diff --git a/Dockerfile b/Dockerfile index 467aeb9..ed2aa85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,25 @@ -FROM golang:alpine AS builder +FROM node:alpine AS frontend_builder WORKDIR /app -COPY . . -RUN go build -o main . +COPY package.json package-lock.json ./ +RUN npm ci +COPY src ./src +COPY public ./public +COPY tsconfig.json ./ +COPY index.html ./ +RUN npm run build +FROM golang:alpine AS server_builder +WORKDIR /app +COPY go.mod ./ +RUN go mod download +COPY main.go ./ +COPY --from=frontend_builder /app/dist ./dist +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main FROM alpine:latest WORKDIR /app -COPY --from=builder /app/main /app/main -COPY --from=builder /app/dist /app/dist +RUN apk add --no-cache ca-certificates +COPY --from=server_builder /app/main ./main +COPY --from=server_builder /app/dist ./dist EXPOSE 8181 -CMD ["/app/main"] +CMD ["./main"] diff --git a/dist/assets/index--TwMq_B1.js b/dist/assets/index--TwMq_B1.js new file mode 100644 index 0000000..45bf845 --- /dev/null +++ b/dist/assets/index--TwMq_B1.js @@ -0,0 +1,68 @@ +(function(){const ut=document.createElement("link").relList;if(ut&&ut.supports&&ut.supports("modulepreload"))return;for(const at of document.querySelectorAll('link[rel="modulepreload"]'))ht(at);new MutationObserver(at=>{for(const mt of at)if(mt.type==="childList")for(const p of mt.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&ht(p)}).observe(document,{childList:!0,subtree:!0});function ot(at){const mt={};return at.integrity&&(mt.integrity=at.integrity),at.referrerPolicy&&(mt.referrerPolicy=at.referrerPolicy),at.crossOrigin==="use-credentials"?mt.credentials="include":at.crossOrigin==="anonymous"?mt.credentials="omit":mt.credentials="same-origin",mt}function ht(at){if(at.ep)return;at.ep=!0;const mt=ot(at);fetch(at.href,mt)}})();function Mt(gt){return gt&>.__esModule&&Object.prototype.hasOwnProperty.call(gt,"default")?gt.default:gt}var Pt={exports:{}},Rt=Pt.exports,At;function Ft(){return At||(At=1,(function(gt,ut){(function(ht,at){gt.exports=at()})(Rt,()=>(()=>{var ot={50792:(p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,o){this.fn=e,this.context=s,this.once=o||!1}function h(e,s,o,i,a){if(typeof o!="function")throw new TypeError("The listener must be a function");var l=new c(o,i||e,a),f=t?t+s:s;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],l]:e._events[f].push(l):(e._events[f]=l,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],o,i;if(this._eventsCount===0)return s;for(i in o=this._events)S.call(o,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(o)):s},n.prototype.listeners=function(s){var o=t?t+s:s,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,l=i.length,f=new Array(l);a{var d=t(38829),c=function(h,r,n,e){for(var s=h[0],o=1;o{var d=t(66979),c=function(h,r,n,e,s){return d(h,"angle",r,n,e,s)};p.exports=c}),60757:(p=>{var S=function(t,d,c){for(var h=0;h{var S=function(t,d,c){c===void 0&&(c=0);for(var h=c;h{var S=function(t,d,c){c===void 0&&(c=0);for(var h=t.length-1;h>=c;h--){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S}),94420:((p,S,t)=>{var d=t(11879),c=t(60461),h=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(o,i){i===void 0&&(i={});var a=i.hasOwnProperty("width"),l=i.hasOwnProperty("height"),f=h(i,"width",-1),u=h(i,"height",-1),v=h(i,"cellWidth",1),m=h(i,"cellHeight",v),x=h(i,"position",c.TOP_LEFT),g=h(i,"x",0),y=h(i,"y",0),T=0,C=0,E=f*v,M=u*m;e.setPosition(g,y),e.setSize(v,m);for(var P=0;P{var d=t(66979),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c}),67285:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c}),9074:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c}),75222:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c}),22983:(p=>{var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.x,s=d.y,o=d.radius,i=0;i{var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.width/2,s=d.height/2,o=0;o{var d=t(15258),c=t(26708),h=function(r,n,e){var s;e?s=c(n,e,r.length):s=d(n,r.length);for(var o=0;o{var d=t(14649),c=t(86003),h=t(49498),r=function(n,e,s){s===void 0&&(s=0);var o=d(e,!1,n.length);s>0?c(o,s):s<0&&h(o,Math.abs(s));for(var i=0;i{var d=t(84993),c=function(h,r,n){var e=d({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),s=d({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),o=d({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),s.pop(),o.pop(),e=e.concat(s,o);for(var i=e.length/h.length,a=0,l=0;l{var S=function(t,d,c){for(var h=0;h{var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]+=c+s*h,s++;return t};p.exports=S}),43967:(p=>{var S=function(t,d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,o=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]=c+s*h,s++;return t};p.exports=S}),88926:((p,S,t)=>{var d=t(28176),c=function(h,r){for(var n=0;n{var d=t(24820),c=function(h,r){for(var n=0;n{var d=t(65822),c=function(h,r){for(var n=0;n{var d=t(26597),c=function(h,r){for(var n=0;n{var d=t(90260),c=function(h,r){for(var n=0;n{var d=t(66979),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c}),91051:((p,S,t)=>{var d=t(1163),c=t(20339),h=function(r,n,e){for(var s=n.x,o=n.y,i=0;i{var d=t(1163),c=function(h,r,n,e){var s=r.x,o=r.y;if(e===0)return h;for(var i=0;i{var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c}),94868:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c}),95532:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c}),8689:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c}),2645:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e){return d(h,"blendMode",r,0,n,e)};p.exports=c}),32372:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"depth",r,n,e,s)};p.exports=c}),85373:(p=>{var S=function(t,d,c){for(var h=0;h{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"originX",r,e,o,i),d(h,"originY",n,s,o,i),h.forEach(function(a){a.updateDisplayOrigin()}),h};p.exports=c}),79939:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"rotation",r,n,e,s)};p.exports=c}),2699:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scaleX",r,e,o,i),d(h,"scaleY",n,s,o,i)};p.exports=c}),98739:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleX",r,n,e,s)};p.exports=c}),98476:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scaleY",r,n,e,s)};p.exports=c}),6207:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"scrollFactorX",r,e,o,i),d(h,"scrollFactorY",n,s,o,i)};p.exports=c}),6607:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorX",r,n,e,s)};p.exports=c}),72248:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"scrollFactorY",r,n,e,s)};p.exports=c}),14036:(p=>{var S=function(t,d,c,h,r){for(var n=0;n{var d=t(43967),c=function(h,r,n,e){return d(h,"visible",r,0,n,e)};p.exports=c}),77597:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c}),83194:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c}),67678:((p,S,t)=>{var d=t(43967),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c}),35850:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=new d);var o,i,a=h.length;if(a===1)o=h[0].x,i=h[0].y,h[0].x=r,h[0].y=n;else{var l=1,f=0;e===0&&(f=a-1,l=a-2),o=h[f].x,i=h[f].y,h[f].x=r,h[f].y=n;for(var u=0;u=a||l===-1)){var v=h[l],m=v.x,x=v.y;v.x=o,v.y=i,o=m,i=x,e===0?l--:l++}}return s.x=o,s.y=i,s};p.exports=c}),8628:((p,S,t)=>{var d=t(33680),c=function(h){return d(h)};p.exports=c}),21837:((p,S,t)=>{var d=t(7602),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i{var d=t(54261),c=function(h,r,n,e,s){s===void 0&&(s=!1);var o=Math.abs(e-n)/h.length,i;if(s)for(i=0;i{var S=function(t,d,c,h,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][d]+=(h+c)/2:t[0][d]=(h+c)/2,t;var n=Math.abs(h-c)/(t.length-1),e;if(r)for(e=0;e{var S=function(t){for(var d=0;d{var d=t(15994),c=function(h,r,n){n===void 0&&(n=0);for(var e=0;e{p.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:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(74943),r=t(81957),n=t(41138),e=t(35154),s=t(90126),o=new c({initialize:function(a,l,f){this.manager=a,this.key=l,this.type="frame",this.frames=this.getFrames(a.textureManager,e(f,"frames",[]),e(f,"defaultTextureKey",null),e(f,"sortFrames",!0)),this.frameRate=e(f,"frameRate",null),this.duration=e(f,"duration",null),this.msPerFrame,this.skipMissedFrames=e(f,"skipMissedFrames",!0),this.delay=e(f,"delay",0),this.repeat=e(f,"repeat",0),this.repeatDelay=e(f,"repeatDelay",0),this.yoyo=e(f,"yoyo",!1),this.showBeforeDelay=e(f,"showBeforeDelay",!1),this.showOnStart=e(f,"showOnStart",!1),this.hideOnComplete=e(f,"hideOnComplete",!1),this.randomFrame=e(f,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(h.PAUSE_ALL,this.pause,this),this.manager.on(h.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,a,l,f){l===null&&f===null?(i.frameRate=24,i.duration=24/a*1e3):l&&f===null?(i.duration=l,i.frameRate=a/(l/1e3)):(i.frameRate=f,i.duration=a/f*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,a){var l=this.getFrames(this.manager.textureManager,a);if(l.length>0){if(i===0)this.frames=l.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(l);else{var f=this.frames.slice(0,i),u=this.frames.slice(i);this.frames=f.concat(l,u)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i0){m.isLast=!0,m.nextFrame=u[0],u[0].prevFrame=m;var R=1/(u.length-1);for(g=0;g0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,a.nextFrame)},handleYoyoFrame:function(i,a){if(a||(a=!1),i.inReverse===!a&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=a),this.repeatAnimation(i);return}if(i.inReverse!==a&&i.repeatCounter===0){i.complete();return}i.forward=a;var l=a?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,l)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var a=i.currentFrame;a.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,a.prevFrame)},updateAndGetNextTick:function(i,a){i.setCurrentFrame(a),this.getNextTick(i)},removeFrame:function(i){var a=this.frames.indexOf(i);return a!==-1&&this.removeFrameAt(a),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(a){i.frames.push(a.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,a=1/(i-1),l,f=0;f1?(l.isLast=!0,l.prevFrame=this.frames[i-2],l.nextFrame=this.frames[0]):i>1&&(l.prevFrame=this.frames[f-1],l.nextFrame=this.frames[f+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(h.PAUSE_ALL,this.pause,this),this.manager.off(h.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var i=0;i{var d=t(83419),c=new d({initialize:function(r,n,e,s,o){o===void 0&&(o=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=o},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=c}),60848:((p,S,t)=>{var d=t(42099),c=t(83419),h=t(90330),r=t(50792),n=t(74943),e=t(8443),s=t(95540),o=t(35154),i=t(36383),a=t(20283),l=t(41836),f=new c({Extends:r,initialize:function(v){r.call(this),this.game=v,this.textureManager=null,this.globalTimeScale=1,this.anims=new h,this.mixes=new h,this.paused=!1,this.name="AnimationManager",v.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(u,v,m){var x=this.anims,g=this.mixes,y=typeof u=="string"?u:u.key,T=typeof v=="string"?v:v.key;if(x.has(y)&&x.has(T)){var C=g.get(y);C||(C={}),C[T]=m,g.set(y,C)}return this},removeMix:function(u,v){var m=this.mixes,x=typeof u=="string"?u:u.key,g=m.get(x);if(g)if(v){var y=typeof v=="string"?v:v.key;g.hasOwnProperty(y)&&delete g[y]}else v||m.delete(x);return this},getMix:function(u,v){var m=this.mixes,x=typeof u=="string"?u:u.key,g=typeof v=="string"?v:v.key,y=m.get(x);return y&&y.hasOwnProperty(g)?y[g]:0},add:function(u,v){return this.anims.has(u)?(console.warn("Animation key exists: "+u),this):(v.key=u,this.anims.set(u,v),this.emit(n.ADD_ANIMATION,u,v),this)},exists:function(u){return this.anims.has(u)},createFromAseprite:function(u,v,m){var x=[],g=this.game.cache.json.get(u);if(!g)return console.warn("No Aseprite data found for: "+u),x;var y=this,T=o(g,"meta",null),C=o(g,"frames",null);if(T&&C){var E=o(T,"frameTags",[]);E.forEach(function(M){var P=[],A=s(M,"name",null),R=s(M,"from",0),F=s(M,"to",0),w=s(M,"direction","forward");if(A&&(!v||v&&v.indexOf(A)>-1)){for(var I=0,U=R;U<=F;U++){var N=U.toString(),D=C[N];if(D){var B=s(D,"duration",i.MAX_SAFE_INTEGER);P.push({key:u,frame:N,duration:B}),I+=B}}w==="reverse"&&(P=P.reverse());var L={key:A,frames:P,duration:I,yoyo:w==="pingpong"},G;m?m.anims&&(G=m.anims.create(L)):G=y.create(L),G&&x.push(G)}})}return x},create:function(u){var v=u.key,m=!1;return v&&(m=this.get(v),m?console.warn("AnimationManager key already exists: "+v):(m=new d(this,v,u),this.anims.set(v,m),this.emit(n.ADD_ANIMATION,v,m))),m},fromJSON:function(u,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof u=="string"&&(u=JSON.parse(u));var m=[];if(u.hasOwnProperty("anims")&&Array.isArray(u.anims)){for(var x=0;x{var d=t(42099),c=t(30976),h=t(83419),r=t(90330),n=t(74943),e=t(95540),s=new h({initialize:function(i){this.parent=i,this.animationManager=i.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(o){var i=this.parent;if(o===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(o)||(o=[o]);for(var a=0;af&&(m=0),this.randomFrame&&(m=c(0,f-1));var x=l.frames[m];m===0&&!this.forward&&(x=l.getLastFrame()),this.currentFrame=x}return this.parent},pause:function(o){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),o!==void 0&&this.setCurrentFrame(o),this.parent},resume:function(o){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),o!==void 0&&this.setCurrentFrame(o),this.parent},playAfterDelay:function(o,i){if(!this.isPlaying)this.delayCounter=i,this.play(o,!0);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.nextAnim=o,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(o,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(o);else{var a=this.nextAnim,l=this.nextAnimsQueue;a&&l.unshift(a),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=o,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(o,i){i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent,f=typeof o=="string"?o:o.key;if(i&&this.isPlaying&&a.key===f)return l;if(a&&this.isPlaying){var u=this.animationManager.getMix(a.key,o);if(u>0)return this.playAfterDelay(o,u)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o)},playReverse:function(o,i){i===void 0&&(i=!1);var a=typeof o=="string"?o:o.key;return i&&this.isPlaying&&this.currentAnim.key===a?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(o))},startAnimation:function(o){this.load(o);var i=this.currentAnim,a=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),a},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(o,i){var a=this.currentAnim;if(a){var l=this.currentFrame,f=this.parent,u=l.textureFrame;f.emit(o,a,l,f,u),i&&f.emit(i+a.key,a,l,f,u)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var o=this.currentFrame;if(!o)return 0;var i=o.progress;return this.inReverse&&(i*=-1),i},setProgress:function(o){return this.forward||(o=1-o),this.setCurrentFrame(this.currentAnim.getFrameByProgress(o)),this.parent},setRepeat:function(o){return this.repeatCounter=o===-1?Number.MAX_VALUE:o,this.parent},globalRemove:function(o,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var a=this.currentAnim,l=this.parent;return a?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),a.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!o,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(a.frames[0]),this.parent):l},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(o)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var o=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(o)}return this.parent},stopAfterDelay:function(o){return this._pendingStop=1,this._pendingStopValue=o,this.parent},stopAfterRepeat:function(o){return o===void 0&&(o=1),this.repeatCounter!==-1&&o>this.repeatCounter&&(o=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=o,this.parent},stopOnFrame:function(o){return this._pendingStop=3,this._pendingStopValue=o,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(o,i){var a=this.currentAnim;if(!(!this.isPlaying||!a||a.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?a.nextFrame(this):a.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var l=0;do this.forward?a.nextFrame(this):a.previousFrame(this),l++;while(this.isPlaying&&this.accumulator>this.nextTick&&l<60)}}},setCurrentFrame:function(o){var i=this.parent;return this.currentFrame=o,i.texture=o.frame.texture,i.frame=o.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),o.setAlpha&&(i.alpha=o.alpha),i.setSizeToFrame(),i._originComponent&&(o.frame.customPivot?i.setOrigin(o.frame.pivotX,o.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===o&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(o){return this.anims?this.anims.get(o):null},exists:function(o){return this.anims?this.anims.has(o):!1},create:function(o){var i=o.key,a=!1;return i&&(a=this.get(i),a?console.warn("Animation key already exists: "+i):(a=new d(this,i,o),this.anims||(this.anims=new r),this.anims.set(i,a))),a},createFromAseprite:function(o,i){return this.animationManager.createFromAseprite(o,i,this.parent)},generateFrameNames:function(o,i){return this.animationManager.generateFrameNames(o,i)},generateFrameNumbers:function(o,i){return this.animationManager.generateFrameNumbers(o,i)},remove:function(o){var i=this.get(o);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(o)),i},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}}});p.exports=s}),57090:(p=>{p.exports="add"}),25312:(p=>{p.exports="animationcomplete"}),89580:(p=>{p.exports="animationcomplete-"}),52860:(p=>{p.exports="animationrepeat"}),63850:(p=>{p.exports="animationrestart"}),99085:(p=>{p.exports="animationstart"}),28087:(p=>{p.exports="animationstop"}),1794:(p=>{p.exports="animationupdate"}),52562:(p=>{p.exports="pauseall"}),57953:(p=>{p.exports="remove"}),68339:(p=>{p.exports="resumeall"}),74943:((p,S,t)=>{p.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:((p,S,t)=>{p.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}}),2161:((p,S,t)=>{var d=t(83419),c=t(90330),h=t(50792),r=t(24736),n=new d({initialize:function(){this.entries=new c,this.events=new h},add:function(e,s){return this.entries.set(e,s),this.events.emit(r.ADD,this,e,s),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 s=this.get(e);return s&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,s.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=n}),24047:((p,S,t)=>{var d=t(2161),c=t(83419),h=t(8443),r=new c({initialize:function(e){this.game=e,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(h.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new d),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{p.exports="add"}),59261:(p=>{p.exports="remove"}),24736:((p,S,t)=>{p.exports={ADD:t(51464),REMOVE:t(59261)}}),83388:((p,S,t)=>{p.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}}),71911:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(39506),r=t(50792),n=t(19715),e=t(87841),s=t(61340),o=t(80333),i=t(26099),a=new d({Extends:r,Mixins:[c.AlphaSingle,c.Visible],initialize:function(f,u,v,m){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=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=f,this._y=u,this._width=v,this._height=m,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new s,this.transparent=!0,this.backgroundColor=o("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(v/2,m/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(l){this.renderList.push(l)},setOrigin:function(l,f){return l===void 0&&(l=.5),f===void 0&&(f=l),this.originX=l,this.originY=f,this},getScroll:function(l,f,u){u===void 0&&(u=new i);var v=this.width*.5,m=this.height*.5;return u.x=l-v,u.y=f-m,this.useBounds&&(u.x=this.clampX(u.x),u.y=this.clampY(u.y)),u},centerOnX:function(l){var f=this.width*.5;return this.midPoint.x=l,this.scrollX=l-f,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(l){var f=this.height*.5;return this.midPoint.y=l,this.scrollY=l-f,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(l,f){return this.centerOnX(l),this.centerOnY(f),this},centerToBounds:function(){if(this.useBounds){var l=this._bounds,f=this.width*.5,u=this.height*.5;this.midPoint.set(l.centerX,l.centerY),this.scrollX=l.centerX-f,this.scrollY=l.centerY-u}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(l){if(this.disableCull)return l;var f=this.matrix.matrix,u=f[0],v=f[1],m=f[2],x=f[3],g=u*x-v*m;if(!g)return l;var y=f[4],T=f[5],C=this.scrollX,E=this.scrollY,M=this.width,P=this.height,A=this.y,R=A+P,F=this.x,w=F+M,I=this.culledObjects,U=l.length;g=1/g,I.length=0;for(var N=0;NF&&XA&&zm&&(l=m),l},clampY:function(l){var f=this._bounds,u=this.displayHeight,v=f.y+(u-this.height)/2,m=Math.max(v,v+f.height-u);return lm&&(l=m),l},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(l){return l===void 0&&(l=0),this.rotation=h(l),this},setBackgroundColor:function(l){return l===void 0&&(l="rgba(0,0,0,0)"),this.backgroundColor=o(l),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(l,f,u,v,m){return m===void 0&&(m=!1),this._bounds.setTo(l,f,u,v),this.dirty=!0,this.useBounds=!0,m?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(l){l===void 0&&(l=new e);var f=this._bounds;return l.setTo(f.x,f.y,f.width,f.height),l},setName:function(l){return l===void 0&&(l=""),this.name=l,this},setPosition:function(l,f){return f===void 0&&(f=l),this.x=l,this.y=f,this},setRotation:function(l){return l===void 0&&(l=0),this.rotation=l,this},setRoundPixels:function(l){return this.roundPixels=l,this},setScene:function(l,f){f===void 0&&(f=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=l,this.isSceneCamera=f;var u=l.sys;return this.sceneManager=u.game.scene,this.scaleManager=u.scale,this.cameraManager=u.cameras,this.updateSystem(),this},setScroll:function(l,f){return f===void 0&&(f=l),this.scrollX=l,this.scrollY=f,this},setSize:function(l,f){return f===void 0&&(f=l),this.width=l,this.height=f,this},setViewport:function(l,f,u,v){return this.x=l,this.y=f,this.width=u,this.height=v,this},setZoom:function(l,f){return l===void 0&&(l=1),f===void 0&&(f=l),l===0&&(l=.001),f===0&&(f=.001),this.zoomX=l,this.zoomY=f,this},setMask:function(l,f){return f===void 0&&(f=!0),this.mask=l,this._maskCamera=f?this.cameraManager.default:this,this},clearMask:function(l){return l===void 0&&(l=!1),l&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var l={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&&(l.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),l},update:function(){},setIsSceneCamera:function(l){return this.isSceneCamera=l,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var l=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,f=this.sceneManager;l&&!this._customViewport?f.customViewports++:!l&&this._customViewport&&f.customViewports--,this.dirty=!0,this._customViewport=l}},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(l){this._x=l,this.updateSystem()}},y:{get:function(){return this._y},set:function(l){this._y=l,this.updateSystem()}},width:{get:function(){return this._width},set:function(l){this._width=l,this.updateSystem()}},height:{get:function(){return this._height},set:function(l){this._height=l,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(l){l!==this._scrollX&&(this._scrollX=l,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(l){l!==this._scrollY&&(this._scrollY=l,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(l){this._zoomX=l,this._zoomY=l,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(l){this._zoomX=l,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(l){this._zoomY=l,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(l){this._rotation=l,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}}});p.exports=a}),38058:((p,S,t)=>{var d=t(71911),c=t(67502),h=t(45319),r=t(83419),n=t(31401),e=t(20052),s=t(19715),o=t(28915),i=t(87841),a=t(26099),l=new r({Extends:d,Mixins:[n.PostPipeline],initialize:function(u,v,m,x){d.call(this,u,v,m,x),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new a(1,1),this.followOffset=new a,this.deadzone=null,this._follow=null},setDeadzone:function(f,u){if(f===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=f,this.deadzone.height=u):this.deadzone=new i(0,0,f,u),this._follow){var v=this.width/2,m=this.height/2,x=this._follow.x-this.followOffset.x,g=this._follow.y-this.followOffset.y;this.midPoint.set(x,g),this.scrollX=x-v,this.scrollY=g-m}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(f,u,v,m,x,g){return this.fadeEffect.start(!1,f,u,v,m,!0,x,g)},fadeOut:function(f,u,v,m,x,g){return this.fadeEffect.start(!0,f,u,v,m,!0,x,g)},fadeFrom:function(f,u,v,m,x,g,y){return this.fadeEffect.start(!1,f,u,v,m,x,g,y)},fade:function(f,u,v,m,x,g,y){return this.fadeEffect.start(!0,f,u,v,m,x,g,y)},flash:function(f,u,v,m,x,g,y){return this.flashEffect.start(f,u,v,m,x,g,y)},shake:function(f,u,v,m,x){return this.shakeEffect.start(f,u,v,m,x)},pan:function(f,u,v,m,x,g,y){return this.panEffect.start(f,u,v,m,x,g,y)},rotateTo:function(f,u,v,m,x,g,y){return this.rotateToEffect.start(f,u,v,m,x,g,y)},zoomTo:function(f,u,v,m,x,g){return this.zoomEffect.start(f,u,v,m,x,g)},preRender:function(){this.renderList.length=0;var f=this.width,u=this.height,v=f*.5,m=u*.5,x=this.zoomX,g=this.zoomY,y=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(x)&&Number.isInteger(g);var T=f*this.originX,C=u*this.originY,E=this._follow,M=this.deadzone,P=this.scrollX,A=this.scrollY;M&&c(M,this.midPoint.x,this.midPoint.y);var R=!1;if(E&&!this.panEffect.isRunning){var F=this.lerp,w=E.x-this.followOffset.x,I=E.y-this.followOffset.y;M?(wM.right&&(P=o(P,P+(w-M.right),F.x)),IM.bottom&&(A=o(A,A+(I-M.bottom),F.y))):(P=o(P,w-T,F.x),A=o(A,I-C,F.y)),R=!0}this.roundPixels&&(P=Math.floor(P),A=Math.floor(A)),this.useBounds&&(P=this.clampX(P),A=this.clampY(A)),this.scrollX=P,this.scrollY=A;var U=P+v,N=A+m;this.midPoint.set(U,N);var D=Math.floor(f/x+.5),B=Math.floor(u/g+.5),L=Math.floor(U-D/2+.5),G=Math.floor(N-B/2+.5);this.worldView.setTo(L,G,D,B),y.applyITRS(Math.floor(this.x+T+.5),Math.floor(this.y+C+.5),this.rotation,x,g),y.translate(-T,-C),this.shakeEffect.preRender(),R&&this.emit(s.FOLLOW_UPDATE,this,E)},setLerp:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),this.lerp.set(f,u),this},setFollowOffset:function(f,u){return f===void 0&&(f=0),u===void 0&&(u=0),this.followOffset.set(f,u),this},startFollow:function(f,u,v,m,x,g){u===void 0&&(u=!1),v===void 0&&(v=1),m===void 0&&(m=v),x===void 0&&(x=0),g===void 0&&(g=x),this._follow=f,this.roundPixels=u,v=h(v,0,1),m=h(m,0,1),this.lerp.set(v,m),this.followOffset.set(x,g);var y=this.width/2,T=this.height/2,C=f.x-x,E=f.y-g;return this.midPoint.set(C,E),this.scrollX=C-y,this.scrollY=E-T,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(f,u){this.visible&&(this.rotateToEffect.update(f,u),this.panEffect.update(f,u),this.zoomEffect.update(f,u),this.shakeEffect.update(f,u),this.flashEffect.update(f,u),this.fadeEffect.update(f,u))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=l}),32743:((p,S,t)=>{var d=t(38058),c=t(83419),h=t(95540),r=t(37277),n=t(37303),e=t(97480),s=t(44594),o=new c({initialize:function(a){this.scene=a,this.systems=a.sys,this.roundPixels=a.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var a=this.systems.events;a.on(s.UPDATE,this.update,this),a.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),f===void 0&&(f=this.scene.sys.scale.height),u===void 0&&(u=!1),v===void 0&&(v="");var m=new d(i,a,l,f);return m.setName(v),m.setScene(this.scene),m.setRoundPixels(this.roundPixels),m.id=this.getNextID(),this.cameras.push(m),u&&(this.main=m),m},addExisting:function(i,a){a===void 0&&(a=!1);var l=this.cameras.indexOf(i);return l===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),a&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,a=1,l=0;l<32;l++){for(var f=!1,u=0;u0){v.preRender();var m=this.getVisibleChildren(a.getChildren(),v);i.render(l,m,v)}}},getVisibleChildren:function(i,a){return i.filter(function(l){return l.willRender(a)})},resetAll:function(){for(var i=0;i{var d=t(45319),c=t(83419),h=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,s,o,i,a,l,f){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=s,this.green=o,this.blue=i,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f;var u=n?h.FADE_OUT_START:h.FADE_IN_START;return this.camera.emit(u,this.camera,this,e,s,o,i),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var d=t(45319),c=t(83419),h=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,s,o,i,a,l){return n===void 0&&(n=250),e===void 0&&(e=255),s===void 0&&(s=255),o===void 0&&(o=255),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=s,this.blue=o,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(h.FLASH_START,this.camera,this,n,e,s,o),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=t(26099),e=new c({initialize:function(o){this.camera=o,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(s,o,i,a,l,f,u){i===void 0&&(i=1e3),a===void 0&&(a=h.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene);var v=this.camera;return!l&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(v.scrollX,v.scrollY),this.destination.set(s,o),v.getScroll(s,o,this.current),typeof a=="string"&&h.hasOwnProperty(a)?this.ease=h[a]:typeof a=="function"&&(this.ease=a),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.camera.emit(r.PAN_START,this.camera,this,i,s,o)),v},update:function(s,o){if(this.isRunning){this._elapsed+=o;var i=d(this._elapsed/this.duration,0,1);this.progress=i;var a=this.camera;if(this._elapsed{var d=t(45319),c=t(83419),h=t(19715),r=t(62640),n=new c({initialize:function(s){this.camera=s,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,s,o,i,a,l,f){o===void 0&&(o=1e3),i===void 0&&(i=r.Linear),a===void 0&&(a=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var u=e;e<0?(u=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;u=u-Math.floor(u/v)*v;var m=this.camera;if(!a&&this.isRunning)return m;if(this.isRunning=!0,this.duration=o,this.progress=0,this.source=m.rotation,this.destination=u,typeof i=="string"&&r.hasOwnProperty(i)?this.ease=r[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.shortestPath){var x=0,g=0;this.destination>this.source?x=Math.abs(this.destination-this.source):x=Math.abs(this.destination+v)-this.source,this.source>this.destination?g=Math.abs(this.source-this.destination):g=Math.abs(this.source+v)-this.destination,xg&&(this.clockwise=!1)}return this.camera.emit(h.ROTATE_START,this.camera,this,o,u),m},update:function(e,s){if(this.isRunning){this._elapsed+=s;var o=d(this._elapsed/this.duration,0,1);this.progress=o;var i=this.camera;if(this._elapsed=v?l=Math.abs(u-v):l=Math.abs(u+f)-v;var m=0;this.clockwise?m=i.rotation+l*a:m=i.rotation-l*a,i.rotation=m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,m)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,o,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=n}),30330:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(19715),r=t(26099),n=new c({initialize:function(s){this.camera=s,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,s,o,i,a){return e===void 0&&(e=100),s===void 0&&(s=.05),o===void 0&&(o=!1),i===void 0&&(i=null),a===void 0&&(a=this.camera.scene),!o&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof s=="number"?this.intensity.set(s):this.intensity.set(s.x,s.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=a,this.camera.emit(h.SHAKE_START,this.camera,this,e,s),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,s){if(this.isRunning)if(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var d=t(45319),c=t(83419),h=t(62640),r=t(19715),n=new c({initialize:function(s){this.camera=s,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,s,o,i,a,l){s===void 0&&(s=1e3),o===void 0&&(o=h.Linear),i===void 0&&(i=!1),a===void 0&&(a=null),l===void 0&&(l=this.camera.scene);var f=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=f.zoom,this.destination=e,typeof o=="string"&&h.hasOwnProperty(o)?this.ease=h[o]:typeof o=="function"&&(this.ease=o),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=l,this.camera.emit(r.ZOOM_START,this.camera,this,s,e)),f},update:function(e,s){this.isRunning&&(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._elapsed{p.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}}),16438:(p=>{p.exports="cameradestroy"}),32726:(p=>{p.exports="camerafadeincomplete"}),87807:(p=>{p.exports="camerafadeinstart"}),45917:(p=>{p.exports="camerafadeoutcomplete"}),95666:(p=>{p.exports="camerafadeoutstart"}),47056:(p=>{p.exports="cameraflashcomplete"}),91261:(p=>{p.exports="cameraflashstart"}),45047:(p=>{p.exports="followupdate"}),81927:(p=>{p.exports="camerapancomplete"}),74264:(p=>{p.exports="camerapanstart"}),54419:(p=>{p.exports="postrender"}),79330:(p=>{p.exports="prerender"}),93183:(p=>{p.exports="camerarotatecomplete"}),80112:(p=>{p.exports="camerarotatestart"}),62252:(p=>{p.exports="camerashakecomplete"}),86017:(p=>{p.exports="camerashakestart"}),539:(p=>{p.exports="camerazoomcomplete"}),51892:(p=>{p.exports="camerazoomstart"}),19715:((p,S,t)=>{p.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:((p,S,t)=>{p.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}}),63091:((p,S,t)=>{var d=t(83419),c=t(35154),h=new d({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}});p.exports=h}),58818:((p,S,t)=>{var d=t(83419),c=t(35154),h=new d({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 s=c(n,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var o=c(n,"maxSpeed",null);typeof o=="number"?(this.maxSpeedX=o,this.maxSpeedY=o):(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}});p.exports=h}),38865:((p,S,t)=>{p.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}}),26638:((p,S,t)=>{p.exports={Controls:t(38865),Scene2D:t(87969)}}),8054:((p,S,t)=>{var d={VERSION:"3.90.0",LOG_VERSION:"v390",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};p.exports=d}),69547:((p,S,t)=>{var d=t(83419),c=t(8054),h=t(42363),r=t(82264),n=t(95540),e=t(35154),s=t(41212),o=t(29747),i=t(75508),a=t(36060),l=t(80333),f=new d({initialize:function(v){v===void 0&&(v={});var m=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff",g=e(v,"scale",null);this.width=e(g,"width",1024,v),this.height=e(g,"height",768,v),this.zoom=e(g,"zoom",1,v),this.parent=e(g,"parent",void 0,v),this.scaleMode=e(g,g?"mode":"scaleMode",0,v),this.expandParent=e(g,"expandParent",!0,v),this.autoRound=e(g,"autoRound",!1,v),this.autoCenter=e(g,"autoCenter",0,v),this.resizeInterval=e(g,"resizeInterval",500,v),this.fullscreenTarget=e(g,"fullscreenTarget",null,v),this.minWidth=e(g,"min.width",0,v),this.maxWidth=e(g,"max.width",0,v),this.minHeight=e(g,"min.height",0,v),this.maxHeight=e(g,"max.height",0,v),this.snapWidth=e(g,"snap.width",0,v),this.snapHeight=e(g,"snap.height",0,v),this.renderType=e(v,"type",c.AUTO),this.canvas=e(v,"canvas",null),this.context=e(v,"context",null),this.canvasStyle=e(v,"canvasStyle",null),this.customEnvironment=e(v,"customEnvironment",!1),this.sceneConfig=e(v,"scene",null),this.seed=e(v,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(v,"title",""),this.gameURL=e(v,"url","https://phaser.io/"+c.LOG_VERSION),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(v,"dom.createContainer",!1),this.domPointerEvents=e(v,"dom.pointerEvents","none"),this.inputKeyboard=e(v,"input.keyboard",!0),this.inputKeyboardEventTarget=e(v,"input.keyboard.target",window),this.inputKeyboardCapture=e(v,"input.keyboard.capture",[]),this.inputMouse=e(v,"input.mouse",!0),this.inputMouseEventTarget=e(v,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(v,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(v,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(v,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(v,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(v,"input.touch",r.input.touch),this.inputTouchEventTarget=e(v,"input.touch.target",null),this.inputTouchCapture=e(v,"input.touch.capture",!0),this.inputActivePointers=e(v,"input.activePointers",1),this.inputSmoothFactor=e(v,"input.smoothFactor",0),this.inputWindowEvents=e(v,"input.windowEvents",!0),this.inputGamepad=e(v,"input.gamepad",!1),this.inputGamepadEventTarget=e(v,"input.gamepad.target",window),this.disableContextMenu=e(v,"disableContextMenu",!1),this.audio=e(v,"audio",{}),this.hideBanner=e(v,"banner",null)===!1,this.hidePhaser=e(v,"banner.hidePhaser",!1),this.bannerTextColor=e(v,"banner.text",x),this.bannerBackgroundColor=e(v,"banner.background",m),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(v,"fps",null),this.disablePreFX=e(v,"disablePreFX",!1),this.disablePostFX=e(v,"disablePostFX",!1);var y=e(v,"render",null);this.pipeline=e(y,"pipeline",null,v),this.autoMobilePipeline=e(y,"autoMobilePipeline",!0,v),this.defaultPipeline=e(y,"defaultPipeline",a.MULTI_PIPELINE,v),this.antialias=e(y,"antialias",!0,v),this.antialiasGL=e(y,"antialiasGL",!0,v),this.mipmapFilter=e(y,"mipmapFilter","",v),this.desynchronized=e(y,"desynchronized",!1,v),this.roundPixels=e(y,"roundPixels",!1,v),this.pixelArt=e(y,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(y,"transparent",!1,v),this.clearBeforeRender=e(y,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(y,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(y,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(y,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(y,"powerPreference","default",v),this.batchSize=e(y,"batchSize",4096,v),this.maxTextures=e(y,"maxTextures",-1,v),this.maxLights=e(y,"maxLights",10,v);var T=e(v,"backgroundColor",0);this.backgroundColor=l(T),this.transparent&&(this.backgroundColor=l(0),this.backgroundColor.alpha=0),this.preBoot=e(v,"callbacks.preBoot",o),this.postBoot=e(v,"callbacks.postBoot",o),this.physics=e(v,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(v,"loader.baseURL",""),this.loaderPath=e(v,"loader.path",""),this.loaderMaxParallelDownloads=e(v,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(v,"loader.crossOrigin",void 0),this.loaderResponseType=e(v,"loader.responseType",""),this.loaderAsync=e(v,"loader.async",!0),this.loaderUser=e(v,"loader.user",""),this.loaderPassword=e(v,"loader.password",""),this.loaderTimeout=e(v,"loader.timeout",0),this.loaderMaxRetries=e(v,"loader.maxRetries",2),this.loaderWithCredentials=e(v,"loader.withCredentials",!1),this.loaderImageLoadType=e(v,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(v,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(v,"fx.glow.quality",.1),this.glowFXDistance=e(v,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var C=e(v,"plugins",null),E=h.DefaultScene;C&&(Array.isArray(C)?this.defaultPlugins=C:s(C)&&(this.installGlobalPlugins=n(C,"global",[]),this.installScenePlugins=n(C,"scene",[]),Array.isArray(C.default)?E=C.default:Array.isArray(C.defaultMerge)&&(E=E.concat(C.defaultMerge)))),this.defaultPlugins=E;var M="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",M+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",M+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(v,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});p.exports=f}),86054:((p,S,t)=>{var d=t(20623),c=t(27919),h=t(8054),r=t(89357),n=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===h.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==h.HEADLESS)if(s.renderType===h.AUTO&&(s.renderType=r.webGL?h.WEBGL:h.CANVAS),s.renderType===h.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===h.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||c.disableSmoothing();var o=e.scale.baseSize,i=o.width,a=o.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=a):e.canvas=c.create(e,i,a,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||d.setCrisp(e.canvas),s.renderType!==h.HEADLESS){var l,f;l=t(68627),f=t(74797),s.renderType===h.WEBGL?e.renderer=new f(e):(e.renderer=new l(e),e.context=e.renderer.gameContext)}};p.exports=n}),96391:((p,S,t)=>{var d=t(8054),c=function(h){var r=h.config;if(!r.hideBanner){var n="WebGL";r.renderType===d.CANVAS?n="Canvas":r.renderType===d.HEADLESS&&(n="Headless");var e=r.audio,s=h.device.audio,o;if(s.webAudio&&!e.disableWebAudio?o="Web Audio":e.noAudio||!s.webAudio&&!s.audioData?o="No Audio":o="HTML5 Audio",h.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var i="",a=[i];if(Array.isArray(r.bannerBackgroundColor)){var l;r.bannerBackgroundColor.forEach(function(u){i=i.concat("%c "),a.push("background: "+u),l=u}),a[a.length-1]="color: "+r.bannerTextColor+"; background: "+l}else i=i.concat("%c "),a.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);a.push("background: transparent"),r.gameTitle&&(i=i.concat(r.gameTitle),r.gameVersion&&(i=i.concat(" v"+r.gameVersion)),r.hidePhaser||(i=i.concat(" / ")));var f="";r.hidePhaser||(i=i.concat("Phaser v"+d.VERSION+f+" ("+n+" | "+o+")")),i=i.concat(" %c "+r.gameURL),a[0]=i,console.log.apply(console,a)}}};p.exports=c}),50127:((p,S,t)=>{var d=t(40366),c=t(60848),h=t(24047),r=t(27919),n=t(83419),e=t(69547),s=t(83719),o=t(86054),i=t(45893),a=t(96391),l=t(82264),f=t(57264),u=t(50792),v=t(8443),m=t(7003),x=t(37277),g=t(77332),y=t(76531),T=t(60903),C=t(69442),E=t(17130),M=t(65898),P=t(51085),A=t(14747),R=new n({initialize:function(w){this.config=new e(w),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new u,this.anims=new c(this),this.textures=new E(this),this.cache=new h(this),this.registry=new i(this,new u),this.input=new m(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=l,this.scale=new y(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new M(this,this.config.fps),this.plugins=new g(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,f(this.boot.bind(this))},boot:function(){if(!x.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),o(this),s(this),a(this),d(this.canvas,this.config.parent),this.textures.once(C.READY,this.texturesReady,this),this.events.emit(v.BOOT)},texturesReady:function(){this.events.emit(v.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)),P(this);var F=this.events;F.on(v.HIDDEN,this.onHidden,this),F.on(v.VISIBLE,this.onVisible,this),F.on(v.BLUR,this.onBlur,this),F.on(v.FOCUS,this.onFocus,this)},step:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,F,w),I.emit(v.STEP,F,w),this.scene.update(F,w),I.emit(v.POST_STEP,F,w);var U=this.renderer;U.preRender(),I.emit(v.PRE_RENDER,U,F,w),this.scene.render(U),U.postRender(),I.emit(v.POST_RENDER,U,F,w)}},headlessStep:function(F,w){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var I=this.events;I.emit(v.PRE_STEP,F,w),I.emit(v.STEP,F,w),this.scene.update(F,w),I.emit(v.POST_STEP,F,w),this.scene.isProcessing=!1,I.emit(v.PRE_RENDER,null,F,w),I.emit(v.POST_RENDER,null,F,w)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var F=this.isPaused;this.isPaused=!0,F||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME,this.loop.pauseDuration)},resume:function(){var F=this.isPaused;this.isPaused=!1,F&&this.events.emit(v.RESUME,0)},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(F,w){w===void 0&&(w=!1),this.pendingDestroy=!0,this.removeCanvas=F,this.noReturn=w},runDestroy:function(){this.scene.destroy(),this.events.emit(v.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}});p.exports=R}),65898:((p,S,t)=>{var d=t(83419),c=t(35154),h=t(29747),r=t(43092),n=new d({initialize:function(s,o){this.game=s,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(o,"min",5),this.targetFps=c(o,"target",60),this.fpsLimit=c(o,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=h,this.forceSetTimeOut=c(o,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(o,"deltaHistory",10),this.panicMax=c(o,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(o,"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.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=o[s],e=Math.min(e,this._min)),o[s]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var a=0,l=0;l=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 s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,s),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 s=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+s));var o=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(o,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=s+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}});p.exports=n}),51085:((p,S,t)=>{var d=t(8443),c=function(h){var r,n=h.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(o){document[o+"Hidden"]!==void 0&&(document.hidden=function(){return document[o+"Hidden"]},r=o+"visibilitychange")})}var s=function(o){document.hidden||o.type==="pause"?n.emit(d.HIDDEN):n.emit(d.VISIBLE)};r&&document.addEventListener(r,s,!1),window.onblur=function(){n.emit(d.BLUR)},window.onfocus=function(){n.emit(d.FOCUS)},window.focus&&h.config.autoFocus&&window.focus()};p.exports=c}),97217:(p=>{p.exports="blur"}),47548:(p=>{p.exports="boot"}),19814:(p=>{p.exports="contextlost"}),68446:(p=>{p.exports="destroy"}),41700:(p=>{p.exports="focus"}),25432:(p=>{p.exports="hidden"}),65942:(p=>{p.exports="pause"}),59211:(p=>{p.exports="postrender"}),47789:(p=>{p.exports="poststep"}),39066:(p=>{p.exports="prerender"}),460:(p=>{p.exports="prestep"}),16175:(p=>{p.exports="ready"}),42331:(p=>{p.exports="resume"}),11966:(p=>{p.exports="step"}),32969:(p=>{p.exports="systemready"}),94830:(p=>{p.exports="visible"}),8443:((p,S,t)=>{p.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:((p,S,t)=>{p.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}}),99584:((p,S,t)=>{var d=t(5290),c=t(27919),h=t(35154),r=function(n){var e=h(n,"data",[]),s=h(n,"canvas",null),o=h(n,"palette",d),i=h(n,"pixelWidth",1),a=h(n,"pixelHeight",i),l=h(n,"resizeCanvas",!0),f=h(n,"clearCanvas",!0),u=h(n,"preRender",null),v=h(n,"postRender",null),m=Math.floor(Math.abs(e[0].length*i)),x=Math.floor(Math.abs(e.length*a));s||(s=c.create2D(this,m,x),l=!1,f=!1),l&&(s.width=m,s.height=x);var g=s.getContext("2d",{willReadFrequently:!0});f&&g.clearRect(0,0,m,x),u&&u(s,g);for(var y=0;y{p.exports={GenerateTexture:t(99584),Palettes:t(57763)}}),5290:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:((p,S,t)=>{p.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}}),46728:((p,S,t)=>{var d=t(83419),c=t(36316),h=t(80021),r=t(26099),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,"CubicBezierCurve"),Array.isArray(s)&&(a=new r(s[6],s[7]),i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i,this.p3=a},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2,l=this.p3;return s.set(c(e,o.x,i.x,a.x,l.x),c(e,o.y,i.y,a.y,l.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{var d=t(83419),c=t(19217),h=t(87841),r=t(26099),n=new d({initialize:function(s){this.type=s,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,s){return s===void 0&&(s=32),e.strokePoints(this.getPoints(s))},getBounds:function(e,s){e||(e=new h),s===void 0&&(s=16);var o=this.getLength();s>o&&(s=o/2);var i=Math.max(1,Math.round(o/s));return c(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var s=this.getLength(),o=Math.max(1,s/e);return this.getSpacedPoints(o)},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 s=[],o,i=this.getPoint(0,this._tmpVec2A),a=0;s.push(0);for(var l=1;l<=e;l++)o=this.getPoint(l/e,this._tmpVec2B),a+=o.distance(i),s.push(a),i.copy(o);return this.cacheArcLengths=s,s},getPointAt:function(e,s){var o=this.getUtoTmapping(e);return this.getPoint(o,s)},getPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++)o.push(this.getPoint(i/e));return o},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,s,o){o===void 0&&(o=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++){var a=this.getUtoTmapping(i/e,null,e);o.push(this.getPoint(a))}return o},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new r);var o=1e-4,i=e-o,a=e+o;return i<0&&(i=0),a>1&&(a=1),this.getPoint(i,this._tmpVec2A),this.getPoint(a,s),s.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,s){var o=this.getUtoTmapping(e);return this.getTangent(o,s)},getTFromDistance:function(e,s){return e<=0?0:this.getUtoTmapping(0,e,s)},getUtoTmapping:function(e,s,o){var i=this.getLengths(o),a=0,l=i.length,f;s?f=Math.min(s,i[l-1]):f=e*i[l-1];for(var u=0,v=l-1,m;u<=v;)if(a=Math.floor(u+(v-u)/2),m=i[a]-f,m<0)u=a+1;else if(m>0)v=a-1;else{v=a;break}if(a=v,i[a]===f)return a/(l-1);var x=i[a],g=i[a+1],y=g-x,T=(f-x)/y;return(a+T)/(l-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=n}),73825:((p,S,t)=>{var d=t(83419),c=t(80021),h=t(39506),r=t(35154),n=t(43396),e=t(26099),s=new d({Extends:c,initialize:function(i,a,l,f,u,v,m,x){if(typeof i=="object"){var g=i;i=r(g,"x",0),a=r(g,"y",0),l=r(g,"xRadius",0),f=r(g,"yRadius",l),u=r(g,"startAngle",0),v=r(g,"endAngle",360),m=r(g,"clockwise",!1),x=r(g,"rotation",0)}else f===void 0&&(f=l),u===void 0&&(u=0),v===void 0&&(v=360),m===void 0&&(m=!1),x===void 0&&(x=0);c.call(this,"EllipseCurve"),this.p0=new e(i,a),this._xRadius=l,this._yRadius=f,this._startAngle=h(u),this._endAngle=h(v),this._clockwise=m,this._rotation=h(x)},getStartPoint:function(o){return o===void 0&&(o=new e),this.getPoint(0,o)},getResolution:function(o){return o*2},getPoint:function(o,i){i===void 0&&(i=new e);for(var a=Math.PI*2,l=this._endAngle-this._startAngle,f=Math.abs(l)a;)l-=a;l{var d=t(83419),c=t(80021),h=t(19217),r=t(87841),n=t(26099),e=new d({Extends:c,initialize:function(o,i){c.call(this,"LineCurve"),Array.isArray(o)&&(i=new n(o[2],o[3]),o=new n(o[0],o[1])),this.p0=o,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new r),h([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new n),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,o){return o===void 0&&(o=new n),s===1?o.copy(this.p1):(o.copy(this.p1).subtract(this.p0).scale(s).add(this.p0),o)},getPointAt:function(s,o){return this.getPoint(s,o)},getTangent:function(s,o){return o===void 0&&(o=new n),o.copy(this.p1).subtract(this.p0).normalize(),o},getUtoTmapping:function(s,o,i){var a;if(o){var l=this.getLengths(i),f=l[l.length-1],u=Math.min(o,f);a=u/f}else a=s;return a},draw:function(s){return s.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),s},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(s){var o=s.points,i=new n(o[0],o[1]),a=new n(o[2],o[3]);return new e(i,a)},p.exports=e}),14744:((p,S,t)=>{var d=t(83419),c=t(80021),h=t(32112),r=t(26099),n=new d({Extends:c,initialize:function(s,o,i){c.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new r(s[4],s[5]),o=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=o,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var o=this.p0,i=this.p1,a=this.p2;return s.set(h(e,o.x,i.x,a.x),h(e,o.y,i.y,a.y))},draw:function(e,s){s===void 0&&(s=32);var o=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{var d=t(87842),c=t(83419),h=t(80021),r=t(26099),n=new c({Extends:h,initialize:function(s){s===void 0&&(s=[]),h.call(this,"SplineCurve"),this.points=[],this.addPoints(s)},addPoints:function(e){for(var s=0;so.length-2?o.length-1:a+1],m=o[a>o.length-3?o.length-1:a+2];return s.set(d(l,f.x,u.x,v.x,m.x),d(l,f.y,u.y,v.y,m.y))},toJSON:function(){for(var e=[],s=0;s{p.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:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({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]}}});p.exports=h}),46669:((p,S,t)=>{var d=t(83419),c=t(46728),h=t(73825),r=t(39429),n=t(33951),e=t(68618),s=t(14744),o=t(87841),i=t(42534),a=t(26099),l=t(36383),f=new d({initialize:function(v,m){v===void 0&&(v=0),m===void 0&&(m=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new a,this._tmpVec2A=new a,this._tmpVec2B=new a,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,m)},add:function(u){return this.curves.push(u),this},circleTo:function(u,v,m){return v===void 0&&(v=!1),this.ellipseTo(u,u,0,360,v,m)},closePath:function(){var u=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return u.equals(v)||this.curves.push(new n(v,u)),this},cubicBezierTo:function(u,v,m,x,g,y){var T=this.getEndPoint(),C,E,M;return u instanceof a?(C=u,E=v,M=m):(C=new a(m,x),E=new a(g,y),M=new a(u,v)),this.add(new c(T,C,E,M))},quadraticBezierTo:function(u,v,m,x){var g=this.getEndPoint(),y,T;return u instanceof a?(y=u,T=v):(y=new a(m,x),T=new a(u,v)),this.add(new s(g,y,T))},draw:function(u,v){for(var m=0;m=v)return this.curves[x];x++}return null},getEndPoint:function(u){return u===void 0&&(u=new a),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,u):u.copy(this.startPoint),u},getLength:function(){var u=this.getCurveLengths();return u[u.length-1]},getPoint:function(u,v){v===void 0&&(v=new a);for(var m=u*this.getLength(),x=this.getCurveLengths(),g=0;g=m){var y=x[g]-m,T=this.curves[g],C=T.getLength(),E=C===0?0:1-y/C;return T.getPointAt(E,v)}g++}return null},getPoints:function(u,v){!u&&!v&&(u=this.defaultDivisions);for(var m=[],x,g=0;g1&&!m[m.length-1].equals(m[0])&&m.push(m[0]),m},getRandomPoint:function(u){return u===void 0&&(u=new a),this.getPoint(Math.random(),u)},getSpacedPoints:function(u){u===void 0&&(u=40);for(var v=[],m=0;m<=u;m++)v.push(this.getPoint(m/u));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(u){return u===void 0&&(u=new a),u.copy(this.startPoint)},getTangent:function(u,v){v===void 0&&(v=new a);for(var m=u*this.getLength(),x=this.getCurveLengths(),g=0;g=m){var y=x[g]-m,T=this.curves[g],C=T.getLength(),E=C===0?0:1-y/C;return T.getTangentAt(E,v)}g++}return null},lineTo:function(u,v){u instanceof a?this._tmpVec2B.copy(u):typeof u=="object"?this._tmpVec2B.setFromObject(u):this._tmpVec2B.set(u,v);var m=this.getEndPoint(this._tmpVec2A);return this.add(new n([m.x,m.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(u){return u.unshift(this.getEndPoint()),this.add(new i(u))},moveTo:function(u,v){return u instanceof a?this.add(new e(u.x,u.y)):this.add(new e(u,v))},toJSON:function(){for(var u=[],v=0;v{var d=t(83419),c=t(24882),h=new d({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=[],s=0;s{var d=t(83419),c=t(45893),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.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}});h.register("DataManagerPlugin",n,"data"),p.exports=n}),10700:(p=>{p.exports="changedata"}),93608:(p=>{p.exports="changedata-"}),60883:(p=>{p.exports="destroy"}),69780:(p=>{p.exports="removedata"}),22166:(p=>{p.exports="setdata"}),24882:((p,S,t)=>{p.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}}),44965:((p,S,t)=>{p.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}}),7098:((p,S,t)=>{var d=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 h(){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(i,a){var l=r.canPlayType("audio/"+i).replace(/^no$/,"");return a?!!(l||r.canPlayType("audio/"+a).replace(/^no$/,"")):!!l};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(d.edge)c.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(s===10&&o>=11||s>10)&&(c.dolby=!0)}}}}catch{}return c}p.exports=h()}),84148:((p,S,t)=>{var d=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 h(){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)&&!d.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)&&d.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)&&!d.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}p.exports=h()}),89289:((p,S,t)=>{var d=t(27919),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",o=new Image;return o.onload=function(){var i=new Image;i.onload=function(){var a=d.create2D(i,6),l=a.getContext("2d",{willReadFrequently:!0});if(l.globalCompositeOperation="multiply",l.drawImage(o,0,0),l.drawImage(i,2,0),!l.getImageData(2,0,1,1))return!1;var f=l.getImageData(2,0,1,1).data;d.remove(i),c.supportNewBlendModes=f[0]===255&&f[1]===0&&f[2]===0},i.src=e+"/wCKxvRF"+s},o.src=e+"AP804Oa6"+s,!1}function r(){var e=d.create2D(this,2),s=e.getContext("2d",{willReadFrequently:!0});s.fillStyle="rgba(10, 20, 30, 0.5)",s.fillRect(0,0,1,1);var o=s.getImageData(0,0,1,1);if(o===null)return!1;s.putImageData(o,1,0);var i=s.getImageData(1,0,1,1),a=i.data[0]===o.data[0]&&i.data[1]===o.data[1]&&i.data[2]===o.data[2]&&i.data[3]===o.data[3];return d.remove(this),a}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=h(),c.supportInverseAlpha=r()),c}p.exports=n()}),89357:((p,S,t)=>{var d=t(25892),c=t(84148),h=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 s=new ArrayBuffer(4),o=new Uint8Array(s),i=new Uint32Array(s);return o[0]=161,o[1]=178,o[2]=195,o[3]=212,i[0]===3569595041?!0:i[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 s=!1,o=function(){if(window.WebGLRenderingContext)try{var i=h.createWebGL(this),a=i.getContext("webgl")||i.getContext("experimental-webgl"),l=h.create2D(this),f=l.getContext("2d",{willReadFrequently:!0}),u=f.createImageData(1,1);return s=u.data instanceof Uint8ClampedArray,h.remove(i),h.remove(l),!!a}catch{return!1}return!1};return r.webGL=o(),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),!d.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&&s,r}p.exports=e()}),91639:(p=>{var S={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return S;var d,c="Fullscreen",h="FullScreen",r=["request"+c,"request"+h,"webkitRequest"+c,"webkitRequest"+h,"msRequest"+c,"msRequest"+h,"mozRequest"+h,"mozRequest"+c];for(d=0;d{var d=t(84148),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function h(){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||d.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}p.exports=h()}),25892:(p=>{var S={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 S;var d=navigator.userAgent;/Windows/.test(d)?S.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(S.iOS=!0,S.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),S.iOSVersion=parseInt(RegExp.$1,10)):S.macOS=!0:/Android/.test(d)?S.android=!0:/Linux/.test(d)?S.linux=!0:/iP[ao]d|iPhone/i.test(d)?(S.iOS=!0,navigator.appVersion.match(/OS (\d+)/),S.iOSVersion=parseInt(RegExp.$1,10),S.iPhone=d.toLowerCase().indexOf("iphone")!==-1,S.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?S.kindle=!0:/CrOS/.test(d)&&(S.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(S.android=!1,S.iOS=!1,S.macOS=!1,S.windows=!0,S.windowsPhone=!0);var c=/Silk/.test(d);return(S.windows||S.macOS||S.linux&&!c||S.chromeOS)&&(S.desktop=!0),(S.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(S.desktop=!1),navigator.standalone&&(S.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(S.cordova=!0),window.ejecta!==void 0&&(S.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(S.node=!0),S.node&&typeof process.versions=="object"&&(S.nodeWebkit=!!process.versions["node-webkit"],S.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(S.crosswalk=!0),S.pixelRatio=window.devicePixelRatio||1,S}p.exports=t()}),43267:((p,S,t)=>{var d=t(95540),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){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(s){Array.isArray(s)||(s=[s]);for(var o=0;o{p.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:((p,S,t)=>{var d=t(83419),c=new Float32Array(20),h=new d({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,s=(e-1)*-.5;return this.multiply([e,s,s,0,0,s,e,s,0,0,s,s,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),s=Math.sin(r),o=.213,i=.715,a=.072;return this.multiply([o+e*(1-o)+s*-o,i+e*-i+s*-i,a+e*-a+s*(1-a),0,0,o+e*-o+s*.143,i+e*(1-i)+s*.14,a+e*-a+s*-.283,0,0,o+e*-o+s*-.787,i+e*-i+s*i,a+e*(1-a)+s*a,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(h.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,s=-.5*(e-1);return this.multiply([e,0,0,0,s,0,e,0,0,s,0,0,e,0,s,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(h.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(h.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(h.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(h.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(h.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(h.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(h.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(h.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(h.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(h.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,s=c;return s.set(e),e.set([s[0]*r[0]+s[1]*r[5]+s[2]*r[10]+s[3]*r[15],s[0]*r[1]+s[1]*r[6]+s[2]*r[11]+s[3]*r[16],s[0]*r[2]+s[1]*r[7]+s[2]*r[12]+s[3]*r[17],s[0]*r[3]+s[1]*r[8]+s[2]*r[13]+s[3]*r[18],s[0]*r[4]+s[1]*r[9]+s[2]*r[14]+s[3]*r[19]+s[4],s[5]*r[0]+s[6]*r[5]+s[7]*r[10]+s[8]*r[15],s[5]*r[1]+s[6]*r[6]+s[7]*r[11]+s[8]*r[16],s[5]*r[2]+s[6]*r[7]+s[7]*r[12]+s[8]*r[17],s[5]*r[3]+s[6]*r[8]+s[7]*r[13]+s[8]*r[18],s[5]*r[4]+s[6]*r[9]+s[7]*r[14]+s[8]*r[19]+s[9],s[10]*r[0]+s[11]*r[5]+s[12]*r[10]+s[13]*r[15],s[10]*r[1]+s[11]*r[6]+s[12]*r[11]+s[13]*r[16],s[10]*r[2]+s[11]*r[7]+s[12]*r[12]+s[13]*r[17],s[10]*r[3]+s[11]*r[8]+s[12]*r[13]+s[13]*r[18],s[10]*r[4]+s[11]*r[9]+s[12]*r[14]+s[13]*r[19]+s[14],s[15]*r[0]+s[16]*r[5]+s[17]*r[10]+s[18]*r[15],s[15]*r[1]+s[16]*r[6]+s[17]*r[11]+s[18]*r[16],s[15]*r[2]+s[16]*r[7]+s[17]*r[12]+s[18]*r[17],s[15]*r[3]+s[16]*r[8]+s[17]*r[13]+s[18]*r[18],s[15]*r[4]+s[16]*r[9]+s[17]*r[14]+s[18]*r[19]+s[19]]),this._dirty=!0,this}});h.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],h.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],h.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],h.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],h.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],h.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],h.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],h.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],h.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],h.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],h.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],p.exports=h}),51767:((p,S,t)=>{var d=t(83419),c=t(29747),h=new d({initialize:function(n,e,s){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,s)},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 s=this._rgb;return s[0]===r&&s[1]===n&&s[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}});p.exports=h}),60461:(p=>{var S={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};p.exports=S}),54312:((p,S,t)=>{var d=t(62235),c=t(35893),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),46768:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),35827:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),46871:((p,S,t)=>{var d=t(66786),c=t(35893),h=t(7702),r=function(n,e,s,o){return s===void 0&&(s=0),o===void 0&&(o=0),d(n,c(e)+s,h(e)+o),n};p.exports=r}),5198:((p,S,t)=>{var d=t(7702),c=t(26541),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),11879:((p,S,t)=>{var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(54312),c[d.BOTTOM_LEFT]=t(46768),c[d.BOTTOM_RIGHT]=t(35827),c[d.CENTER]=t(46871),c[d.LEFT_CENTER]=t(5198),c[d.RIGHT_CENTER]=t(80503),c[d.TOP_CENTER]=t(89698),c[d.TOP_LEFT]=t(922),c[d.TOP_RIGHT]=t(21373),c[d.LEFT_BOTTOM]=c[d.BOTTOM_LEFT],c[d.LEFT_TOP]=c[d.TOP_LEFT],c[d.RIGHT_BOTTOM]=c[d.BOTTOM_RIGHT],c[d.RIGHT_TOP]=c[d.TOP_RIGHT];var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h}),80503:((p,S,t)=>{var d=t(7702),c=t(54380),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),89698:((p,S,t)=>{var d=t(35893),c=t(17717),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),922:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n}),21373:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),91660:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(60461),c=t(79291),h={In:t(91660),To:t(16694)};h=c(!1,h,d),p.exports=h}),21578:((p,S,t)=>{var d=t(62235),c=t(35893),h=t(88417),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n}),10210:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)-o),r(e,d(s)+i),e};p.exports=n}),82341:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,c(s)+o),r(e,d(s)+i),e};p.exports=n}),87958:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),40080:((p,S,t)=>{var d=t(7702),c=t(26541),h=t(20786),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)-o),h(e,d(s)+i),e};p.exports=n}),88466:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(40136),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)-o),r(e,c(s)-i),e};p.exports=n}),38829:((p,S,t)=>{var d=t(60461),c=[];c[d.BOTTOM_CENTER]=t(21578),c[d.BOTTOM_LEFT]=t(10210),c[d.BOTTOM_RIGHT]=t(82341),c[d.LEFT_BOTTOM]=t(87958),c[d.LEFT_CENTER]=t(40080),c[d.LEFT_TOP]=t(88466),c[d.RIGHT_BOTTOM]=t(19211),c[d.RIGHT_CENTER]=t(34609),c[d.RIGHT_TOP]=t(48741),c[d.TOP_CENTER]=t(49440),c[d.TOP_LEFT]=t(81288),c[d.TOP_RIGHT]=t(61323);var h=function(r,n,e,s,o){return c[e](r,n,s,o)};p.exports=h}),19211:((p,S,t)=>{var d=t(62235),c=t(54380),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),34609:((p,S,t)=>{var d=t(7702),c=t(54380),h=t(20786),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,c(s)+o),h(e,d(s)+i),e};p.exports=n}),48741:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(385),r=t(66737),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),h(e,d(s)+o),r(e,c(s)-i),e};p.exports=n}),49440:((p,S,t)=>{var d=t(35893),c=t(17717),h=t(86327),r=t(88417),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n}),81288:((p,S,t)=>{var d=t(26541),c=t(17717),h=t(86327),r=t(385),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)-o),h(e,c(s)-i),e};p.exports=n}),61323:((p,S,t)=>{var d=t(54380),c=t(17717),h=t(86327),r=t(40136),n=function(e,s,o,i){return o===void 0&&(o=0),i===void 0&&(i=0),r(e,d(s)+o),h(e,c(s)-i),e};p.exports=n}),16694:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(88417),c=t(20786),h=function(r,n,e){return d(r,n),c(r,e)};p.exports=h}),62235:(p=>{var S=function(t){return t.y+t.height-t.height*t.originY};p.exports=S}),72873:((p,S,t)=>{var d=t(62235),c=t(26541),h=t(54380),r=t(17717),n=t(87841),e=function(s,o){o===void 0&&(o=new n);var i=c(s),a=r(s);return o.x=i,o.y=a,o.width=h(s)-i,o.height=d(s)-a,o};p.exports=e}),35893:(p=>{var S=function(t){return t.x-t.width*t.originX+t.width*.5};p.exports=S}),7702:(p=>{var S=function(t){return t.y-t.height*t.originY+t.height*.5};p.exports=S}),26541:(p=>{var S=function(t){return t.x-t.width*t.originX};p.exports=S}),87431:(p=>{var S=function(t){return t.width*t.originX};p.exports=S}),46928:(p=>{var S=function(t){return t.height*t.originY};p.exports=S}),54380:(p=>{var S=function(t){return t.x+t.width-t.width*t.originX};p.exports=S}),17717:(p=>{var S=function(t){return t.y-t.height*t.originY};p.exports=S}),86327:(p=>{var S=function(t,d){return t.y=d-t.height+t.height*t.originY,t};p.exports=S}),88417:(p=>{var S=function(t,d){var c=t.width*t.originX;return t.x=d+c-t.width*.5,t};p.exports=S}),20786:(p=>{var S=function(t,d){var c=t.height*t.originY;return t.y=d+c-t.height*.5,t};p.exports=S}),385:(p=>{var S=function(t,d){return t.x=d+t.width*t.originX,t};p.exports=S}),40136:(p=>{var S=function(t,d){return t.x=d-t.width+t.width*t.originX,t};p.exports=S}),66737:(p=>{var S=function(t,d){return t.y=d+t.height*t.originY,t};p.exports=S}),58724:((p,S,t)=>{p.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:(p=>{var S={setCrisp:function(t){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.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}};p.exports=S}),27919:((p,S,t)=>{var d=t(8054),c=t(68703),h=[],r=!1,n=function(){var e=function(m,x,g,y,T){x===void 0&&(x=1),g===void 0&&(g=1),y===void 0&&(y=d.CANVAS),T===void 0&&(T=!1);var C,E=i(y);return E===null?(E={parent:m,canvas:document.createElement("canvas"),type:y},y===d.CANVAS&&h.push(E),C=E.canvas):(E.parent=m,C=E.canvas),T&&(E.parent=C),C.width=x,C.height=g,r&&y===d.CANVAS&&c.disable(C.getContext("2d",{willReadFrequently:!1})),C},s=function(m,x,g){return e(m,x,g,d.CANVAS)},o=function(m,x,g){return e(m,x,g,d.WEBGL)},i=function(m){if(m===void 0&&(m=d.CANVAS),m===d.WEBGL)return null;for(var x=0;x{var S="",t=function(){var d=function(n){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s{var S=function(t,d){return d===void 0&&(d="none"),t.style.msTouchAction=d,t.style["ms-touch-action"]=d,t.style["touch-action"]=d,t};p.exports=S}),91610:(p=>{var S=function(t,d){d===void 0&&(d="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.forEach(function(h){t.style[h+"user-select"]=d}),t.style["-webkit-touch-callout"]=d,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};p.exports=S}),26253:((p,S,t)=>{p.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}}),40987:((p,S,t)=>{var d=t(83419),c=t(37589),h=t(1e3),r=t(7537),n=t(87837),e=new d({initialize:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=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(o,i,a,l)},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(s,o,i,a,l){return a===void 0&&(a=255),l===void 0&&(l=!0),this._locked=!0,this.red=s,this.green=o,this.blue=i,this.alpha=a,this._locked=!1,this.update(l)},setGLTo:function(s,o,i,a){return a===void 0&&(a=1),this._locked=!0,this.redGL=s,this.greenGL=o,this.blueGL=i,this.alphaGL=a,this._locked=!1,this.update(!0)},setFromRGB:function(s){return this._locked=!0,this.red=s.r,this.green=s.g,this.blue=s.b,s.hasOwnProperty("a")&&(this.alpha=s.a),this._locked=!1,this.update(!0)},setFromHSV:function(s,o,i){return r(s,o,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var o=this.r,i=this.g,a=this.b,l=this.a;return this._color=c(o,i,a),this._color32=h(o,i,a,l),this._rgba="rgba("+o+","+i+","+a+","+l/255+")",s&&n(o,i,a,this),this},updateHSV:function(){var s=this.r,o=this.g,i=this.b;return n(s,o,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(s){return this.setTo(s,s,s)},random:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s)),a=Math.floor(s+Math.random()*(o-s)),l=Math.floor(s+Math.random()*(o-s));return this.setTo(i,a,l)},randomGray:function(s,o){s===void 0&&(s=0),o===void 0&&(o=255);var i=Math.floor(s+Math.random()*(o-s));return this.setTo(i,i,i)},saturate:function(s){return this.s+=s/100,this},desaturate:function(s){return this.s-=s/100,this},lighten:function(s){return this.v+=s/100,this},darken:function(s){return this.v-=s/100,this},brighten:function(s){var o=this.r,i=this.g,a=this.b;return o=Math.max(0,Math.min(255,o-Math.round(255*-(s/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(s/100)))),a=Math.max(0,Math.min(255,a-Math.round(255*-(s/100)))),this.setTo(o,i,a)},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(s){this.gl[0]=Math.min(Math.abs(s),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(s){this.gl[1]=Math.min(Math.abs(s),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(s){this.gl[2]=Math.min(Math.abs(s),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(s){this.gl[3]=Math.min(Math.abs(s),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(s){s=Math.floor(Math.abs(s)),this.r=Math.min(s,255),this.gl[0]=s/255,this.update(!0)}},green:{get:function(){return this.g},set:function(s){s=Math.floor(Math.abs(s)),this.g=Math.min(s,255),this.gl[1]=s/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(s){s=Math.floor(Math.abs(s)),this.b=Math.min(s,255),this.gl[2]=s/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(s){s=Math.floor(Math.abs(s)),this.a=Math.min(s,255),this.gl[3]=s/255,this.update()}},h:{get:function(){return this._h},set:function(s){this._h=s,r(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,r(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,r(this._h,this._s,s,this)}}});p.exports=e}),92728:((p,S,t)=>{var d=t(37589),c=function(h){h===void 0&&(h=1024);var r=[],n=255,e,s=255,o=0,i=0;for(e=0;e<=n;e++)r.push({r:s,g:e,b:i,color:d(s,e,i)});for(o=255,e=n;e>=0;e--)r.push({r:e,g:o,b:i,color:d(e,o,i)});for(s=0,e=0;e<=n;e++,o--)r.push({r:s,g:o,b:e,color:d(s,o,e)});for(o=0,i=255,e=0;e<=n;e++,i--,s++)r.push({r:s,g:o,b:i,color:d(s,o,i)});if(h===1024)return r;var a=[],l=0,f=1024/h;for(e=0;e{var S=function(t){var d={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(d.a=t>>>24),d};p.exports=S}),62957:(p=>{var S=function(t){var d=t.toString(16);return d.length===1?"0"+d:d};p.exports=S}),37589:(p=>{var S=function(t,d,c){return t<<16|d<<8|c};p.exports=S}),1e3:(p=>{var S=function(t,d,c,h){return h<<24|t<<16|d<<8|c};p.exports=S}),62183:((p,S,t)=>{var d=t(40987),c=t(89528),h=function(r,n,e){var s=e,o=e,i=e;if(n!==0){var a=e<.5?e*(1+n):e+n-e*n,l=2*e-a;s=c(l,a,r+1/3),o=c(l,a,r),i=c(l,a,r-1/3)}var f=new d;return f.setGLTo(s,o,i,1)};p.exports=h}),27939:((p,S,t)=>{var d=t(7537),c=function(h,r){h===void 0&&(h=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(d(e/359,h,r));return n};p.exports=c}),7537:((p,S,t)=>{var d=t(37589);function c(r,n,e,s){var o=(r+n*6)%6,i=Math.min(o,4-o,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var h=function(r,n,e,s){n===void 0&&(n=1),e===void 0&&(e=1);var o=c(5,r,n,e),i=c(3,r,n,e),a=c(1,r,n,e);return s?s.setTo?s.setTo(o,i,a,s.alpha,!0):(s.r=o,s.g=i,s.b=a,s.color=d(o,i,a),s):{r:o,g:i,b:a,color:d(o,i,a)}};p.exports=h}),70238:((p,S,t)=>{var d=t(40987),c=function(h){var r=new d;h=h.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,a,l,f){return a+a+l+l+f+f});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);if(n){var e=parseInt(n[1],16),s=parseInt(n[2],16),o=parseInt(n[3],16);r.setTo(e,s,o)}return r};p.exports=c}),89528:(p=>{var S=function(t,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(d-t)*6*c:c<.5?d:c<.6666666666666666?t+(d-t)*(.6666666666666666-c)*6:t};p.exports=S}),30100:((p,S,t)=>{var d=t(40987),c=t(90664),h=function(r){var n=c(r);return new d(n.r,n.g,n.b,n.a)};p.exports=h}),90664:(p=>{var S=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}};p.exports=S}),13699:((p,S,t)=>{var d=t(28915),c=t(37589),h=function(e,s,o,i,a,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var v=u/f,m=d(e,i,v),x=d(s,a,v),g=d(o,l,v);return{r:m,g:x,b:g,a:255,color:c(m,x,g)}},r=function(e,s,o,i){return o===void 0&&(o=100),i===void 0&&(i=0),h(e.r,e.g,e.b,s.r,s.g,s.b,o,i)},n=function(e,s,o,i,a,l){return a===void 0&&(a=100),l===void 0&&(l=0),h(e.r,e.g,e.b,s,o,i,a,l)};p.exports={RGBWithRGB:h,ColorWithRGB:n,ColorWithColor:r}}),68957:((p,S,t)=>{var d=t(40987),c=function(h){return new d(h.r,h.g,h.b,h.a)};p.exports=c}),87388:((p,S,t)=>{var d=t(40987),c=function(h){var r=new d,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(h.toLowerCase());if(n){var e=parseInt(n[1],10),s=parseInt(n[2],10),o=parseInt(n[3],10),i=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,s,o,i*255)}return r};p.exports=c}),87837:(p=>{var S=function(t,d,c,h){h===void 0&&(h={h:0,s:0,v:0}),t/=255,d/=255,c/=255;var r=Math.min(t,d,c),n=Math.max(t,d,c),e=n-r,s=0,o=n===0?0:e/n,i=n;return n!==r&&(n===t?s=(d-c)/e+(d{var d=t(62957),c=function(h,r,n,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(h<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+d(e)+d(h)+d(r)+d(n)};p.exports=c}),85386:((p,S,t)=>{var d=t(30976),c=t(40987),h=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(d(r,n),d(r,n),d(r,n))};p.exports=h}),80333:((p,S,t)=>{var d=t(70238),c=t(30100),h=t(68957),r=t(87388),n=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):d(e);case"number":return c(e);case"object":return h(e)}};p.exports=n}),3956:((p,S,t)=>{var d=t(40987);d.ColorSpectrum=t(92728),d.ColorToRGBA=t(91588),d.ComponentToHex=t(62957),d.GetColor=t(37589),d.GetColor32=t(1e3),d.HexStringToColor=t(70238),d.HSLToColor=t(62183),d.HSVColorWheel=t(27939),d.HSVToRGB=t(7537),d.HueToComponent=t(89528),d.IntegerToColor=t(30100),d.IntegerToRGB=t(90664),d.Interpolate=t(13699),d.ObjectToColor=t(68957),d.RandomRGB=t(85386),d.RGBStringToColor=t(87388),d.RGBToHSV=t(87837),d.RGBToString=t(75723),d.ValueToColor=t(80333),p.exports=d}),27460:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=t(39429),h=new d({initialize:function(n,e,s,o,i,a){e||(e=n.sys.make.image({x:s,y:o,key:i,frame:a,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,s,o){return new h(this.scene,r,n,e,s,o)}),p.exports=h}),80661:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(h){return this.geometryMask=h,this},setInvertAlpha:function(h){return h===void 0&&(h=!0),this.invertAlpha=h,this},preRenderWebGL:function(h,r,n){var e=h.gl;h.flush(),h.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),h.maskCount=0),h.currentCameraMask.mask!==this&&(h.currentMask.mask=this),h.maskStack.push({mask:this,camera:n}),this.applyStencil(h,n,!0),h.maskCount++},applyStencil:function(h,r,n){var e=h.gl,s=this.geometryMask,o=h.maskCount,i=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,o,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),o++):(e.stencilFunc(e.EQUAL,o+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=o,s.renderWebGL(h,s,r),h.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,o,i):e.stencilFunc(e.EQUAL,o,i)},postRenderWebGL:function(h){var r=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var n=h.currentMask;if(h.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=h.maskStack[h.maskStack.length-1];e.mask.applyStencil(h,e.camera,!1),h.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(h,r,n){var e=this.geometryMask;h.currentContext.save(),e.renderCanvas(h,e,n,null,null,!0),h.currentContext.clip()},postRenderCanvas:function(h){h.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=c}),69781:((p,S,t)=>{p.exports={BitmapMask:t(6858),GeometryMask:t(80661)}}),73894:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){(!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(` +`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c}),40366:(p=>{var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S}),83719:((p,S,t)=>{var d=t(40366),c=function(h){var r=h.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=n,d(n,r.parent)}};p.exports=c}),57264:((p,S,t)=>{var d=t(25892),c=function(h){if(document.readyState==="complete"||document.readyState==="interactive"){h();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),h()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c}),57811:(p=>{var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),c.w=d===90?h.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S}),45818:((p,S,t)=>{var d=t(13560),c=function(h,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?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>h?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c}),74403:(p=>{var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S}),56836:(p=>{var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S}),35846:(p=>{var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S}),43092:((p,S,t)=>{var d=t(83419),c=t(29747),h=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),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}});p.exports=h}),84902:((p,S,t)=>{var d={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};p.exports=d}),47565:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(37277),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",r,"events"),p.exports=r}),93055:((p,S,t)=>{p.exports={EventEmitter:t(47565)}}),20122:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.BARREL,e),this.amount=s}});p.exports=r}),32251:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f){o===void 0&&(o=1),i===void 0&&(i=1),a===void 0&&(a=1),l===void 0&&(l=1),f===void 0&&(f=4),c.call(this,h.BLOOM,e),this.steps=f,this.offsetX=o,this.offsetY=i,this.blurStrength=a,this.strength=l,this.glcolor=[1,1,1],s!=null&&(this.color=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}}});p.exports=r}),9047:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f){s===void 0&&(s=0),o===void 0&&(o=2),i===void 0&&(i=2),a===void 0&&(a=1),f===void 0&&(f=4),c.call(this,h.BLUR,e),this.quality=s,this.x=o,this.y=i,this.steps=f,this.strength=a,this.glcolor=[1,1,1],l!=null&&(this.color=l)},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}}});p.exports=r}),27885:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=.5),o===void 0&&(o=1),i===void 0&&(i=.2),a===void 0&&(a=!1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=1),c.call(this,h.BOKEH,e),this.radius=s,this.amount=o,this.contrast=i,this.isTiltShift=a,this.strength=u,this.blurX=l,this.blurY=f}});p.exports=r}),12578:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l){s===void 0&&(s=8),a===void 0&&(a=1),l===void 0&&(l=.005),c.call(this,h.CIRCLE,e),this.scale=a,this.feather=l,this.thickness=s,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],o!=null&&(this.color=o),i!=null&&(this.backgroundColor=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}},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}}});p.exports=r}),15802:((p,S,t)=>{var d=t(83419),c=t(89422),h=t(14811),r=new d({Extends:c,initialize:function(e){c.call(this),this.type=h.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});p.exports=r}),72898:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});p.exports=c}),44553:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i){s===void 0&&(s="__WHITE"),o===void 0&&(o=.005),i===void 0&&(i=.005),c.call(this,h.DISPLACEMENT,e),this.x=o,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});p.exports=r}),68531:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){o===void 0&&(o=4),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.GLOW,e),this.outerStrength=o,this.innerStrength=i,this.knockout=a,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=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}}});p.exports=r}),37102:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u,v){i===void 0&&(i=.2),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=1),v===void 0&&(v=0),c.call(this,h.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=a,this.fromY=l,this.toX=f,this.toY=u,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),o!=null&&(this.color2=o)},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}}});p.exports=r}),86886:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.PIXELATE,e),this.amount=s}});p.exports=r}),92322:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=.1),a===void 0&&(a=1),f===void 0&&(f=6),u===void 0&&(u=1),c.call(this,h.SHADOW,e),this.x=s,this.y=o,this.decay=i,this.power=a,this.glcolor=[0,0,0,1],this.samples=f,this.intensity=u,l!==void 0&&(this.color=l)},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}}});p.exports=r}),39563:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=3),a===void 0&&(a=!1),c.call(this,h.SHINE,e),this.speed=s,this.lineWidth=o,this.gradient=i,this.reveal=a}});p.exports=r}),56448:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.5),o===void 0&&(o=.5),i===void 0&&(i=.5),a===void 0&&(a=.5),c.call(this,h.VIGNETTE,e),this.x=s,this.y=o,this.radius=i,this.strength=a}});p.exports=r}),38433:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a){s===void 0&&(s=.1),o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,h.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=o,this.axis=i,this.reveal=a}});p.exports=r}),14811:(p=>{var S={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};p.exports=S}),66064:((p,S,t)=>{var d=t(79291),c=t(14811),h={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};h=d(!1,h,c),p.exports=h}),25305:((p,S,t)=>{var d=t(10312),c=t(23568),h=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 s=c(e,"scale",null);typeof s=="number"?n.setScale(s):s!==null&&(n.scaleX=c(s,"x",1),n.scaleY=c(s,"y",1));var o=c(e,"scrollFactor",null);typeof o=="number"?n.setScrollFactor(o):o!==null&&(n.scrollFactorX=c(o,"x",1),n.scrollFactorY=c(o,"y",1)),n.rotation=c(e,"rotation",0);var i=c(e,"angle",null);i!==null&&(n.angle=i),n.alpha=c(e,"alpha",1);var a=c(e,"origin",null);if(typeof a=="number")n.setOrigin(a);else if(a!==null){var l=c(a,"x",.5),f=c(a,"y",.5);n.setOrigin(l,f)}n.blendMode=c(e,"blendMode",d.NORMAL),n.visible=c(e,"visible",!0);var u=c(e,"add",!0);return u&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};p.exports=h}),13059:((p,S,t)=>{var d=t(23568),c=function(h,r){var n=d(r,"anims",null);if(n===null)return h;if(typeof n=="string")h.anims.play(n);else if(typeof n=="object"){var e=h.anims,s=d(n,"key",void 0);if(s){var o=d(n,"startFrame",void 0),i=d(n,"delay",0),a=d(n,"repeat",0),l=d(n,"repeatDelay",0),f=d(n,"yoyo",!1),u=d(n,"play",!1),v=d(n,"delayedPlay",0),m={key:s,delay:i,repeat:a,repeatDelay:l,yoyo:f,startFrame:o};u?e.play(m):v>0?e.playAfterDelay(m,v):e.load(m)}}return h};p.exports=c}),8050:((p,S,t)=>{var d=t(83419),c=t(73162),h=t(37277),r=t(51708),n=t(44594),e=t(19186),s=new d({Extends:c,initialize:function(i){c.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(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(o){o.displayList&&o.displayList!==this&&o.removeFromDisplayList(),o.parentContainer&&o.parentContainer.remove(o),o.displayList||(this.queueDepthSort(),o.displayList=this,o.emit(r.ADDED_TO_SCENE,o,this.scene),this.events.emit(n.ADDED_TO_SCENE,o,this.scene))},removeChildCallback:function(o){this.queueDepthSort(),o.displayList=null,o.emit(r.REMOVED_FROM_SCENE,o,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,o,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(o,i){return o._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var o=this.list,i=o.length;i--;)o[i]&&o[i].destroy(!0);o.length=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}});h.register("DisplayList",s,"displayList"),p.exports=s}),95643:((p,S,t)=>{var d=t(83419),c=t(53774),h=t(45893),r=t(50792),n=t(51708),e=t(44594),s=new d({Extends:r,initialize:function(i,a){r.call(this),this.scene=i,this.displayList=null,this.type=a,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),i.sys.queueDepthSort()},setActive:function(o){return this.active=o,this},setName:function(o){return this.name=o,this},setState:function(o){return this.state=o,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(o,i){return this.data||(this.data=new h(this)),this.data.set(o,i),this},incData:function(o,i){return this.data||(this.data=new h(this)),this.data.inc(o,i),this},toggleData:function(o){return this.data||(this.data=new h(this)),this.data.toggle(o),this},getData:function(o){return this.data||(this.data=new h(this)),this.data.get(o)},setInteractive:function(o,i,a){return this.scene.sys.input.enable(this,o,i,a),this},disableInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.disable(this,o),this},removeInteractive:function(o){return o===void 0&&(o=!1),this.scene.sys.input.clear(this),o&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(o){var i=this.displayList&&this.displayList.active?this.displayList.willRender(o):!0;return!(!i||s.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&o.id)},getIndexList:function(){for(var o=this,i=this.parentContainer,a=[];i&&(a.unshift(i.getIndex(o)),o=i,i.parentContainer);)i=i.parentContainer;return this.displayList?a.unshift(this.displayList.getIndex(o)):a.unshift(this.scene.sys.displayList.getIndex(o)),a},addToDisplayList:function(o){return o===void 0&&(o=this.scene.sys.displayList),this.displayList&&this.displayList!==o&&this.removeFromDisplayList(),o.exists(this)||(this.displayList=o,o.add(this,!0),o.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),o.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 o=this.displayList||this.scene.sys.displayList;return o&&o.exists(this)&&(o.remove(this,!0),o.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),o.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var o=null;return this.parentContainer?o=this.parentContainer.list:this.displayList&&(o=this.displayList.list),o},destroy:function(o){!this.scene||this.ignoreDestroy||(o===void 0&&(o=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,o),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)}});s.RENDER_MASK=15,p.exports=s}),44603:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});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"),p.exports=r}),39429:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});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"),p.exports=r}),91296:((p,S,t)=>{var d=t(61340),c=new d,h=new d,r=new d,n={camera:c,sprite:h,calc:r},e=function(s,o,i){var a=c,l=h,f=r;return l.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),a.copyFrom(o.matrix),i?(a.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),l.e=s.x,l.f=s.y):(l.e-=o.scrollX*s.scrollFactorX,l.f-=o.scrollY*s.scrollFactorY),a.multiply(l,f),n};p.exports=e}),45027:((p,S,t)=>{var d=t(83419),c=t(25774),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){c.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.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,s){for(var o=this._active,i=o.length,a=0;a{var S=function(t,d,c,h,r,n,e,s,o,i,a,l,f,u,v){var m=c.x-d.displayOriginX+r,x=c.y-d.displayOriginY+n,g=m+c.w,y=x+c.h,T=e.a,C=e.b,E=e.c,M=e.d,P=e.e,A=e.f,R=m*T+x*E+P,F=m*C+x*M+A,w=m*T+y*E+P,I=m*C+y*M+A,U=g*T+y*E+P,N=g*C+y*M+A,D=g*T+x*E+P,B=g*C+x*M+A;s&&(R=Math.round(R),F=Math.round(F),w=Math.round(w),I=Math.round(I),U=Math.round(U),N=Math.round(N),D=Math.round(D),B=Math.round(B)),t.batchQuad(d,R,F,w,I,U,N,D,B,h.u0,h.v0,h.u1,h.v1,o,i,a,l,f,u,v)};p.exports=S}),53048:(p=>{var S=function(t,d,c,h){if(c===void 0&&(c=!1),h===void 0)return h={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},h;var r=t.text,n=r.length,e=t.maxWidth,s=t.wordWrapCharCode,o=Number.MAX_VALUE,i=Number.MAX_VALUE,a=0,l=0,f=t.fontData.chars,u=t.fontData.lineHeight,v=t.letterSpacing,m=t.lineSpacing,x=0,g=0,y=0,T=null,C=t._align,E=0,M=0,P=t.fontSize/t.fontData.size,A=P*t.scaleX,R=P*t.scaleY,F=null,w=0,I=[],U=Number.MAX_VALUE,N=0,D=0,B=0,L,G,O,X=[],z=[],V=null,Y=function(ft,ct){for(var rt=0,dt=0;dt0){O=r.split(` +`);var W=[];for(L=0;LN&&(N=B),BE&&(o=E),i>M&&(i=M);var tt=E+T.xAdvance,Q=M+u;aN&&(N=B),B0)for(var k=0;k{var d=t(21859),c=function(h,r,n,e,s,o,i){var a=h.sys.textures.get(n),l=a.get(e),f=h.sys.cache.xml.get(s);if(l&&f){var u=d(f,l,o,i,a);return h.sys.cache.bitmapFont.add(r,{data:u,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c}),6925:((p,S,t)=>{var d=t(35154),c=function(h,r){var n=r.width,e=r.height,s=Math.floor(n/2),o=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var a=d(r,"image",""),l=h.sys.textures.getFrame(a),f=l.cutX,u=l.cutY,v=l.source.width,m=l.source.height,x=d(r,"offset.x",0),g=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),C=d(r,"lineSpacing",0),E=d(r,"charsPerRow",null);E===null&&(E=v/n,E>i.length&&(E=i.length));for(var M=x,P=g,A={retroFont:!0,font:a,size:n,lineHeight:e+C,chars:{}},R=0,F=0;F{function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,o=c.source.width,i=c.source.height,a=c.sourceIndex,l={},f=d.getElementsByTagName("info")[0],u=d.getElementsByTagName("common")[0];l.font=f.getAttribute("face"),l.size=S(f,"size"),l.lineHeight=S(u,"lineHeight")+r,l.chars={};var v=d.getElementsByTagName("char"),m=c!==void 0&&c.trimmed;if(m)var x=c.height,g=c.width;for(var y=0;y{var d=t(87662),c=t(79291),h={Parse:t(6925)};h=c(!1,h,d),p.exports=h}),87662:(p=>{var S={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`};p.exports=S}),2638:((p,S,t)=>{var d=t(22186),c=t(83419),h=t(12310),r=new c({Extends:d,Mixins:[h],initialize:function(e,s,o,i,a,l,f){d.call(this,e,s,o,i,a,l,f),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}});p.exports=r}),86741:((p,S,t)=>{var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.displayCallback,f=r.callbackData,u=r.fontData.chars,v=r.fontData.lineHeight,m=r._letterSpacing,x=0,g=0,y=0,T=null,C=0,E=0,M=0,P=0,A=0,R=0,F=null,w=0,I=r.frame.source.image,U=a.cutX,N=a.cutY,D=0,B=0,L=r._fontSize/r.fontData.size,G=r._align,O=0,X=0;r.getTextBounds(!1);var z=r._bounds.lines;G===1?X=(z.longest-z.lengths[0])/2:G===2&&(X=z.longest-z.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);var V=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(i.beginPath(),i.rect(0,0,r.cropWidth,r.cropHeight),i.clip());for(var Y=0;Y{var d=t(2638),c=t(25305),h=t(44603),r=t(23568);h.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var s=r(n,"font",""),o=r(n,"text",""),i=r(n,"size",!1),a=new d(this.scene,0,0,s,o,i);return e!==void 0&&(n.add=e),c(this.scene,a,n),a})}),72566:((p,S,t)=>{var d=t(2638),c=t(39429);c.register("dynamicBitmapText",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,e,s))})}),12310:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(73482),h=t(86741),p.exports={renderWebGL:c,renderCanvas:h}}),73482:((p,S,t)=>{var d=t(91296),c=t(61340),h=t(70554),r=new c,n=function(e,s,o,i){var a=s.text,l=a.length;if(l!==0){o.addToRenderList(s);var f=e.pipelines.set(s.pipeline,s),u=d(s,o,i);e.pipelines.preBatch(s);var v=u.sprite,m=u.calc,x=r,g=s.cropWidth>0||s.cropHeight>0;g&&(f.flush(),e.pushScissor(m.tx,m.ty,s.cropWidth*m.scaleX,s.cropHeight*m.scaleY));var y=s.frame,T=y.glTexture,C=s.tintFill,E=h.getTintAppendFloatAlpha(s.tintTopLeft,o.alpha*s._alphaTL),M=h.getTintAppendFloatAlpha(s.tintTopRight,o.alpha*s._alphaTR),P=h.getTintAppendFloatAlpha(s.tintBottomLeft,o.alpha*s._alphaBL),A=h.getTintAppendFloatAlpha(s.tintBottomRight,o.alpha*s._alphaBR),R=f.setGameObject(s),F=0,w=0,I=0,U=0,N=s.letterSpacing,D,B=0,L=0,G,O=s.scrollX,X=s.scrollY,z=s.fontData,V=z.chars,Y=z.lineHeight,W=s.fontSize/z.size,H=0,K=s._align,b=0,J=0,$=s.getTextBounds(!1);s.maxWidth>0&&(a=$.wrappedText,l=a.length);var Z=s._bounds.lines;K===1?J=(Z.longest-Z.lengths[0])/2:K===2&&(J=Z.longest-Z.lengths[0]);for(var q=o.roundPixels,_=s.displayCallback,tt=s.callbackData,Q=0;Q{var d=t(83419),c=t(45319),h=t(31401),r=t(95643),n=t(53048),e=t(61327),s=t(21859),o=t(87841),i=t(18658),a=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Texture,h.Tint,h.Transform,h.Visible,i],initialize:function(f,u,v,m,x,g,y){x===void 0&&(x=""),y===void 0&&(y=0),r.call(this,f,"BitmapText"),this.font=m;var T=this.scene.sys.cache.bitmapFont.get(m);if(!T)throw new Error("Invalid BitmapText key: "+m);this.fontData=T.data,this._text="",this._fontSize=g||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=y,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=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(u,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(x)},setLeftAlign:function(){return this._align=a.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=a.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=a.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(l){return this._fontSize=l,this._dirty=!0,this},setLetterSpacing:function(l){return l===void 0&&(l=0),this._letterSpacing=l,this._dirty=!0,this},setLineSpacing:function(l){return l===void 0&&(l=0),this.lineSpacing=l,this},setText:function(l){return!l&&l!==0&&(l=""),Array.isArray(l)&&(l=l.join(` +`)),l!==this.text&&(this._text=l.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=.5),this.dropShadowX=l,this.dropShadowY=f,this.dropShadowColor=u,this.dropShadowAlpha=v,this},setCharacterTint:function(l,f,u,v,m,x,g){l===void 0&&(l=0),f===void 0&&(f=1),u===void 0&&(u=!1),v===void 0&&(v=-1),m===void 0&&(m=v,x=v,g=v);var y=this.text.length;f===-1&&(f=y),l<0&&(l=y+l),l=c(l,0,y-1);for(var T=c(l+f,l,y),C=this.charColors,E=l;E{var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.fontData.chars,f=r.fontData.lineHeight,u=r._letterSpacing,v=r._lineSpacing,m=0,x=0,g=0,y=null,T=0,C=0,E=0,M=0,P=0,A=0,R=null,F=0,w=a.source.image,I=a.cutX,U=a.cutY,N=r._fontSize/r.fontData.size,D=r._align,B=0,L=0,G=r.getTextBounds(!1);r.maxWidth>0&&(s=G.wrappedText,o=s.length);var O=r._bounds.lines;D===1?L=(O.longest-O.lengths[0])/2:D===2&&(L=O.longest-O.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var X=n.roundPixels,z=0;z{var d=t(22186),c=t(25305),h=t(44603),r=t(23568),n=t(35154);h.register("bitmapText",function(e,s){e===void 0&&(e={});var o=n(e,"font",""),i=r(e,"text",""),a=r(e,"size",!1),l=n(e,"align",0),f=new d(this.scene,0,0,o,i,a,l);return s!==void 0&&(e.add=s),c(this.scene,f,e),f})}),34914:((p,S,t)=>{var d=t(22186),c=t(39429);c.register("bitmapText",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),18658:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(33590),h=t(37289),p.exports={renderWebGL:c,renderCanvas:h}}),33590:((p,S,t)=>{var d=t(3217),c=t(91296),h=t(70554),r=function(n,e,s,o){var i=e._text,a=i.length;if(a!==0){s.addToRenderList(e);var l=n.pipelines.set(e.pipeline,e),f=c(e,s,o).calc;n.pipelines.preBatch(e);var u=s.roundPixels,v=s.alpha,m=e.charColors,x=e.tintFill,g=h.getTintAppendFloatAlpha,y=g(e.tintTopLeft,v*e._alphaTL),T=g(e.tintTopRight,v*e._alphaTR),C=g(e.tintBottomLeft,v*e._alphaBL),E=g(e.tintBottomRight,v*e._alphaBR),M=e.frame.glTexture,P=l.setGameObject(e),A=e.getTextBounds(!1),R,F,w,I=A.characters,U=e.dropShadowX,N=e.dropShadowY,D=U!==0||N!==0;if(D){var B=e.dropShadowColor,L=e.dropShadowAlpha,G=g(B,v*L*e._alphaTL),O=g(B,v*L*e._alphaTR),X=g(B,v*L*e._alphaBL),z=g(B,v*L*e._alphaBR);for(R=0;R{var d=t(48011),c=t(46590),h=t(83419),r=t(31401),n=t(4327),e=t(95643),s=t(73162),o=new h({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,d],initialize:function(a,l,f,u,v){e.call(this,a,"Blitter"),this.setTexture(u,v),this.setPosition(l,f),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,a,l,f,u){f===void 0&&(f=!0),u===void 0&&(u=this.children.length),l===void 0?l=this.frame:l instanceof n||(l=this.texture.get(l));var v=new c(this,i,a,l,f);return this.children.addAt(v,u,!1),this.dirty=!0,v},createFromCallback:function(i,a,l,f){for(var u=this.createMultiple(a,l,f),v=0;v0},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=[]}});p.exports=o}),72396:(p=>{var S=function(t,d,c,h){var r=d.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*d.alpha;if(e!==0){c.addToRenderList(d),n.globalCompositeOperation=t.blendModes[d.blendMode],n.imageSmoothingEnabled=!d.frame.source.scaleMode;var s=d.x-c.scrollX*d.scrollFactorX,o=d.y-c.scrollY*d.scrollFactorY;n.save(),h&&h.copyToContext(n);for(var i=c.roundPixels,a=0;a0&&v.height>0&&(n.save(),n.translate(l.x+s,l.y+o),n.scale(g,y),n.drawImage(u.source.image,v.x,v.y,v.width,v.height,m,x,v.width,v.height),n.restore())):(i&&(m=Math.round(m),x=Math.round(x)),v.width>0&&v.height>0&&n.drawImage(u.source.image,v.x,v.y,v.width,v.height,m+l.x+s,x+l.y+o,v.width,v.height)))}n.restore()}}};p.exports=S}),9403:((p,S,t)=>{var d=t(6107),c=t(25305),h=t(44603),r=t(23568);h.register("blitter",function(n,e){n===void 0&&(n={});var s=r(n,"key",null),o=r(n,"frame",null),i=new d(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),c(this.scene,i,n),i})}),12709:((p,S,t)=>{var d=t(6107),c=t(39429);c.register("blitter",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),48011:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(99485),h=t(72396),p.exports={renderWebGL:c,renderCanvas:h}}),99485:((p,S,t)=>{var d=t(61340),c=t(70554),h=new d,r=function(n,e,s,o){var i=e.getRenderList(),a=s.alpha*e.alpha;if(!(i.length===0||a===0)){s.addToRenderList(e);var l=n.pipelines.set(this.pipeline,e),f=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,v=h.copyFrom(s.matrix);o&&(v.multiplyWithOffset(o,-f,-u),f=0,u=0);var m=e.x-f,x=e.y-u,g=-1,y=!1,T=s.roundPixels;n.pipelines.preBatch(e);for(var C=0;C{var d=t(83419),c=t(4327),h=new d({initialize:function(n,e,s,o,i){this.parent=n,this.x=e,this.y=s,this.frame=o,this.data={},this.tint=16777215,this._visible=i,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}}});p.exports=h}),16005:((p,S,t)=>{var d=t(45319),c=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,s){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=d(r,0,1),this._alphaTR=d(n,0,1),this._alphaBL=d(e,0,1),this._alphaBR=d(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(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=d(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=d(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=d(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=d(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};p.exports=h}),88509:((p,S,t)=>{var d=t(45319),c=2,h={_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=d(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};p.exports=h}),90065:((p,S,t)=>{var d=t(10312),c={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(h){typeof h=="string"&&(h=d[h]),h|=0,h>=-1&&(this._blendMode=h)}},setBlendMode:function(h){return this.blendMode=h,this}};p.exports=c}),94215:(p=>{var S={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,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S}),61683:(p=>{var S={texture:null,frame:null,isCropped:!1,setCrop:function(t,d,c,h){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,d,c,h,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}}};p.exports=S}),89272:((p,S,t)=>{var d=t(37105),c={_depth:0,depth:{get:function(){return this._depth},set:function(h){this.displayList&&this.displayList.queueDepthSort(),this._depth=h}},setDepth:function(h){return h===void 0&&(h=0),this.depth=h,this},setToTop:function(){var h=this.getDisplayList();return h&&d.BringToTop(h,this),this},setToBack:function(){var h=this.getDisplayList();return h&&d.SendToBack(h,this),this},setAbove:function(h){var r=this.getDisplayList();return r&&h&&d.MoveAbove(r,this,h),this},setBelow:function(h){var r=this.getDisplayList();return r&&h&&d.MoveBelow(r,this,h),this}};p.exports=c}),47059:((p,S,t)=>{var d=t(83419),c=t(66064),h=t(19133),r=new d({initialize:function(e,s){this.gameObject=e,this.isPost=s,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{var S={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,d){return this.flipX=t,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=S}),8004:((p,S,t)=>{var d=t(87841),c=t(11520),h=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 s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new h),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 h),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 h),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 h),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 h),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 h),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 h),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 h),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 h),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 d);var e,s,o,i,a,l,f,u;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),v.transformPoint(n.x,n.y,n),e=n.x,s=n.y,this.getTopRight(n),v.transformPoint(n.x,n.y,n),o=n.x,i=n.y,this.getBottomLeft(n),v.transformPoint(n.x,n.y,n),a=n.x,l=n.y,this.getBottomRight(n),v.transformPoint(n.x,n.y,n),f=n.x,u=n.y}else this.getTopLeft(n),e=n.x,s=n.y,this.getTopRight(n),o=n.x,i=n.y,this.getBottomLeft(n),a=n.x,l=n.y,this.getBottomRight(n),f=n.x,u=n.y;return n.x=Math.min(e,o,a,f),n.y=Math.min(s,i,l,u),n.width=Math.max(e,o,a,f)-n.x,n.height=Math.max(s,i,l,u)-n.y,n}};p.exports=r}),8573:((p,S,t)=>{var d=t(6858),c=t(80661),h={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,s,o){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new d(this.scene,r,n,e,s,o)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};p.exports=h}),27387:(p=>{var S={_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,d){return t===void 0&&(t=.5),d===void 0&&(d=t),this.originX=t,this.originY=d,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,d){return t===void 0&&(t=0),d===void 0&&(d=t),this.displayOriginX=t,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=S}),37640:((p,S,t)=>{var d=t(39506),c=t(57355),h=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(s,o){o===void 0&&(o=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=s,o&&this.startFollow(o),this},setRotateToPath:function(s,o){return o===void 0&&(o=0),this.rotateToPath=s,this.pathRotationOffset=o,this},isFollowing:function(){var s=this.pathTween;return s&&s.isPlaying()},startFollow:function(s,o){s===void 0&&(s={}),o===void 0&&(o=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof s=="number"&&(s={duration:s}),s.from=h(s,"from",0),s.to=h(s,"to",1);var a=c(s,"positionOnPath",!1);this.rotateToPath=c(s,"rotateToPath",!1),this.pathRotationOffset=h(s,"rotationOffset",0);var l=h(s,"startAt",o);if(l&&(s.onStart=function(u){var v=u.data[0];v.progress=l,v.elapsed=v.duration*l;var m=v.ease(v.progress);v.current=v.start+(v.end-v.start)*m,v.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(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),a&&(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 f=this.path.getPoint(.1);this.rotation=Math.atan2(f.y-this.y,f.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=s,this},pauseFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.pause(),this},resumeFollow:function(){var s=this.pathTween;return s&&s.isPaused()&&s.resume(),this},stopFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this},pathUpdate:function(){var s=this.pathTween;if(s&&s.data){var o=s.data[0],i=this.pathDelta,a=this.pathVector;if(i.copy(a).negate(),o.state===r.COMPLETE){this.path.getPoint(o.end,a),i.add(a),a.add(this.pathOffset),this.setPosition(a.x,a.y);return}else if(o.state!==r.PLAYING_FORWARD&&o.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),a),i.add(a),a.add(this.pathOffset);var l=this.x,f=this.y;this.setPosition(a.x,a.y);var u=this.x-l,v=this.y-f;if(u===0&&v===0)return;if(o.state!==this._prevDirection){this._prevDirection=o.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,u)+d(this.pathRotationOffset))}}};p.exports=e}),72699:((p,S,t)=>{var d=t(62644),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){h===void 0&&(h=n.default);var e=n.get(h);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(h,r,n){var e=this.scene.sys.renderer;if(!e)return this;var s=e.pipelines;if(s){var o=s.get(h);o&&(this.pipeline=o),r&&(this.pipelineData=n?d(r):r)}return this},setPipelineData:function(h,r){var n=this.pipelineData;return r===void 0?delete n[h]:n[h]=r,this},resetPipeline:function(h){return h===void 0&&(h=!1),this.pipeline=this.defaultPipeline,h&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline===null?null:this.pipeline.name}};p.exports=c}),17581:((p,S,t)=>{var d=t(62644),c=t(47059),h=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,s){var o=this.scene.sys.renderer;if(!o)return this;var i=o.pipelines;if(i){Array.isArray(n)||(n=[n]);for(var a=0;a0,this},setPostPipelineData:function(n,e){var s=this.postPipelineData;return e===void 0?delete s[n]:s[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,o=[],i=0;i=0;o--){var i=s[o];(e&&i.name===n||!e&&i===n)&&(i.destroy(),h(s,o))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};p.exports=r}),80227:(p=>{var S={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,d){return d===void 0&&(d=t),this.scrollFactorX=t,this.scrollFactorY=d,this}};p.exports=S}),16736:(p=>{var S={_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 d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S}),37726:((p,S,t)=>{var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,s){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,s)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(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}};p.exports=h}),79812:((p,S,t)=>{var d=t(4327),c=8,h={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,s){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,s,this.flipX,this.flipY);else{var o=r;this.frame.setCropUVs(this._crop,o.x,o.y,o.width,o.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 d?(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}}};p.exports=h}),27472:(p=>{var S={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,d,c,h){return t===void 0&&(t=16777215),d===void 0&&(d=t,c=t,h=t),this.tintTopLeft=t,this.tintTopRight=d,this.tintBottomLeft=c,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(t,d,c,h){return this.setTint(t,d,c,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};p.exports=S}),53774:(p=>{var S=function(t){var d={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&&(d.textureKey=t.texture.key,d.frameKey=t.frame.name),d};p.exports=S}),16901:((p,S,t)=>{var d=t(36383),c=t(61340),h=t(85955),r=t(86554),n=t(30954),e=t(26099),s=4,o={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~s:this.renderFlags|=s}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~s:this._scaleY!==0&&(this.renderFlags|=s)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~s:this._scaleX!==0&&(this.renderFlags|=s)}},angle:{get:function(){return n(this._rotation*d.RAD_TO_DEG)},set:function(i){this.rotation=n(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=r(i)}},setPosition:function(i,a,l,f){return i===void 0&&(i=0),a===void 0&&(a=i),l===void 0&&(l=0),f===void 0&&(f=0),this.x=i,this.y=a,this.z=l,this.w=f,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,a,l,f){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=this.scene.sys.scale.width),f===void 0&&(f=this.scene.sys.scale.height),this.x=i+Math.random()*l,this.y=a+Math.random()*f,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=i),this.scaleX=i,this.scaleY=a,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,a){i===void 0&&(i=new c);var l=this.parentContainer;if(!l)return this.getLocalTransformMatrix(i);var f=!1;for(a||(a=new c,f=!0),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);l;)a.applyITRS(l.x,l.y,l._rotation,l._scaleX,l._scaleY),a.multiply(i,i),l=l.parentContainer;return f&&a.destroy(),i},getLocalPoint:function(i,a,l,f){l||(l=new e),f||(f=this.scene.sys.cameras.main);var u=f.scrollX,v=f.scrollY,m=i+u*this.scrollFactorX-u,x=a+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(m,x,l):h(m,x,this.x,this.y,this.rotation,this.scaleX,this.scaleY,l),this._originComponent&&(l.x+=this._displayOriginX,l.y+=this._displayOriginY),l},getWorldPoint:function(i,a,l){i===void 0&&(i=new e);var f=this.parentContainer;if(!f)return i.x=this.x,i.y=this.y,i;var u=this.getWorldTransformMatrix(a,l);return i.x=u.tx,i.y=u.ty,i},getParentRotation:function(){for(var i=0,a=this.parentContainer;a;)i+=a.rotation,a=a.parentContainer;return i}};p.exports=o}),61340:((p,S,t)=>{var d=t(83419),c=t(36383),h=t(26099),r=new d({initialize:function(e,s,o,i,a,l){e===void 0&&(e=1),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=1),a===void 0&&(a=0),l===void 0&&(l=0),this.matrix=new Float32Array([e,s,o,i,a,l,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],s=n[1],o=n[2],i=n[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):o||i?c.TAU-(i>0?Math.acos(-o/this.scaleY):-Math.acos(o/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 s=this.matrix;return s[4]=s[0]*n+s[2]*e+s[4],s[5]=s[1]*n+s[3]*e+s[5],this},scale:function(n,e){var s=this.matrix;return s[0]*=n,s[1]*=n,s[2]*=e,s[3]*=e,this},rotate:function(n){var e=Math.sin(n),s=Math.cos(n),o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3];return o[0]=i*s+l*e,o[1]=a*s+f*e,o[2]=i*-e+l*s,o[3]=a*-e+f*s,this},multiply:function(n,e){var s=this.matrix,o=n.matrix,i=s[0],a=s[1],l=s[2],f=s[3],u=s[4],v=s[5],m=o[0],x=o[1],g=o[2],y=o[3],T=o[4],C=o[5],E=e===void 0?s:e.matrix;return E[0]=m*i+x*l,E[1]=m*a+x*f,E[2]=g*i+y*l,E[3]=g*a+y*f,E[4]=T*i+C*l+u,E[5]=T*a+C*f+v,E},multiplyWithOffset:function(n,e,s){var o=this.matrix,i=n.matrix,a=o[0],l=o[1],f=o[2],u=o[3],v=o[4],m=o[5],x=e*a+s*f+v,g=e*l+s*u+m,y=i[0],T=i[1],C=i[2],E=i[3],M=i[4],P=i[5];return o[0]=y*a+T*f,o[1]=y*l+T*u,o[2]=C*a+E*f,o[3]=C*l+E*u,o[4]=M*a+P*f+x,o[5]=M*l+P*u+g,this},transform:function(n,e,s,o,i,a){var l=this.matrix,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5];return l[0]=n*f+e*v,l[1]=n*u+e*m,l[2]=s*f+o*v,l[3]=s*u+o*m,l[4]=i*f+a*v+x,l[5]=i*u+a*m+g,this},transformPoint:function(n,e,s){s===void 0&&(s={x:0,y:0});var o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3],u=o[4],v=o[5];return s.x=n*i+e*l+u,s.y=n*a+e*f+v,s},invert:function(){var n=this.matrix,e=n[0],s=n[1],o=n[2],i=n[3],a=n[4],l=n[5],f=e*i-s*o;return n[0]=i/f,n[1]=-s/f,n[2]=-o/f,n[3]=e/f,n[4]=(o*l-i*a)/f,n[5]=-(e*l-s*a)/f,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.a,this.b,this.c,this.d,this.e,this.f),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,s,o,i,a){var l=this.matrix;return l[0]=n,l[1]=e,l[2]=s,l[3]=o,l[4]=i,l[5]=a,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,s=e[0],o=e[1],i=e[2],a=e[3],l=s*a-o*i;if(n.translateX=e[4],n.translateY=e[5],s||o){var f=Math.sqrt(s*s+o*o);n.rotation=o>0?Math.acos(s/f):-Math.acos(s/f),n.scaleX=f,n.scaleY=l/f}else if(i||a){var u=Math.sqrt(i*i+a*a);n.rotation=Math.PI*.5-(a>0?Math.acos(-i/u):-Math.acos(i/u)),n.scaleX=l/u,n.scaleY=u}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,s,o,i){var a=this.matrix,l=Math.sin(s),f=Math.cos(s);return a[4]=n,a[5]=e,a[0]=f*o,a[1]=l*o,a[2]=-l*i,a[3]=f*i,this},applyInverse:function(n,e,s){s===void 0&&(s=new h);var o=this.matrix,i=o[0],a=o[1],l=o[2],f=o[3],u=o[4],v=o[5],m=1/(i*f+l*-a);return s.x=f*m*n+-l*m*e+(v*l-u*f)*m,s.y=i*m*e+-a*m*n+(-v*i+u*a)*m,s},setQuad:function(n,e,s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=this.quad);var l=this.matrix,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5],y=n*f+e*v+x,T=n*u+e*m+g,C=n*f+o*v+x,E=n*u+o*m+g,M=s*f+o*v+x,P=s*u+o*m+g,A=s*f+e*v+x,R=s*u+e*m+g;if(i){var F=Math.floor(y+.5),w=Math.floor(T+.5),I=F-y,U=w-T;a[0]=F,a[1]=w,a[2]=C+I,a[3]=E+U,a[4]=M+I,a[5]=P+U,a[6]=A+I,a[7]=R+U}else a[0]=y,a[1]=T,a[2]=C,a[3]=E,a[4]=M,a[5]=P,a[6]=A,a[7]=R;return a},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,s){var o=this.getX(n,e);return s&&(o=Math.floor(o+.5)),o},getYRound:function(n,e,s){var o=this.getY(n,e);return s&&(o=Math.floor(o+.5)),o},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}});p.exports=r}),59715:(p=>{var S=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=S):(this._visible=!1,this.renderFlags&=~S)}},setVisible:function(d){return this.visible=d,this}};p.exports=t}),31401:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(37105),c=t(10312),h=t(83419),r=t(31401),n=t(51708),e=t(95643),s=t(87841),o=t(29959),i=t(36899),a=t(26099),l=new r.TransformMatrix,f=new h({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,o],initialize:function(v,m,x,g){e.call(this,v,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this._sortKey="",this._sysEvents=v.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(m,x),this.setBlendMode(c.SKIP_CHECK),g&&this.add(g)},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 s),u.setTo(this.x,this.y,0,0),this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix(),m=v.transformPoint(this.x,this.y);u.setTo(m.x,m.y,0,0)}if(this.list.length>0){var x=this.list,g=new s,y=!1;u.setEmpty();for(var T=0;T-1},setAll:function(u,v,m,x){return d.SetAll(this.list,u,v,m,x),this},each:function(u,v){var m=[null],x,g=this.list.slice(),y=g.length;for(x=2;x0?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.list=[]},onChildDestroyed:function(u){d.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});p.exports=f}),53584:(p=>{var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list;if(r.length!==0){var n=d.localTransform;h?(n.loadIdentity(),n.multiply(h),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var e=d.blendMode!==-1;e||t.setBlendMode(0);var s=d._alpha,o=d.scrollFactorX,i=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var a=0;a{var d=t(25305),c=t(31559),h=t(44603),r=t(23568),n=t(95540);h.register("container",function(e,s){e===void 0&&(e={});var o=r(e,"x",0),i=r(e,"y",0),a=n(e,"children",null),l=new c(this.scene,o,i,a);return s!==void 0&&(e.add=s),d(this.scene,l,e),l})}),24961:((p,S,t)=>{var d=t(31559),c=t(39429);c.register("container",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})}),29959:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(72249),h=t(53584),p.exports={renderWebGL:c,renderCanvas:h}}),72249:(p=>{var S=function(t,d,c,h){c.addToRenderList(d);var r=d.list,n=r.length;if(n!==0){var e=d.localTransform;h?(e.loadIdentity(),e.multiply(h),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),t.pipelines.preBatch(d);var s=d.blendMode!==-1;s||t.setBlendMode(0);for(var o=d.alpha,i=d.scrollFactorX,a=d.scrollFactorY,l=0;l{p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}),3069:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(441),r=t(95643),n=t(41212),e=t(35846),s=t(44594),o=t(61369),i=new d({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,h],initialize:function(l,f,u,v,m,x){if(r.call(this,l,"DOMElement"),this.parent=l.sys.game.domContainer,!this.parent)throw new Error("No DOM Container set in game config");this.cache=l.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new o,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(f,u),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),m,x):this.createElement(v,m,x):v&&this.setElement(v,m,x),l.sys.events.on(s.SLEEP,this.handleSceneEvent,this),l.sys.events.on(s.WAKE,this.handleSceneEvent,this),l.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(a){var l=this.node,f=l.style;l&&(f.display=a.settings.visible?"block":"none")},setSkew:function(a,l){return a===void 0&&(a=0),l===void 0&&(l=a),this.skewX=a,this.skewY=l,this},setPerspective:function(a){return this.parent.style.perspective=a+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(a){this.parent.style.perspective=a+"px"}},addListener:function(a){if(this.node){a=a.split(" ");for(var l=0;l{var d=t(47407),c=t(95643),h=t(61340),r=new h,n=new h,e=new h,s=function(o,i,a,l){if(i.node){var f=i.node.style,u=i.scene.sys.settings;if(!f||!u.visible||c.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&a.id||i.parentContainer&&!i.parentContainer.willRender()){f.display="none";return}var v=i.parentContainer,m=a.alpha*i.alpha;v&&(m*=v.alpha);var x=r,g=n,y=e,T=0,C=0,E="0%",M="0%";l?(T=i.width*i.scaleX*i.originX,C=i.height*i.scaleY*i.originY,g.applyITRS(i.x-T,i.y-C,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),x.multiplyWithOffset(l,-a.scrollX*i.scrollFactorX,-a.scrollY*i.scrollFactorY),g.e=i.x-T,g.f=i.y-C,x.multiply(g,y)):(T=i.width*i.originX,C=i.height*i.originY,g.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),E=100*i.originX+"%",M=100*i.originY+"%",g.e-=a.scrollX*i.scrollFactorX,g.f-=a.scrollY*i.scrollFactorY,x.multiply(g,y),y.e-=T,y.f-=C),i.transformOnly||(f.display="block",f.opacity=m,f.zIndex=i._depth,f.pointerEvents=i.pointerEvents,f.mixBlendMode=d[i._blendMode]),f.transform=y.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",f.transformOrigin=E+" "+M}};p.exports=s}),2611:((p,S,t)=>{var d=t(3069),c=t(39429);c.register("dom",function(h,r,n,e,s){var o=new d(this.scene,h,r,n,e,s);return this.displayList.add(o),o})}),441:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(49381),h=t(49381),p.exports={renderWebGL:c,renderCanvas:h}}),62980:(p=>{p.exports="addedtoscene"}),41337:(p=>{p.exports="destroy"}),44947:(p=>{p.exports="removedfromscene"}),49358:(p=>{p.exports="complete"}),35163:(p=>{p.exports="created"}),97249:(p=>{p.exports="error"}),19483:(p=>{p.exports="locked"}),56059:(p=>{p.exports="loop"}),26772:(p=>{p.exports="metadata"}),64437:(p=>{p.exports="playing"}),83411:(p=>{p.exports="play"}),75780:(p=>{p.exports="seeked"}),67799:(p=>{p.exports="seeking"}),63500:(p=>{p.exports="stalled"}),55541:(p=>{p.exports="stop"}),53208:(p=>{p.exports="textureready"}),4992:(p=>{p.exports="unlocked"}),12:(p=>{p.exports="unsupported"}),51708:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(64993),n=new d({Extends:h,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(s){h.call(this,s,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=n}),70217:(()=>{}),56315:((p,S,t)=>{var d=t(42421),c=t(39429);c.register("extern",function(){var h=new d(this.scene);return this.displayList.add(h),h})}),64993:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(80287),h=t(70217),p.exports={renderWebGL:c,renderCanvas:h}}),80287:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){h.pipelines.clear();var s=d(r,n,e).calc;r.render.call(r,h,n,s),h.pipelines.rebind()};p.exports=c}),85592:(p=>{p.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:((p,S,t)=>{var d=t(71911),c=t(83419),h=t(85592),r=t(31401),n=t(8497),e=t(95643),s=t(95540),o=t(35154),i=t(36383),a=t(84503),l=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,a],initialize:function(u,v){var m=o(v,"x",0),x=o(v,"y",0);e.call(this,u,"Graphics"),this.setPosition(m,x),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(v)},setDefaultStyles:function(f){return o(f,"lineStyle",null)&&(this.defaultStrokeWidth=o(f,"lineStyle.width",1),this.defaultStrokeColor=o(f,"lineStyle.color",16777215),this.defaultStrokeAlpha=o(f,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),o(f,"fillStyle",null)&&(this.defaultFillColor=o(f,"fillStyle.color",16777215),this.defaultFillAlpha=o(f,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(f,u,v){return v===void 0&&(v=1),this.commandBuffer.push(h.LINE_STYLE,f,u,v),this._lineWidth=f,this},fillStyle:function(f,u){return u===void 0&&(u=1),this.commandBuffer.push(h.FILL_STYLE,f,u),this},fillGradientStyle:function(f,u,v,m,x,g,y,T){return x===void 0&&(x=1),g===void 0&&(g=x),y===void 0&&(y=x),T===void 0&&(T=x),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,x,g,y,T,f,u,v,m),this},lineGradientStyle:function(f,u,v,m,x,g){return g===void 0&&(g=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,f,g,u,v,m,x),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(f){return this.fillCircle(f.x,f.y,f.radius)},strokeCircleShape:function(f){return this.strokeCircle(f.x,f.y,f.radius)},fillCircle:function(f,u,v){return this.beginPath(),this.arc(f,u,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(f,u,v){return this.beginPath(),this.arc(f,u,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(f){return this.fillRect(f.x,f.y,f.width,f.height)},strokeRectShape:function(f){return this.strokeRect(f.x,f.y,f.width,f.height)},fillRect:function(f,u,v,m){return this.commandBuffer.push(h.FILL_RECT,f,u,v,m),this},strokeRect:function(f,u,v,m){var x=this._lineWidth/2,g=f-x,y=f+x;return this.beginPath(),this.moveTo(f,u),this.lineTo(f,u+m),this.strokePath(),this.beginPath(),this.moveTo(f+v,u),this.lineTo(f+v,u+m),this.strokePath(),this.beginPath(),this.moveTo(g,u),this.lineTo(y+v,u),this.strokePath(),this.beginPath(),this.moveTo(g,u+m),this.lineTo(y+v,u+m),this.strokePath(),this},fillRoundedRect:function(f,u,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,C=x;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),C=s(x,"br",20));var E=g>=0,M=y>=0,P=T>=0,A=C>=0;return g=Math.abs(g),y=Math.abs(y),T=Math.abs(T),C=Math.abs(C),this.beginPath(),this.moveTo(f+g,u),this.lineTo(f+v-y,u),M?this.arc(f+v-y,u+y,y,-i.TAU,0):this.arc(f+v,u,y,Math.PI,i.TAU,!0),this.lineTo(f+v,u+m-C),A?this.arc(f+v-C,u+m-C,C,0,i.TAU):this.arc(f+v,u+m,C,-i.TAU,Math.PI,!0),this.lineTo(f+T,u+m),P?this.arc(f+T,u+m-T,T,i.TAU,Math.PI):this.arc(f,u+m,T,0,-i.TAU,!0),this.lineTo(f,u+g),E?this.arc(f+g,u+g,g,-Math.PI,-i.TAU):this.arc(f,u,g,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(f,u,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,C=x,E=Math.min(v,m)/2;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),C=s(x,"br",20));var M=g>=0,P=y>=0,A=T>=0,R=C>=0;return g=Math.min(Math.abs(g),E),y=Math.min(Math.abs(y),E),T=Math.min(Math.abs(T),E),C=Math.min(Math.abs(C),E),this.beginPath(),this.moveTo(f+g,u),this.lineTo(f+v-y,u),this.moveTo(f+v-y,u),P?this.arc(f+v-y,u+y,y,-i.TAU,0):this.arc(f+v,u,y,Math.PI,i.TAU,!0),this.lineTo(f+v,u+m-C),this.moveTo(f+v,u+m-C),R?this.arc(f+v-C,u+m-C,C,0,i.TAU):this.arc(f+v,u+m,C,-i.TAU,Math.PI,!0),this.lineTo(f+T,u+m),this.moveTo(f+T,u+m),A?this.arc(f+T,u+m-T,T,i.TAU,Math.PI):this.arc(f,u+m,T,0,-i.TAU,!0),this.lineTo(f,u+g),this.moveTo(f,u+g),M?this.arc(f+g,u+g,g,-Math.PI,-i.TAU):this.arc(f,u,g,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(f,u){return this.fillPoint(f.x,f.y,u)},fillPoint:function(f,u,v){return!v||v<1?v=1:(f-=v/2,u-=v/2),this.commandBuffer.push(h.FILL_RECT,f,u,v,v),this},fillTriangleShape:function(f){return this.fillTriangle(f.x1,f.y1,f.x2,f.y2,f.x3,f.y3)},strokeTriangleShape:function(f){return this.strokeTriangle(f.x1,f.y1,f.x2,f.y2,f.x3,f.y3)},fillTriangle:function(f,u,v,m,x,g){return this.commandBuffer.push(h.FILL_TRIANGLE,f,u,v,m,x,g),this},strokeTriangle:function(f,u,v,m,x,g){return this.commandBuffer.push(h.STROKE_TRIANGLE,f,u,v,m,x,g),this},strokeLineShape:function(f){return this.lineBetween(f.x1,f.y1,f.x2,f.y2)},lineBetween:function(f,u,v,m){return this.beginPath(),this.moveTo(f,u),this.lineTo(v,m),this.strokePath(),this},lineTo:function(f,u){return this.commandBuffer.push(h.LINE_TO,f,u),this},moveTo:function(f,u){return this.commandBuffer.push(h.MOVE_TO,f,u),this},strokePoints:function(f,u,v,m){u===void 0&&(u=!1),v===void 0&&(v=!1),m===void 0&&(m=f.length),this.beginPath(),this.moveTo(f[0].x,f[0].y);for(var x=1;x-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(f,u,v){var m=this.scene.sys,x=m.game.renderer;u===void 0&&(u=m.scale.width),v===void 0&&(v=m.scale.height),l.TargetCamera.setScene(this.scene),l.TargetCamera.setViewport(0,0,u,v),l.TargetCamera.scrollX=this.x,l.TargetCamera.scrollY=this.y;var g,y,T={willReadFrequently:!0};if(typeof f=="string")if(m.textures.exists(f)){g=m.textures.get(f);var C=g.getSourceImage();C instanceof HTMLCanvasElement&&(y=C.getContext("2d",T))}else g=m.textures.createCanvas(f,u,v),y=g.getSourceImage().getContext("2d",T);else f instanceof HTMLCanvasElement&&(y=f.getContext("2d",T));return y&&(this.renderCanvas(x,this,l.TargetCamera,null,y,!1),g&&g.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});l.TargetCamera=new d,p.exports=l}),32768:((p,S,t)=>{var d=t(85592),c=t(20926),h=function(r,n,e,s,o,i){var a=n.commandBuffer,l=a.length,f=o||r.currentContext;if(!(l===0||!c(r,f,n,e,s))){e.addToRenderList(n);var u=1,v=1,m=0,x=0,g=1,y=0,T=0,C=0;f.beginPath();for(var E=0;E>>16,T=(m&65280)>>>8,C=m&255,f.strokeStyle="rgba("+y+","+T+","+C+","+u+")",f.lineWidth=g,E+=3;break;case d.FILL_STYLE:x=a[E+1],v=a[E+2],y=(x&16711680)>>>16,T=(x&65280)>>>8,C=x&255,f.fillStyle="rgba("+y+","+T+","+C+","+v+")",E+=2;break;case d.BEGIN_PATH:f.beginPath();break;case d.CLOSE_PATH:f.closePath();break;case d.FILL_PATH:i||f.fill();break;case d.STROKE_PATH:i||f.stroke();break;case d.FILL_RECT:i?f.rect(a[E+1],a[E+2],a[E+3],a[E+4]):f.fillRect(a[E+1],a[E+2],a[E+3],a[E+4]),E+=4;break;case d.FILL_TRIANGLE:f.beginPath(),f.moveTo(a[E+1],a[E+2]),f.lineTo(a[E+3],a[E+4]),f.lineTo(a[E+5],a[E+6]),f.closePath(),i||f.fill(),E+=6;break;case d.STROKE_TRIANGLE:f.beginPath(),f.moveTo(a[E+1],a[E+2]),f.lineTo(a[E+3],a[E+4]),f.lineTo(a[E+5],a[E+6]),f.closePath(),i||f.stroke(),E+=6;break;case d.LINE_TO:f.lineTo(a[E+1],a[E+2]),E+=2;break;case d.MOVE_TO:f.moveTo(a[E+1],a[E+2]),E+=2;break;case d.LINE_FX_TO:f.lineTo(a[E+1],a[E+2]),E+=5;break;case d.MOVE_FX_TO:f.moveTo(a[E+1],a[E+2]),E+=5;break;case d.SAVE:f.save();break;case d.RESTORE:f.restore();break;case d.TRANSLATE:f.translate(a[E+1],a[E+2]),E+=2;break;case d.SCALE:f.scale(a[E+1],a[E+2]),E+=2;break;case d.ROTATE:f.rotate(a[E+1]),E+=1;break;case d.GRADIENT_FILL_STYLE:E+=5;break;case d.GRADIENT_LINE_STYLE:E+=6;break}}f.restore()}};p.exports=h}),87079:((p,S,t)=>{var d=t(44603),c=t(43831);d.register("graphics",function(h,r){h===void 0&&(h={}),r!==void 0&&(h.add=r);var n=new c(this.scene,h);return h.add&&this.scene.sys.displayList.add(n),n})}),1201:((p,S,t)=>{var d=t(43831),c=t(39429);c.register("graphics",function(h){return this.displayList.add(new d(this.scene,h))})}),84503:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(77545),h=t(32768),h=t(32768),p.exports={renderWebGL:c,renderCanvas:h}}),77545:((p,S,t)=>{var d=t(85592),c=t(91296),h=t(61340),r=t(70554),n=function(a,l,f){this.x=a,this.y=l,this.width=f},e=function(a,l,f){this.points=[],this.pointsLength=1,this.points[0]=new n(a,l,f)},s=[],o=new h,i=function(a,l,f,u){if(l.commandBuffer.length!==0){f.addToRenderList(l);var v=a.pipelines.set(l.pipeline,l);a.pipelines.preBatch(l);for(var m=c(l,f,u).calc,x=o.loadIdentity(),g=l.commandBuffer,y=f.alpha*l.alpha,T=1,C=v.fillTint,E=v.strokeTint,M=0,P=0,A=0,R=.01,F=Math.PI*2,w,I=[],U=0,N=!0,D=null,B=r.getTintAppendFloatAlpha,L=0;L0&&(Q=-F+Q%F):Q>F?Q=F:Q<0&&(Q=F+Q%F),D===null&&(D=new e(Z+Math.cos(tt)*_,q+Math.sin(tt)*_,T),I.push(D),$+=R);$<1+k;)A=Q*$+tt,M=Z+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T)),$+=R;A=Q+tt,M=Z+Math.cos(A)*_,P=q+Math.sin(A)*_,D.points.push(new n(M,P,T));break}case d.FILL_RECT:{v.batchFillRect(g[++L],g[++L],g[++L],g[++L],x,m);break}case d.FILL_TRIANGLE:{v.batchFillTriangle(g[++L],g[++L],g[++L],g[++L],g[++L],g[++L],x,m);break}case d.STROKE_TRIANGLE:{v.batchStrokeTriangle(g[++L],g[++L],g[++L],g[++L],g[++L],g[++L],T,x,m);break}case d.LINE_TO:{D!==null?D.points.push(new n(g[++L],g[++L],T)):(D=new e(g[++L],g[++L],T),I.push(D));break}case d.MOVE_TO:{D=new e(g[++L],g[++L],T),I.push(D);break}case d.SAVE:{s.push(x.copyToArray());break}case d.RESTORE:{x.copyFromArray(s.pop());break}case d.TRANSLATE:{Z=g[++L],q=g[++L],x.translate(Z,q);break}case d.SCALE:{Z=g[++L],q=g[++L],x.scale(Z,q);break}case d.ROTATE:{x.rotate(g[++L]);break}}a.pipelines.postBatch(l)}};p.exports=i}),26479:((p,S,t)=>{var d=t(61061),c=t(83419),h=t(51708),r=t(50792),n=t(46710),e=t(95540),s=t(35154),o=t(97022),i=t(41212),a=t(88492),l=t(35072),f=t(68287),u=new c({Extends:r,initialize:function(m,x,g){r.call(this),g?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?i(x[0])&&(g=x,x=null):i(x)&&(g=x,x=null),this.scene=m,this.children=new l,this.isParent=!0,this.type="Group",this.classType=e(g,"classType",f),this.name=e(g,"name",""),this.active=e(g,"active",!0),this.maxSize=e(g,"maxSize",-1),this.defaultKey=e(g,"defaultKey",null),this.defaultFrame=e(g,"defaultFrame",null),this.runChildUpdate=e(g,"runChildUpdate",!1),this.createCallback=e(g,"createCallback",null),this.removeCallback=e(g,"removeCallback",null),this.createMultipleCallback=e(g,"createMultipleCallback",null),this.internalCreateCallback=e(g,"internalCreateCallback",null),this.internalRemoveCallback=e(g,"internalRemoveCallback",null),x&&this.addMultiple(x),g&&this.createMultiple(g),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(v,m,x,g,y,T){if(v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=this.defaultKey),g===void 0&&(g=this.defaultFrame),y===void 0&&(y=!0),T===void 0&&(T=!0),this.isFull())return null;var C=new this.classType(this.scene,v,m,x,g);return C.addToDisplayList(this.scene.sys.displayList),C.addToUpdateList(),C.visible=y,C.setActive(T),this.add(C),C},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var m=[];if(v[0].key)for(var x=0;x=0;A--)if(P=F[A],P.active===x){if(R++,R===m)break}else P=null;return P?(typeof y=="number"&&(P.x=y),typeof T=="number"&&(P.y=T),P):g?this.create(y,T,C,E,M):null},get:function(v,m,x,g,y){return this.getFirst(!1,!0,v,m,x,g,y)},getFirstAlive:function(v,m,x,g,y,T){return this.getFirst(!0,v,m,x,g,y,T)},getFirstDead:function(v,m,x,g,y,T){return this.getFirst(!1,v,m,x,g,y,T)},playAnimation:function(v,m){return d.PlayAnimation(this.children.entries,v,m),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var m=0,x=0;x{var d=t(44603),c=t(26479);d.register("group",function(h){return new c(this.scene,null,h)})}),3385:((p,S,t)=>{var d=t(26479),c=t(39429);c.register("group",function(h,r){return this.updateList.add(new d(this.scene,h,r))})}),88571:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(59819),n=new d({Extends:h,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(s,o,i,a,l){h.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(a,l),this.setPosition(o,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=n}),40652:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),82459:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(88571);c.register("image",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"frame",null),i=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,i,n),i})}),2117:((p,S,t)=>{var d=t(88571),c=t(39429);c.register("image",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),59819:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(99517),h=t(40652),p.exports={renderWebGL:c,renderCanvas:h}}),99517:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),this.pipeline.batchSprite(d,c,h)};p.exports=S}),77856:((p,S,t)=>{var d={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)}};d.Shader=t(20071),d.Mesh=t(4703),d.NineSlice=t(28103),d.PointLight=t(80321),d.Plane=t(33663),d.Factories.Shader=t(74177),d.Factories.Mesh=t(9225),d.Factories.NineSlice=t(47521),d.Factories.PointLight=t(71255),d.Factories.Plane=t(30985),d.Creators.Shader=t(54935),d.Creators.Mesh=t(20527),d.Creators.NineSlice=t(28279),d.Creators.PointLight=t(39829),d.Creators.Plane=t(56015),d.Light=t(41432),d.LightsManager=t(61356),d.LightsPlugin=t(88992),p.exports=d}),93595:((p,S,t)=>{var d=t(10312),c=t(83419),h=t(31401),r=t(53774),n=t(45893),e=t(50792),s=t(51708),o=t(73162),i=t(33963),a=t(44594),l=t(19186),f=new c({Extends:o,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Mask,h.PostPipeline,h.Visible,e,i],initialize:function(v,m){o.call(this,v),e.call(this),this.scene=v,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=v.sys,this.events=v.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),m&&this.add(m),v.sys.queueDepthSort()},setActive:function(u){return this.active=u,this},setName:function(u){return this.name=u,this},setState:function(u){return this.state=u,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(u,v){return this.data||(this.data=new n(this)),this.data.set(u,v),this},incData:function(u,v){return this.data||(this.data=new n(this)),this.data.inc(u,v),this},toggleData:function(u){return this.data||(this.data=new n(this)),this.data.toggle(u),this},getData:function(u){return this.data||(this.data=new n(this)),this.data.get(u)},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(u){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&u.id)},getIndexList:function(){for(var u=this,v=this.parentContainer,m=[];v&&(m.unshift(v.getIndex(u)),u=v,v.parentContainer);)v=v.parentContainer;return m.unshift(this.displayList.getIndex(u)),m},addChildCallback:function(u){var v=u.displayList;v&&v!==this&&u.removeFromDisplayList(),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(s.ADDED_TO_SCENE,u,this.scene),this.events.emit(a.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(s.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,u,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(l(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,v){return u._depth-v._depth},getChildren:function(){return this.list},addToDisplayList:function(u){return u===void 0&&(u=this.scene.sys.displayList),this.displayList&&this.displayList!==u&&this.removeFromDisplayList(),u.exists(this)||(this.displayList=u,u.add(this,!0),u.queueDepthSort(),this.emit(s.ADDED_TO_SCENE,this,this.scene),u.events.emit(a.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var u=this.displayList||this.scene.sys.displayList;return u.exists(this)&&(u.remove(this,!0),u.queueDepthSort(),this.displayList=null,this.emit(s.REMOVED_FROM_SCENE,this,this.scene),u.events.emit(a.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var u=null;return this.parentContainer?u=this.parentContainer.list:this.displayList&&(u=this.displayList.list),u},destroy:function(u){if(!(!this.scene||this.ignoreDestroy)){this.emit(s.DESTROY,this);for(var v=this.list;v.length;)v[0].destroy(u);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}}});p.exports=f}),2956:(p=>{var S=function(t,d,c){var h=d.list;if(h.length!==0){d.depthSort();var r=d.blendMode!==-1;r||t.setBlendMode(0);var n=d._alpha;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var e=0;e{var d=t(25305),c=t(93595),h=t(44603),r=t(23568);h.register("layer",function(n,e){n===void 0&&(n={});var s=r(n,"children",null),o=new c(this.scene,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})}),20005:((p,S,t)=>{var d=t(93595),c=t(39429);c.register("layer",function(h){return this.displayList.add(new d(this.scene,h))})}),33963:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(15869),h=t(2956),p.exports={renderWebGL:c,renderCanvas:h}}),15869:(p=>{var S=function(t,d,c){var h=d.list,r=h.length;if(r!==0){d.depthSort(),t.pipelines.preBatch(d);var n=d.blendMode!==-1;n||t.setBlendMode(0);for(var e=d.alpha,s=0;s{var d=t(96503),c=t(83419),h=t(31401),r=t(51767),n=t(70554),e=new c({Extends:d,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(o,i,a,l,f,u,v){d.call(this,o,i,a),this.color=new r(l,f,u),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(a)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}},width:{get:function(){return this.diameter},set:function(s){this.diameter=s}},height:{get:function(){return this.diameter},set:function(s){this.diameter=s}},willRender:function(s){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&s.id)},setColor:function(s){var o=n.getFloatsFromUintRGB(s);return this.color.set(o[0],o[1],o[2]),this},setIntensity:function(s){return this.intensity=s,this},setRadius:function(s){return this.radius=s,this}});e.RENDER_MASK=15,p.exports=e}),61356:((p,S,t)=>{var d=t(81491),c=t(83419),h=t(20339),r=t(41432),n=t(80321),e=t(51767),s=t(19133),o=t(19186),i=t(70554),a=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(l,f,u,v,m,x){return this.systems.displayList.add(new n(this.scene,l,f,u,v,m,x))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(l){for(var f=this.lights,u=l.worldView,v=[],m=0;mthis.maxLights&&(o(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(l,f){return l.distance>=f.distance},setAmbientColor:function(l){var f=i.getFloatsFromUintRGB(l);return this.ambientColor.set(f[0],f[1],f[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(l,f,u,v,m){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),v===void 0&&(v=16777215),m===void 0&&(m=1);var x=i.getFloatsFromUintRGB(v),g=new r(l,f,u,x[0],x[1],x[2],m);return this.lights.push(g),g},removeLight:function(l){var f=this.lights.indexOf(l);return f>=0&&s(this.lights,f),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=a}),88992:((p,S,t)=>{var d=t(83419),c=t(61356),h=t(37277),r=t(44594),n=new d({Extends:c,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.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}});h.register("LightsPlugin",n,"lights"),p.exports=n}),4703:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(39506),r=t(83997),n=t(95643),e=t(34684),s=t(92515),o=t(91296),i=t(37867),a=t(29807),l=t(43396),f=t(19186),u=t(25836),v=t(39318),m=new d({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,a],initialize:function(g,y,T,C,E,M,P,A,R,F,w,I){y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C="__WHITE"),n.call(this,g,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new u,this.modelScale=new u(1,1,1),this.modelRotation=new u,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new u,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var U=g.sys.renderer;this.setPosition(y,T),this.setTexture(C,E),this.setSize(U.width,U.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(U.width,U.height),M&&this.addVertices(M,P,A,R,F,w,I)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(u.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=u.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,g,y,T,C){return y===void 0&&(y=45),T===void 0&&(T=.01),C===void 0&&(C=1e3),this.fov=y,this.projectionMatrix.perspective(h(y),x/g,T,C),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,g,y,T){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),g===void 0&&(g=1),y===void 0&&(y=-1e3),T===void 0&&(T=1e3),this.fov=0,this.projectionMatrix.ortho(-x,x,-g,g,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,g,y,T,C,E,M,P,A){var R=this.scene.sys.cache.obj.get(x),F;return R&&(F=e(R,this,g,y,T,C,E,M,P,A)),(!F||F.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",x),this},sortByDepth:function(x,g){return x.depth-g.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(x,g,y,T,C,E,M){var P=new v(x,g,y,T,C,E,M);return this.vertices.push(P),P},addFace:function(x,g,y){var T=new r(x,g,y);return this.faces.push(T),this.dirtyCache[9]=-1,T},addVertices:function(x,g,y,T,C,E,M){var P=s(x,g,y,T,C,E,M);return P?(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},hasFaceAt:function(x,g,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=o(this,y).calc,C=this.faces,E=0;E{var S=function(){};p.exports=S}),20527:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(4703);c.register("mesh",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"vertices",[]),l=r(e,"uvs",[]),f=r(e,"indicies",[]),u=r(e,"containsZ",!1),v=r(e,"normals",[]),m=r(e,"colors",16777215),x=r(e,"alphas",1),g=new n(this.scene,0,0,o,i,a,l,f,u,v,m,x);return s!==void 0&&(e.add=s),d(this.scene,g,e),g})}),9225:((p,S,t)=>{var d=t(4703),c=t(39429);c.register("mesh",function(h,r,n,e,s,o,i,a,l,f,u){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,f,u))})}),29807:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(48833),h=t(36488),p.exports={renderWebGL:c,renderCanvas:h}}),48833:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){var s=r.faces,o=s.length;if(o!==0){n.addToRenderList(r);var i=h.pipelines.set(r.pipeline,r),a=d(r,n,e).calc;h.pipelines.preBatch(r);for(var l=i.setGameObject(r),f=i.vertexViewF32,u=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,m=r.tintFill,x=[],g=r.debugCallback,y=a.a,T=a.b,C=a.c,E=a.d,M=a.e,P=a.f,A=r.viewPosition.z,R=r.hideCCW,F=n.roundPixels,w=n.alpha*r.alpha,I=0,U=0;U{var d=t(83419),c=t(31401),h=t(95643),r=t(78023),n=t(39318),e=new d({Extends:h,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(o,i,a,l,f,u,v,m,x,g,y){h.call(this,o,"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 T=o.textures.getFrame(l,f);this.is3Slice=!g&&!y,T&&T.scale9&&(this.is3Slice=T.is3Slice);for(var C=this.is3Slice?18:54,E=0;E{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(28103);c.register("nineslice",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=r(e,"width",256),l=r(e,"height",256),f=r(e,"leftWidth",10),u=r(e,"rightWidth",10),v=r(e,"topHeight",0),m=r(e,"bottomHeight",0),x=new n(this.scene,0,0,o,i,a,l,f,u,v,m);return s!==void 0&&(e.add=s),d(this.scene,x,e),x})}),47521:((p,S,t)=>{var d=t(28103),c=t(39429);c.register("nineslice",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a,l,f))})}),78023:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(52230),p.exports={renderWebGL:c,renderCanvas:h}}),52230:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){var o=n.vertices,i=o.length;if(i!==0){e.addToRenderList(n);var a=r.pipelines.set(n.pipeline,n),l=d(n,e,s,!1).calc;r.pipelines.preBatch(n);var f=a.setGameObject(n),u=a.vertexViewF32,v=a.vertexViewU32,m=a.vertexCount*a.currentShader.vertexComponentCount-1,x=e.roundPixels,g=n.tintFill,y=e.alpha*n.alpha,T=c.getTintAppendFloatAlpha(n.tint,y),C=a.vertexAvailable(),E=-1;C{var d=t(83419),c=t(44777),h=t(37589),r=t(6113),n=t(91389),e=t(90664),s=new d({Extends:c,initialize:function(i){c.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var o=this.propertyValue,i=o,a=this.defaultEmit,l=this.defaultUpdate;if(this.method===9){this.start=o[0],this.ease=r("Linear"),this.interpolation=n("linear"),a=this.easedValueEmit,l=this.easeValueUpdate,i=o[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var f=0;f{var d=t(30976),c=t(45319),h=t(83419),r=t(99472),n=t(6113),e=t(95540),s=t(91389),o=t(77720),i=t(15994),a=new h({initialize:function(f,u,v){v===void 0&&(v=!1),this.propertyKey=f,this.propertyValue=u,this.defaultValue=u,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=v,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(l,f){l===void 0&&(l={}),f&&(this.propertyKey=f),this.propertyValue=e(l,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(l){var f;switch(this.method){case 1:case 3:case 8:f=l;break;case 2:this.propertyValue.indexOf(l)>=0&&(f=l);break;case 4:var u=(this.end-this.start)/this.steps;f=o(l,u),this.counter=f;break;case 5:case 6:case 7:f=c(l,this.start,this.end);break;case 9:f=this.start[0];break}return this.current=f,this},getMethod:function(){var l=this.propertyValue;if(l===null)return 0;var f=typeof l;if(f==="number")return 1;if(Array.isArray(l))return 2;if(f==="function")return 3;if(f==="object"){if(this.hasBoth(l,"start","end"))return this.has(l,"steps")?4:5;if(this.hasBoth(l,"min","max"))return 6;if(this.has(l,"random"))return 7;if(this.hasEither(l,"onEmit","onUpdate"))return 8;if(this.hasEither(l,"values","interpolation"))return 9}return 0},setMethods:function(){var l=this.propertyValue,f=l,u=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:u=this.staticValueEmit;break;case 2:u=this.randomStaticValueEmit,f=l[0];break;case 3:this._onEmit=l,u=this.proxyEmit,f=this.defaultValue;break;case 4:this.start=l.start,this.end=l.end,this.steps=l.steps,this.counter=this.start,this.yoyo=this.has(l,"yoyo")?l.yoyo:!1,this.direction=0,u=this.steppedEmit,f=this.start;break;case 5:this.start=l.start,this.end=l.end;var m=this.has(l,"ease")?l.ease:"Linear";this.ease=n(m,l.easeParams),u=this.has(l,"random")&&l.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,f=this.start;break;case 6:this.start=l.min,this.end=l.max,u=this.has(l,"int")&&l.int?this.randomRangedIntEmit:this.randomRangedValueEmit,f=this.start;break;case 7:var x=l.random;Array.isArray(x)&&(this.start=x[0],this.end=x[1]),u=this.randomRangedIntEmit,f=this.start;break;case 8:this._onEmit=this.has(l,"onEmit")?l.onEmit:this.defaultEmit,this._onUpdate=this.has(l,"onUpdate")?l.onUpdate:this.defaultUpdate,u=this.proxyEmit,v=this.proxyUpdate,f=this.defaultValue;break;case 9:this.start=l.values;var g=this.has(l,"ease")?l.ease:"Linear";this.ease=n(g,l.easeParams),this.interpolation=s(l.interpolation),u=this.easedValueEmit,v=this.easeValueUpdate,f=this.start[0];break}return this.onEmit=u,this.onUpdate=v,this.current=f,this},has:function(l,f){return l.hasOwnProperty(f)},hasBoth:function(l,f,u){return l.hasOwnProperty(f)&&l.hasOwnProperty(u)},hasEither:function(l,f,u){return l.hasOwnProperty(f)||l.hasOwnProperty(u)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(l,f,u,v){return v},proxyEmit:function(l,f,u){var v=this._onEmit(l,f,u);return this.current=v,v},proxyUpdate:function(l,f,u,v){var m=this._onUpdate(l,f,u,v);return this.current=m,m},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var l=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[l],this.current},randomRangedValueEmit:function(l,f){var u=r(this.start,this.end);return l&&l.data[f]&&(l.data[f].min=u,l.data[f].max=this.end),this.current=u,u},randomRangedIntEmit:function(l,f){var u=d(this.start,this.end);return l&&l.data[f]&&(l.data[f].min=u,l.data[f].max=this.end),this.current=u,u},steppedEmit:function(){var l=this.counter,f=l,u=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(f+=u,f>=this.end&&(v=f-this.end,f=this.end-v,this.direction=1)):(f-=u,f<=this.start&&(v=this.start-f,f=this.start+v,this.direction=0)),this.counter=f}else this.counter=i(f+u,this.start,this.end);return this.current=l,l},easedValueEmit:function(l,f){if(l&&l.data[f]){var u=l.data[f];u.min=this.start,u.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(l,f,u){var v=l.data[f],m,x=this.ease(u);return this.interpolation?m=this.interpolation(this.start,x):m=(v.max-v.min)*x+v.min,this.current=m,m},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});p.exports=a}),24502:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(20286),r=new d({Extends:h,initialize:function(e,s,o,i,a){if(typeof e=="object"){var l=e;e=c(l,"x",0),s=c(l,"y",0),o=c(l,"power",0),i=c(l,"epsilon",100),a=c(l,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=100),a===void 0&&(a=50);h.call(this,e,s,!0),this._gravity=a,this._power=o*a,this._epsilon=i*i},update:function(n,e){var s=this.x-n.x,o=this.y-n.y,i=s*s+o*o;if(i!==0){var a=Math.sqrt(i);i{var d=t(9674),c=t(45319),h=t(83419),r=t(39506),n=t(87841),e=t(11520),s=t(26099),o=new h({initialize:function(a){this.emitter=a,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new s,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=a.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new d(this)),this.bounds=new n},emit:function(i,a,l,f,u,v){return this.emitter.emit(i,a,l,f,u,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,a){i===void 0&&(i=0),a===void 0&&(a=0),this.x=i,this.y=a},fire:function(i,a){var l=this.emitter,f=l.ops,u=l.getAnim();if(u?this.anims.play(u):(this.frame=l.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(l.getEmitZone(this),i===void 0?this.x+=f.x.onEmit(this,"x"):f.x.steps>0?this.x+=i+f.x.onEmit(this,"x"):this.x+=i,a===void 0?this.y+=f.y.onEmit(this,"y"):f.y.steps>0?this.y+=a+f.y.onEmit(this,"y"):this.y+=a,this.life=f.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=f.delay.onEmit(this,"delay"),this.holdCurrent=f.hold.onEmit(this,"hold"),this.scaleX=f.scaleX.onEmit(this,"scaleX"),this.scaleY=f.scaleY.active?f.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=f.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),l.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&l.getDeathZone(this))return this.lifeCurrent=0,!1;var v=f.speedX.onEmit(this,"speedX"),m=f.speedY.active?f.speedY.onEmit(this,"speedY"):v;if(l.radial){var x=r(f.angle.onEmit(this,"angle"));this.velocityX=Math.cos(x)*Math.abs(v),this.velocityY=Math.sin(x)*Math.abs(m)}else if(l.moveTo){var g=f.moveToX.onEmit(this,"moveToX"),y=f.moveToY.onEmit(this,"moveToY"),T=this.life/1e3;this.velocityX=(g-this.x)/T,this.velocityY=(y-this.y)/T}else this.velocityX=v,this.velocityY=m;return l.acceleration&&(this.accelerationX=f.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=f.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=f.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=f.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=f.bounce.onEmit(this,"bounce"),this.alpha=f.alpha.onEmit(this,"alpha"),f.color.active?this.tint=f.color.onEmit(this,"tint"):this.tint=f.tint.onEmit(this,"tint"),!0},update:function(i,a,l){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims&&this.anims.update(0,i);var f=this.emitter,u=f.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=u.x.onUpdate(this,"x",v,this.x),this.y=u.y.onUpdate(this,"y",v,this.y),f.moveTo){var m=u.moveToX.onUpdate(this,"moveToX",v,f.moveToX),x=u.moveToY.onUpdate(this,"moveToY",v,f.moveToY),g=this.lifeCurrent/1e3;this.velocityX=(m-this.x)/g,this.velocityY=(x-this.y)/g}return this.computeVelocity(f,i,a,l,v),this.scaleX=u.scaleX.onUpdate(this,"scaleX",v,this.scaleX),u.scaleY.active?this.scaleY=u.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=u.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=r(this.angle),f.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(u.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),u.color.active?this.tint=u.color.onUpdate(this,"color",v,this.tint):this.tint=u.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,a,l,f,u){var v=i.ops,m=this.velocityX,x=this.velocityY,g=v.accelerationX.onUpdate(this,"accelerationX",u,this.accelerationX),y=v.accelerationY.onUpdate(this,"accelerationY",u,this.accelerationY),T=v.maxVelocityX.onUpdate(this,"maxVelocityX",u,this.maxVelocityX),C=v.maxVelocityY.onUpdate(this,"maxVelocityY",u,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",u,this.bounce),m+=i.gravityX*l+g*l,x+=i.gravityY*l+y*l,m=c(m,-T,T),x=c(x,-C,C),this.velocityX=m,this.velocityY=x,this.x+=m*l,this.y+=x*l,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var E=0;E{var d=t(83419),c=t(20286),h=t(87841),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f,u){a===void 0&&(a=!0),l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),c.call(this,e,s,!0),this.bounds=new h(e,s,o,i),this.collideLeft=a,this.collideRight=l,this.collideTop=f,this.collideBottom=u},update:function(n){var e=this.bounds,s=-n.bounce,o=n.worldPosition;o.xe.right&&this.collideRight&&(n.x-=o.x-e.right,n.velocityX*=s),o.ye.bottom&&this.collideBottom&&(n.y-=o.y-e.bottom,n.velocityY*=s)}});p.exports=r}),31600:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(53774),r=t(43459),n=t(26388),e=t(19909),s=t(76472),o=t(44777),i=t(20696),a=t(95643),l=t(95540),f=t(26546),u=t(24502),v=t(69036),m=t(1985),x=t(97022),g=t(86091),y=t(73162),T=t(20074),C=t(269),E=t(56480),M=t(69601),P=t(68875),A=t(87841),R=t(59996),F=t(72905),w=t(90668),I=t(19186),U=t(61340),N=t(26099),D=t(15994),B=["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"],L=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],G=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,w],initialize:function(X,z,V,Y,W){a.call(this,X,"ParticleEmitter"),this.particleClass=E,this.config=null,this.ops={accelerationX:new o("accelerationX",0),accelerationY:new o("accelerationY",0),alpha:new o("alpha",1),angle:new o("angle",{min:0,max:360},!0),bounce:new o("bounce",0),color:new s("color"),delay:new o("delay",0,!0),hold:new o("hold",0,!0),lifespan:new o("lifespan",1e3,!0),maxVelocityX:new o("maxVelocityX",1e4),maxVelocityY:new o("maxVelocityY",1e4),moveToX:new o("moveToX",0),moveToY:new o("moveToY",0),quantity:new o("quantity",1,!0),rotate:new o("rotate",0),scaleX:new o("scaleX",1),scaleY:new o("scaleY",1),speedX:new o("speedX",0,!0),speedY:new o("speedY",0,!0),tint:new o("tint",16777215),x:new o("x",0),y:new o("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 N,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 U,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new y(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(z,V),this.setTexture(Y),W&&this.setConfig(W)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(O){if(!O)return this;this.config=O;var X=0,z="",V=this.ops;for(X=0;X=this.animQuantity&&(this.animCounter=0,this.currentAnim=D(this.currentAnim+1,0,X)),z},setAnim:function(O,X,z){X===void 0&&(X=!0),z===void 0&&(z=1),this.randomAnim=X,this.animQuantity=z,this.currentAnim=0;var V=typeof O;if(this.anims.length=0,Array.isArray(O))this.anims=this.anims.concat(O);else if(V==="string")this.anims.push(O);else if(V==="object"){var Y=O;O=l(Y,"anims",null),O&&(this.anims=this.anims.concat(O));var W=l(Y,"cycle",!1);this.randomAnim=!W,this.animQuantity=l(Y,"quantity",z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(O){return O===void 0&&(O=!0),this.radial=O,this},addParticleBounds:function(O,X,z,V,Y,W,H,K){if(typeof O=="object"){var b=O;O=b.x,X=b.y,z=x(b,"w")?b.w:b.width,V=x(b,"h")?b.h:b.height}return this.addParticleProcessor(new M(O,X,z,V,Y,W,H,K))},setParticleSpeed:function(O,X){return X===void 0&&(X=O),this.ops.speedX.onChange(O),O===X?this.ops.speedY.active=!1:this.ops.speedY.onChange(X),this.radial=!0,this},setParticleScale:function(O,X){return O===void 0&&(O=1),X===void 0&&(X=O),this.ops.scaleX.onChange(O),this.ops.scaleY.onChange(X),this},setParticleGravity:function(O,X){return this.gravityX=O,this.gravityY=X,this},setParticleAlpha:function(O){return this.ops.alpha.onChange(O),this},setParticleTint:function(O){return this.ops.tint.onChange(O),this},setEmitterAngle:function(O){return this.ops.angle.onChange(O),this},setParticleLifespan:function(O){return this.ops.lifespan.onChange(O),this},setQuantity:function(O){return this.quantity=O,this},setFrequency:function(O,X){return this.frequency=O,this.flowCounter=O>0?O:0,X&&(this.quantity=X),this},addDeathZone:function(O){Array.isArray(O)||(O=[O]);for(var X,z=[],V=0;V-1&&(this.zoneTotal++,this.zoneTotal===V.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===z&&(this.zoneIndex=0)))}},getDeathZone:function(O){for(var X=this.deathZones,z=0;z=0&&(this.zoneIndex=X),this},addParticleProcessor:function(O){return this.processors.exists(O)||(O.emitter&&O.emitter.removeParticleProcessor(O),this.processors.add(O),O.emitter=this),O},removeParticleProcessor:function(O){return this.processors.exists(O)&&(this.processors.remove(O,!0),O.emitter=null),O},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(O){return this.addParticleProcessor(new u(O))},reserve:function(O){var X=this.dead;if(this.maxParticles>0){var z=this.getParticleCount();z+O>this.maxParticles&&(O=this.maxParticles-(z+O))}for(var V=0;V0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(O,X){return O===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof O=="function"&&(this.emitCallback=O,X&&(this.emitCallbackScope=X)),this},onParticleDeath:function(O,X){return O===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof O=="function"&&(this.deathCallback=O,X&&(this.deathCallbackScope=X)),this},killAll:function(){for(var O=this.dead,X=this.alive;X.length>0;)O.push(X.pop());return this},forEachAlive:function(O,X){for(var z=this.alive,V=z.length,Y=0;Y0&&this.fastForward(O),this.emitting=!0,this.resetCounters(this.frequency,!0),X!==void 0&&(this.duration=Math.abs(X)),this.emit(i.START,this)),this},stop:function(O){return O===void 0&&(O=!1),this.emitting&&(this.emitting=!1,O&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(O,X){return O===void 0&&(O=""),X===void 0&&(X=this.true),this.sortProperty=O,this.sortOrderAsc=X,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(O){return this.sortProperty!==""?O=this.depthSortCallback:O=null,this.sortCallback=O,this},depthSort:function(){return I(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(O,X){var z=this.sortProperty;return this.sortOrderAsc?O[z]-X[z]:X[z]-O[z]},flow:function(O,X,z){return X===void 0&&(X=1),this.emitting=!1,this.frequency=O,this.quantity=X,z!==void 0&&(this.stopAfter=z),this.start()},explode:function(O,X,z){this.frequency=-1,this.resetCounters(-1,!0);var V=this.emitParticle(O,X,z);return this.emit(i.EXPLODE,this,V),V},emitParticleAt:function(O,X,z){return this.emitParticle(z,O,X)},emitParticle:function(O,X,z){if(!this.atLimit()){O===void 0&&(O=this.ops.quantity.onEmit());for(var V=this.dead,Y=this.stopAfter,W=this.follow?this.follow.x+this.followOffset.x:X,H=this.follow?this.follow.y+this.followOffset.y:z,K=0;K0&&(this.stopCounter++,this.stopCounter>=Y)||this.atLimit())break}return b}},fastForward:function(O,X){X===void 0&&(X=1e3/60);var z=0;for(this.skipping=!0;z0){var $=this.deathCallback,Z=this.deathCallbackScope;for(H=b-1;H>=0;H--){var q=K[H];Y.splice(q.index,1),W.push(q.particle),$&&$.call(Z,q.particle),q.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Y.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=X;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=X,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(O){for(var X=this.getWorldTransformMatrix(),z=this.alive,V=z.length,Y=[],W=0;W0){var J=0;for(this.skipping=!0;J0&&g(V,O,O),V},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(O){this.ops.x.onChange(O)}},particleY:{get:function(){return this.ops.y.current},set:function(O){this.ops.y.onChange(O)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(O){this.ops.accelerationX.onChange(O)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(O){this.ops.accelerationY.onChange(O)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(O){this.ops.maxVelocityX.onChange(O)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(O){this.ops.maxVelocityY.onChange(O)}},speed:{get:function(){return this.ops.speedX.current},set:function(O){this.ops.speedX.onChange(O),this.ops.speedY.onChange(O)}},speedX:{get:function(){return this.ops.speedX.current},set:function(O){this.ops.speedX.onChange(O)}},speedY:{get:function(){return this.ops.speedY.current},set:function(O){this.ops.speedY.onChange(O)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(O){this.ops.moveToX.onChange(O)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(O){this.ops.moveToY.onChange(O)}},bounce:{get:function(){return this.ops.bounce.current},set:function(O){this.ops.bounce.onChange(O)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(O){this.ops.scaleX.onChange(O)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(O){this.ops.scaleY.onChange(O)}},particleColor:{get:function(){return this.ops.color.current},set:function(O){this.ops.color.onChange(O)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(O){this.ops.color.setEase(O)}},particleTint:{get:function(){return this.ops.tint.current},set:function(O){this.ops.tint.onChange(O)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(O){this.ops.alpha.onChange(O)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(O){this.ops.lifespan.onChange(O)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(O){this.ops.angle.onChange(O)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(O){this.ops.rotate.onChange(O)}},quantity:{get:function(){return this.ops.quantity.current},set:function(O){this.ops.quantity.onChange(O)}},delay:{get:function(){return this.ops.delay.current},set:function(O){this.ops.delay.onChange(O)}},hold:{get:function(){return this.ops.hold.current},set:function(O){this.ops.hold.onChange(O)}},flowCounter:{get:function(){return this.counters[0]},set:function(O){this.counters[0]=O}},frameCounter:{get:function(){return this.counters[1]},set:function(O){this.counters[1]=O}},animCounter:{get:function(){return this.counters[2]},set:function(O){this.counters[2]=O}},elapsed:{get:function(){return this.counters[3]},set:function(O){this.counters[3]=O}},stopCounter:{get:function(){return this.counters[4]},set:function(O){this.counters[4]=O}},completeFlag:{get:function(){return this.counters[5]},set:function(O){this.counters[5]=O}},zoneIndex:{get:function(){return this.counters[6]},set:function(O){this.counters[6]=O}},zoneTotal:{get:function(){return this.counters[7]},set:function(O){this.counters[7]=O}},currentFrame:{get:function(){return this.counters[8]},set:function(O){this.counters[8]=O}},currentAnim:{get:function(){return this.counters[9]},set:function(O){this.counters[9]=O}},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 O,X=this.ops;for(O=0;O{var d=t(59996),c=t(61340),h=new c,r=new c,n=new c,e=new c,s=function(o,i,a,l){var f=h,u=r,v=n,m=e;l?(m.loadIdentity(),m.multiply(l),m.translate(i.x,i.y),m.rotate(i.rotation),m.scale(i.scaleX,i.scaleY)):m.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var x=o.currentContext,g=a.roundPixels,y=a.alpha,T=i.alpha,C=i.alive,E=C.length,M=i.viewBounds;if(!(!i.visible||E===0||M&&!d(M,a.worldView))){i.sortCallback&&i.depthSort(),a.addToRenderList(i);var P=i.scrollFactorX,A=i.scrollFactorY;x.save(),x.globalCompositeOperation=o.blendModes[i.blendMode];for(var R=0;R0&&U.height>0){var N=-I.halfWidth,D=-I.halfHeight;x.globalAlpha=w,x.save(),u.setToContext(x),g&&(N=Math.round(N),D=Math.round(D)),x.imageSmoothingEnabled=!I.source.scaleMode,x.drawImage(I.source.image,U.x,U.y,U.width,U.height,N,D,U.width,U.height),x.restore()}}}x.restore()}};p.exports=s}),92730:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(95540),n=t(31600);c.register("particles",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=r(e,"config",null),a=new n(this.scene,0,0,o);return s!==void 0&&(e.add=s),d(this.scene,a,e),i&&a.setConfig(i),a})}),676:((p,S,t)=>{var d=t(39429),c=t(31600);d.register("particles",function(h,r,n,e){return h!==void 0&&typeof h=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,h,r,n,e))})}),90668:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(21188),h=t(9871),p.exports={renderWebGL:c,renderCanvas:h}}),21188:((p,S,t)=>{var d=t(59996),c=t(61340),h=t(70554),r=new c,n=new c,e=new c,s=new c,o=function(i,a,l,f){var u=i.pipelines.set(a.pipeline),v=r,m=n,x=e,g=s;f?(g.loadIdentity(),g.multiply(f),g.translate(a.x,a.y),g.rotate(a.rotation),g.scale(a.scaleX,a.scaleY)):g.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var y=h.getTintAppendFloatAlpha,T=l.alpha,C=a.alpha;i.pipelines.preBatch(a);var E=a.alive,M=E.length,P=a.viewBounds;if(!(M===0||P&&!d(P,l.worldView))){a.sortCallback&&a.depthSort(),l.addToRenderList(a),v.copyFrom(l.matrix),v.multiplyWithOffset(g,-l.scrollX*a.scrollFactorX,-l.scrollY*a.scrollFactorY),i.setBlendMode(a.blendMode),a.mask&&(a.mask.preRenderWebGL(i,a,l),i.pipelines.set(a.pipeline));for(var A=a.tintFill,R,F,w=0;w{var d=t(83419),c=new d({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}});p.exports=c}),9774:(p=>{p.exports="complete"}),812:(p=>{p.exports="deathzone"}),30522:(p=>{p.exports="explode"}),96695:(p=>{p.exports="start"}),18677:(p=>{p.exports="stop"}),20696:((p,S,t)=>{p.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}}),18404:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(h){var r=h.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});p.exports=c}),19909:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i){s===void 0&&(s=!1),o===void 0&&(o=!0),i===void 0&&(i=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=s,this.counter=-1,this.seamless=o,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],r=this.points[this.points.length-1];h.x===r.x&&h.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(h){return this.source=h,this.updateSource()},getPoint:function(h){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(h.x=r.x,h.y=r.y)}});p.exports=c}),68875:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({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}});p.exports=h}),21024:((p,S,t)=>{p.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}}),1159:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(68287),r=new d({Extends:h,Mixins:[c.PathFollower],initialize:function(e,s,o,i,a,l){h.call(this,e,o,i,a,l),this.path=s},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});p.exports=r}),90145:((p,S,t)=>{var d=t(39429),c=t(1159);d.register("follower",function(h,r,n,e,s){var o=new c(this.scene,h,r,n,e,s);return this.displayList.add(o),this.updateList.add(o),o})}),33663:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(48803),r=t(90664),n=t(4703),e=t(45650),s=new c({Extends:n,initialize:function(i,a,l,f,u,v,m,x){f||(f="__DEFAULT"),n.call(this,i,a,l,f,u),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,m,x),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(o,i,a){o===void 0&&(o=8),i===void 0&&(i=8),a===void 0&&(a=!1);var l=!1;return a&&(l=!0),this.gridWidth=o,this.gridHeight=i,this.isTiled=a,this.clear(),h({mesh:this,widthSegments:o,heightSegments:i,isOrtho:!1,tile:a,flipY:l}),this},setSizeToFrame:function(o){o===void 0&&(o=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!o)return this;var a=this.gridWidth,l=this.gridHeight,f=this.vertices,u=i.u0,v=i.u1,m=i.v0,x=i.v1,g,y,T=0;if(this.isTiled)for(m=i.v1,x=i.v0,y=0;y7&&g>7?m.push(u.r,u.g,u.b,a):m.push(v.r,v.g,v.b,l);var y=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(m),16,16);return this.removeCheckerboard(),this.setTexture(y),this.setSizeToFrame(),this.setViewHeight(f),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(o,i){return this.anims.play(o,i)},playReverse:function(o,i){return this.anims.playReverse(o,i)},playAfterDelay:function(o,i){return this.anims.playAfterDelay(o,i)},playAfterRepeat:function(o,i){return this.anims.playAfterRepeat(o,i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(o){return this.anims.stopAfterDelay(o)},stopAfterRepeat:function(o){return this.anims.stopAfterRepeat(o)},stopOnFrame:function(o){return this.anims.stopOnFrame(o)},preUpdate:function(o,i){n.prototype.preUpdate.call(this,o,i),this.anims.update(o,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});p.exports=s}),56015:((p,S,t)=>{var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(35154),e=t(33663);h.register("plane",function(s,o){s===void 0&&(s={});var i=r(s,"key",null),a=r(s,"frame",null),l=n(s,"width",8),f=n(s,"height",8),u=n(s,"tile",!1),v=new e(this.scene,0,0,i,a,l,f,u);o!==void 0&&(s.add=o);var m=n(s,"checkerboard",null);if(m){var x=n(m,"color1",16777215),g=n(m,"color2",255),y=n(m,"alpha1",255),T=n(m,"alpha2",255),C=n(m,"height",128);v.createCheckerboard(x,g,y,T,C)}return d(this.scene,v,s),c(v,s),v})}),30985:((p,S,t)=>{var d=t(33663),c=t(39429);c.register("plane",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),80321:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(30100),n=t(36060),e=t(67277),s=new d({Extends:h,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(i,a,l,f,u,v,m){f===void 0&&(f=16777215),u===void 0&&(u=128),v===void 0&&(v=1),m===void 0&&(m=.1),h.call(this,i,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(a,l),this.color=r(f),this.intensity=v,this.attenuation=m,this.width=u*2,this.height=u*2,this._radius=u},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this.width=o*2,this.height=o*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=s}),39829:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(80321);c.register("pointlight",function(n,e){n===void 0&&(n={});var s=h(n,"color",16777215),o=h(n,"radius",128),i=h(n,"intensity",1),a=h(n,"attenuation",.1),l=new r(this.scene,0,0,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})}),71255:((p,S,t)=>{var d=t(39429),c=t(80321);d.register("pointlight",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})}),67277:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(57787),p.exports={renderWebGL:c,renderCanvas:h}}),57787:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){n.addToRenderList(r);var s=h.pipelines.set(r.pipeline),o=d(r,n,e).calc,i=r.width,a=r.height,l=-r._radius,f=-r._radius,u=l+i,v=f+a,m=o.getX(0,0),x=o.getY(0,0),g=o.getX(l,f),y=o.getY(l,f),T=o.getX(l,v),C=o.getY(l,v),E=o.getX(u,v),M=o.getY(u,v),P=o.getX(u,f),A=o.getY(u,f);h.pipelines.preBatch(r),s.batchPointLight(r,n,g,y,T,C,E,M,P,A,m,x),h.pipelines.postBatch(r)};p.exports=c}),591:((p,S,t)=>{var d=t(83419),c=t(81320),h=t(88571),r=new d({Extends:h,initialize:function(e,s,o,i,a,l){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=32),a===void 0&&(a=32),l===void 0&&(l=!0);var f=new c(e.sys.textures,"",i,a,l);h.call(this,e,s,o,f),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=n,s.hitArea.height=e),this},resize:function(n,e,s){return this.texture.setSize(n,e,s),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,s,o,i,a){return this.texture.fill(n,e,s,o,i,a),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,s,o,i){return this.texture.stamp(n,e,s,o,i),this},erase:function(n,e,s){return this.texture.erase(n,e,s),this},draw:function(n,e,s,o,i){return this.texture.draw(n,e,s,o,i),this},drawFrame:function(n,e,s,o,i,a){return this.texture.drawFrame(n,e,s,o,i,a),this},repeat:function(n,e,s,o,i,a,l,f,u){return this.texture.repeat(n,e,s,o,i,a,l,f,u),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,s,o,i){return this.texture.batchDraw(n,e,s,o,i),this},batchDrawFrame:function(n,e,s,o,i,a){return this.texture.batchDrawFrame(n,e,s,o,i,a),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,s,o,i,a,l){return this.texture.snapshotArea(n,e,s,o,i,a,l),this},snapshot:function(n,e,s){return this.snapshotArea(0,0,this.width,this.height,n,e,s)},snapshotPixel:function(n,e,s){return this.snapshotArea(n,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});p.exports=r}),34495:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(591);c.register("renderTexture",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",32),a=h(n,"height",32),l=new r(this.scene,s,o,i,a);return e!==void 0&&(n.add=e),d(this.scene,l,n),l})}),60505:((p,S,t)=>{var d=t(39429),c=t(591);d.register("renderTexture",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})}),77757:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(36060),e=t(38745),s=t(26099),o=new c({Extends:r,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Flip,h.Mask,h.Pipeline,h.PostPipeline,h.Size,h.Texture,h.Transform,h.Visible,h.ScrollFactor,e],initialize:function(a,l,f,u,v,m,x,g,y){u===void 0&&(u="__DEFAULT"),m===void 0&&(m=2),x===void 0&&(x=!0),r.call(this,a,"Rope"),this.anims=new d(this),this.points=m,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=u==="__DEFAULT",this.dirty=!1,this.horizontal=x,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(u,v),this.setPosition(l,f),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(m)&&this.resizeArrays(m.length),this.setPoints(m,g,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,a){var l=this.anims.currentFrame;this.anims.update(i,a),this.anims.currentFrame!==l&&(this.updateUVs(),this.updateVertices())},play:function(i,a,l){return this.anims.play(i,a,l),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,a,l))},setVertical:function(i,a,l){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,a,l)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,a){var l=this.points.length;if(l<1)return this;var f=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&a===void 0&&(i=[i]);var u,v=0;if(a!==void 0)for(u=0;uv&&(m=i[v]),f[v]=m,i.length>v+1&&(m=i[v+1]),f[v+1]=m}return this},setColors:function(i){var a=this.points.length;if(a<1)return this;var l=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var f,u=0;if(i.length===a)for(f=0;fu&&(v=i[u]),l[u]=v,i.length>u+1&&(v=i[u+1]),l[u+1]=v}return this},setPoints:function(i,a,l){if(i===void 0&&(i=2),typeof i=="number"){var f=i;f<2&&(f=2),i=[];var u,v,m;if(this.horizontal)for(m=-this.frame.halfWidth,v=this.frame.width/(f-1),u=0;u{var S=function(){};p.exports=S}),26209:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(35154),n=t(77757);c.register("rope",function(e,s){e===void 0&&(e={});var o=h(e,"key",null),i=h(e,"frame",null),a=h(e,"horizontal",!0),l=r(e,"points",void 0),f=r(e,"colors",void 0),u=r(e,"alphas",void 0),v=new n(this.scene,0,0,o,i,l,a,f,u);return s!==void 0&&(e.add=s),d(this.scene,v,e),v})}),96819:((p,S,t)=>{var d=t(77757),c=t(39429);c.register("rope",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))})}),38745:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(20439),h=t(95262),p.exports={renderWebGL:c,renderCanvas:h}}),20439:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline,n),i=d(n,e,s).calc,a=n.vertices,l=n.uv,f=n.colors,u=n.alphas,v=n.alpha,m=c.getTintAppendFloatAlpha,x=e.roundPixels,g=a.length,y=Math.floor(g*.5);o.flush(),r.pipelines.preBatch(n);var T=o.setGameObject(n),C=o.vertexViewF32,E=o.vertexViewU32,M=o.vertexCount*o.currentShader.vertexComponentCount-1,P=0,A=n.tintFill;n.dirty&&n.updateVertices();for(var R=n.debugCallback,F=[],w=0;w{var d=t(83419),c=t(31401),h=t(95643),r=t(95540),n=t(79291),e=t(61622),s=t(25479),o=t(61340),i=t(95428),a=t(92503),l=new d({Extends:h,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,s],initialize:function(u,v,m,x,g,y,T,C){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=128),y===void 0&&(y=128),h.call(this,u,"Shader"),this.blendMode=-1,this.shader;var E=u.sys.renderer;this.renderer=E,this.gl=E.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=E.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 o,this._tempMatrix2=new o,this._tempMatrix3=new o,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=E.width,this._rendererHeight=E.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(m,x),this.setSize(g,y),this.setOrigin(.5,.5),this.setShader(v,T,C),this.renderer.on(a.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(f){return this.renderToTexture?!0:!(h.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},setRenderToTexture:function(f,u){if(!this.renderToTexture){var v=this.width,m=this.height,x=this.renderer;this.glTexture=x.createTextureFromSource(null,v,m,0),this.framebuffer=x.createFramebuffer(v,m,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=m,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),f&&(this.texture=this.scene.sys.textures.addGLTexture(f,this.glTexture))}return this.shader&&(x.pipelines.clear(),this.load(),this.flush(),x.pipelines.rebind()),this},setShader:function(f,u,v){if(this.renderer.contextLost)return this._deferSetShader={key:f,textures:u,textureData:v},this;if(u===void 0&&(u=[]),typeof f=="string"){var m=this.scene.sys.cache.shader;if(!m.has(f))return console.warn("Shader missing: "+f),this;this.shader=m.get(f)}else this.shader=f;var x=this.gl,g=this.renderer;this.program&&g.deleteProgram(this.program);var y=g.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),x.uniformMatrix4fv(x.getUniformLocation(y.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),x.uniform2f(x.getUniformLocation(y.webGLProgram,"uResolution"),this.width,this.height),this.program=y;var T=new Date,C={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:[T.getFullYear(),T.getMonth(),T.getDate(),T.getHours()*60*60+T.getMinutes()*60+T.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,C):this.uniforms=C;for(var E=0;E<4;E++)u[E]&&this.setSampler2D("iChannel"+E,u[E],E,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(f){return this.pointer=f,this},projOrtho:function(f,u,v,m){if(this.renderer.contextLost){this._deferProjOrtho={left:f,right:u,bottom:v,top:m};return}var x=-1e3,g=1e3,y=1/(f-u),T=1/(v-m),C=1/(x-g),E=this.projectionMatrix;E[0]=-2*y,E[5]=-2*T,E[10]=2*C,E[12]=(f+u)*y,E[13]=(m+v)*T,E[14]=(g+x)*C;var M=this.program,P=this.gl,A=this.renderer;A.setProgram(M),P.uniformMatrix4fv(P.getUniformLocation(M.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=u,this._rendererHeight=v},initUniforms:function(){var f=this.renderer.glFuncMap,u=this.program;this._textureCount=0;for(var v in this.uniforms){var m=this.uniforms[v],x=m.type,g=f[x];m.uniformLocation=this.renderer.createUniformLocation(u,v),x!=="sampler2D"&&(m.glMatrix=g.matrix,m.glValueLength=g.length,m.glFunc=g.func)}},setSampler2DBuffer:function(f,u,v,m,x,g){x===void 0&&(x=0),g===void 0&&(g={});var y=this.uniforms[f];return y.value=u,g.width=v,g.height=m,y.textureData=g,this._textureCount=x,this.initSampler2D(y),this},setSampler2D:function(f,u,v,m){v===void 0&&(v=0);var x=this.scene.sys.textures;if(x.exists(u)){var g=x.getFrame(u);if(g.glTexture&&g.glTexture.isRenderTexture)return this.setSampler2DBuffer(f,g.glTexture,g.width,g.height,v,m);var y=this.uniforms[f],T=g.source;y.textureKey=u,y.source=T.image,y.value=g.glTexture,T.isGLTexture&&(m||(m={}),m.width=T.width,m.height=T.height),m&&(y.textureData=m),this._textureCount=v,this.initSampler2D(y)}return this},setUniform:function(f,u){return e(this.uniforms,f,u),this},getUniform:function(f){return r(this.uniforms,f,null)},setChannel0:function(f,u){return this.setSampler2D("iChannel0",f,0,u)},setChannel1:function(f,u){return this.setSampler2D("iChannel1",f,1,u)},setChannel2:function(f,u){return this.setSampler2D("iChannel2",f,2,u)},setChannel3:function(f,u){return this.setSampler2D("iChannel3",f,3,u)},initSampler2D:function(f){if(f.value){var u=f.textureData;if(u&&!f.value.isRenderTexture){var v=this.gl,m=f.value,x=v[r(u,"magFilter","linear").toUpperCase()],g=v[r(u,"minFilter","linear").toUpperCase()],y=v[r(u,"wrapS","repeat").toUpperCase()],T=v[r(u,"wrapT","repeat").toUpperCase()],C=v[r(u,"format","rgba").toUpperCase()],E=r(u,"flipY",!1),M=r(u,"width",m.width),P=r(u,"height",m.height),A=r(u,"source",m.pixels);u.repeat&&(y=v.REPEAT,T=v.REPEAT),u.width&&(A=null),m.update(A,M,P,E,y,T,g,x,C)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var f=this.gl,u=this.uniforms,v,m,x,g,y,T=0;for(var C in u)v=u[C],x=v.glFunc,m=v.glValueLength,g=v.uniformLocation,y=v.value,y!==null&&(m===1?v.glMatrix?x.call(f,g.webGLUniformLocation,v.transpose,y):x.call(f,g.webGLUniformLocation,y):m===2?x.call(f,g.webGLUniformLocation,y.x,y.y):m===3?x.call(f,g.webGLUniformLocation,y.x,y.y,y.z):m===4?x.call(f,g.webGLUniformLocation,y.x,y.y,y.z,y.w):v.type==="sampler2D"&&(f.activeTexture(f.TEXTURE0+T),f.bindTexture(f.TEXTURE_2D,y.webGLTexture),f.uniform1i(g.webGLUniformLocation,T),T++))},load:function(f){var u=this.gl,v=this.width,m=this.height,x=this.renderer,g=this.program,y=this.viewMatrix;if(!this.renderToTexture){var T=-this._displayOriginX,C=-this._displayOriginY;y[0]=f[0],y[1]=f[1],y[4]=f[2],y[5]=f[3],y[8]=f[4],y[9]=f[5],y[12]=y[0]*T+y[4]*C,y[13]=y[1]*T+y[5]*C}u.useProgram(g.webGLProgram),u.uniformMatrix4fv(u.getUniformLocation(g.webGLProgram,"uViewMatrix"),!1,y),u.uniformMatrix4fv(u.getUniformLocation(g.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),u.uniform2f(u.getUniformLocation(g.webGLProgram,"uResolution"),this.width,this.height);var E=this.uniforms,M=E.resolution;M.value.x=v,M.value.y=m,E.time.value=x.game.loop.getDuration();var P=this.pointer;if(P){var A=E.mouse,R=P.x/v,F=1-P.y/m;A.value.x=R.toFixed(2),A.value.y=F.toFixed(2)}this.syncUniforms()},flush:function(){var f=this.width,u=this.height,v=this.program,m=this.gl,x=this.vertexBuffer,g=this.renderer,y=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(g.setFramebuffer(this.framebuffer),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)),m.bindBuffer(m.ARRAY_BUFFER,x.webGLBuffer);var T=m.getAttribLocation(v.webGLProgram,"inPosition");T!==-1&&(m.enableVertexAttribArray(T),m.vertexAttribPointer(T,2,m.FLOAT,!1,y,0));var C=this.vertexViewF32;C[3]=u,C[4]=f,C[5]=u,C[8]=f,C[9]=u,C[10]=f;var E=6;m.bufferSubData(m.ARRAY_BUFFER,0,this.bytes.subarray(0,E*y)),m.drawArrays(m.TRIANGLES,0,E),this.renderToTexture&&g.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var f=this._deferSetShader.key,u=this._deferSetShader.textures,v=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(f,u,v)}if(this._deferProjOrtho!==null){var m=this._deferProjOrtho.left,x=this._deferProjOrtho.right,g=this._deferProjOrtho.bottom,y=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(m,x,g,y)}},preDestroy:function(){var f=this.renderer;f.off(a.RESTORE_WEBGL,this.onContextRestored,this),f.deleteProgram(this.program),f.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(f.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(u){f.deleteUniformLocation(u.uniformLocation),u.uniformLocation=null})}});p.exports=l}),80464:(p=>{var S=function(){};p.exports=S}),54935:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(20071);c.register("shader",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=h(n,"x",0),i=h(n,"y",0),a=h(n,"width",128),l=h(n,"height",128),f=new r(this.scene,s,o,i,a,l);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})}),74177:((p,S,t)=>{var d=t(20071),c=t(39429);c.register("shader",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),25479:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(19257),h=t(80464),p.exports={renderWebGL:c,renderCanvas:h}}),19257:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e){if(r.shader){if(n.addToRenderList(r),h.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var s=d(r,n,e).calc;(h.width!==r._rendererWidth||h.height!==r._rendererHeight)&&r.projOrtho(0,h.width,h.height,0),r.load(s.matrix),r.flush()}h.pipelines.rebind()}};p.exports=c}),10441:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e,s,o){for(var i=d.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),a=n.pathData,l=n.pathIndexes,f=0;f{var S=function(t,d,c,h){var r=c||d.fillColor,n=h||d.fillAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.fillStyle="rgba("+e+","+s+","+o+","+n+")"};p.exports=S}),75177:(p=>{var S=function(t,d,c,h){var r=c||d.strokeColor,n=h||d.strokeAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,o=r&255;t.strokeStyle="rgba("+e+","+s+","+o+","+n+")",t.lineWidth=d.lineWidth};p.exports=S}),17803:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(95643),r=t(23031),n=new d({Extends:h,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(s,o,i){o===void 0&&(o="Shape"),h.call(this,s,o),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,s){return s===void 0&&(s=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=s,this.isFilled=!0),this},setStrokeStyle:function(e,s,o){return o===void 0&&(o=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=s,this.strokeAlpha=o,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,s){return this.width=e,this.height=s,this},setDisplaySize:function(e,s){return this.displayWidth=e,this.displayHeight=s,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}}});p.exports=n}),34682:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e,s){var o=h.strokeTint,i=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);o.TL=i,o.TR=i,o.BL=i,o.BR=i;var a=r.pathData,l=a.length-1,f=r.lineWidth,u=f/2,v=a[0]-e,m=a[1]-s;r.closePath||(l-=2);for(var x=2;x{var d=t(13609),c=t(83419),h=t(39506),r=t(94811),n=t(96503),e=t(36383),s=t(17803),o=new c({Extends:s,Mixins:[d],initialize:function(a,l,f,u,v,m,x,g,y){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),v===void 0&&(v=0),m===void 0&&(m=360),x===void 0&&(x=!1),s.call(this,a,"Arc",new n(0,0,u)),this._startAngle=v,this._endAngle=m,this._anticlockwise=x,this._iterations=.01,this.setPosition(l,f);var T=this.geom.radius*2;this.setSize(T,T),g!==void 0&&this.setFillStyle(g,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var a=i*2;this.setSize(a,a),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,a){return this._startAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},setEndAngle:function(i,a){return this._endAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},updateData:function(){var i=this._iterations,a=i,l=this.geom.radius,f=h(this._startAngle),u=h(this._endAngle),v=this._anticlockwise,m=l,x=l;u-=f,v?u<-e.PI2?u=-e.PI2:u>0&&(u=-e.PI2+u%e.PI2):u>e.PI2?u=e.PI2:u<0&&(u=e.PI2+u%e.PI2);for(var g=[m+Math.cos(f)*l,x+Math.sin(f)*l],y;a<1;)y=u*a+f,g.push(m+Math.cos(y)*l,x+Math.sin(y)*l),a+=i;return y=u+f,g.push(m+Math.cos(y)*l,x+Math.sin(y)*l),g.push(m+Math.cos(f)*l,x+Math.sin(f)*l),this.pathIndexes=r(g),this.pathData=g,this}});p.exports=o}),42542:((p,S,t)=>{var d=t(39506),c=t(65960),h=t(75177),r=t(20926),n=function(e,s,o,i){o.addToRenderList(s);var a=e.currentContext;if(r(e,a,s,o,i)){var l=s.radius;a.beginPath(),a.arc(l-s.originX*(l*2),l-s.originY*(l*2),l,d(s._startAngle),d(s._endAngle),s.anticlockwise),s.closePath&&a.closePath(),s.isFilled&&(c(a,s),a.fill()),s.isStroked&&(h(a,s),a.stroke()),a.restore()}};p.exports=n}),42563:((p,S,t)=>{var d=t(23629),c=t(39429);c.register("arc",function(h,r,n,e,s,o,i,a){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i,a))}),c.register("circle",function(h,r,n,e,s){return this.displayList.add(new d(this.scene,h,r,n,0,360,!1,e,s))})}),13609:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(41447),h=t(42542),p.exports={renderWebGL:c,renderCanvas:h}}),41447:((p,S,t)=>{var d=t(91296),c=t(10441),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),89:((p,S,t)=>{var d=t(83419),c=t(33141),h=t(94811),r=t(87841),n=t(17803),e=new d({Extends:n,Mixins:[c],initialize:function(o,i,a,l,f,u){i===void 0&&(i=0),a===void 0&&(a=0),n.call(this,o,"Curve",l),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(i,a),f!==void 0&&this.setFillStyle(f,u),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){var s=this._curveBounds,o=this._smoothness;this.geom.getBounds(s,o),this.setSize(s.width,s.height),this.updateDisplayOrigin();for(var i=[],a=this.geom.getPoints(o),l=0;l{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x{var d=t(39429),c=t(89);d.register("curve",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})}),33141:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(53987),h=t(3170),p.exports={renderWebGL:c,renderCanvas:h}}),53987:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),19921:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(54205),r=t(8497),n=t(17803),e=new d({Extends:n,Mixins:[h],initialize:function(o,i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=128),n.call(this,o,"Ellipse",new r(l/2,f/2,l,f)),this._smoothness=64,this.setPosition(i,a),this.width=l,this.height=f,u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSize:function(s,o){return this.width=s,this.height=o,this.geom.setPosition(s/2,o/2),this.geom.setSize(s,o),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){for(var s=[],o=this.geom.getPoints(this._smoothness),i=0;i{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x{var d=t(19921),c=t(39429);c.register("ellipse",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),54205:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(19467),h=t(7930),p.exports={renderWebGL:c,renderCanvas:h}}),19467:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),30479:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(26015),r=new d({Extends:c,Mixins:[h],initialize:function(e,s,o,i,a,l,f,u,v,m,x){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=128),a===void 0&&(a=128),l===void 0&&(l=32),f===void 0&&(f=32),c.call(this,e,"Grid",null),this.cellWidth=l,this.cellHeight=f,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(s,o),this.setSize(i,a),this.setFillStyle(u,v),m!==void 0&&this.setOutlineStyle(m,x),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=r}),49912:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=-e._displayOriginX,l=-e._displayOriginY,f=s.alpha*e.alpha,u=e.width,v=e.height,m=e.cellWidth,x=e.cellHeight,g=Math.ceil(u/m),y=Math.ceil(v/x),T=m,C=x,E=m-(g*m-u),M=x-(y*x-v),P=e.showCells,A=e.showAltCells,R=e.showOutline,F=0,w=0,I=0,U=0,N=0;if(R&&(T--,C--,E===m&&E--,M===x&&M--),P&&e.fillAlpha>0)for(d(i,e),w=0;w0)for(d(i,e,e.altFillColor,e.altFillAlpha*f),w=0;w0){for(c(i,e,e.outlineFillColor,e.outlineFillAlpha*f),F=1;F{var d=t(39429),c=t(30479);d.register("grid",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,f))})}),26015:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(46161),h=t(49912),p.exports={renderWebGL:c,renderCanvas:h}}),46161:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc);a.translate(-n._displayOriginX,-n._displayOriginY);var l=e.alpha*n.alpha,f=n.width,u=n.height,v=n.cellWidth,m=n.cellHeight,x=Math.ceil(f/v),g=Math.ceil(u/m),y=v,T=m,C=v-(x*v-f),E=m-(g*m-u),M,P,A=n.showCells,R=n.showAltCells,F=n.showOutline,w=0,I=0,U=0,N=0,D=0;if(F&&(y--,T--,C===v&&C--,E===m&&E--),r.pipelines.preBatch(n),A&&n.fillAlpha>0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,I=0;I0)for(M=o.fillTint,P=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*l),M.TL=P,M.TR=P,M.BL=P,M.BR=P,I=0;I0){var B=o.strokeTint,L=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*l);for(B.TL=L,B.TR=L,B.BL=L,B.BR=L,w=1;w{var d=t(99651),c=t(83419),h=t(17803),r=new c({Extends:h,Mixins:[d],initialize:function(e,s,o,i,a,l,f,u){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=15658734),f===void 0&&(f=10066329),u===void 0&&(u=13421772),h.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=l,this.fillLeft=f,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r}),11508:((p,S,t)=>{var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,f=i/n.projection;n.showTop&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-f-a),o.lineTo(l,-a),o.lineTo(l,-1),o.lineTo(0,f-1),o.lineTo(-l,-1),o.lineTo(-l,-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,f),o.lineTo(0,f-a),o.lineTo(-l,-a),o.lineTo(-l,0),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,f),o.lineTo(0,f-a),o.lineTo(l,-a),o.lineTo(l,0),o.fill()),o.restore()}};p.exports=h}),3933:((p,S,t)=>{var d=t(39429),c=t(61475);d.register("isobox",function(h,r,n,e,s,o,i){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i))})}),99651:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(68149),h=t(11508),p.exports={renderWebGL:c,renderCanvas:h}}),68149:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,f=n.height,u=l/2,v=l/n.projection,m=e.alpha*n.alpha;if(n.isFilled){var x,g,y,T,C,E,M,P,A;r.pipelines.preBatch(n),n.showTop&&(x=c.getTintAppendFloatAlpha(n.fillTop,m),g=a.getX(-u,-f),y=a.getY(-u,-f),T=a.getX(0,-v-f),C=a.getY(0,-v-f),E=a.getX(u,-f),M=a.getY(u,-f),P=a.getX(0,v-f),A=a.getY(0,v-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,m),g=a.getX(-u,0),y=a.getY(-u,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-f),M=a.getY(0,v-f),P=a.getX(-u,-f),A=a.getY(-u,-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,m),g=a.getX(u,0),y=a.getY(u,0),T=a.getX(0,v),C=a.getY(0,v),E=a.getX(0,v-f),M=a.getY(0,v-f),P=a.getX(u,-f),A=a.getY(u,-f),o.batchQuad(n,g,y,T,C,E,M,P,A,0,0,1,1,x,x,x,x,2)),r.pipelines.postBatch(n)}};p.exports=h}),16933:((p,S,t)=>{var d=t(83419),c=t(60561),h=t(17803),r=new d({Extends:h,Mixins:[c],initialize:function(e,s,o,i,a,l,f,u,v){s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i=48),a===void 0&&(a=32),l===void 0&&(l=!1),f===void 0&&(f=15658734),u===void 0&&(u=10066329),v===void 0&&(v=13421772),h.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=l,this.isFilled=!0,this.setPosition(s,o),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r}),79590:((p,S,t)=>{var d=t(65960),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)&&n.isFilled){var i=n.width,a=n.height,l=i/2,f=i/n.projection,u=n.isReversed;n.showTop&&u&&(d(o,n,n.fillTop),o.beginPath(),o.moveTo(-l,-a),o.lineTo(0,-f-a),o.lineTo(l,-a),o.lineTo(0,f-a),o.fill()),n.showLeft&&(d(o,n,n.fillLeft),o.beginPath(),u?(o.moveTo(-l,-a),o.lineTo(0,f),o.lineTo(0,f-a)):(o.moveTo(-l,0),o.lineTo(0,f),o.lineTo(0,f-a)),o.fill()),n.showRight&&(d(o,n,n.fillRight),o.beginPath(),u?(o.moveTo(l,-a),o.lineTo(0,f),o.lineTo(0,f-a)):(o.moveTo(l,0),o.lineTo(0,f),o.lineTo(0,f-a)),o.fill()),o.restore()}};p.exports=h}),49803:((p,S,t)=>{var d=t(39429),c=t(16933);d.register("isotriangle",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})}),60561:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(51503),h=t(79590),p.exports={renderWebGL:c,renderCanvas:h}}),51503:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s),a=o.calcMatrix.copyFrom(i.calc),l=n.width,f=n.height,u=l/2,v=l/n.projection,m=n.isReversed,x=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var g,y,T,C,E,M,P;if(n.showTop&&m){g=c.getTintAppendFloatAlpha(n.fillTop,x),y=a.getX(-u,-f),T=a.getY(-u,-f),C=a.getX(0,-v-f),E=a.getY(0,-v-f),M=a.getX(u,-f),P=a.getY(u,-f);var A=a.getX(0,v-f),R=a.getY(0,v-f);o.batchQuad(n,y,T,C,E,M,P,A,R,0,0,1,1,g,g,g,g,2)}n.showLeft&&(g=c.getTintAppendFloatAlpha(n.fillLeft,x),m?(y=a.getX(-u,-f),T=a.getY(-u,-f),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)):(y=a.getX(-u,0),T=a.getY(-u,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,g,g,g,2)),n.showRight&&(g=c.getTintAppendFloatAlpha(n.fillRight,x),m?(y=a.getX(u,-f),T=a.getY(u,-f),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)):(y=a.getX(u,0),T=a.getY(u,0),C=a.getX(0,v),E=a.getY(0,v),M=a.getX(0,v-f),P=a.getY(0,v-f)),o.batchTri(n,y,T,C,E,M,P,0,0,1,1,g,g,g,2)),r.pipelines.postBatch(n)}};p.exports=h}),57847:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(23031),r=t(36823),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,f,u,v,m){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=0),c.call(this,s,"Line",new h(a,l,f,u));var x=Math.max(1,this.geom.right-this.geom.left),g=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(o,i),this.setSize(x,g),v!==void 0&&this.setStrokeStyle(1,v,m),this.updateDisplayOrigin()},setLineWidth:function(e,s){return s===void 0&&(s=e),this._startWidth=e,this._endWidth=s,this.lineWidth=e,this},setTo:function(e,s,o,i){return this.geom.setTo(e,s,o,i),this}});p.exports=n}),17440:((p,S,t)=>{var d=t(75177),c=t(20926),h=function(r,n,e,s){e.addToRenderList(n);var o=r.currentContext;if(c(r,o,n,e,s)){var i=n._displayOriginX,a=n._displayOriginY;n.isStroked&&(d(o,n),o.beginPath(),o.moveTo(n.geom.x1-i,n.geom.y1-a),o.lineTo(n.geom.x2-i,n.geom.y2-a),o.stroke()),o.restore()}};p.exports=h}),2481:((p,S,t)=>{var d=t(39429),c=t(57847);d.register("line",function(h,r,n,e,s,o,i,a){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a))})}),36823:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(77385),h=t(17440),p.exports={renderWebGL:c,renderCanvas:h}}),77385:((p,S,t)=>{var d=t(91296),c=t(70554),h=function(r,n,e,s){e.addToRenderList(n);var o=r.pipelines.set(n.pipeline),i=d(n,e,s);o.calcMatrix.copyFrom(i.calc);var a=n._displayOriginX,l=n._displayOriginY,f=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var u=o.strokeTint,v=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*f);u.TL=v,u.TR=v,u.BL=v,u.BR=v,o.batchLine(n.geom.x1-a,n.geom.y1-l,n.geom.x2-a,n.geom.y2-l,n._startWidth/2,n._endWidth/2,1,0,!1,i.sprite,i.camera)}r.pipelines.postBatch(n)};p.exports=h}),24949:((p,S,t)=>{var d=t(90273),c=t(83419),h=t(94811),r=t(13829),n=t(25717),e=t(17803),s=t(5469),o=new c({Extends:e,Mixins:[d],initialize:function(a,l,f,u,v,m){l===void 0&&(l=0),f===void 0&&(f=0),e.call(this,a,"Polygon",new n(u));var x=r(this.geom);this.setPosition(l,f),this.setSize(x.width,x.height),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var a=0;a{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x{var d=t(39429),c=t(24949);d.register("polygon",function(h,r,n,e,s){return this.displayList.add(new c(this.scene,h,r,n,e,s))})}),90273:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(73695),h=t(38710),p.exports={renderWebGL:c,renderCanvas:h}}),73695:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),74561:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(87841),r=t(17803),n=t(95597),e=new d({Extends:r,Mixins:[n],initialize:function(o,i,a,l,f,u,v){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=128),r.call(this,o,"Rectangle",new h(0,0,l,f)),this.radius=20,this.isRounded=!1,this.setPosition(i,a),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,v),this.updateDisplayOrigin(),this.updateData()},setRounded:function(s){return s===void 0&&(s=16),this.radius=s,this.isRounded=s>0,this.updateRoundedData()},setSize:function(s,o){this.width=s,this.height=o,this.geom.setSize(s,o),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=s,i.hitArea.height=o),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var s=[],o=this.geom,i=this._tempLine;return o.getLineA(i),s.push(i.x1,i.y1,i.x2,i.y2),o.getLineB(i),s.push(i.x2,i.y2),o.getLineC(i),s.push(i.x2,i.y2),o.getLineD(i),s.push(i.x2,i.y2),this.pathData=s,this},updateRoundedData:function(){var s=[],o=this.width/2,i=this.height/2,a=Math.min(o,i),l=Math.min(this.radius,a),f=o,u=i,v=Math.max(1,Math.floor(l/5));return this.arcTo(s,f-o+l,u-i+l,l,Math.PI,Math.PI*1.5,v),s.push(f+o-l,u-i),this.arcTo(s,f+o-l,u-i+l,l,Math.PI*1.5,Math.PI*2,v),s.push(f+o,u+i-l),this.arcTo(s,f+o-l,u+i-l,l,0,Math.PI*.5,v),s.push(f-o+l,u+i),this.arcTo(s,f-o+l,u+i-l,l,Math.PI*.5,Math.PI,v),s.push(f-o,u-i+l),this.pathIndexes=c(s),this.pathData=s,this},arcTo:function(s,o,i,a,l,f,u){for(var v=(f-l)/u,m=0;m<=u;m++){var x=l+v*m;s.push(o+Math.cos(x)*a,i+Math.sin(x)*a)}}});p.exports=e}),48682:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(e,s,o,i,a,l){var f=Math.min(i/2,a/2),u=Math.min(l,f);if(u===0){e.rect(s,o,i,a);return}e.moveTo(s+u,o),e.lineTo(s+i-u,o),e.arcTo(s+i,o,s+i,o+u,u),e.lineTo(s+i,o+a-u),e.arcTo(s+i,o+a,s+i-u,o+a,u),e.lineTo(s+u,o+a),e.arcTo(s,o+a,s,o+a-u,u),e.lineTo(s,o+u),e.arcTo(s,o,s+u,o,u),e.closePath()},n=function(e,s,o,i){o.addToRenderList(s);var a=e.currentContext;if(h(e,a,s,o,i)){var l=s._displayOriginX,f=s._displayOriginY;s.isFilled&&(d(a,s),s.isRounded?(a.beginPath(),r(a,-l,-f,s.width,s.height,s.radius),a.fill()):a.fillRect(-l,-f,s.width,s.height)),s.isStroked&&(c(a,s),a.beginPath(),s.isRounded?r(a,-l,-f,s.width,s.height,s.radius):a.rect(-l,-f,s.width,s.height),a.stroke()),a.restore()}};p.exports=n}),87959:((p,S,t)=>{var d=t(39429),c=t(74561);d.register("rectangle",function(h,r,n,e,s,o){return this.displayList.add(new c(this.scene,h,r,n,e,s,o))})}),95597:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(52059),h=t(48682),p.exports={renderWebGL:c,renderCanvas:h}}),52059:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=t(70554),n=function(e,s,o,i){o.addToRenderList(s);var a=e.pipelines.set(s.pipeline),l=c(s,o,i);a.calcMatrix.copyFrom(l.calc);var f=s._displayOriginX,u=s._displayOriginY,v=o.alpha*s.alpha;if(e.pipelines.preBatch(s),s.isRounded&&s.isFilled)d(a,l.calc,s,v,f,u);else if(s.isFilled){var m=a.fillTint,x=r.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*v);m.TL=x,m.TR=x,m.BL=x,m.BR=x,a.batchFillRect(-f,-u,s.width,s.height)}s.isStroked&&h(a,s,v,f,u),e.pipelines.postBatch(s)};p.exports=n}),55911:((p,S,t)=>{var d=t(81991),c=t(83419),h=t(94811),r=t(17803),n=new c({Extends:r,Mixins:[d],initialize:function(s,o,i,a,l,f,u,v){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=5),l===void 0&&(l=32),f===void 0&&(f=64),r.call(this,s,"Star",null),this._points=a,this._innerRadius=l,this._outerRadius=f,this.setPosition(o,i),this.setSize(f*2,f*2),u!==void 0&&this.setFillStyle(u,v),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=[],s=this._points,o=this._innerRadius,i=this._outerRadius,a=Math.PI/2*3,l=Math.PI/s,f=i,u=i;e.push(f,u+-i);for(var v=0;v{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.pathData,u=f.length-1,v=f[0]-a,m=f[1]-l;i.beginPath(),i.moveTo(v,m),e.closePath||(u-=2);for(var x=2;x{var d=t(55911),c=t(39429);c.register("star",function(h,r,n,e,s,o,i){return this.displayList.add(new d(this.scene,h,r,n,e,s,o,i))})}),81991:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(57017),h=t(64272),p.exports={renderWebGL:c,renderCanvas:h}}),57017:((p,S,t)=>{var d=t(10441),c=t(91296),h=t(34682),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,o),l=i.calcMatrix.copyFrom(a.calc),f=e._displayOriginX,u=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,l,e,v,f,u),e.isStroked&&h(i,e,v,f,u),n.pipelines.postBatch(e)};p.exports=r}),36931:((p,S,t)=>{var d=t(83419),c=t(17803),h=t(16483),r=t(96195),n=new d({Extends:c,Mixins:[r],initialize:function(s,o,i,a,l,f,u,v,m,x,g){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=128),f===void 0&&(f=64),u===void 0&&(u=0),v===void 0&&(v=128),m===void 0&&(m=128),c.call(this,s,"Triangle",new h(a,l,f,u,v,m));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(o,i),this.setSize(y,T),x!==void 0&&this.setFillStyle(x,g),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,o,i,a,l){return this.geom.setTo(e,s,o,i,a,l),this.updateData()},updateData:function(){var e=[],s=this.geom,o=this._tempLine;return s.getLineA(o),e.push(o.x1,o.y1,o.x2,o.y2),s.getLineB(o),e.push(o.x2,o.y2),s.getLineC(o),e.push(o.x2,o.y2),this.pathData=e,this}});p.exports=n}),85172:((p,S,t)=>{var d=t(65960),c=t(75177),h=t(20926),r=function(n,e,s,o){s.addToRenderList(e);var i=n.currentContext;if(h(n,i,e,s,o)){var a=e._displayOriginX,l=e._displayOriginY,f=e.geom.x1-a,u=e.geom.y1-l,v=e.geom.x2-a,m=e.geom.y2-l,x=e.geom.x3-a,g=e.geom.y3-l;i.beginPath(),i.moveTo(f,u),i.lineTo(v,m),i.lineTo(x,g),i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r}),45245:((p,S,t)=>{var d=t(39429),c=t(36931);d.register("triangle",function(h,r,n,e,s,o,i,a,l,f){return this.displayList.add(new c(this.scene,h,r,n,e,s,o,i,a,l,f))})}),96195:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(83253),h=t(85172),p.exports={renderWebGL:c,renderCanvas:h}}),83253:((p,S,t)=>{var d=t(91296),c=t(34682),h=t(70554),r=function(n,e,s,o){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,o);i.calcMatrix.copyFrom(a.calc);var l=e._displayOriginX,f=e._displayOriginY,u=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=h.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);v.TL=m,v.TR=m,v.BL=m,v.BR=m;var x=e.geom.x1-l,g=e.geom.y1-f,y=e.geom.x2-l,T=e.geom.y2-f,C=e.geom.x3-l,E=e.geom.y3-f;i.batchFillTriangle(x,g,y,T,C,E,a.sprite,a.camera)}e.isStroked&&c(i,e,u,l,f),n.pipelines.postBatch(e)};p.exports=r}),68287:((p,S,t)=>{var d=t(9674),c=t(83419),h=t(31401),r=t(95643),n=t(92751),e=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Size,h.TextureCrop,h.Tint,h.Transform,h.Visible,n],initialize:function(o,i,a,l,f){r.call(this,o,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(l,f),this.setPosition(i,a),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(s,o){this.anims.update(s,o)},play:function(s,o){return this.anims.play(s,o)},playReverse:function(s,o){return this.anims.playReverse(s,o)},playAfterDelay:function(s,o){return this.anims.playAfterDelay(s,o)},playAfterRepeat:function(s,o){return this.anims.playAfterRepeat(s,o)},chain:function(s){return this.anims.chain(s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(s){return this.anims.stopAfterDelay(s)},stopAfterRepeat:function(s){return this.anims.stopAfterRepeat(s)},stopOnFrame:function(s){return this.anims.stopOnFrame(s)},toJSON:function(){return h.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e}),76552:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),15567:((p,S,t)=>{var d=t(25305),c=t(13059),h=t(44603),r=t(23568),n=t(68287);h.register("sprite",function(e,s){e===void 0&&(e={});var o=r(e,"key",null),i=r(e,"frame",null),a=new n(this.scene,0,0,o,i);return s!==void 0&&(e.add=s),d(this.scene,a,e),c(a,e),a})}),46409:((p,S,t)=>{var d=t(39429),c=t(68287);d.register("sprite",function(h,r,n,e){return this.displayList.add(new c(this.scene,h,r,n,e))})}),92751:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(9409),h=t(76552),p.exports={renderWebGL:c,renderCanvas:h}}),9409:(p=>{var S=function(t,d,c,h){c.addToRenderList(d),d.pipeline.batchSprite(d,c,h)};p.exports=S}),14220:(p=>{var S=function(t,d,c){var h=t.canvas,r=t.context,n=t.style,e=[],s=0,o=c.length;n.maxLines>0&&n.maxLines1&&(l+=i*(f.length-1))}n.wordWrap&&(l-=r.measureText(" ").width),e[a]=Math.ceil(l),s=Math.max(s,e[a])}var v=d.fontSize+n.strokeThickness,m=v*o,x=t.lineSpacing;return o>1&&(m+=x*(o-1)),{width:s,height:m,lines:o,lineWidths:e,lineSpacing:x,lineHeight:v}};p.exports=S}),79557:((p,S,t)=>{var d=t(27919),c=function(h){var r=d.create(this),n=r.getContext("2d",{willReadFrequently:!0});h.syncFont(r,n);var e=n.measureText(h.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,o=e.actualBoundingBoxDescent;return d.remove(r),{ascent:s,descent:o,fontSize:s+o}}var i=Math.ceil(e.width*h.baselineX),a=i,l=2*a;a=a*h.baselineY|0,r.width=i,r.height=l,n.fillStyle="#f00",n.fillRect(0,0,i,l),n.font=h._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(h.testString,0,a);var f={ascent:0,descent:0,fontSize:0},u=n.getImageData(0,0,i,l);if(!u)return f.ascent=a,f.descent=a+6,f.fontSize=f.ascent+f.descent,d.remove(r),f;var v=u.data,m=v.length,x=i*4,g,y,T=0,C=!1;for(g=0;ga;g--){for(y=0;y{var d=t(40366),c=t(27919),h=t(83419),r=t(31401),n=t(95643),e=t(14220),s=t(35154),o=t(35846),i=t(61771),a=t(35762),l=t(45650),f=new h({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,i],initialize:function(v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),n.call(this,v,"Text"),this.renderer=v.sys.renderer,this.setPosition(m,x),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new a(this,y),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=l(),this.texture=v.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(g),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing),y&&y.letterSpacing&&this.setLetterSpacing(y.letterSpacing)},initRTL:function(){if(!this.style.rtl){this.canvas.dir="ltr",this.context.direction="ltr";return}this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(u){var v=this.style;if(v.wordWrapCallback){var m=v.wordWrapCallback.call(v.wordWrapCallbackScope,u,this);return Array.isArray(m)&&(m=m.join(` +`)),m}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,v,m){for(var x="",g=u.replace(/ +/gi," ").split(this.splitRegExp),y=g.length,T=0;TA){if(F===0){for(var D=I;D.length;){D=D.slice(0,-1);var B=D.length*this.letterSpacing;if(N=v.measureText(D).width+B,N<=A)break}if(!D.length)throw new Error("wordWrapWidth < a single character");var L=w.substr(D.length);R[F]=L,E+=D}var G=R[F].length?F:F+1,O=R.slice(G).join(" ").replace(/[ \n]*$/gi,"");g.splice(T+1,0,O),y=g.length;break}else E+=I,A-=N}x+=E.replace(/[ \n]*$/gi,"")+` +`}return x=x.replace(/[\s|\n]*$/gi,""),x},basicWordWrap:function(u,v,m){for(var x="",g=u.split(this.splitRegExp),y=g.length-1,T=v.measureText(" ").width,C=0;C<=y;C++){for(var E=m,M=g[C].split(" "),P=M.length-1,A=0;A<=P;A++){var R=M[A],F=R.length*this.letterSpacing,w=v.measureText(R).width+F,I=w;AE&&A>0&&(x+=` +`,E=m),x+=R,A0&&(F+=C.lineSpacing*w),m.rtl)R=P-R-E.left-E.right;else if(m.align==="right")R+=M-C.lineWidths[w];else if(m.align==="center")R+=(M-C.lineWidths[w])/2;else if(m.align==="justify"){var I=.85;if(C.lineWidths[w]/C.width>=I){var U=C.width-C.lineWidths[w],N=v.measureText(" ").width,D=T[w].trim(),B=D.split(" ");U+=(T[w].length-D.length)*N;for(var L=Math.floor(U/N),G=0;L>0;)B[G]+=" ",G=(G+1)%(B.length-1||1),--L;T[w]=B.join(" ")}}this.autoRound&&(R=Math.round(R),F=Math.round(F));var O=this.letterSpacing;if(m.strokeThickness&&O===0&&(m.syncShadow(v,m.shadowStroke),v.strokeText(T[w],R,F)),m.color)if(m.syncShadow(v,m.shadowFill),O!==0)for(var X=0,z=T[w].split(""),V=0;V{var S=function(t,d,c,h){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S}),71259:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(50171);c.register("text",function(n,e){n===void 0&&(n={});var s=h(n,"text",""),o=h(n,"style",null),i=h(n,"padding",null);i!==null&&(o.padding=i);var a=new r(this.scene,0,0,s,o);return e!==void 0&&(n.add=e),d(this.scene,a,n),a.autoRound=h(n,"autoRound",!0),a.resolution=h(n,"resolution",1),a})}),68005:((p,S,t)=>{var d=t(50171),c=t(39429);c.register("text",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),61771:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(34397),h=t(79724),p.exports={renderWebGL:c,renderCanvas:h}}),35762:((p,S,t)=>{var d=t(83419),c=t(23568),h=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 d({initialize:function(o,i){this.parent=o,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(i,!1,!0)},setStyle:function(s,o,i){o===void 0&&(o=!0),i===void 0&&(i=!1);for(var a in n){var l=i?n[a][1]:this[a];a==="wordWrapCallback"||a==="wordWrapCallbackScope"?this[a]=h(s,n[a][0],l):s&&a==="fontSize"&&typeof s.fontSize=="number"?this[a]=s.fontSize.toString()+"px":this[a]=c(s,n[a][0],l)}var f=h(s,"font",null);f!==null&&this.setFont(f,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=h(s,"fill",null);u!==null&&(this.color=u);var v=h(s,"metrics",!1);return v?this.metrics={ascent:h(v,"ascent",0),descent:h(v,"descent",0),fontSize:h(v,"fontSize",0)}:(o||!this.metrics)&&(this.metrics=r(this)),o?this.parent.updateText():this.parent},syncFont:function(s,o){o.font=this._font},syncStyle:function(s,o){o.textBaseline="alphabetic",o.fillStyle=this.color,o.strokeStyle=this.stroke,o.lineWidth=this.strokeThickness,o.lineCap="round",o.lineJoin="round"},syncShadow:function(s,o){o?(s.shadowOffsetX=this.shadowOffsetX,s.shadowOffsetY=this.shadowOffsetY,s.shadowColor=this.shadowColor,s.shadowBlur=this.shadowBlur):(s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowColor=0,s.shadowBlur=0)},update:function(s){return s&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(s,o){o===void 0&&(o=!0);var i=s,a="",l="";if(typeof s!="string")i=h(s,"fontFamily","Courier"),a=h(s,"fontSize","16px"),l=h(s,"fontStyle","");else{var f=s.split(" "),u=0;l=f.length>2?f[u++]:"",a=f[u++]||"16px",i=f[u++]||"Courier"}return(i!==this.fontFamily||a!==this.fontSize||l!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=a,this.fontStyle=l,o&&this.update(!0)),this.parent},setFontFamily:function(s){return this.fontFamily!==s&&(this.fontFamily=s,this.update(!0)),this.parent},setFontStyle:function(s){return this.fontStyle!==s&&(this.fontStyle=s,this.update(!0)),this.parent},setFontSize:function(s){return typeof s=="number"&&(s=s.toString()+"px"),this.fontSize!==s&&(this.fontSize=s,this.update(!0)),this.parent},setTestString:function(s){return this.testString=s,this.update(!0)},setFixedSize:function(s,o){return this.fixedWidth=s,this.fixedHeight=o,s&&(this.parent.width=s),o&&(this.parent.height=o),this.update(!1)},setBackgroundColor:function(s){return this.backgroundColor=s,this.update(!1)},setFill:function(s){return this.color=s,this.update(!1)},setColor:function(s){return this.color=s,this.update(!1)},setResolution:function(s){return this.resolution=s,this.update(!1)},setStroke:function(s,o){return o===void 0&&(o=this.strokeThickness),s===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==s||this.strokeThickness!==o)&&(this.stroke=s,this.strokeThickness=o,this.update(!0)),this.parent},setShadow:function(s,o,i,a,l,f){return s===void 0&&(s=0),o===void 0&&(o=0),i===void 0&&(i="#000"),a===void 0&&(a=0),l===void 0&&(l=!1),f===void 0&&(f=!0),this.shadowOffsetX=s,this.shadowOffsetY=o,this.shadowColor=i,this.shadowBlur=a,this.shadowStroke=l,this.shadowFill=f,this.update(!1)},setShadowOffset:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this.shadowOffsetX=s,this.shadowOffsetY=o,this.update(!1)},setShadowColor:function(s){return s===void 0&&(s="#000"),this.shadowColor=s,this.update(!1)},setShadowBlur:function(s){return s===void 0&&(s=0),this.shadowBlur=s,this.update(!1)},setShadowStroke:function(s){return this.shadowStroke=s,this.update(!1)},setShadowFill:function(s){return this.shadowFill=s,this.update(!1)},setWordWrapWidth:function(s,o){return o===void 0&&(o=!1),this.wordWrapWidth=s,this.wordWrapUseAdvanced=o,this.update(!1)},setWordWrapCallback:function(s,o){return o===void 0&&(o=null),this.wordWrapCallback=s,this.wordWrapCallbackScope=o,this.update(!1)},setAlign:function(s){return s===void 0&&(s="left"),this.align=s,this.update(!1)},setMaxLines:function(s){return s===void 0&&(s=0),this.maxLines=s,this.update(!1)},getTextMetrics:function(){var s=this.metrics;return{ascent:s.ascent,descent:s.descent,fontSize:s.fontSize}},toJSON:function(){var s={};for(var o in n)s[o]=this[o];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});p.exports=e}),34397:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var s=r.frame,o=s.width,i=s.height,a=d.getTintAppendFloatAlpha,l=h.pipelines.set(r.pipeline,r),f=l.setTexture2D(s.glTexture,r);l.batchTexture(r,s.glTexture,o,i,r.x,r.y,o/r.style.resolution,i/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,o,i,a(r.tintTopLeft,n.alpha*r._alphaTL),a(r.tintTopRight,n.alpha*r._alphaTR),a(r.tintBottomLeft,n.alpha*r._alphaBL),a(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,f)}};p.exports=c}),20839:((p,S,t)=>{var d=t(27919),c=t(83419),h=t(31401),r=t(95643),n=t(98439),e=t(68703),s=t(56295),o=t(45650),i=t(26099),a=8,l=new c({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Crop,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Tint,h.Transform,h.Visible,s],initialize:function(u,v,m,x,g,y,T){var C=u.sys.renderer;r.call(this,u,"TileSprite");var E=u.sys.textures.get(y),M=E.get(T);M.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),E=u.sys.textures.get("__MISSING"),M=E.get()),E.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),E=u.sys.textures.get("__MISSING"),M=E.get()),!x||!g?(x=x||M.width,g=g||M.height):(x=Math.floor(x),g=Math.floor(g)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=C,this.canvas=d.create(this,x,g),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=E,this.displayFrame=M,this._crop=this.resetCropObject(),this._textureKey=o(),this.texture=u.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(M.width),this.potHeight=n(M.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(v,m),this.setSize(x,g),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(f,u){return this.displayTexture=this.scene.sys.textures.get(f),this.setFrame(u)},setFrame:function(f){var u=this.displayTexture.get(f);return this.potWidth=n(u.width),this.potHeight=n(u.height),this.canvas.width=0,!u.cutWidth||!u.cutHeight?this.renderFlags&=~a:this.renderFlags|=a,this.displayFrame=u,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(f,u){return f!==void 0&&(this.tilePositionX=f),u!==void 0&&(this.tilePositionY=u),this},setTileScale:function(f,u){return f===void 0&&(f=this.tileScaleX),u===void 0&&(u=f),this.tileScaleX=f,this.tileScaleY=u,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var f=this.displayFrame;if(f.source.isRenderTexture||f.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var u=this.fillContext,v=this.fillCanvas,m=this.potWidth,x=this.potHeight;(!this.renderer||!this.renderer.gl)&&(m=f.cutWidth,x=f.cutHeight),u.clearRect(0,0,m,x),v.width=m,v.height=x,u.drawImage(f.source.image,f.cutX,f.cutY,f.cutWidth,f.cutHeight,0,0,m,x),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(v,this.fillPattern):this.fillPattern=u.createPattern(v,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var f=this.canvas;if((f.width!==this.width||f.height!==this.height)&&(f.width=this.width,f.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 u=this.context;this.scene.sys.game.config.antialias||e.disable(u);var v=this._tileScale.x,m=this._tileScale.y,x=this._tilePosition.x,g=this._tilePosition.y;u.clearRect(0,0,this.width,this.height),u.save(),u.scale(v,m),u.translate(-x,-g),u.fillStyle=this.fillPattern,u.fillRect(x,g,this.width/v,this.height/m),u.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var f=this.texture;f&&f.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(f){this._tilePosition.x=f,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(f){this._tilePosition.y=f,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(f){this._tileScale.x=f,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(f){this._tileScale.y=f,this.dirty=!0}}});p.exports=l}),46992:(p=>{var S=function(t,d,c,h){d.updateCanvas(),c.addToRenderList(d),t.batchSprite(d,d.frame,c,h)};p.exports=S}),14167:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(20839);c.register("tileSprite",function(n,e){n===void 0&&(n={});var s=h(n,"x",0),o=h(n,"y",0),i=h(n,"width",512),a=h(n,"height",512),l=h(n,"key",""),f=h(n,"frame",""),u=new r(this.scene,s,o,i,a,l,f);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})}),91681:((p,S,t)=>{var d=t(20839),c=t(39429);c.register("tileSprite",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r,n,e,s,o))})}),56295:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(18553),h=t(46992),p.exports={renderWebGL:c,renderCanvas:h}}),18553:((p,S,t)=>{var d=t(70554),c=function(h,r,n,e){r.updateCanvas();var s=r.width,o=r.height;if(!(s===0||o===0)){n.addToRenderList(r);var i=d.getTintAppendFloatAlpha,a=h.pipelines.set(r.pipeline,r),l=a.setTexture2D(r.fillPattern,r);a.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,s,o,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*s,r.originY*o,0,0,s,o,i(r.tintTopLeft,n.alpha*r._alphaTL),i(r.tintTopRight,n.alpha*r._alphaTR),i(r.tintBottomLeft,n.alpha*r._alphaBL),i(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,l)}};p.exports=c}),18471:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(31401),r=t(51708),n=t(8443),e=t(95643),s=t(36383),o=t(14463),i=t(45650),a=t(10247),l=new c({Extends:e,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.TextureCrop,h.Tint,h.Transform,h.Visible,a],initialize:function(u,v,m,x){e.call(this,u,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var g=u.sys.game;this._device=g.device.video,this.setPosition(v,m),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),g.events.on(n.PAUSE,this.globalPause,this),g.events.on(n.RESUME,this.globalResume,this);var y=u.sys.sound;y&&y.on(o.GLOBAL_MUTE,this.globalMute,this),x&&this.load(x)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(f){var u=this.scene.sys.cache.video.get(f);return u?(this.cacheKey=f,this.loadHandler(u.url,u.noAudio,u.crossOrigin)):console.warn("No video in cache for key: "+f),this},changeSource:function(f,u,v,m,x){u===void 0&&(u=!0),v===void 0&&(v=!1),this.cacheKey!==f&&(this.load(f),u&&this.play(v,m,x))},getVideoKey:function(){return this.cacheKey},loadURL:function(f,u,v){u===void 0&&(u=!1);var m=this._device.getVideoURL(f);return m?(this.cacheKey="",this.loadHandler(m.url,u,v)):console.warn("No supported video format found for "+f),this},loadMediaStream:function(f,u,v){return this.loadHandler(null,u,v,f)},loadHandler:function(f,u,v,m){u||(u=!1);var x=this.video;if(x?(this.removeLoadEventHandlers(),this.stop()):(x=document.createElement("video"),x.controls=!1,x.setAttribute("playsinline","playsinline"),x.setAttribute("preload","auto"),x.setAttribute("disablePictureInPicture","true")),u?(x.muted=!0,x.defaultMuted=!0,x.setAttribute("autoplay","autoplay")):(x.muted=!1,x.defaultMuted=!1,x.removeAttribute("autoplay")),v?x.setAttribute("crossorigin",v):x.removeAttribute("crossorigin"),m)if("srcObject"in x)try{x.srcObject=m}catch(y){if(y.name!=="TypeError")throw y;x.src=URL.createObjectURL(m)}else x.src=URL.createObjectURL(m);else x.src=f;this.retry=0,this.video=x,this._playCalled=!1,x.load(),this.addLoadEventHandlers();var g=this.scene.sys.textures.get(this._key);return this.setTexture(g),this},requestVideoFrame:function(f,u){var v=this.video;if(v){var m=u.width,x=u.height,g=this.videoTexture,y=this.videoTextureSource,T=!g||y.source!==v;T?(this._codePaused=v.paused,this._codeMuted=v.muted,g?(y.source=v,y.width=m,y.height=x,g.get().setSize(m,x)):(g=this.scene.sys.textures.create(this._key,v,m,x),g.add("__BASE",0,0,0,m,x),this.setTexture(g),this.videoTexture=g,this.videoTextureSource=g.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,g)),this.setSizeToFrame(),this.updateDisplayOrigin()):y.update(),this.isStalled=!1,this.metadata=u;var C=u.mediaTime;T&&(this._lastUpdate=C,this.emit(r.VIDEO_CREATED,this,m,x),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?C>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):C-1&&v>u&&v=0&&!isNaN(v)&&v>u&&(this.markers[f]=[u,v]),this},playMarker:function(f,u){var v=this.markers[f];return v&&this.play(u,v[0],v[1]),this},removeMarker:function(f){return delete this.markers[f],this},snapshot:function(f,u){return f===void 0&&(f=this.width),u===void 0&&(u=this.height),this.snapshotArea(0,0,this.width,this.height,f,u)},snapshotArea:function(f,u,v,m,x,g){f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),x===void 0&&(x=v),g===void 0&&(g=m);var y=this.video,T=this.snapshotTexture;return T?(T.setSize(x,g),y&&T.context.drawImage(y,f,u,v,m,0,0,x,g)):(T=this.scene.sys.textures.createCanvas(i(),x,g),this.snapshotTexture=T,y&&T.context.drawImage(y,f,u,v,m,0,0,x,g)),T.update()},saveSnapshotTexture:function(f){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,f):this.snapshotTexture=this.scene.sys.textures.createCanvas(f,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 f=this.scene.sys.sound;f&&f.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(f){var u=f.name;u==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):u==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,f)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,f))},legacyPlayHandler:function(){var f=this.video;f&&(this.playSuccess(),f.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(f){this.stop(!1),this.emit(r.VIDEO_ERROR,this,f)},metadataHandler:function(f){this.emit(r.VIDEO_METADATA,this,f)},setSizeToFrame:function(f){f||(f=this.frame),this.width=f.realWidth,this.height=f.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=this.width,u.hitArea.height=this.height),this},stalledHandler:function(f){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,f)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(f,u){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=u,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(f){var u=this.video;if(u){var v=u.duration;if(v!==1/0&&!isNaN(v)){var m=v*f;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(f){var u=this.video;if(u){if(typeof f=="string"){var v=f[0],m=parseFloat(f.substr(1));v==="+"?f=u.currentTime+m:v==="-"&&(f=u.currentTime-m)}u.currentTime=f}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 f=this.video;if(f){var u=f.duration;if(u!==1/0&&!isNaN(u))return f.currentTime/u}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(f){f===void 0&&(f=!0),this._codeMuted=f;var u=this.video;return u&&(u.muted=this._systemMuted?!0:f),this},isMuted:function(){return this._codeMuted},globalMute:function(f,u){this._systemMuted=u;var v=this.video;v&&(v.muted=this._codeMuted?!0:u)},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(f){f===void 0&&(f=!0);var u=this.video;return this._codePaused=f,u&&!u.ended&&(f?u.paused||(this.removeEventHandlers(),u.pause()):f||(this._playCalled?u.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(f){return f===void 0&&(f=1),this.video&&(this.video.volume=d(f,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(f){return this.video&&(this.video.playbackRate=f),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(f){return f===void 0&&(f=!0),this.video&&(this.video.loop=f),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(f,u){return u===void 0&&(u=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,f),this.videoTextureSource.setFlipY(u)),this._key=f,this.flipY=u,!!this.videoTexture},stop:function(f){f===void 0&&(f=!0);var u=this.video;return u&&(this.removeEventHandlers(),u.cancelVideoFrameCallback(this._rfvCallbackId),u.pause()),this.retry=0,this._playCalled=!1,f&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var f=this.video;if(f){for(f.parentNode&&f.parentNode.removeChild(f);f.hasChildNodes();)f.removeChild(f.firstChild);f.removeAttribute("autoplay"),f.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var f=this.scene.sys.game.events;f.off(n.PAUSE,this.globalPause,this),f.off(n.RESUME,this.globalResume,this);var u=this.scene.sys.sound;u&&u.off(o.GLOBAL_MUTE,this.globalMute,this)}});p.exports=l}),58352:(p=>{var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S}),11511:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(18471);c.register("video",function(n,e){n===void 0&&(n={});var s=h(n,"key",null),o=new r(this.scene,0,0,s);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})}),89025:((p,S,t)=>{var d=t(18471),c=t(39429);c.register("video",function(h,r,n){return this.displayList.add(new d(this.scene,h,r,n))})}),10247:((p,S,t)=>{var d=t(29747),c=d,h=d;c=t(29849),h=t(58352),p.exports={renderWebGL:c,renderCanvas:h}}),29849:(p=>{var S=function(t,d,c,h){d.videoTexture&&(c.addToRenderList(d),d.pipeline.batchSprite(d,c,h))};p.exports=S}),41481:((p,S,t)=>{var d=t(10312),c=t(96503),h=t(87902),r=t(83419),n=t(31401),e=t(95643),s=t(87841),o=t(37303),i=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(l,f,u,v,m){v===void 0&&(v=1),m===void 0&&(m=v),e.call(this,l,"Zone"),this.setPosition(f,u),this.width=v,this.height=m,this.blendMode=d.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,l,f){f===void 0&&(f=!0),this.width=a,this.height=l,this.updateDisplayOrigin();var u=this.input;return f&&u&&!u.customHitArea&&(u.hitArea.width=a,u.hitArea.height=l),this},setDisplaySize:function(a,l){return this.displayWidth=a,this.displayHeight=l,this},setCircleDropZone:function(a){return this.setDropZone(new c(0,0,a),h)},setRectangleDropZone:function(a,l){return this.setDropZone(new s(0,0,a,l),o)},setDropZone:function(a,l){return this.input||this.setInteractive(a,l,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(a,l,f){f.addToRenderList(l)},renderWebGL:function(a,l,f){f.addToRenderList(l)}});p.exports=i}),95261:((p,S,t)=>{var d=t(44603),c=t(23568),h=t(41481);d.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),s=c(r,"width",1),o=c(r,"height",s);return new h(this.scene,n,e,s,o)})}),84175:((p,S,t)=>{var d=t(41481),c=t(39429);c.register("zone",function(h,r,n,e){return this.displayList.add(new d(this.scene,h,r,n,e))})}),95166:(p=>{var S=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};p.exports=S}),96503:((p,S,t)=>{var d=t(83419),c=t(87902),h=t(26241),r=t(79124),n=t(23777),e=t(28176),s=new d({initialize:function(i,a,l){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.type=n.CIRCLE,this.x=i,this.y=a,this._radius=l,this._diameter=l*2},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a){return this.x=o,this.y=i,this._radius=a,this._diameter=a*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(o){this._radius=o,this._diameter=o*2}},diameter:{get:function(){return this._diameter},set:function(o){this._diameter=o,this._radius=o*.5}},left:{get:function(){return this.x-this._radius},set:function(o){this.x=o+this._radius}},right:{get:function(){return this.x+this._radius},set:function(o){this.x=o-this._radius}},top:{get:function(){return this.y-this._radius},set:function(o){this.y=o+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(o){this.y=o-this._radius}}});p.exports=s}),71562:(p=>{var S=function(t){return 2*(Math.PI*t.radius)};p.exports=S}),92110:((p,S,t)=>{var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x+h.radius*Math.cos(r),n.y=h.y+h.radius*Math.sin(r),n};p.exports=c}),42250:((p,S,t)=>{var d=t(96503),c=function(h){return new d(h.x,h.y,h.radius)};p.exports=c}),87902:(p=>{var S=function(t,d,c){if(t.radius>0&&d>=t.left&&d<=t.right&&c>=t.top&&c<=t.bottom){var h=(t.x-d)*(t.x-d),r=(t.y-c)*(t.y-c);return h+r<=t.radius*t.radius}else return!1};p.exports=S}),5698:((p,S,t)=>{var d=t(87902),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),70588:((p,S,t)=>{var d=t(87902),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c}),26394:(p=>{var S=function(t,d){return d.setTo(t.x,t.y,t.radius)};p.exports=S}),76278:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.radius===d.radius};p.exports=S}),2074:((p,S,t)=>{var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.diameter,r.height=h.diameter,r};p.exports=c}),26241:((p,S,t)=>{var d=t(92110),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n}),79124:((p,S,t)=>{var d=t(71562),c=t(92110),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),39212:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),28176:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,o=s*Math.cos(n),i=s*Math.sin(n);return r.x=h.x+o*h.radius,r.y=h.y+i*h.radius,r};p.exports=c}),88911:((p,S,t)=>{var d=t(96503);d.Area=t(95166),d.Circumference=t(71562),d.CircumferencePoint=t(92110),d.Clone=t(42250),d.Contains=t(87902),d.ContainsPoint=t(5698),d.ContainsRect=t(70588),d.CopyFrom=t(26394),d.Equals=t(76278),d.GetBounds=t(2074),d.GetPoint=t(26241),d.GetPoints=t(79124),d.Offset=t(50884),d.OffsetPoint=t(39212),d.Random=t(28176),p.exports=d}),23777:(p=>{var S={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=S}),78874:(p=>{var S=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};p.exports=S}),92990:(p=>{var S=function(t){var d=t.width/2,c=t.height/2,h=Math.pow(d-c,2)/Math.pow(d+c,2);return Math.PI*(d+c)*(1+3*h/(10+Math.sqrt(4-3*h)))};p.exports=S}),79522:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.width/2,s=h.height/2;return n.x=h.x+e*Math.cos(r),n.y=h.y+s*Math.sin(r),n};p.exports=c}),58102:((p,S,t)=>{var d=t(8497),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c}),81154:(p=>{var S=function(t,d,c){if(t.width<=0||t.height<=0)return!1;var h=(d-t.x)/t.width,r=(c-t.y)/t.height;return h*=h,r*=r,h+r<.25};p.exports=S}),46662:((p,S,t)=>{var d=t(81154),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),1632:((p,S,t)=>{var d=t(81154),c=function(h,r){return d(h,r.x,r.y)&&d(h,r.right,r.y)&&d(h,r.x,r.bottom)&&d(h,r.right,r.bottom)};p.exports=c}),65534:(p=>{var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S}),8497:((p,S,t)=>{var d=t(83419),c=t(81154),h=t(90549),r=t(48320),n=t(23777),e=t(24820),s=new d({initialize:function(i,a,l,f){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.ELLIPSE,this.x=i,this.y=a,this.width=l,this.height=f},contains:function(o,i){return c(this,o,i)},getPoint:function(o,i){return h(this,o,i)},getPoints:function(o,i,a){return r(this,o,i,a)},getRandomPoint:function(o){return e(this,o)},setTo:function(o,i,a,l){return this.x=o,this.y=i,this.width=a,this.height=l,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(o,i){return i===void 0&&(i=o),this.x=o,this.y=i,this},setSize:function(o,i){return i===void 0&&(i=o),this.width=o,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(o){this.x=o+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(o){this.x=o-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(o){this.y=o+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(o){this.y=o-this.height/2}}});p.exports=s}),36146:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S}),23694:((p,S,t)=>{var d=t(87841),c=function(h,r){return r===void 0&&(r=new d),r.x=h.left,r.y=h.top,r.width=h.width,r.height=h.height,r};p.exports=c}),90549:((p,S,t)=>{var d=t(79522),c=t(62945),h=t(36383),r=t(2141),n=function(e,s,o){o===void 0&&(o=new r);var i=c(s,0,h.PI2);return d(e,i,o)};p.exports=n}),48320:((p,S,t)=>{var d=t(92990),c=t(79522),h=t(62945),r=t(36383),n=function(e,s,o,i){i===void 0&&(i=[]),!s&&o>0&&(s=d(e)/o);for(var a=0;a{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),44808:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),24820:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=h.x+e*Math.cos(n)*h.width/2,r.y=h.y+e*Math.sin(n)*h.height/2,r};p.exports=c}),49203:((p,S,t)=>{var d=t(8497);d.Area=t(78874),d.Circumference=t(92990),d.CircumferencePoint=t(79522),d.Clone=t(58102),d.Contains=t(81154),d.ContainsPoint=t(46662),d.ContainsRect=t(1632),d.CopyFrom=t(65534),d.Equals=t(36146),d.GetBounds=t(23694),d.GetPoint=t(90549),d.GetPoints=t(48320),d.Offset=t(73424),d.OffsetPoint=t(44808),d.Random=t(24820),p.exports=d}),55738:((p,S,t)=>{var d=t(23777),c=t(79291),h={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};h=c(!1,h,d),p.exports=h}),2044:((p,S,t)=>{var d=t(20339),c=function(h,r){return d(h.x,h.y,r.x,r.y)<=h.radius+r.radius};p.exports=c}),81491:(p=>{var S=function(t,d){var c=d.width/2,h=d.height/2,r=Math.abs(t.x-d.x-c),n=Math.abs(t.y-d.y-h),e=c+t.radius,s=h+t.radius;if(r>e||n>s)return!1;if(r<=c||n<=h)return!0;var o=r-c,i=n-h,a=o*o,l=i*i,f=t.radius*t.radius;return a+l<=f};p.exports=S}),63376:((p,S,t)=>{var d=t(2141),c=t(2044),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x,o=r.y,i=r.radius,a=n.x,l=n.y,f=n.radius,u,v,m,x,g;if(o===l)g=(f*f-i*i-a*a+s*s)/(2*(s-a)),u=1,v=-2*l,m=a*a+g*g-2*a*g+l*l-f*f,x=v*v-4*u*m,x===0?e.push(new d(g,-v/(2*u))):x>0&&(e.push(new d(g,(-v+Math.sqrt(x))/(2*u))),e.push(new d(g,(-v-Math.sqrt(x))/(2*u))));else{var y=(s-a)/(o-l),T=(f*f-i*i-a*a+s*s-l*l+o*o)/(2*(o-l));u=y*y+1,v=2*o*y-2*T*y-2*s,m=s*s+o*o+T*T-i*i-2*o*T,x=v*v-4*u*m,x===0?(g=-v/(2*u),e.push(new d(g,T-g*y))):x>0&&(g=(-v+Math.sqrt(x))/(2*u),e.push(new d(g,T-g*y)),g=(-v-Math.sqrt(x))/(2*u),e.push(new d(g,T-g*y)))}}return e};p.exports=h}),97439:((p,S,t)=>{var d=t(4042),c=t(81491),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC(),a=n.getLineD();d(s,r,e),d(o,r,e),d(i,r,e),d(a,r,e)}return e};p.exports=h}),4042:((p,S,t)=>{var d=t(2141),c=t(80462),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x1,o=r.y1,i=r.x2,a=r.y2,l=n.x,f=n.y,u=n.radius,v=i-s,m=a-o,x=s-l,g=o-f,y=v*v+m*m,T=2*(v*x+m*g),C=x*x+g*g-u*u,E=T*T-4*y*C,M,P;if(E===0){var A=-T/(2*y);M=s+A*v,P=o+A*m,A>=0&&A<=1&&e.push(new d(M,P))}else if(E>0){var R=(-T-Math.sqrt(E))/(2*y);M=s+R*v,P=o+R*m,R>=0&&R<=1&&e.push(new d(M,P));var F=(-T+Math.sqrt(E))/(2*y);M=s+F*v,P=o+F*m,F>=0&&F<=1&&e.push(new d(M,P))}}return e};p.exports=h}),36100:((p,S,t)=>{var d=t(25836),c=function(h,r,n,e){n===void 0&&(n=!1);var s=h.x1,o=h.y1,i=h.x2,a=h.y2,l=r.x1,f=r.y1,u=r.x2,v=r.y2,m=i-s,x=a-o,g=u-l,y=v-f,T=m*y-x*g;if(T===0)return null;var C,E,M;if(n){if(C=(m*(f-o)+x*(s-l))/(g*x-y*m),m!==0)E=(l+g*C-s)/m;else if(x!==0)E=(f+y*C-o)/x;else return null;if(E<0||C<0||C>1)return null;M=E}else{if(C=((l-s)*y-(f-o)*g)/T,E=((o-f)*m-(s-l)*x)/T,C<0||C>1||E<0||E>1)return null;M=C}return e===void 0&&(e=new d),e.set(s+m*M,o+x*M,M)};p.exports=c}),3073:((p,S,t)=>{var d=t(36100),c=t(23031),h=t(25836),r=new c,n=new h,e=function(s,o,i,a){i===void 0&&(i=!1),a===void 0&&(a=new h);var l=!1;a.set(),n.set();for(var f=o[o.length-1],u=0;u{var d=t(25836),c=t(61369),h=t(3073),r=new d,n=function(e,s,o,i){i===void 0&&(i=new c),Array.isArray(s)||(s=[s]);var a=!1;i.set(),r.set();for(var l=0;l{var d=t(2141),c=t(76112),h=t(92773),r=function(n,e,s){if(s===void 0&&(s=[]),h(n,e))for(var o=e.getLineA(),i=e.getLineB(),a=e.getLineC(),l=e.getLineD(),f=[new d,new d,new d,new d],u=[c(o,n,f[0]),c(i,n,f[1]),c(a,n,f[2]),c(l,n,f[3])],v=0;v<4;v++)u[v]&&s.push(f[v]);return s};p.exports=r}),71147:((p,S,t)=>{var d=t(61369),c=t(56362),h=t(23031),r=new h;function n(o,i,a,l,f){var u=Math.cos(o),v=Math.sin(o);r.setTo(i,a,i+u,a+v);var m=c(r,l,!0);m&&f.push(new d(m.x,m.y,o,m.w))}function e(o,i){return o.z-i.z}var s=function(o,i,a){Array.isArray(a)||(a=[a]);for(var l=[],f=[],u=0;u{var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),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};p.exports=h}),52784:((p,S,t)=>{var d=t(60646),c=t(59996),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC(),a=r.getLineD();d(s,n,e),d(o,n,e),d(i,n,e),d(a,n,e)}return e};p.exports=h}),26341:((p,S,t)=>{var d=t(89265),c=t(60646),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(s,r,e),c(o,r,e),c(i,r,e)}return e};p.exports=h}),38720:((p,S,t)=>{var d=t(4042),c=t(67636),h=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();d(s,n,e),d(o,n,e),d(i,n,e)}return e};p.exports=h}),13882:((p,S,t)=>{var d=t(2141),c=t(2822),h=t(76112),r=function(n,e,s){if(s===void 0&&(s=[]),c(n,e))for(var o=n.getLineA(),i=n.getLineB(),a=n.getLineC(),l=[new d,new d,new d],f=[h(o,e,l[0]),h(i,e,l[1]),h(a,e,l[2])],u=0;u<3;u++)f[u]&&s.push(l[u]);return s};p.exports=r}),75636:((p,S,t)=>{var d=t(82944),c=t(13882),h=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),o=n.getLineB(),i=n.getLineC();c(r,s,e),c(r,o,e),c(r,i,e)}return e};p.exports=h}),80462:((p,S,t)=>{var d=t(87902),c=t(2141),h=new c,r=function(n,e,s){if(s===void 0&&(s=h),d(e,n.x1,n.y1))return s.x=n.x1,s.y=n.y1,!0;if(d(e,n.x2,n.y2))return s.x=n.x2,s.y=n.y2,!0;var o=n.x2-n.x1,i=n.y2-n.y1,a=e.x-n.x1,l=e.y-n.y1,f=o*o+i*i,u=o,v=i;if(f>0){var m=(a*o+l*i)/f;u*=m,v*=m}s.x=n.x1+u,s.y=n.y1+v;var x=u*u+v*v;return x<=f&&u*o+v*i>=0&&d(e,s.x,s.y)};p.exports=r}),76112:(p=>{var S=function(t,d,c){var h=t.x1,r=t.y1,n=t.x2,e=t.y2,s=d.x1,o=d.y1,i=d.x2,a=d.y2;if(h===n&&r===e||s===i&&o===a)return!1;var l=(a-o)*(n-h)-(i-s)*(e-r);if(l===0)return!1;var f=((i-s)*(r-o)-(a-o)*(h-s))/l,u=((n-h)*(r-o)-(e-r)*(h-s))/l;return f<0||f>1||u<0||u>1?!1:(c&&(c.x=h+f*(n-h),c.y=r+f*(e-r)),!0)};p.exports=S}),92773:(p=>{var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=d.x,s=d.y,o=d.right,i=d.bottom,a=0;if(c>=e&&c<=o&&h>=s&&h<=i||r>=e&&r<=o&&n>=s&&n<=i)return!0;if(c=e){if(a=h+(n-h)*(e-c)/(r-c),a>s&&a<=i)return!0}else if(c>o&&r<=o&&(a=h+(n-h)*(o-c)/(r-c),a>=s&&a<=i))return!0;if(h=s){if(a=c+(r-c)*(s-h)/(n-h),a>=e&&a<=o)return!0}else if(h>i&&n<=i&&(a=c+(r-c)*(i-h)/(n-h),a>=e&&a<=o))return!0;return!1};p.exports=S}),16204:(p=>{var S=function(t,d,c){c===void 0&&(c=1);var h=d.x1,r=d.y1,n=d.x2,e=d.y2,s=t.x,o=t.y,i=(n-h)*(n-h)+(e-r)*(e-r);if(i===0)return!1;var a=((s-h)*(n-h)+(o-r)*(e-r))/i;if(a<0)return Math.sqrt((h-s)*(h-s)+(r-o)*(r-o))<=c;if(a>=0&&a<=1){var l=((r-o)*(n-h)-(h-s)*(e-r))/i;return Math.abs(l)*Math.sqrt(i)<=c}else return Math.sqrt((n-s)*(n-s)+(e-o)*(e-o))<=c};p.exports=S}),14199:((p,S,t)=>{var d=t(16204),c=function(h,r){if(!d(h,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),s=Math.min(r.y1,r.y2),o=Math.max(r.y1,r.y2);return h.x>=n&&h.x<=e&&h.y>=s&&h.y<=o};p.exports=c}),59996:(p=>{var S=function(t,d){return t.width<=0||t.height<=0||d.width<=0||d.height<=0?!1:!(t.rightd.right||t.y>d.bottom)};p.exports=S}),89265:((p,S,t)=>{var d=t(76112),c=t(37303),h=t(48653),r=t(77493),n=function(e,s){if(s.left>e.right||s.righte.bottom||s.bottom0};p.exports=n}),84411:(p=>{var S=function(t,d,c,h,r,n){return n===void 0&&(n=0),!(d>t.right+n||ct.bottom+n||r{var d=t(80462),c=t(10690),h=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{var d=t(76112),c=function(h,r){return!!(h.contains(r.x1,r.y1)||h.contains(r.x2,r.y2)||d(h.getLineA(),r)||d(h.getLineB(),r)||d(h.getLineC(),r))};p.exports=c}),82944:((p,S,t)=>{var d=t(48653),c=t(71694),h=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(u=c(e),v=d(n,u,!0),v.length>0)};p.exports=r}),91865:((p,S,t)=>{p.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:(p=>{var S=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};p.exports=S}),84993:(p=>{var S=function(t,d,c){d===void 0&&(d=1),c===void 0&&(c=[]);var h=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(n-h),o=Math.abs(e-r),i=h-o&&(l-=o,h+=i),u{var S=function(t,d,c){var h=d-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=h,t.y1+=r,t.x2+=h,t.y2+=r,t};p.exports=S}),31116:((p,S,t)=>{var d=t(23031),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2)};p.exports=c}),59944:(p=>{var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2)};p.exports=S}),59220:(p=>{var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2};p.exports=S}),78177:((p,S,t)=>{var d=t(35001),c=function(h,r,n){n===void 0&&(n=r);var e=d(h),s=h.x2-h.x1,o=h.y2-h.y1;return r&&(h.x1=h.x1-s/e*r,h.y1=h.y1-o/e*r),n&&(h.x2=h.x2+s/e*n,h.y2=h.y2+o/e*n),h};p.exports=c}),26708:((p,S,t)=>{var d=t(52816),c=t(6113),h=t(2141),r=function(n,e,s,o,i){o===void 0&&(o=0),i===void 0&&(i=[]);var a=[],l=n.x1,f=n.y1,u=n.x2-l,v=n.y2-f,m=c(e,i),x,g,y=s-1;for(x=0;x0){var T=a[0],C=[T];for(x=1;x=o&&(C.push(E),T=E)}var M=a[a.length-1];return d(T,M){var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2)/2,r.y=(h.y1+h.y2)/2,r};p.exports=c}),99569:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x1,s=h.y1,o=h.x2,i=h.y2,a=(o-e)*(o-e)+(i-s)*(i-s);if(a===0)return n;var l=((r.x-e)*(o-e)+(r.y-s)*(i-s))/a;return n.x=e+l*(o-e),n.y=s+l*(i-s),n};p.exports=c}),34638:((p,S,t)=>{var d=t(36383),c=t(91938),h=t(2141),r=function(n,e){e===void 0&&(e=new h);var s=c(n)-d.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};p.exports=r}),13151:((p,S,t)=>{var d=t(2141),c=function(h,r,n){return n===void 0&&(n=new d),n.x=h.x1+(h.x2-h.x1)*r,n.y=h.y1+(h.y2-h.y1)*r,n};p.exports=c}),15258:((p,S,t)=>{var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=d(r)/e);for(var o=r.x1,i=r.y1,a=r.x2,l=r.y2,f=0;f{var S=function(t,d){var c=t.x1,h=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-h)*(n-h);if(e===0)return!1;var s=((h-d.y)*(r-c)-(c-d.x)*(n-h))/e;return Math.abs(s)*Math.sqrt(e)};p.exports=S}),98770:(p=>{var S=function(t){return Math.abs(t.y1-t.y2)};p.exports=S}),35001:(p=>{var S=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};p.exports=S}),23031:((p,S,t)=>{var d=t(83419),c=t(13151),h=t(15258),r=t(23777),n=t(65822),e=t(26099),s=new d({initialize:function(i,a,l,f){i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=r.LINE,this.x1=i,this.y1=a,this.x2=l,this.y2=f},getPoint:function(o,i){return c(this,o,i)},getPoints:function(o,i,a){return h(this,o,i,a)},getRandomPoint:function(o){return n(this,o)},setTo:function(o,i,a,l){return o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),this.x1=o,this.y1=i,this.x2=a,this.y2=l,this},setFromObjects:function(o,i){return this.x1=o.x,this.y1=o.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(o){return o===void 0&&(o=new e),o.set(this.x1,this.y1),o},getPointB:function(o){return o===void 0&&(o=new e),o.set(this.x2,this.y2),o},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(o){this.x1<=this.x2?this.x1=o:this.x2=o}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(o){this.x1>this.x2?this.x1=o:this.x2=o}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(o){this.y1<=this.y2?this.y1=o:this.y2=o}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(o){this.y1>this.y2?this.y1=o:this.y2=o}}});p.exports=s}),64795:((p,S,t)=>{var d=t(36383),c=t(15994),h=t(91938),r=function(n){var e=h(n)-d.TAU;return c(e,-Math.PI,Math.PI)};p.exports=r}),52616:((p,S,t)=>{var d=t(36383),c=t(91938),h=function(r){return Math.cos(c(r)-d.TAU)};p.exports=h}),87231:((p,S,t)=>{var d=t(36383),c=t(91938),h=function(r){return Math.sin(c(r)-d.TAU)};p.exports=h}),89662:(p=>{var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t};p.exports=S}),71165:(p=>{var S=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};p.exports=S}),65822:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=Math.random();return r.x=h.x1+n*(h.x2-h.x1),r.y=h.y1+n*(h.y2-h.y1),r};p.exports=c}),69777:((p,S,t)=>{var d=t(91938),c=t(64795),h=function(r,n){return 2*c(n)-Math.PI-d(r)};p.exports=h}),39706:((p,S,t)=>{var d=t(64400),c=function(h,r){var n=(h.x1+h.x2)/2,e=(h.y1+h.y2)/2;return d(h,n,e,r)};p.exports=c}),82585:((p,S,t)=>{var d=t(64400),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c}),64400:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,t};p.exports=S}),62377:(p=>{var S=function(t,d,c,h,r){return t.x1=d,t.y1=c,t.x2=d+Math.cos(h)*r,t.y2=c+Math.sin(h)*r,t};p.exports=S}),71366:(p=>{var S=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};p.exports=S}),10809:(p=>{var S=function(t){return Math.abs(t.x1-t.x2)};p.exports=S}),2529:((p,S,t)=>{var d=t(23031);d.Angle=t(91938),d.BresenhamPoints=t(84993),d.CenterOn=t(36469),d.Clone=t(31116),d.CopyFrom=t(59944),d.Equals=t(59220),d.Extend=t(78177),d.GetEasedPoints=t(26708),d.GetMidPoint=t(32125),d.GetNearestPoint=t(99569),d.GetNormal=t(34638),d.GetPoint=t(13151),d.GetPoints=t(15258),d.GetShortestDistance=t(26408),d.Height=t(98770),d.Length=t(35001),d.NormalAngle=t(64795),d.NormalX=t(52616),d.NormalY=t(87231),d.Offset=t(89662),d.PerpSlope=t(71165),d.Random=t(65822),d.ReflectAngle=t(69777),d.Rotate=t(39706),d.RotateAroundPoint=t(82585),d.RotateAroundXY=t(64400),d.SetToAngle=t(62377),d.Slope=t(71366),d.Width=t(10809),p.exports=d}),83997:((p,S,t)=>{var d=t(83419),c=t(87841),h=t(26099);function r(e,s,o,i){var a=e-o,l=s-i,f=a*a+l*l;return Math.sqrt(f)}var n=new d({initialize:function(s,o,i){this.vertex1=s,this.vertex2=o,this.vertex3=i,this.bounds=new c,this._inCenter=new h},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,o=this.vertex2,i=this.vertex3,a,l,f,u,v,m;e?(a=s.x,l=s.y,f=o.x,u=o.y,v=i.x,m=i.y):(a=s.vx,l=s.vy,f=o.vx,u=o.vy,v=i.vx,m=i.vy);var x=r(v,m,f,u),g=r(a,l,v,m),y=r(f,u,a,l),T=x+g+y;return this._inCenter.set((a*x+f*g+v*y)/T,(l*x+u*g+m*y)/T)},contains:function(e,s,o){var i=this.vertex1,a=this.vertex2,l=this.vertex3,f=i.vx,u=i.vy,v=a.vx,m=a.vy,x=l.vx,g=l.vy;if(o){var y=o.a,T=o.b,C=o.c,E=o.d,M=o.e,P=o.f;f=i.vx*y+i.vy*C+M,u=i.vx*T+i.vy*E+P,v=a.vx*y+a.vy*C+M,m=a.vx*T+a.vy*E+P,x=l.vx*y+l.vy*C+M,g=l.vx*T+l.vy*E+P}var A=x-f,R=g-u,F=v-f,w=m-u,I=e-f,U=s-u,N=A*A+R*R,D=A*F+R*w,B=A*I+R*U,L=F*F+w*w,G=F*I+w*U,O=N*L-D*D,X=O===0?0:1/O,z=(L*B-D*G)*X,V=(N*G-D*B)*X;return z>=0&&V>=0&&z+V<1},isCounterClockwise:function(e){var s=this.vertex1,o=this.vertex2,i=this.vertex3,a=(o.vx-s.vx)*(i.vy-s.vy)-(o.vy-s.vy)*(i.vx-s.vx);return e<=0?a>=0:a<0},load:function(e,s,o,i,a){return o=this.vertex1.load(e,s,o,i,a),o=this.vertex2.load(e,s,o,i,a),o=this.vertex3.load(e,s,o,i,a),o},transformCoordinatesLocal:function(e,s,o,i){return this.vertex1.transformCoordinatesLocal(e,s,o,i),this.vertex2.transformCoordinatesLocal(e,s,o,i),this.vertex3.transformCoordinatesLocal(e,s,o,i),this},updateBounds:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,s.vx,o.vx),i.y=Math.min(e.vy,s.vy,o.vy),i.width=Math.max(e.vx,s.vx,o.vx)-i.x,i.height=Math.max(e.vy,s.vy,o.vy)-i.y,this},isInView:function(e,s,o,i,a,l,f,u,v,m,x){this.update(i,a,l,f,u,v,m,x);var g=this.vertex1,y=this.vertex2,T=this.vertex3;if(g.ta<=0&&y.ta<=0&&T.ta<=0||s&&!this.isCounterClockwise(o))return!1;var C=this.bounds;C.x=Math.min(g.tx,y.tx,T.tx),C.y=Math.min(g.ty,y.ty,T.ty),C.width=Math.max(g.tx,y.tx,T.tx)-C.x,C.height=Math.max(g.ty,y.ty,T.ty)-C.y;var E=e.x+e.width,M=e.y+e.height;return C.width<=0||C.height<=0||e.width<=0||e.height<=0?!1:!(C.rightE||C.y>M)},scrollUV:function(e,s){return this.vertex1.scrollUV(e,s),this.vertex2.scrollUV(e,s),this.vertex3.scrollUV(e,s),this},scaleUV:function(e,s){return this.vertex1.scaleUV(e,s),this.vertex2.scaleUV(e,s),this.vertex3.scaleUV(e,s),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,s,o,i,a,l,f,u){return this.vertex1.update(s,o,i,a,l,f,u,e),this.vertex2.update(s,o,i,a,l,f,u,e),this.vertex3.update(s,o,i,a,l,f,u,e),this},translate:function(e,s){s===void 0&&(s=0);var o=this.vertex1,i=this.vertex2,a=this.vertex3;return o.x+=e,o.y+=s,i.x+=e,i.y+=s,a.x+=e,a.y+=s,this},x:{get:function(){return this.getInCenter().x},set:function(e){var s=this.getInCenter();this.translate(e-s.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var s=this.getInCenter();this.translate(0,e-s.y)}},alpha:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.alpha+s.alpha+o.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,s=this.vertex2,o=this.vertex3;return(e.vz+s.vz+o.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=n}),48803:((p,S,t)=>{var d=t(83997),c=t(95540),h=t(37867),r=t(25836),n=t(39318),e=new r,s=new r,o=new h,i=function(a){var l=c(a,"mesh"),f=c(a,"texture",null),u=c(a,"frame"),v=c(a,"width",1),m=c(a,"height",v),x=c(a,"widthSegments",1),g=c(a,"heightSegments",x),y=c(a,"x",0),T=c(a,"y",0),C=c(a,"z",0),E=c(a,"rotateX",0),M=c(a,"rotateY",0),P=c(a,"rotateZ",0),A=c(a,"zIsUp",!0),R=c(a,"isOrtho",l?l.dirtyCache[11]:!1),F=c(a,"colors",[16777215]),w=c(a,"alphas",[1]),I=c(a,"tile",!1),U=c(a,"flipY",!1),N=c(a,"width",null),D={faces:[],verts:[]};e.set(y,T,C),s.set(E,M,P),o.fromRotationXYTranslation(s,e,A);var B;if(!f&&l)f=l.texture,u||(B=l.frame);else if(l&&typeof f=="string")f=l.scene.sys.textures.get(f);else if(!f)return D;B||(B=f.get(u)),!N&&R&&f&&l&&(v=B.width/l.height,m=B.height/l.height);var L=v/2,G=m/2,O=Math.floor(x),X=Math.floor(g),z=O+1,V=X+1,Y=v/O,W=m/X,H=[],K=[],b,J,$=0,Z=1,q=0,_=1;B&&($=B.u0,Z=B.u1,U?(q=B.v1,_=B.v0):(q=B.v0,_=B.v1));var tt=Z-$,Q=_-q;for(J=0;J{var d=t(83997),c=t(37867),h=t(25836),r=t(39318),n=new h,e=new h,s=new c,o=function(i,a,l,f,u,v,m,x,g,y){l===void 0&&(l=1),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},C=i.materials;n.set(f,u,v),e.set(m,x,g),s.fromRotationXYTranslation(e,n,y);for(var E=0;E{var d=t(83997),c=t(39318),h=function(r,n,e,s,o,i,a,l){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),a===void 0&&(a=1),l===void 0&&(l=!1),r.length!==n.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var f={faces:[],vertices:[]},u,v,m,x,g,y,T,C,E,M,P,A=s?3:2,R=Array.isArray(i),F=Array.isArray(a);if(Array.isArray(e)&&e.length>0)for(u=0;u{var S=!0,t="untitled",d="",c="";function h(v){var m=v.indexOf("#");return m>-1?v.substring(0,m):v}function r(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),d="",v.models[v.models.length-1]}function n(v,m){var x=v.length>=2?v[1]:t;m.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function e(v){v.length===2&&(d=v[1])}function s(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertices.push({x:g,y,z:T})}function o(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;isNaN(g)&&(g=0),isNaN(y)&&(y=0),isNaN(T)&&(T=0),S&&(y=1-y),r(m).textureCoords.push({u:g,v:y,w:T})}function i(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertexNormals.push({x:g,y,z:T})}function a(v,m){var x=v.length-1;if(!(x<3)){for(var g={group:d,material:c,vertices:[]},y=0;y3)){var M=0,P=0,A=0;M=parseInt(C[0],10),E>1&&C[1]!==""&&(P=parseInt(C[1],10)),E>2&&(A=parseInt(C[2],10)),M!==0&&(M<0&&(M=r(m).vertices.length+1+M),P-=1,M-=1,A-=1,g.vertices.push({textureCoordsIndex:P,vertexIndex:M,vertexNormalIndex:A}))}}r(m).faces.push(g)}}function l(v,m){v.length>=2&&m.materialLibraries.push(v[1])}function f(v){v.length>=2&&(c=v[1])}var u=function(v,m){m===void 0&&(m=!0),S=m;var x={materials:{},materialLibraries:[],models:[]};d="",c="";for(var g=v.split(` +`),y=0;y{var d=t(37589),c=function(h){for(var r={},n=h.split(` +`),e="",s=0;s=2?Math.floor(i[2]*255):a,f=i.length>=3?Math.floor(i[3]*255):a;r[e]=d(a,l,f);break}}}}return r};p.exports=c}),92570:(p=>{var S=function(t,d,c,h){var r,n;if(c===void 0&&h===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),o=Math.sin(d),i=t.vertex1,a=t.vertex2,l=t.vertex3,f=i.x-r,u=i.y-n;i.set(f*s-u*o+r,f*o+u*s+n),f=a.x-r,u=a.y-n,a.set(f*s-u*o+r,f*o+u*s+n),f=l.x-r,u=l.y-n,l.set(f*s-u*o+r,f*o+u*s+n)};p.exports=S}),39318:((p,S,t)=>{var d=t(83419),c=t(70554),h=t(25836),r=new d({Extends:h,initialize:function(e,s,o,i,a,l,f,u,v,m){l===void 0&&(l=16777215),f===void 0&&(f=1),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),h.call(this,e,s,o),this.vx=0,this.vy=0,this.vz=0,this.nx=u,this.ny=v,this.nz=m,this.u=i,this.v=a,this.color=l,this.alpha=f,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=a},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,s,o){var i=this.x,a=this.y,l=this.z,f=n.val,u=i*f[0]+a*f[4]+l*f[8]+f[12],v=i*f[1]+a*f[5]+l*f[9]+f[13],m=i*f[2]+a*f[6]+l*f[10]+f[14],x=i*f[3]+a*f[7]+l*f[11]+f[15];this.vx=u/x*e,this.vy=-(v/x)*s,o<=0?this.vz=m/x:this.vz=-(m/x)},resize:function(n,e,s,o,i,a){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*o,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),a<.5?this.vy+=o*(.5-a):a>.5&&(this.vy-=o*(a-.5)),this},update:function(n,e,s,o,i,a,l,f){var u=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*o+a;return l&&(u=Math.round(u),v=Math.round(v)),this.tx=u,this.ty=v,this.ta=this.alpha*f,this},load:function(n,e,s,o,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=o,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r}),73090:((p,S,t)=>{var d={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};p.exports=d}),96550:(p=>{var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S}),99706:((p,S,t)=>{var d=t(2141),c=function(h){return new d(h.x,h.y)};p.exports=c}),68010:(p=>{var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S}),27814:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S}),73565:(p=>{var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S}),87555:((p,S,t)=>{var d=t(2141),c=function(h,r){if(r===void 0&&(r=new d),!Array.isArray(h))throw new Error("GetCentroid points argument must be an array");var n=h.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=h[0].x,r.y=h[0].y;else{for(var e=0;e{var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S}),44405:(p=>{var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S}),20873:((p,S,t)=>{var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=0;in&&(n=a.x),a.xs&&(s=a.y),a.y{var d=t(2141),c=function(h,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=h.x+(r.x-h.x)*n,e.y=h.y+(r.y-h.y)*n,e};p.exports=c}),55767:(p=>{var S=function(t){return t.setTo(t.y,t.x)};p.exports=S}),79432:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.setTo(-h.x,-h.y)};p.exports=c}),2141:((p,S,t)=>{var d=t(83419),c=t(23777),h=new d({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}});p.exports=h}),72930:((p,S,t)=>{var d=t(2141),c=t(44405),h=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,o=s/c(n);return o!==0&&(e.x=o*n.x,e.y=o*n.y),e};p.exports=h}),62880:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x*r.x+h.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c}),15093:((p,S,t)=>{var d=t(28793),c=function(h,r){if(h.x!==0||h.y!==0){var n=d(h);h.x/=n,h.y/=n}return h.x*=r,h.y*=r,h};p.exports=c}),43711:((p,S,t)=>{var d=t(2141);d.Ceil=t(96550),d.Clone=t(99706),d.CopyFrom=t(68010),d.Equals=t(27814),d.Floor=t(73565),d.GetCentroid=t(87555),d.GetMagnitude=t(28793),d.GetMagnitudeSq=t(44405),d.GetRectangleFromPoints=t(20873),d.Interpolate=t(26152),d.Invert=t(55767),d.Negative=t(79432),d.Project=t(72930),d.ProjectUnit=t(62880),d.SetMagnitude=t(15093),p.exports=d}),12306:((p,S,t)=>{var d=t(25717),c=function(h){return new d(h.points)};p.exports=c}),63814:(p=>{var S=function(t,d,c){for(var h=!1,r=-1,n=t.points.length-1;++r{var d=t(63814),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),94811:(p=>{function S(D,B,L){L=L||2;var G=B&&B.length,O=G?B[0]*L:D.length,X=t(D,0,O,L,!0),z=[];if(!X||X.next===X.prev)return z;var V,Y,W,H,K,b,J;if(G&&(X=s(D,B,X,L)),D.length>80*L){V=W=D[0],Y=H=D[1];for(var $=L;$W&&(W=K),b>H&&(H=b);J=Math.max(W-V,H-Y),J=J!==0?32767/J:0}return c(X,z,L,V,Y,J,0),z}function t(D,B,L,G,O){var X,z;if(O===N(D,B,L,G)>0)for(X=B;X=B;X-=G)z=w(X,D[X],D[X+1],z);return z&&T(z,z.next)&&(I(z),z=z.next),z}function d(D,B){if(!D)return D;B||(B=D);var L=D,G;do if(G=!1,!L.steiner&&(T(L,L.next)||y(L.prev,L,L.next)===0)){if(I(L),L=B=L.prev,L===L.next)break;G=!0}else L=L.next;while(G||L!==B);return B}function c(D,B,L,G,O,X,z){if(D){!z&&X&&f(D,G,O,X);for(var V=D,Y,W;D.prev!==D.next;){if(Y=D.prev,W=D.next,X?r(D,G,O,X):h(D)){B.push(Y.i/L|0),B.push(D.i/L|0),B.push(W.i/L|0),I(D),D=W.next,V=W.next;continue}if(D=W,D===V){z?z===1?(D=n(d(D),B,L),c(D,B,L,G,O,X,2)):z===2&&e(D,B,L,G,O,X):c(d(D),B,L,G,O,X,1);break}}}}function h(D){var B=D.prev,L=D,G=D.next;if(y(B,L,G)>=0)return!1;for(var O=B.x,X=L.x,z=G.x,V=B.y,Y=L.y,W=G.y,H=OX?O>z?O:z:X>z?X:z,J=V>Y?V>W?V:W:Y>W?Y:W,$=G.next;$!==B;){if($.x>=H&&$.x<=b&&$.y>=K&&$.y<=J&&x(O,V,X,Y,z,W,$.x,$.y)&&y($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function r(D,B,L,G){var O=D.prev,X=D,z=D.next;if(y(O,X,z)>=0)return!1;for(var V=O.x,Y=X.x,W=z.x,H=O.y,K=X.y,b=z.y,J=VY?V>W?V:W:Y>W?Y:W,q=H>K?H>b?H:b:K>b?K:b,_=v(J,$,B,L,G),tt=v(Z,q,B,L,G),Q=D.prevZ,j=D.nextZ;Q&&Q.z>=_&&j&&j.z<=tt;){if(Q.x>=J&&Q.x<=Z&&Q.y>=$&&Q.y<=q&&Q!==O&&Q!==z&&x(V,H,Y,K,W,b,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0||(Q=Q.prevZ,j.x>=J&&j.x<=Z&&j.y>=$&&j.y<=q&&j!==O&&j!==z&&x(V,H,Y,K,W,b,j.x,j.y)&&y(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;Q&&Q.z>=_;){if(Q.x>=J&&Q.x<=Z&&Q.y>=$&&Q.y<=q&&Q!==O&&Q!==z&&x(V,H,Y,K,W,b,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0)return!1;Q=Q.prevZ}for(;j&&j.z<=tt;){if(j.x>=J&&j.x<=Z&&j.y>=$&&j.y<=q&&j!==O&&j!==z&&x(V,H,Y,K,W,b,j.x,j.y)&&y(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function n(D,B,L){var G=D;do{var O=G.prev,X=G.next.next;!T(O,X)&&C(O,G,G.next,X)&&A(O,X)&&A(X,O)&&(B.push(O.i/L|0),B.push(G.i/L|0),B.push(X.i/L|0),I(G),I(G.next),G=D=X),G=G.next}while(G!==D);return d(G)}function e(D,B,L,G,O,X){var z=D;do{for(var V=z.next.next;V!==z.prev;){if(z.i!==V.i&&g(z,V)){var Y=F(z,V);z=d(z,z.next),Y=d(Y,Y.next),c(z,B,L,G,O,X,0),c(Y,B,L,G,O,X,0);return}V=V.next}z=z.next}while(z!==D)}function s(D,B,L,G){var O=[],X,z,V,Y,W;for(X=0,z=B.length;X=L.next.y&&L.next.y!==L.y){var V=L.x+(O-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(V<=G&&V>X&&(X=V,z=L.x=L.x&&L.x>=W&&G!==L.x&&x(Oz.x||L.x===z.x&&l(z,L)))&&(z=L,K=b)),L=L.next;while(L!==Y);return z}function l(D,B){return y(D.prev,D,B.prev)<0&&y(B.next,D,D.next)<0}function f(D,B,L,G){var O=D;do O.z===0&&(O.z=v(O.x,O.y,B,L,G)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==D);O.prevZ.nextZ=null,O.prevZ=null,u(O)}function u(D){var B,L,G,O,X,z,V,Y,W=1;do{for(L=D,D=null,X=null,z=0;L;){for(z++,G=L,V=0,B=0;B0||Y>0&&G;)V!==0&&(Y===0||!G||L.z<=G.z)?(O=L,L=L.nextZ,V--):(O=G,G=G.nextZ,Y--),X?X.nextZ=O:D=O,O.prevZ=X,X=O;L=G}X.nextZ=null,W*=2}while(z>1);return D}function v(D,B,L,G,O){return D=(D-L)*O|0,B=(B-G)*O|0,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,D|B<<1}function m(D){var B=D,L=D;do(B.x=(D-z)*(X-V)&&(D-z)*(G-V)>=(L-z)*(B-V)&&(L-z)*(X-V)>=(O-z)*(G-V)}function g(D,B){return D.next.i!==B.i&&D.prev.i!==B.i&&!P(D,B)&&(A(D,B)&&A(B,D)&&R(D,B)&&(y(D.prev,D,B.prev)||y(D,B.prev,B))||T(D,B)&&y(D.prev,D,D.next)>0&&y(B.prev,B,B.next)>0)}function y(D,B,L){return(B.y-D.y)*(L.x-B.x)-(B.x-D.x)*(L.y-B.y)}function T(D,B){return D.x===B.x&&D.y===B.y}function C(D,B,L,G){var O=M(y(D,B,L)),X=M(y(D,B,G)),z=M(y(L,G,D)),V=M(y(L,G,B));return!!(O!==X&&z!==V||O===0&&E(D,L,B)||X===0&&E(D,G,B)||z===0&&E(L,D,G)||V===0&&E(L,B,G))}function E(D,B,L){return B.x<=Math.max(D.x,L.x)&&B.x>=Math.min(D.x,L.x)&&B.y<=Math.max(D.y,L.y)&&B.y>=Math.min(D.y,L.y)}function M(D){return D>0?1:D<0?-1:0}function P(D,B){var L=D;do{if(L.i!==D.i&&L.next.i!==D.i&&L.i!==B.i&&L.next.i!==B.i&&C(L,L.next,D,B))return!0;L=L.next}while(L!==D);return!1}function A(D,B){return y(D.prev,D,D.next)<0?y(D,B,D.next)>=0&&y(D,D.prev,B)>=0:y(D,B,D.prev)<0||y(D,D.next,B)<0}function R(D,B){var L=D,G=!1,O=(D.x+B.x)/2,X=(D.y+B.y)/2;do L.y>X!=L.next.y>X&&L.next.y!==L.y&&O<(L.next.x-L.x)*(X-L.y)/(L.next.y-L.y)+L.x&&(G=!G),L=L.next;while(L!==D);return G}function F(D,B){var L=new U(D.i,D.x,D.y),G=new U(B.i,B.x,B.y),O=D.next,X=B.prev;return D.next=B,B.prev=D,L.next=O,O.prev=L,G.next=L,L.prev=G,X.next=G,G.prev=X,G}function w(D,B,L,G){var O=new U(D,B,L);return G?(O.next=G.next,O.prev=G,G.next.prev=O,G.next=O):(O.prev=O,O.next=O),O}function I(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function U(D,B,L){this.i=D,this.x=B,this.y=L,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}S.deviation=function(D,B,L,G){var O=B&&B.length,X=O?B[0]*L:D.length,z=Math.abs(N(D,0,X,L));if(O)for(var V=0,Y=B.length;V0&&(G+=D[O-1].length,L.holes.push(G))}return L},p.exports=S}),13829:((p,S,t)=>{var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=1/0,e=1/0,s=-n,o=-e,i,a=0;a{var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c{var d=t(35001),c=t(23031),h=t(30052),r=function(n,e,s,o){o===void 0&&(o=[]);var i=n.points,a=h(n);!e&&s>0&&(e=a/s);for(var l=0;lu+y){u+=y;continue}var T=g.getPoint((f-u)/y);o.push(T);break}return o};p.exports=r}),30052:((p,S,t)=>{var d=t(35001),c=t(23031),h=function(r){for(var n=r.points,e=0,s=0;s{var d=t(83419),c=t(63814),h=t(9564),r=t(23777),n=new d({initialize:function(s){this.type=r.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return c(this,e,s)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var s,o=0;o{var S=function(t){return t.points.reverse(),t};p.exports=S}),29524:(p=>{function S(n,e){var s=n.x-e.x,o=n.y-e.y;return s*s+o*o}function t(n,e,s){var o=e.x,i=e.y,a=s.x-o,l=s.y-i;if(a!==0||l!==0){var f=((n.x-o)*a+(n.y-i)*l)/(a*a+l*l);f>1?(o=s.x,i=s.y):f>0&&(o+=a*f,i+=l*f)}return a=n.x-o,l=n.y-i,a*a+l*l}function d(n,e){for(var s=n[0],o=[s],i,a=1,l=n.length;ae&&(o.push(i),s=i);return s!==i&&o.push(i),o}function c(n,e,s,o,i){for(var a=o,l,f=e+1;fa&&(l=f,a=u)}a>o&&(l-e>1&&c(n,e,l,o,i),i.push(n[l]),s-l>1&&c(n,l,s,o,i))}function h(n,e){var s=n.length-1,o=[n[0]];return c(n,0,s,e,o),o.push(n[s]),o}var r=function(n,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var o=n.points;if(o.length>2){var i=e*e;s||(o=d(o,i)),n.setTo(h(o,i))}return n};p.exports=r}),5469:(p=>{var S=function(d,c){return d[0]=c[0],d[1]=c[1],d},t=function(d){var c,h=[],r=d.points;for(c=0;c0&&n.push(S([0,0],h[0])),c=0;c1&&n.push(S([0,0],h[h.length-1])),d.setTo(n)};p.exports=t}),24709:(p=>{var S=function(t,d,c){for(var h=t.points,r=0;r{var d=t(25717);d.Clone=t(12306),d.Contains=t(63814),d.ContainsPoint=t(99338),d.Earcut=t(94811),d.GetAABB=t(13829),d.GetNumberArray=t(26173),d.GetPoints=t(9564),d.Perimeter=t(30052),d.Reverse=t(8133),d.Simplify=t(29524),d.Smooth=t(5469),d.Translate=t(24709),p.exports=d}),62224:(p=>{var S=function(t){return t.width*t.height};p.exports=S}),98615:(p=>{var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};p.exports=S}),31688:(p=>{var S=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};p.exports=S}),67502:(p=>{var S=function(t,d,c){return t.x=d-t.width/2,t.y=c-t.height/2,t};p.exports=S}),65085:((p,S,t)=>{var d=t(87841),c=function(h){return new d(h.x,h.y,h.width,h.height)};p.exports=c}),37303:(p=>{var S=function(t,d,c){return t.width<=0||t.height<=0?!1:t.x<=d&&t.x+t.width>=d&&t.y<=c&&t.y+t.height>=c};p.exports=S}),96553:((p,S,t)=>{var d=t(37303),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),70273:(p=>{var S=function(t,d){return d.width*d.height>t.width*t.height?!1:d.x>t.x&&d.xt.x&&d.rightt.y&&d.yt.y&&d.bottom{var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S}),77493:(p=>{var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x,y:t.y}),d.push({x:t.right,y:t.y}),d.push({x:t.right,y:t.bottom}),d.push({x:t.x,y:t.bottom}),d};p.exports=S}),9219:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S}),53751:((p,S,t)=>{var d=t(8249),c=function(h,r){var n=d(h);return n{var d=t(8249),c=function(h,r){var n=d(h);return n>d(r)?h.setSize(r.height*n,r.height):h.setSize(r.width,r.width/n),h.setPosition(r.centerX-h.width/2,r.centerY-h.height/2)};p.exports=c}),80774:(p=>{var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};p.exports=S}),83859:(p=>{var S=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};p.exports=S}),19217:((p,S,t)=>{var d=t(87841),c=t(36383),h=function(r,n){if(n===void 0&&(n=new d),r.length===0)return n;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,o=c.MIN_SAFE_INTEGER,i=c.MIN_SAFE_INTEGER,a,l,f,u=0;u{var d=t(87841),c=function(h,r,n,e,s){return s===void 0&&(s=new d),s.setTo(Math.min(h,n),Math.min(r,e),Math.abs(h-n),Math.abs(r-e))};p.exports=c}),8249:(p=>{var S=function(t){return t.height===0?NaN:t.width/t.height};p.exports=S}),27165:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.centerX,r.y=h.centerY,r};p.exports=c}),20812:((p,S,t)=>{var d=t(13019),c=t(2141),h=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 s=d(r)*n;return n>.5?(s-=r.width+r.height,s<=r.width?(e.x=r.right-s,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(s-r.width))):s<=r.width?(e.x=r.x+s,e.y=r.y):(e.x=r.right,e.y=r.y+(s-r.width)),e};p.exports=h}),34819:((p,S,t)=>{var d=t(20812),c=t(13019),h=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=c(r)/e);for(var o=0;o{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.width,r.y=h.height,r};p.exports=c}),86091:((p,S,t)=>{var d=t(67502),c=function(h,r,n){var e=h.centerX,s=h.centerY;return h.setSize(h.width+r*2,h.height+n*2),d(h,e,s)};p.exports=c}),53951:((p,S,t)=>{var d=t(87841),c=t(59996),h=function(r,n,e){return e===void 0&&(e=new d),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};p.exports=h}),14649:((p,S,t)=>{var d=t(13019),c=t(2141),h=function(r,n,e,s){if(s===void 0&&(s=[]),!n&&!e)return s;n?e=Math.round(d(r)/n):n=d(r)/e;for(var o=r.x,i=r.y,a=0,l=0;l=r.right&&(a=1,i+=o-r.right,o=r.right);break;case 1:i+=n,i>=r.bottom&&(a=2,o-=i-r.bottom,i=r.bottom);break;case 2:o-=n,o<=r.left&&(a=3,i-=r.left-o,o=r.left);break;case 3:i-=n,i<=r.top&&(a=0,i=r.top);break}return s};p.exports=h}),33595:(p=>{var S=function(t,d){for(var c=t.x,h=t.right,r=t.y,n=t.bottom,e=0;e{var S=function(t,d){var c=Math.min(t.x,d.x),h=Math.max(t.right,d.right);t.x=c,t.width=h-c;var r=Math.min(t.y,d.y),n=Math.max(t.bottom,d.bottom);return t.y=r,t.height=n-r,t};p.exports=S}),92171:(p=>{var S=function(t,d,c){var h=Math.min(t.x,d),r=Math.max(t.right,d);t.x=h,t.width=r-h;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};p.exports=S}),42981:(p=>{var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S}),46907:(p=>{var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S}),60170:(p=>{var S=function(t,d){return t.xd.x&&t.yd.y};p.exports=S}),13019:(p=>{var S=function(t){return 2*(t.width+t.height)};p.exports=S}),85133:((p,S,t)=>{var d=t(2141),c=t(39506),h=function(r,n,e){e===void 0&&(e=new d),n=c(n);var s=Math.sin(n),o=Math.cos(n),i=o>0?r.width/2:r.width/-2,a=s>0?r.height/2:r.height/-2;return Math.abs(i*s){var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=h.x+Math.random()*h.width,r.y=h.y+Math.random()*h.height,r};p.exports=c}),86470:((p,S,t)=>{var d=t(30976),c=t(70273),h=t(2141),r=function(n,e,s){if(s===void 0&&(s=new h),c(n,e))switch(d(0,3)){case 0:s.x=n.x+Math.random()*(e.right-n.x),s.y=n.y+Math.random()*(e.top-n.y);break;case 1:s.x=e.x+Math.random()*(n.right-e.x),s.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:s.x=n.x+Math.random()*(e.x-n.x),s.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(n.right-e.right),s.y=n.y+Math.random()*(e.bottom-n.y);break}return s};p.exports=r}),87841:((p,S,t)=>{var d=t(83419),c=t(37303),h=t(20812),r=t(34819),n=t(23777),e=t(23031),s=t(26597),o=new d({initialize:function(a,l,f,u){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.RECTANGLE,this.x=a,this.y=l,this.width=f,this.height=u},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,f){return this.x=i,this.y=a,this.width=l,this.height=f,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,a){return a===void 0&&(a=i),this.x=i,this.y=a,this},setSize:function(i,a){return a===void 0&&(a=i),this.width=i,this.height=a,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});p.exports=o}),94845:(p=>{var S=function(t,d){return t.width===d.width&&t.height===d.height};p.exports=S}),31730:(p=>{var S=function(t,d,c){return c===void 0&&(c=d),t.width*=d,t.height*=c,t};p.exports=S}),36899:((p,S,t)=>{var d=t(87841),c=function(h,r,n){n===void 0&&(n=new d);var e=Math.min(h.x,r.x),s=Math.min(h.y,r.y),o=Math.max(h.right,r.right)-e,i=Math.max(h.bottom,r.bottom)-s;return n.setTo(e,s,o,i)};p.exports=c}),93232:((p,S,t)=>{var d=t(87841);d.Area=t(62224),d.Ceil=t(98615),d.CeilAll=t(31688),d.CenterOn=t(67502),d.Clone=t(65085),d.Contains=t(37303),d.ContainsPoint=t(96553),d.ContainsRect=t(70273),d.CopyFrom=t(43459),d.Decompose=t(77493),d.Equals=t(9219),d.FitInside=t(53751),d.FitOutside=t(16088),d.Floor=t(80774),d.FloorAll=t(83859),d.FromPoints=t(19217),d.FromXY=t(9477),d.GetAspectRatio=t(8249),d.GetCenter=t(27165),d.GetPoint=t(20812),d.GetPoints=t(34819),d.GetSize=t(51313),d.Inflate=t(86091),d.Intersection=t(53951),d.MarchingAnts=t(14649),d.MergePoints=t(33595),d.MergeRect=t(20074),d.MergeXY=t(92171),d.Offset=t(42981),d.OffsetPoint=t(46907),d.Overlaps=t(60170),d.Perimeter=t(13019),d.PerimeterPoint=t(85133),d.Random=t(26597),d.RandomOutside=t(86470),d.SameDimensions=t(94845),d.Scale=t(31730),d.Union=t(36899),p.exports=d}),41658:(p=>{var S=function(t){var d=t.x1,c=t.y1,h=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-d)*(r-c)-(h-d)*(e-c))/2)};p.exports=S}),39208:((p,S,t)=>{var d=t(16483),c=function(h,r,n){var e=n*(Math.sqrt(3)/2),s=h,o=r,i=h+n/2,a=r+e,l=h-n/2,f=r+e;return new d(s,o,i,a,l,f)};p.exports=c}),39545:((p,S,t)=>{var d=t(94811),c=t(16483),h=function(r,n,e,s,o){n===void 0&&(n=null),e===void 0&&(e=1),s===void 0&&(s=1),o===void 0&&(o=[]);for(var i=d(r,n),a,l,f,u,v,m,x,g,y,T=0;T{var d=t(16483),c=function(h,r,n,e){e===void 0&&(e=n);var s=h,o=r,i=h,a=r-e,l=h+n,f=r;return new d(s,o,i,a,l,f)};p.exports=c}),23707:((p,S,t)=>{var d=t(97523),c=t(13584),h=function(r,n,e,s){s===void 0&&(s=d);var o=s(r),i=n-o.x,a=e-o.y;return c(r,i,a)};p.exports=h}),97523:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.x=(h.x1+h.x2+h.x3)/3,r.y=(h.y1+h.y2+h.y3)/3,r};p.exports=c}),24951:((p,S,t)=>{var d=t(26099);function c(r,n,e,s){return r*s-n*e}var h=function(r,n){n===void 0&&(n=new d);var e=r.x3,s=r.y3,o=r.x1-e,i=r.y1-s,a=r.x2-e,l=r.y2-s,f=2*c(o,i,a,l),u=c(i,o*o+i*i,l,a*a+l*l),v=c(o,o*o+i*i,a,a*a+l*l);return n.x=e-u/f,n.y=s+v/f,n};p.exports=h}),85614:((p,S,t)=>{var d=t(96503),c=function(h,r){r===void 0&&(r=new d);var n=h.x1,e=h.y1,s=h.x2,o=h.y2,i=h.x3,a=h.y3,l=s-n,f=o-e,u=i-n,v=a-e,m=l*(n+s)+f*(e+o),x=u*(n+i)+v*(e+a),g=2*(l*(a-o)-f*(i-s)),y,T;if(Math.abs(g)<1e-6){var C=Math.min(n,s,i),E=Math.min(e,o,a);y=(Math.max(n,s,i)-C)*.5,T=(Math.max(e,o,a)-E)*.5,r.x=C+y,r.y=E+T,r.radius=Math.sqrt(y*y+T*T)}else r.x=(v*m-f*x)/g,r.y=(l*x-u*m)/g,y=r.x-n,T=r.y-e,r.radius=Math.sqrt(y*y+T*T);return r};p.exports=c}),74422:((p,S,t)=>{var d=t(16483),c=function(h){return new d(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)};p.exports=c}),10690:(p=>{var S=function(t,d,c){var h=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,s=d-t.x1,o=c-t.y1,i=h*h+r*r,a=h*n+r*e,l=h*s+r*o,f=n*n+e*e,u=n*s+e*o,v=i*f-a*a,m=v===0?0:1/v,x=(f*l-a*u)*m,g=(i*u-a*l)*m;return x>=0&&g>=0&&x+g<1};p.exports=S}),48653:(p=>{var S=function(t,d,c,h){c===void 0&&(c=!1),h===void 0&&(h=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,o=r*r+n*n,i=r*e+n*s,a=e*e+s*s,l=o*a-i*i,f=l===0?0:1/l,u,v,m,x,g,y,T=t.x1,C=t.y1,E=0;E=0&&v>=0&&u+v<1&&(h.push({x:d[E].x,y:d[E].y}),c)));E++);return h};p.exports=S}),96006:((p,S,t)=>{var d=t(10690),c=function(h,r){return d(h,r.x,r.y)};p.exports=c}),71326:(p=>{var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};p.exports=S}),71694:(p=>{var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x1,y:t.y1}),d.push({x:t.x2,y:t.y2}),d.push({x:t.x3,y:t.y3}),d};p.exports=S}),33522:(p=>{var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2&&t.x3===d.x3&&t.y3===d.y3};p.exports=S}),20437:((p,S,t)=>{var d=t(2141),c=t(35001),h=function(r,n,e){e===void 0&&(e=new d);var s=r.getLineA(),o=r.getLineB(),i=r.getLineC();if(n<=0||n>=1)return e.x=s.x1,e.y=s.y1,e;var a=c(s),l=c(o),f=c(i),u=a+l+f,v=u*n,m=0;return va+l?(v-=a+l,m=v/f,e.x=i.x1+(i.x2-i.x1)*m,e.y=i.y1+(i.y2-i.y1)*m):(v-=a,m=v/l,e.x=o.x1+(o.x2-o.x1)*m,e.y=o.y1+(o.y2-o.y1)*m),e};p.exports=h}),80672:((p,S,t)=>{var d=t(35001),c=t(2141),h=function(r,n,e,s){s===void 0&&(s=[]);var o=r.getLineA(),i=r.getLineB(),a=r.getLineC(),l=d(o),f=d(i),u=d(a),v=l+f+u;!n&&e>0&&(n=v/e);for(var m=0;ml+f?(x-=l+f,g=x/u,y.x=a.x1+(a.x2-a.x1)*g,y.y=a.y1+(a.y2-a.y1)*g):(x-=l,g=x/f,y.x=i.x1+(i.x2-i.x1)*g,y.y=i.y1+(i.y2-i.y1)*g),s.push(y)}return s};p.exports=h}),39757:((p,S,t)=>{var d=t(2141);function c(r,n,e,s){var o=r-e,i=n-s,a=o*o+i*i;return Math.sqrt(a)}var h=function(r,n){n===void 0&&(n=new d);var e=r.x1,s=r.y1,o=r.x2,i=r.y2,a=r.x3,l=r.y3,f=c(a,l,o,i),u=c(e,s,a,l),v=c(o,i,e,s),m=f+u+v;return n.x=(e*f+o*u+a*v)/m,n.y=(s*f+i*u+l*v)/m,n};p.exports=h}),13584:(p=>{var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t.x3+=d,t.y3+=c,t};p.exports=S}),1376:((p,S,t)=>{var d=t(35001),c=function(h){var r=h.getLineA(),n=h.getLineB(),e=h.getLineC();return d(r)+d(n)+d(e)};p.exports=c}),90260:((p,S,t)=>{var d=t(2141),c=function(h,r){r===void 0&&(r=new d);var n=h.x2-h.x1,e=h.y2-h.y1,s=h.x3-h.x1,o=h.y3-h.y1,i=Math.random(),a=Math.random();return i+a>=1&&(i=1-i,a=1-a),r.x=h.x1+(n*i+s*a),r.y=h.y1+(e*i+o*a),r};p.exports=c}),52172:((p,S,t)=>{var d=t(99614),c=t(39757),h=function(r,n){var e=c(r);return d(r,e.x,e.y,n)};p.exports=h}),49907:((p,S,t)=>{var d=t(99614),c=function(h,r,n){return d(h,r.x,r.y,n)};p.exports=c}),99614:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,e=t.x3-d,s=t.y3-c,t.x3=e*r-s*n+d,t.y3=e*n+s*r+c,t};p.exports=S}),16483:((p,S,t)=>{var d=t(83419),c=t(10690),h=t(20437),r=t(80672),n=t(23777),e=t(23031),s=t(90260),o=new d({initialize:function(a,l,f,u,v,m){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=n.TRIANGLE,this.x1=a,this.y1=l,this.x2=f,this.y2=u,this.x3=v,this.y3=m},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return h(this,i,a)},getPoints:function(i,a,l){return r(this,i,a,l)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,l,f,u,v){return i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=0),this.x1=i,this.y1=a,this.x2=l,this.y2=f,this.x3=u,this.y3=v,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1<=this.x2&&this.x1<=this.x3?a=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1>=this.x2&&this.x1>=this.x3?a=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1<=this.y2&&this.y1<=this.y3?a=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1>=this.y2&&this.y1>=this.y3?a=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}}});p.exports=o}),84435:((p,S,t)=>{var d=t(16483);d.Area=t(41658),d.BuildEquilateral=t(39208),d.BuildFromPolygon=t(39545),d.BuildRight=t(90301),d.CenterOn=t(23707),d.Centroid=t(97523),d.CircumCenter=t(24951),d.CircumCircle=t(85614),d.Clone=t(74422),d.Contains=t(10690),d.ContainsArray=t(48653),d.ContainsPoint=t(96006),d.CopyFrom=t(71326),d.Decompose=t(71694),d.Equals=t(33522),d.GetPoint=t(20437),d.GetPoints=t(80672),d.InCenter=t(39757),d.Perimeter=t(1376),d.Offset=t(13584),d.Random=t(90260),d.Rotate=t(52172),d.RotateAroundPoint=t(49907),d.RotateAroundXY=t(99614),p.exports=d}),74457:(p=>{var S=function(t,d,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};p.exports=S}),84409:(p=>{var S=function(t,d){return function(c,h,r,n){var e=t.getPixelAlpha(h,r,n.texture.key,n.frame.name);return e&&e>=d}};p.exports=S}),7003:((p,S,t)=>{var d=t(83419),c=t(93301),h=t(50792),r=t(8214),n=t(8443),e=t(78970),s=t(85098),o=t(42515),i=t(36210),a=t(61340),l=t(85955),f=new d({initialize:function(v,m){this.game=v,this.scaleManager,this.canvas,this.config=m,this.enabled=!0,this.events=new h,this.isOver=!0,this.defaultCursor="",this.keyboard=m.inputKeyboard?new e(this):null,this.mouse=m.inputMouse?new s(this):null,this.touch=m.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=m.inputActivePointers;for(var x=0;x<=this.pointersTotal;x++){var g=new o(this,x);g.smoothFactor=m.inputSmoothFactor,this.pointers.push(g)}this.mousePointer=m.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new a,this._tempMatrix2=new a,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(n.BOOT,this.boot,this)},boot:function(){var u=this.game,v=u.events;this.canvas=u.canvas,this.scaleManager=u.scale,this.events.emit(r.MANAGER_BOOT),v.on(n.PRE_RENDER,this.preRender,this),v.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(u){this.isOver=!0,this.events.emit(r.GAME_OVER,u)},setCanvasOut:function(u){this.isOver=!1,this.events.emit(r.GAME_OUT,u)},preRender:function(){var u=this.game.loop.now,v=this.game.loop.delta,m=this.game.scene.getScenes(!0,!0);this.time=u,this.events.emit(r.MANAGER_UPDATE);for(var x=0;x10&&(u=10-this.pointersTotal);for(var m=0;m{var d=t(96503),c=t(87902),h=t(83419),r=t(93301),n=t(74457),e=t(84409),s=t(20339),o=t(8497),i=t(81154),a=t(8214),l=t(50792),f=t(95540),u=t(23777),v=t(89639),m=t(41212),x=t(37277),g=t(87841),y=t(37303),T=t(44594),C=t(16483),E=t(10690),M=new h({Extends:l,initialize:function(A){l.call(this),this.scene=A,this.systems=A.sys,this.settings=A.sys.settings,this.manager=A.sys.game.input,this.pluginEvents=new l,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var R={cancelled:!1};this._eventContainer={stopPropagation:function(){R.cancelled=!0}},this._eventData=R,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,A.sys.events.once(T.BOOT,this.boot,this),A.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(a.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(a.GAME_OUT,this.onGameOut,this),this.manager.events.on(a.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(a.START)},onGameOver:function(P){this.isActive()&&this.emit(a.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(a.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(a.PRE_UPDATE);var P=this._pendingRemoval,A=this._pendingInsertion,R=P.length,F=A.length;if(!(R===0&&F===0)){for(var w=this._list,I=0;I-1&&(w.splice(N,1),this.clear(U,!0))}this._pendingRemoval.length=0,this._list=w.concat(A.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(P){this.manager&&this.manager.setCursor(P)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(P,A){if(!this.isActive())return!1;if(this.pluginEvents.emit(a.UPDATE,P,A),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var R,F=this.manager,w=F.pointers;for(R=0;R0)if(this._pollTimer-=A,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var U=!1;for(R=0;R0&&(U=!0)}return U},update:function(P,A){if(!this.isActive())return!1;for(var R=!1,F=0;F0&&(R=!0)}return this._updatedThisFrame=!0,R},clear:function(P,A){A===void 0&&(A=!1),this.disable(P);var R=P.input;R&&(this.removeDebug(P),this.manager.resetCursor(R),R.gameObject=void 0,R.target=void 0,R.hitArea=void 0,R.hitAreaCallback=void 0,R.callbackContext=void 0,P.input=null),A||this.queueForRemoval(P);var F=this._draggable.indexOf(P);return F>-1&&this._draggable.splice(F,1),P},disable:function(P,A){A===void 0&&(A=!1);var R=P.input;R&&(R.enabled=!1,R.dragState=0);for(var F=this._drag,w=this._over,I=this.manager,U=0,N;U-1&&F[U].splice(N,1),N=w[U].indexOf(P),N>-1&&w[U].splice(N,1);return A&&this.resetCursor(),this},enable:function(P,A,R,F){return F===void 0&&(F=!1),P.input?P.input.enabled=!0:this.setHitArea(P,A,R),P.input&&F&&!P.input.dropZone&&(P.input.dropZone=F),this},hitTestPointer:function(P){for(var A=this.cameras.getCamerasBelowPointer(P),R=0;R0)return P.camera=F,w}return P.camera=A[0],[]},processDownEvents:function(P){var A=0,R=this._temp,F=this._eventData,w=this._eventContainer;F.cancelled=!1;for(var I=0;I0&&s(P.x,P.y,P.downX,P.downY)>=w||F>0&&A>=P.downTime+F)&&(R=!0),R)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R1&&(this.sortGameObjects(R,P),this.topOnly&&R.splice(1)),this._drag[P.id]=R,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;var A=this._tempZones,R=this._drag[P.id];R.length>1&&(R=R.slice(0));for(var F=0;F0?(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,w,U),I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U)):(w.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,w,U),A[0]?(I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U)):I.target=null)}else!U&&A[0]&&(I.target=A[0],U=I.target,w.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,w,U));var D,B,L=P.positionToCamera(I.dragStartCamera);if(!w.parentContainer)D=L.x-I.dragX,B=L.y-I.dragY;else{var G=L.x-I.dragStartXGlobal,O=L.y-I.dragStartYGlobal,X=w.getParentRotation(),z=G*Math.cos(X)+O*Math.sin(X),V=O*Math.cos(X)-G*Math.sin(X);z*=1/w.parentContainer.scaleX,V*=1/w.parentContainer.scaleY,D=z+I.dragStartX,B=V+I.dragStartY}w.emit(a.GAMEOBJECT_DRAG,P,D,B),this.emit(a.DRAG,P,w,D,B)}return R.length},processDragUpEvent:function(P){var A=this._drag[P.id];A.length>1&&(A=A.slice(0));for(var R=0;R0){var I=this.manager,U=this._eventData,N=this._eventContainer;U.cancelled=!1;for(var D=0;D0){var w=this.manager,I=this._eventData,U=this._eventContainer;I.cancelled=!1,this.sortGameObjects(A,P);for(var N=0;N0){for(this.sortGameObjects(w,P),R=0;R0){for(this.sortGameObjects(I,P),R=0;R-1&&this._draggable.splice(w,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var A=this.systems.textures;return e(A,P)},setHitArea:function(P,A,R){if(A===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var F=!1,w=!1,I=!1,U=!1,N=!1,D=!0;if(m(A)&&Object.keys(A).length){var B=A,L=P.some(function(V){return V.hasOwnProperty("faces")});if(!L){A=f(B,"hitArea",null),R=f(B,"hitAreaCallback",null),N=f(B,"pixelPerfect",!1);var G=f(B,"alphaTolerance",1);N&&(A={},R=this.makePixelPerfect(G))}F=f(B,"draggable",!1),w=f(B,"dropZone",!1),I=f(B,"cursor",!1),U=f(B,"useHandCursor",!1),(!A||!R)&&(this.setHitAreaFromTexture(P),D=!1)}else typeof A=="function"&&!R&&(R=A,A={});for(var O=0;O{var d=t(35154),c={},h={};h.register=function(r,n,e,s,o){c[r]={plugin:n,mapping:e,settingsKey:s,configKey:o}},h.getPlugin=function(r){return c[r]},h.install=function(r){var n=r.scene.sys,e=n.settings.input,s=n.game.config;for(var o in c){var i=c[o].plugin,a=c[o].mapping,l=c[o].settingsKey,f=c[o].configKey;d(e,l,s[f])&&(r[a]=new i(r))}},h.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},p.exports=h}),42515:((p,S,t)=>{var d=t(31040),c=t(83419),h=t(20339),r=t(43855),n=t(47235),e=t(26099),s=t(25892),o=new c({initialize:function(a,l){this.manager=a,this.id=l,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=l===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var a=i.getWorldPoint(this.x,this.y);return this.worldX=a.x,this.worldY=a.y,this},positionToCamera:function(i,a){return i.getWorldPoint(this.x,this.y,a)},updateMotion:function(){var i=this.position.x,a=this.position.y,l=this.midPoint.x,f=this.midPoint.y;if(!(i===l&&a===f)){var u=n(this.motionFactor,l,i),v=n(this.motionFactor,f,a);r(u,i,.1)&&(u=i),r(v,a,.1)&&(v=a),this.midPoint.set(u,v);var m=i-u,x=a-v;this.velocity.set(m,x),this.angle=d(u,v,i,a),this.distance=Math.sqrt(m*m+x*x)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),s.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,a){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=a,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=a.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,a){this.event=a,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=a.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.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.buttons===0?this.button===0&&!this.isDown:this.button===0},rightButtonReleased:function(){return this.buttons===0?this.button===2&&!this.isDown:this.button===2},middleButtonReleased:function(){return this.buttons===0?this.button===1&&!this.isDown:this.button===1},backButtonReleased:function(){return this.buttons===0?this.button===3&&!this.isDown:this.button===3},forwardButtonReleased:function(){return this.buttons===0?this.button===4&&!this.isDown:this.button===4},getDistance:function(){return this.isDown?h(this.downX,this.downY,this.x,this.y):h(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,a){i===void 0&&(i=10),a===void 0&&(a=[]);for(var l=this.prevPosition.x,f=this.prevPosition.y,u=this.position.x,v=this.position.y,m=0;m{var S={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};p.exports=S}),7179:(p=>{p.exports="boot"}),85375:(p=>{p.exports="destroy"}),39843:(p=>{p.exports="dragend"}),23388:(p=>{p.exports="dragenter"}),16133:(p=>{p.exports="drag"}),27829:(p=>{p.exports="dragleave"}),53904:(p=>{p.exports="dragover"}),56058:(p=>{p.exports="dragstart"}),2642:(p=>{p.exports="drop"}),88171:(p=>{p.exports="gameobjectdown"}),36147:(p=>{p.exports="dragend"}),71692:(p=>{p.exports="dragenter"}),96149:(p=>{p.exports="drag"}),81285:(p=>{p.exports="dragleave"}),74048:(p=>{p.exports="dragover"}),21322:(p=>{p.exports="dragstart"}),49378:(p=>{p.exports="drop"}),86754:(p=>{p.exports="gameobjectmove"}),86433:(p=>{p.exports="gameobjectout"}),60709:(p=>{p.exports="gameobjectover"}),24081:(p=>{p.exports="pointerdown"}),11172:(p=>{p.exports="pointermove"}),18907:(p=>{p.exports="pointerout"}),95579:(p=>{p.exports="pointerover"}),35368:(p=>{p.exports="pointerup"}),26972:(p=>{p.exports="wheel"}),47078:(p=>{p.exports="gameobjectup"}),73802:(p=>{p.exports="gameobjectwheel"}),56718:(p=>{p.exports="gameout"}),25936:(p=>{p.exports="gameover"}),27503:(p=>{p.exports="boot"}),50852:(p=>{p.exports="process"}),96438:(p=>{p.exports="update"}),59152:(p=>{p.exports="pointerlockchange"}),47777:(p=>{p.exports="pointerdown"}),27957:(p=>{p.exports="pointerdownoutside"}),19444:(p=>{p.exports="pointermove"}),54251:(p=>{p.exports="pointerout"}),18667:(p=>{p.exports="pointerover"}),27192:(p=>{p.exports="pointerup"}),24652:(p=>{p.exports="pointerupoutside"}),45132:(p=>{p.exports="wheel"}),44512:(p=>{p.exports="preupdate"}),15757:(p=>{p.exports="shutdown"}),41637:(p=>{p.exports="start"}),93802:(p=>{p.exports="update"}),8214:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(h){this.value=h},getValue:function(){return Math.abs(this.value){var d=t(83419),c=t(92734),h=new d({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}});p.exports=h}),99125:((p,S,t)=>{var d=t(97421),c=t(28884),h=t(83419),r=t(50792),n=t(26099),e=new h({Extends:r,initialize:function(o,i){r.call(this),this.manager=o,this.pad=i,this.id=i.id,this.index=i.index;for(var a=[],l=0;l=2&&(this.leftStick.set(f[0].getValue(),f[1].getValue()),l>=4&&this.rightStick.set(f[2].getValue(),f[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s{var d=t(83419),c=t(50792),h=t(92734),r=t(99125),n=t(35154),e=t(89639),s=t(8214),o=new d({Extends:c,initialize:function(a){c.call(this),this.scene=a.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=a,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,a.pluginEvents.once(s.BOOT,this.boot,this),a.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,a=this.settings.input,l=i.config;this.enabled=n(a,"gamepad",l.inputGamepad)&&i.device.input.gamepads,this.target=n(a,"gamepad.target",l.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(s.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(s.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,a=this.target,l=function(f){f.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(f))};this.onGamepadHandler=l,a.addEventListener("gamepadconnected",l,!1),a.addEventListener("gamepaddisconnected",l,!1),this.sceneInputPlugin.pluginEvents.on(s.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(s.UPDATE,this.update);for(var i=0;i{p.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:(p=>{p.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:(p=>{p.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:((p,S,t)=>{p.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}}),46008:(p=>{p.exports="down"}),7629:(p=>{p.exports="up"}),42206:(p=>{p.exports="connected"}),86544:(p=>{p.exports="disconnected"}),94784:(p=>{p.exports="down"}),14325:(p=>{p.exports="up"}),92734:((p,S,t)=>{p.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:((p,S,t)=>{p.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}}),14350:((p,S,t)=>{var d=t(93301),c=t(79291),h={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};h=c(!1,h,d),p.exports=h}),78970:((p,S,t)=>{var d=t(72905),c=t(83419),h=t(8443),r=t(8214),n=t(46032),e=t(29747),s=new c({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var o=this.manager.config;this.enabled=o.inputKeyboard,this.target=o.inputKeyboardEventTarget,this.addCapture(o.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(h.POST_STEP,this.postUpdate,this)},startListeners:function(){var o=this;this.onKeyDown=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}},this.onKeyUp=function(a){if(!(a.defaultPrevented||!o.enabled||!o.manager)){o.queue.push(a),o.manager.events.emit(r.MANAGER_PROCESS);var l=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;o.preventDefault&&!l&&o.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var o=this.target;o.removeEventListener("keydown",this.onKeyDown,!1),o.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a0},removeCapture:function(o){typeof o=="string"&&(o=o.split(",")),Array.isArray(o)||(o=[o]);for(var i=this.captures,a=0;a0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(h.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=s}),28846:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(95922),r=t(8443),n=t(35154),e=t(8214),s=t(89639),o=t(30472),i=t(46032),a=t(87960),l=t(74600),f=t(44594),u=t(56583),v=new d({Extends:c,initialize:function(x){c.call(this),this.game=x.systems.game,this.scene=x.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=x,this.manager=x.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,x.pluginEvents.once(e.BOOT,this.boot,this),x.pluginEvents.on(e.START,this.start,this)},boot:function(){var m=this.settings.input;this.enabled=n(m,"keyboard",!0);var x=n(m,"keyboard.capture",null);x&&this.addCaptures(x),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(m){return this.manager.addCapture(m),this},removeCapture:function(m){return this.manager.removeCapture(m),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(m,x,g){x===void 0&&(x=!0),g===void 0&&(g=!1);var y={};if(typeof m=="string"){m=m.split(",");for(var T=0;T-1?y[T]=m:y[m.keyCode]=m,x&&this.addCapture(m.keyCode),m.setEmitOnRepeat(g),m}return typeof m=="string"&&(m=i[m.toUpperCase()]),y[m]||(y[m]=new o(this,m),x&&this.addCapture(m),y[m].setEmitOnRepeat(g)),y[m]},removeKey:function(m,x,g){x===void 0&&(x=!1),g===void 0&&(g=!1);var y=this.keys,T;if(m instanceof o){var C=y.indexOf(m);C>-1&&(T=this.keys[C],this.keys[C]=void 0)}else typeof m=="string"&&(m=i[m.toUpperCase()]);return y[m]&&(T=y[m],y[m]=void 0),T&&(T.plugin=null,g&&this.removeCapture(T.keyCode),x&&T.destroy()),this},removeAllKeys:function(m,x){m===void 0&&(m=!1),x===void 0&&(x=!1);for(var g=this.keys,y=0;ym._tick)return m._tick=g,!0}return!1},update:function(){var m=this.manager.queue,x=m.length;if(!(!this.isActive()||x===0))for(var g=this.keys,y=0;y{var S=function(t,d){return d.timeLastMatched=t.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=S}),87960:((p,S,t)=>{var d=t(83419),c=t(95922),h=t(95540),r=t(68769),n=t(92803),e=new d({initialize:function(o,i,a){if(a===void 0&&(a={}),i.length<2)return!1;this.manager=o,this.enabled=!0,this.keyCodes=[];for(var l=0;l{var d=t(66970),c=function(h,r){if(r.matched)return!0;var n=!1,e=!1;if(h.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var s=r.timeLastMatched+r.maxKeyDelay;h.timeStamp<=s&&(e=!0,n=d(h,r))}else e=!0,n=d(h,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=h.timeStamp,r.matched=!0,r.timeMatched=h.timeStamp),n};p.exports=c}),92803:(p=>{var S=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};p.exports=S}),92612:(p=>{p.exports="keydown"}),23345:(p=>{p.exports="keyup"}),21957:(p=>{p.exports="keycombomatch"}),44743:(p=>{p.exports="down"}),3771:(p=>{p.exports="keydown-"}),46358:(p=>{p.exports="keyup-"}),75674:(p=>{p.exports="up"}),95922:((p,S,t)=>{p.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:((p,S,t)=>{p.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:(p=>{var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c{var S=function(t){return t._justDown?(t._justDown=!1,!0):!1};p.exports=S}),38796:(p=>{var S=function(t){return t._justUp?(t._justUp=!1,!0):!1};p.exports=S}),30472:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(95922),r=new d({Extends:c,initialize:function(e,s){c.call(this),this.plugin=e,this.keyCode=s,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(h.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(h.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(h.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}});p.exports=r}),46032:(p=>{var S={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};p.exports=S}),74600:((p,S,t)=>{var d=t(46032),c={};for(var h in d)c[d[h]]=h;p.exports=c}),41170:(p=>{var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c{var d=t(83419),c=t(89357),h=t(8214),r=t(29747),n=new d({initialize:function(s){this.manager=s,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,s.events.once(h.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 s=this,o=this.manager,i=o.canvas,a=window&&window.focus&&o.game.config.autoFocus;this.onMouseMove=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseMove(f),s.preventDefaultMove&&f.preventDefault())},this.onMouseDown=function(f){a&&window.focus(),!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseDown(f),s.preventDefaultDown&&f.target===i&&f.preventDefault())},this.onMouseDownWindow=function(f){f.sourceCapabilities&&f.sourceCapabilities.firesTouchEvents||!f.defaultPrevented&&s.enabled&&o&&o.enabled&&f.target!==i&&o.onMouseDown(f)},this.onMouseUp=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&(o.onMouseUp(f),s.preventDefaultUp&&f.target===i&&f.preventDefault())},this.onMouseUpWindow=function(f){f.sourceCapabilities&&f.sourceCapabilities.firesTouchEvents||!f.defaultPrevented&&s.enabled&&o&&o.enabled&&f.target!==i&&o.onMouseUp(f)},this.onMouseOver=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOver(f)},this.onMouseOut=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.setCanvasOut(f)},this.onMouseWheel=function(f){!f.defaultPrevented&&s.enabled&&o&&o.enabled&&o.onMouseWheel(f),s.preventDefaultWheel&&f.target===i&&f.preventDefault()};var l={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,l),e.addEventListener("mouseout",this.onMouseOut,l),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,l),window&&o.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,l),window.top.addEventListener("mouseup",this.onMouseUpWindow,l)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,l),window.addEventListener("mouseup",this.onMouseUpWindow,l),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(f){var u=s.target;s.locked=document.pointerLockElement===u||document.mozPointerLockElement===u||document.webkitPointerLockElement===u,o.onPointerLockChange(f)},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}});p.exports=n}),87078:((p,S,t)=>{p.exports={MouseManager:t(85098)}}),36210:((p,S,t)=>{var d=t(83419),c=t(8214),h=t(29747),r=new d({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=h,this.onTouchStartWindow=h,this.onTouchMove=h,this.onTouchEnd=h,this.onTouchEndWindow=h,this.onTouchCancel=h,this.onTouchCancelWindow=h,this.isTop=!0,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,s=this.manager,o=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(u),e.capture&&u.cancelable&&u.preventDefault())},this.onTouchStart=function(u){i&&window.focus(),!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(u),e.capture&&u.cancelable&&u.target===o&&u.preventDefault())},this.onTouchStartWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==o&&s.onTouchStart(u)},this.onTouchEnd=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(u),e.capture&&u.cancelable&&u.target===o&&u.preventDefault())},this.onTouchEndWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&u.target!==o&&s.onTouchEnd(u)},this.onTouchCancel=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(u),e.capture&&u.preventDefault())},this.onTouchCancelWindow=function(u){!u.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(u)};var a=this.capture,l={passive:!0},f={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,a?f:l),n.addEventListener("touchmove",this.onTouchMove,a?f:l),n.addEventListener("touchend",this.onTouchEnd,a?f:l),n.addEventListener("touchcancel",this.onTouchCancel,a?f:l),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,f),window.top.addEventListener("touchend",this.onTouchEndWindow,f),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,f)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,f),window.addEventListener("touchend",this.onTouchEndWindow,f),window.addEventListener("touchcancel",this.onTouchCancelWindow,f),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}});p.exports=r}),95618:((p,S,t)=>{p.exports={TouchManager:t(36210)}}),41299:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(54899),r=t(95540),n=t(98356),e=t(3374),s=t(84376),o=t(92638),i=new d({initialize:function(l,f){if(this.loader=l,this.cache=r(f,"cache",!1),this.type=r(f,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(f,"key",!1);var u=this.key;if(l.prefix&&l.prefix!==""&&(this.key=l.prefix+u),!this.key)throw new Error("Invalid File key: "+this.key);var v=r(f,"url");v===void 0?v=l.path+u+"."+r(f,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=l.path+v),this.url=v,this.src="",this.xhrSettings=o(r(f,"responseType",void 0)),r(f,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(f,"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(f,"config",{}),this.multiFile,this.linkFile,this.base64=typeof v=="string"&&v.indexOf("data:")===0,this.retryAttempts=r(f,"maxRetries",l.maxRetries)},setLink:function(a){this.linkFile=a,a.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===c.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=s(this,this.loader.xhr)}},onLoad:function(a,l){var f=a.responseURL&&this.loader.localSchemes.some(function(m){return a.responseURL.indexOf(m)===0}),u=f&&l.target.status===0,v=!(l.target&&l.target.status!==200)||u;a.readyState===4&&a.status>=400&&a.status<=599&&(v=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onBase64Load:function(a){this.xhrLoader=a,this.state=c.FILE_LOADED,this.percentComplete=1,this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(a){a.lengthComputable&&(this.bytesLoaded=a.loaded,this.bytesTotal=a.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(h.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(a){if(this.state!==c.FILE_PENDING_DESTROY){a===void 0&&(a=this.data);var l=this.key,f=this.type;this.loader.emit(h.FILE_COMPLETE,l,f,a),this.loader.emit(h.FILE_KEY_COMPLETE+f+"-"+l,l,f,a),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}});i.createObjectURL=function(a,l,f){if(typeof URL=="function")a.src=URL.createObjectURL(l);else{var u=new FileReader;u.onload=function(){a.removeAttribute("crossOrigin"),a.src="data:"+(l.type||f)+";base64,"+u.result.split(",")[1]},u.onerror=a.onerror,u.readAsDataURL(l)}},i.revokeObjectURL=function(a){typeof URL=="function"&&URL.revokeObjectURL(a.src)},p.exports=i}),74099:(p=>{var S={},t={install:function(d){for(var c in S)d[c]=S[c]},register:function(d,c){S[d]=c},destroy:function(){S={}}};p.exports=t}),98356:(p=>{var S=function(t,d){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:d+t.url:!1};p.exports=S}),74261:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(35072),r=t(50792),n=t(54899),e=t(74099),s=t(95540),o=t(35154),i=t(41212),a=t(37277),l=t(44594),f=t(92638),u=new d({Extends:r,initialize:function(m){r.call(this);var x=m.sys.game.config,g=m.sys.settings.loader;this.scene=m,this.systems=m.sys,this.cacheManager=m.sys.cache,this.textureManager=m.sys.textures,this.sceneManager=m.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(g,"baseURL",x.loaderBaseURL)),this.setPath(s(g,"path",x.loaderPath)),this.setPrefix(s(g,"prefix",x.loaderPrefix)),this.maxParallelDownloads=s(g,"maxParallelDownloads",x.loaderMaxParallelDownloads),this.xhr=f(s(g,"responseType",x.loaderResponseType),s(g,"async",x.loaderAsync),s(g,"user",x.loaderUser),s(g,"password",x.loaderPassword),s(g,"timeout",x.loaderTimeout),s(g,"withCredentials",x.loaderWithCredentials)),this.crossOrigin=s(g,"crossOrigin",x.loaderCrossOrigin),this.imageLoadType=s(g,"imageLoadType",x.loaderImageLoadType),this.localSchemes=s(g,"localScheme",x.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new h,this.inflight=new h,this.queue=new h,this._deleteQueue=new h,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=s(g,"maxRetries",x.loaderMaxRetries),m.sys.events.once(l.BOOT,this.boot,this),m.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(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var m=0;m0},removePack:function(v,m){var x=this.systems.anims,g=this.cacheManager,y=this.textureManager,T={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"},C;if(i(v))C=v;else if(C=g.json.get(v),!C){console.warn("Asset Pack not found in JSON cache:",v);return}m&&(C={_:C[m]});for(var E in C){var M=C[E],P=s(M,"prefix",""),A=s(M,"files"),R=s(M,"defaultType");if(Array.isArray(A))for(var F=0;F0&&this.inflight.size{var d=t(79291),c=t(92638),h=function(r,n){var e=r===void 0?c():d({},r);if(n)for(var s in n)n[s]!==void 0&&(e[s]=n[s]);return e};p.exports=h}),26430:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(54899),r=new d({initialize:function(e,s,o,i){var a=[];i.forEach(function(u){u&&a.push(u)}),this.loader=e,this.type=s,this.key=o;var l=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+l),this.multiKeyIndex=e.multiKeyIndex++,this.files=a,this.state=c.FILE_PENDING,this.complete=!1,this.pending=a.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var f=0;f{var d=t(3374),c=function(h,r){var n=d(r,h.xhrSettings);if(h.base64){var e=h.url.split(";base64,").pop()||h.url.split(",").pop(),s;h.xhrSettings.responseType==="arraybuffer"?s={response:Uint8Array.from(atob(e),function(a){return a.charCodeAt(0)}).buffer}:s={responseText:atob(e)},h.onBase64Load(s);return}var o=new XMLHttpRequest;if(o.open("GET",h.src,n.async,n.user,n.password),o.responseType=h.xhrSettings.responseType,o.timeout=n.timeout,n.headers)for(var i in n.headers)o.setRequestHeader(i,n.headers[i]);return n.header&&n.headerValue&&o.setRequestHeader(n.header,n.headerValue),n.requestedWith&&o.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&o.overrideMimeType(n.overrideMimeType),n.withCredentials&&(o.withCredentials=!0),o.onload=h.onLoad.bind(h,o),o.onerror=h.onError.bind(h,o),o.onprogress=h.onProgress.bind(h),o.ontimeout=h.onError.bind(h,o),o.send(),o};p.exports=c}),92638:(p=>{var S=function(t,d,c,h,r,n){return t===void 0&&(t=""),d===void 0&&(d=!0),c===void 0&&(c=""),h===void 0&&(h=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:d,user:c,password:h,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};p.exports=S}),23906:(p=>{var S={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};p.exports=S}),42155:(p=>{p.exports="addfile"}),38991:(p=>{p.exports="complete"}),27540:(p=>{p.exports="filecomplete"}),87464:(p=>{p.exports="filecomplete-"}),94486:(p=>{p.exports="loaderror"}),13035:(p=>{p.exports="load"}),38144:(p=>{p.exports="fileprogress"}),97520:(p=>{p.exports="postprocess"}),85595:(p=>{p.exports="progress"}),55680:(p=>{p.exports="start"}),54899:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(54899),n=new d({Extends:h,initialize:function(s,o,i,a,l){h.call(this,s,o,i,a,l),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new e(a,l,u,m);x.linkFile?s.call(this,a,"atlasjson",l,[x,g,x.linkFile]):s.call(this,a,"atlasjson",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),a.addToCache(),this.complete=!0}}});c.register("aseprite",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new e(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","json"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new e(a,l,u,m);x.linkFile?s.call(this,a,"atlasjson",l,[x,g,x.linkFile]):s.call(this,a,"atlasjson",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlas",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(57318),o=new d({Extends:e,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","xml"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new s(a,l,u,m);x.linkFile?e.call(this,a,"atlasxml",l,[x,g,x.linkFile]):e.call(this,a,"atlasxml",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,a.data,l),this.complete=!0}}});c.register("atlasXML",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(89749),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v){if(s(l)){var m=l;l=n(m,"key"),u=n(m,"xhrSettings"),v=n(m,"context",v)}var x={type:"audio",cache:a.cacheManager.audio,extension:f.type,responseType:"arraybuffer",key:l,url:f.url,xhrSettings:u,config:{context:v}};h.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(a){i.data=a,i.onProcessComplete()},function(a){console.error("Error decoding audio: "+i.key+" - ",a?a.message:null),i.onProcessError()}),this.config.context=null}});o.create=function(i,a,l,f,u){var v=i.systems.game,m=v.config.audio,x=v.device.audio;s(a)&&(l=n(a,"url",[]),f=n(a,"config",{}));var g=o.getAudioURL(v,l);return g?x.webAudio&&!m.disableWebAudio?new o(i,a,g,u,v.sound.context):new e(i,a,g,f):(console.warn('No audio URLs for "%s" can play on this device',a),null)},o.getAudioURL=function(i,a){Array.isArray(a)||(a=[a]);for(var l=0;l{var d=t(21097),c=t(83419),h=t(74099),r=t(95540),n=t(41212),e=t(518),s=t(26430),o=new c({Extends:s,initialize:function(a,l,f,u,v,m,x){if(n(l)){var g=l;l=r(g,"key"),f=r(g,"jsonURL"),u=r(g,"audioURL"),v=r(g,"audioConfig"),m=r(g,"audioXhrSettings"),x=r(g,"jsonXhrSettings")}var y;if(!u)y=new e(a,l,f,x),s.call(this,a,"audiosprite",l,[y]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=m;else{var T=d.create(a,l,u,v,m);T&&(y=new e(a,l,f,x),s.call(this,a,"audiosprite",l,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var l=i.data.resources,f=r(this.config,"audioConfig"),u=r(this.config,"audioXhrSettings"),v=d.create(this.loader,i.key,l,f,u);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1];i.addToCache(),a.addToCache(),this.complete=!0}}});h.register("audioSprite",function(i,a,l,f,u,v){var m=this.systems.game,x=m.config.audio,g=m.device.audio;if(x&&x.noAudio||!g.webAudio&&!g.audioData)return this;var y;if(Array.isArray(i))for(var T=0;T{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="bin";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v),u=n(m,"dataType",u)}var x={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:a,url:l,xhrSettings:f,config:{dataType:u}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.dataType;this.data=o?new o(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(21859),o=t(57318),i=new d({Extends:e,initialize:function(l,f,u,v,m,x){var g,y;if(n(f)){var T=f;f=h(T,"key"),g=new r(l,{key:f,url:h(T,"textureURL"),extension:h(T,"textureExtension","png"),normalMap:h(T,"normalMap"),xhrSettings:h(T,"textureXhrSettings")}),y=new o(l,{key:f,url:h(T,"fontDataURL"),extension:h(T,"fontDataExtension","xml"),xhrSettings:h(T,"fontDataXhrSettings")})}else g=new r(l,f,u,m),y=new o(l,f,v,x);g.linkFile?e.call(this,l,"bitmapfont",f,[g,y,g.linkFile]):e.call(this,l,"bitmapfont",f,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1];a.addToCache();var f=a.cache.get(a.key),u=s(l.data,a.cache.getFrame(a.key),0,0,f);this.loader.cacheManager.bitmapFont.add(a.key,{data:u,texture:a.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(a,l,f,u,v){var m;if(Array.isArray(a))for(var x=0;x{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="css";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"script",cache:!1,extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},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(o,i,a){if(Array.isArray(o))for(var l=0;l{var d=t(38734),c=t(85722),h=t(83419),r=t(74099),n=t(95540),e=t(19550),s=t(41212),o=t(518),i=t(31403),a=t(46975),l=t(59327),f=t(26430),u=t(82038),v=t(55222),m=new h({Extends:f,initialize:function(g,y,T,C){if(T.multiAtlasURL){var E=new o(g,{key:y,url:T.multiAtlasURL,xhrSettings:C,config:T});f.call(this,g,"texture",y,[E])}else{var M=T.textureURL.substr(T.textureURL.length-3);T.type||(T.type=M.toLowerCase()==="ktx"?"KTX":"PVR");var P=new c(g,{key:y,url:T.textureURL,extension:M,xhrSettings:C,config:T});if(T.atlasURL){var A=new o(g,{key:y,url:T.atlasURL,xhrSettings:C,config:T});f.call(this,g,"texture",y,[P,A])}else f.call(this,g,"texture",y,[P])}this.config=T},onFileComplete:function(x){var g=this.files.indexOf(x);if(g!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(x.type==="json"&&x.data.hasOwnProperty("textures")){var y=x.data.textures,T=this.config,C=this.loader,E=C.baseURL,M=C.path,P=C.prefix,A=n(T,"multiBaseURL",this.baseURL),R=n(T,"multiPath",this.path),F=n(T,"prefix",this.prefix),w=n(T,"textureXhrSettings");A&&C.setBaseURL(A),R&&C.setPath(R),F&&C.setPrefix(F);for(var I=0;I{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(98356),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v,m){var x="ttf";if(s(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"format","truetype"),v=n(g,"descriptors",null),m=n(g,"xhrSettings"),x=n(g,"extension",x)}else u===void 0&&(u="truetype");var y={type:"font",cache:!1,extension:x,responseType:"text",key:l,url:f,xhrSettings:m};h.call(this,a,y),this.data={format:u,descriptors:v},this.state=c.FILE_POPULATED},onProcess:function(){this.state=c.FILE_PROCESSING,this.src=e(this,this.loader.baseURL);var i,a=this.key,l="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?i=new FontFace(a,l,this.data.descriptors):i=new FontFace(a,l);var f=this;i.load().then(function(){document.fonts.add(i),document.body.classList.add("fonts-loaded"),f.onProcessComplete()}).catch(function(){console.warn("Font failed to load",l),f.onProcessComplete()})}});r.register("font",function(i,a,l,f,u){if(Array.isArray(i))for(var v=0;v{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(73894),o=new d({Extends:h,initialize:function(a,l,f,u,v){var m="glsl";if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"shaderType","fragment"),v=n(x,"xhrSettings"),m=n(x,"extension",m)}else u===void 0&&(u="fragment");var g={type:"glsl",cache:a.cacheManager.shader,extension:m,responseType:"text",key:l,url:f,config:{shaderType:u},xhrSettings:v};h.call(this,a,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(` +`),a=this.extractBlock(i,0);if(a)for(;a;){var l=this.getShaderName(a.header),f=this.getShaderType(a.header),u=this.getShaderUniforms(a.header),v=a.shader;if(this.cache.has(l)){var m=this.cache.get(l);f==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=u)}else f==="fragment"?this.cache.add(l,new s(l,v,"",u)):this.cache.add(l,new s(l,"",v,u));a=this.extractBlock(i,a.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var a=0;a{var d=t(83419),c=t(54899),h=t(41299),r=t(95540),n=t(98356),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){if(e(a)){var u=a;a=r(u,"key"),f=r(u,"config",f)}var v={type:"audio",cache:i.cacheManager.audio,extension:l.type,key:a,url:l.url,config:f};h.call(this,i,v),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 o=0;o{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="html";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",cache:i.cacheManager.html,extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(o,i,a){if(Array.isArray(o))for(var l=0;l{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){f===void 0&&(f=512),u===void 0&&(u=512);var m="html";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"width",f),u=n(x,"height",u)}var g={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{width:f,height:u}};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.width,i=this.config.height,a=[];a.push(''),a.push(''),a.push(''),a.push(this.xhrLoader.responseText),a.push(""),a.push(""),a.push("");var l=[a.join(` +`)],f=this;try{var u=new window.Blob(l,{type:"image/svg+xml;charset=utf-8"})}catch{f.state=c.FILE_ERRORED,f.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(f.data),f.onProcessError()},h.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),o=new d({Extends:h,initialize:function i(a,l,f,u,v){var m="png",x;if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),x=n(g,"normalMap"),u=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"frameConfig")}Array.isArray(f)&&(x=f[1],f=f[0]);var y={type:"image",cache:a.textureManager,extension:m,responseType:"blob",key:l,url:f,xhrSettings:u,config:v};if(h.call(this,a,y),x){var T=new i(a,this.key,x,u,v);T.type="normalMap",this.setLink(T),a.addFile(T)}this.useImageElementLoad=a.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 i=this;this.data.onload=function(){h.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(i.data),i.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,a,l){if(Array.isArray(i))for(var f=0;f{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v){var m="json";if(s(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"dataKey",v)}var g={type:"json",cache:a.cacheManager.json,extension:m,responseType:"text",key:l,url:f,xhrSettings:u,config:v};h.call(this,a,g),s(f)&&(v?this.data=e(f,v):this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(l){throw this.onProcessError(),l}var a=this.config;typeof a=="string"?this.data=e(i,a,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,a,l,f){if(Array.isArray(i))for(var u=0;u{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m,x){if(n(l)){var g=l;l=h(g,"key"),h(g,"url",!1)?f=h(g,"url"):f=h(g,"atlasURL"),m=h(g,"xhrSettings"),u=h(g,"path"),v=h(g,"baseURL"),x=h(g,"textureXhrSettings")}var y=new e(a,l,f,m);s.call(this,a,"multiatlas",l,[y]),this.config.path=u,this.config.baseURL=v,this.config.textureXhrSettings=x},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var l=i.data.textures,f=this.config,u=this.loader,v=u.baseURL,m=u.path,x=u.prefix,g=h(f,"baseURL",this.baseURL),y=h(f,"path",this.path),T=h(f,"prefix",this.prefix),C=h(f,"textureXhrSettings");u.setBaseURL(g),u.setPath(y),u.setPrefix(T);for(var E=0;E{var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(34328),s=new d({Extends:n,initialize:function(i,a,l,f){var u="js",v=[];if(r(a)){var m=a;a=h(m,"key"),l=h(m,"url"),f=h(m,"xhrSettings"),u=h(m,"extension",u)}Array.isArray(l)||(l=[l]);for(var x=0;x{var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(85048),s=t(61485),o=t(78776),i=new d({Extends:n,initialize:function(l,f,u,v,m,x){var g,y,T=l.cacheManager.obj;if(r(f)){var C=f;f=h(C,"key"),g=new o(l,{key:f,type:"obj",cache:T,url:h(C,"url"),extension:h(C,"extension","obj"),xhrSettings:h(C,"xhrSettings"),config:{flipUV:h(C,"flipUV",m)}}),v=h(C,"matURL"),v&&(y=new o(l,{key:f,type:"mat",cache:T,url:v,extension:h(C,"matExtension","mat"),xhrSettings:h(C,"xhrSettings")}))}else g=new o(l,{key:f,url:u,type:"obj",cache:T,extension:"obj",xhrSettings:x,config:{flipUV:m}}),v&&(y=new o(l,{key:f,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:x}));n.call(this,l,"obj",f,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],l=this.files[1],f=e(a.data,a.config.flipUV);l&&(f.materials=s(l.data)),a.cache.add(a.key,f),this.complete=!0}}});c.register("obj",function(a,l,f,u,v){var m;if(Array.isArray(a))for(var x=0;x{var d=t(83419),c=t(23906),h=t(74099),r=t(518),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,a,l),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()}});h.register("pack",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"start"),u=n(x,"mapping")}var g={type:"plugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{start:f,mapping:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=n(i,"start",!1),l=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)o.install(this.key,this.data,a,l);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 f=o.install(this.key,window[this.key],a,l);(a||l)&&(this.loader.systems[l]=f,this.loader.scene[l]=f)}this.onProcessComplete()}});r.register("plugin",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="svg";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"svgConfig",{}),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:a,url:l,xhrSettings:u,config:{width:n(f,"width"),height:n(f,"height"),scale:n(f,"scale")}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.xhrLoader.responseText,i=[o],a=this.config.width,l=this.config.height,f=this.config.scale;t:if(a&&l||f){var u=null,v=new DOMParser;u=v.parseFromString(o,"text/xml");var m=u.getElementsByTagName("svg")[0],x=m.hasAttribute("viewBox"),g=parseFloat(m.getAttribute("width")),y=parseFloat(m.getAttribute("height"));if(!x&&g&&y)m.setAttribute("viewBox","0 0 "+g+" "+y);else if(x&&!g&&!y){var T=m.getAttribute("viewBox").split(/\s+|,/);g=T[2],y=T[3]}if(f)if(g&&y)a=g*f,l=y*f;else break t;m.setAttribute("width",a.toString()+"px"),m.setAttribute("height",l.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}try{var C=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var E=this,M=!1;this.data.onload=function(){M||h.revokeObjectURL(E.data),E.onProcessComplete()},this.data.onerror=function(){M?E.onProcessError():(M=!0,h.revokeObjectURL(E.data),E.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},h.createObjectURL(this.data,C,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="js";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var o=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(o)),this.complete=!0}});r.register("sceneFile",function(o,i,a){if(Array.isArray(o))for(var l=0;l{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"systemKey"),u=n(x,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{systemKey:f,sceneKey:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=this.key,l=n(i,"systemKey",a),f=n(i,"sceneKey",a);this.state===c.FILE_POPULATED?o.installScenePlugin(l,this.data,f,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),o.installScenePlugin(l,window[this.key],f,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="js";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"type","script"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}else f===void 0&&(f="script");var x={type:f,cache:!1,extension:v,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,x)},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(o,i,a,l){if(Array.isArray(o))for(var f=0;f{var d=t(83419),c=t(23906),h=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,l,a),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)}});h.register("spritesheet",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="text",v="txt",m=i.cacheManager.text;if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),f=n(x,"xhrSettings"),v=n(x,"extension",v),u=n(x,"type",u),m=n(x,"cache",m)}var g={type:u,cache:m,extension:v,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(o,i,a){if(Array.isArray(o))for(var l=0;l{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),o=new d({Extends:h,initialize:function(a,l,f,u){var v="csv";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"tilemapCSV",cache:a.cacheManager.tilemap,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,a,x),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,a,l){if(Array.isArray(i))for(var f=0;f{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,o){if(Array.isArray(e))for(var i=0;i{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,s,o){if(Array.isArray(e))for(var i=0;i{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(78776),o=new d({Extends:e,initialize:function(a,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(a,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new s(a,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","txt"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(a,l,f,v),g=new s(a,l,u,m);x.linkFile?e.call(this,a,"unityatlas",l,[x,g,x.linkFile]):e.call(this,a,"unityatlas",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,a.data,l),this.complete=!0}}});c.register("unityAtlas",function(i,a,l,f,u){var v;if(Array.isArray(i))for(var m=0;m{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(98356),e=t(95540),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u){if(u===void 0&&(u=!1),s(l)){var v=l;l=e(v,"key"),f=e(v,"url",[]),u=e(v,"noAudio",!1)}var m=a.systems.game.device.video.getVideoURL(f);m||console.warn("VideoFile: No supported format for "+l);var x={type:"video",cache:a.cacheManager.video,extension:m.type,key:l,url:m.url,config:{noAudio:u}};h.call(this,a,x)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(i,a,l){if(Array.isArray(i))for(var f=0;f{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(56836),o=new d({Extends:h,initialize:function(a,l,f,u){var v="xml";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"xml",cache:a.cacheManager.xml,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(i,a,l){if(Array.isArray(i))for(var f=0;f{p.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),FontFile:t(87674),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:((p,S,t)=>{var d=t(23906),c=t(79291),h={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};h=c(!1,h,d),p.exports=h}),53307:(p=>{var S=function(t){for(var d=0,c=0;c{var d=t(6411),c=function(h,r){return d(h)/d(r)/d(h-r)};p.exports=c}),30976:(p=>{var S=function(t,d){return Math.floor(Math.random()*(d-t+1)+t)};p.exports=S}),87842:(p=>{var S=function(t,d,c,h,r){var n=(h-d)*.5,e=(r-c)*.5,s=t*t,o=t*s;return(2*c-2*h+n+e)*o+(-3*c+3*h-2*n-e)*s+n*t+c};p.exports=S}),26302:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.ceil(t*h)/h};p.exports=S}),45319:(p=>{var S=function(t,d,c){return Math.max(d,Math.min(c,t))};p.exports=S}),39506:((p,S,t)=>{var d=t(36383),c=function(h){return h*d.DEG_TO_RAD};p.exports=c}),61241:(p=>{var S=function(t,d){return Math.abs(t-d)};p.exports=S}),38857:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(37867),r=t(29747),n=new h,e=new c({initialize:function s(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l=s.DefaultOrder),this._x=o,this._y=i,this._z=a,this._order=l,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(s){this._x=s,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(s){this._y=s,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(s){this._z=s,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(s){this._order=s,this.onChangeCallback(this)}},set:function(s,o,i,a){return a===void 0&&(a=this._order),this._x=s,this._y=o,this._z=i,this._order=a,this.onChangeCallback(this),this},copy:function(s){return this.set(s.x,s.y,s.z,s.order)},setFromQuaternion:function(s,o,i){return o===void 0&&(o=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,o,i)},setFromRotationMatrix:function(s,o,i){o===void 0&&(o=this._order),i===void 0&&(i=!1);var a=s.val,l=a[0],f=a[4],u=a[8],v=a[1],m=a[5],x=a[9],g=a[2],y=a[6],T=a[10],C=0,E=0,M=0,P=.99999;switch(o){case"XYZ":{E=Math.asin(d(u,-1,1)),Math.abs(u){var S=function(t){if(t===0)return 1;for(var d=t;--t;)d*=t;return d};p.exports=S}),99472:(p=>{var S=function(t,d){return Math.random()*(d-t)+t};p.exports=S}),77623:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.floor(t*h)/h};p.exports=S}),62945:((p,S,t)=>{var d=t(45319),c=function(h,r,n){return h=d(h,0,1),(n-r)*h+r};p.exports=c}),38265:(p=>{var S=function(t,d){return t/d/1e3};p.exports=S}),78702:(p=>{var S=function(t){return t==parseFloat(t)?!(t%2):void 0};p.exports=S}),94883:(p=>{var S=function(t){return t===parseFloat(t)?!(t%2):void 0};p.exports=S}),28915:(p=>{var S=function(t,d,c){return(d-t)*c+t};p.exports=S}),94908:(p=>{var S=function(t,d,c){return c===void 0&&(c=0),t.clone().lerp(d,c)};p.exports=S}),94434:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(h){return this.copy(h)},copy:function(h){var r=this.val,n=h.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(h){var r=h.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(h){var r=this.val;return r[0]=h[0],r[1]=h[1],r[2]=h[2],r[3]=h[3],r[4]=h[4],r[5]=h[5],r[6]=h[6],r[7]=h[7],r[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,r=h[1],n=h[2],e=h[5];return h[1]=h[3],h[2]=h[6],h[3]=r,h[5]=h[7],h[6]=n,h[7]=e,this},invert:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8],u=f*o-i*l,v=-f*s+i*a,m=l*s-o*a,x=r*u+n*v+e*m;return x?(x=1/x,h[0]=u*x,h[1]=(-f*n+e*l)*x,h[2]=(i*n-e*o)*x,h[3]=v*x,h[4]=(f*r-e*a)*x,h[5]=(-i*r+e*s)*x,h[6]=m*x,h[7]=(-l*r+n*a)*x,h[8]=(o*r-n*s)*x,this):null},adjoint:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8];return h[0]=o*f-i*l,h[1]=e*l-n*f,h[2]=n*i-e*o,h[3]=i*a-s*f,h[4]=r*f-e*a,h[5]=e*s-r*i,h[6]=s*l-o*a,h[7]=n*a-r*l,h[8]=r*o-n*s,this},determinant:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],o=h[4],i=h[5],a=h[6],l=h[7],f=h[8];return r*(f*o-i*l)+n*(-f*s+i*a)+e*(l*s-o*a)},multiply:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=r[6],f=r[7],u=r[8],v=h.val,m=v[0],x=v[1],g=v[2],y=v[3],T=v[4],C=v[5],E=v[6],M=v[7],P=v[8];return r[0]=m*n+x*o+g*l,r[1]=m*e+x*i+g*f,r[2]=m*s+x*a+g*u,r[3]=y*n+T*o+C*l,r[4]=y*e+T*i+C*f,r[5]=y*s+T*a+C*u,r[6]=E*n+M*o+P*l,r[7]=E*e+M*i+P*f,r[8]=E*s+M*a+P*u,this},translate:function(h){var r=this.val,n=h.x,e=h.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(h){var r=this.val,n=r[0],e=r[1],s=r[2],o=r[3],i=r[4],a=r[5],l=Math.sin(h),f=Math.cos(h);return r[0]=f*n+l*o,r[1]=f*e+l*i,r[2]=f*s+l*a,r[3]=f*o-l*n,r[4]=f*i-l*e,r[5]=f*a-l*s,this},scale:function(h){var r=this.val,n=h.x,e=h.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(h){var r=h.x,n=h.y,e=h.z,s=h.w,o=r+r,i=n+n,a=e+e,l=r*o,f=r*i,u=r*a,v=n*i,m=n*a,x=e*a,g=s*o,y=s*i,T=s*a,C=this.val;return C[0]=1-(v+x),C[3]=f+T,C[6]=u-y,C[1]=f-T,C[4]=1-(l+x),C[7]=m+g,C[2]=u+y,C[5]=m-g,C[8]=1-(l+v),this},normalFromMat4:function(h){var r=h.val,n=this.val,e=r[0],s=r[1],o=r[2],i=r[3],a=r[4],l=r[5],f=r[6],u=r[7],v=r[8],m=r[9],x=r[10],g=r[11],y=r[12],T=r[13],C=r[14],E=r[15],M=e*l-s*a,P=e*f-o*a,A=e*u-i*a,R=s*f-o*l,F=s*u-i*l,w=o*u-i*f,I=v*T-m*y,U=v*C-x*y,N=v*E-g*y,D=m*C-x*T,B=m*E-g*T,L=x*E-g*C,G=M*L-P*B+A*D+R*N-F*U+w*I;return G?(G=1/G,n[0]=(l*L-f*B+u*D)*G,n[1]=(f*N-a*L-u*U)*G,n[2]=(a*B-l*N+u*I)*G,n[3]=(o*B-s*L-i*D)*G,n[4]=(e*L-o*N+i*U)*G,n[5]=(s*N-e*B-i*I)*G,n[6]=(T*w-C*F+E*R)*G,n[7]=(C*A-y*w-E*P)*G,n[8]=(y*F-T*A+E*M)*G,this):null}});p.exports=c}),37867:((p,S,t)=>{var d=t(83419),c=t(25836),h=1e-6,r=new d({initialize:function(l){this.val=new Float32Array(16),l?this.copy(l):this.identity()},clone:function(){return new r(this)},set:function(a){return this.copy(a)},setValues:function(a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R){var F=this.val;return F[0]=a,F[1]=l,F[2]=f,F[3]=u,F[4]=v,F[5]=m,F[6]=x,F[7]=g,F[8]=y,F[9]=T,F[10]=C,F[11]=E,F[12]=M,F[13]=P,F[14]=A,F[15]=R,this},copy:function(a){var l=a.val;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])},fromArray:function(a){return this.setValues(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(a,l,f){var u=n.fromQuat(f),v=u.val,m=l.x,x=l.y,g=l.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*x,v[5]*x,v[6]*x,0,v[8]*g,v[9]*g,v[10]*g,0,a.x,a.y,a.z,1)},xyz:function(a,l,f){this.identity();var u=this.val;return u[12]=a,u[13]=l,u[14]=f,this},scaling:function(a,l,f){this.zero();var u=this.val;return u[0]=a,u[5]=l,u[10]=f,u[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 a=this.val,l=a[1],f=a[2],u=a[3],v=a[6],m=a[7],x=a[11];return a[1]=a[4],a[2]=a[8],a[3]=a[12],a[4]=l,a[6]=a[9],a[7]=a[13],a[8]=f,a[9]=v,a[11]=a[14],a[12]=u,a[13]=m,a[14]=x,this},getInverse:function(a){return this.copy(a),this.invert()},invert:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*x-f*m,I=l*g-u*m,U=l*y-v*m,N=f*g-u*x,D=f*y-v*x,B=u*y-v*g,L=T*A-C*P,G=T*R-E*P,O=T*F-M*P,X=C*R-E*A,z=C*F-M*A,V=E*F-M*R,Y=w*V-I*z+U*X+N*O-D*G+B*L;return Y?(Y=1/Y,this.setValues((x*V-g*z+y*X)*Y,(u*z-f*V-v*X)*Y,(A*B-R*D+F*N)*Y,(E*D-C*B-M*N)*Y,(g*O-m*V-y*G)*Y,(l*V-u*O+v*G)*Y,(R*U-P*B-F*I)*Y,(T*B-E*U+M*I)*Y,(m*z-x*O+y*L)*Y,(f*O-l*z-v*L)*Y,(P*D-A*U+F*w)*Y,(C*U-T*D-M*w)*Y,(x*G-m*X-g*L)*Y,(l*X-f*G+u*L)*Y,(A*I-P*N-R*w)*Y,(T*N-C*I+E*w)*Y)):this},adjoint:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15];return this.setValues(x*(E*F-M*R)-C*(g*F-y*R)+A*(g*M-y*E),-(f*(E*F-M*R)-C*(u*F-v*R)+A*(u*M-v*E)),f*(g*F-y*R)-x*(u*F-v*R)+A*(u*y-v*g),-(f*(g*M-y*E)-x*(u*M-v*E)+C*(u*y-v*g)),-(m*(E*F-M*R)-T*(g*F-y*R)+P*(g*M-y*E)),l*(E*F-M*R)-T*(u*F-v*R)+P*(u*M-v*E),-(l*(g*F-y*R)-m*(u*F-v*R)+P*(u*y-v*g)),l*(g*M-y*E)-m*(u*M-v*E)+T*(u*y-v*g),m*(C*F-M*A)-T*(x*F-y*A)+P*(x*M-y*C),-(l*(C*F-M*A)-T*(f*F-v*A)+P*(f*M-v*C)),l*(x*F-y*A)-m*(f*F-v*A)+P*(f*y-v*x),-(l*(x*M-y*C)-m*(f*M-v*C)+T*(f*y-v*x)),-(m*(C*R-E*A)-T*(x*R-g*A)+P*(x*E-g*C)),l*(C*R-E*A)-T*(f*R-u*A)+P*(f*E-u*C),-(l*(x*R-g*A)-m*(f*R-u*A)+P*(f*g-u*x)),l*(x*E-g*C)-m*(f*E-u*C)+T*(f*g-u*x))},determinant:function(){var a=this.val,l=a[0],f=a[1],u=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],C=a[9],E=a[10],M=a[11],P=a[12],A=a[13],R=a[14],F=a[15],w=l*x-f*m,I=l*g-u*m,U=l*y-v*m,N=f*g-u*x,D=f*y-v*x,B=u*y-v*g,L=T*A-C*P,G=T*R-E*P,O=T*F-M*P,X=C*R-E*A,z=C*F-M*A,V=E*F-M*R;return w*V-I*z+U*X+N*O-D*G+B*L},multiply:function(a){var l=this.val,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5],y=l[6],T=l[7],C=l[8],E=l[9],M=l[10],P=l[11],A=l[12],R=l[13],F=l[14],w=l[15],I=a.val,U=I[0],N=I[1],D=I[2],B=I[3];return l[0]=U*f+N*x+D*C+B*A,l[1]=U*u+N*g+D*E+B*R,l[2]=U*v+N*y+D*M+B*F,l[3]=U*m+N*T+D*P+B*w,U=I[4],N=I[5],D=I[6],B=I[7],l[4]=U*f+N*x+D*C+B*A,l[5]=U*u+N*g+D*E+B*R,l[6]=U*v+N*y+D*M+B*F,l[7]=U*m+N*T+D*P+B*w,U=I[8],N=I[9],D=I[10],B=I[11],l[8]=U*f+N*x+D*C+B*A,l[9]=U*u+N*g+D*E+B*R,l[10]=U*v+N*y+D*M+B*F,l[11]=U*m+N*T+D*P+B*w,U=I[12],N=I[13],D=I[14],B=I[15],l[12]=U*f+N*x+D*C+B*A,l[13]=U*u+N*g+D*E+B*R,l[14]=U*v+N*y+D*M+B*F,l[15]=U*m+N*T+D*P+B*w,this},multiplyLocal:function(a){var l=this.val,f=a.val;return this.setValues(l[0]*f[0]+l[1]*f[4]+l[2]*f[8]+l[3]*f[12],l[0]*f[1]+l[1]*f[5]+l[2]*f[9]+l[3]*f[13],l[0]*f[2]+l[1]*f[6]+l[2]*f[10]+l[3]*f[14],l[0]*f[3]+l[1]*f[7]+l[2]*f[11]+l[3]*f[15],l[4]*f[0]+l[5]*f[4]+l[6]*f[8]+l[7]*f[12],l[4]*f[1]+l[5]*f[5]+l[6]*f[9]+l[7]*f[13],l[4]*f[2]+l[5]*f[6]+l[6]*f[10]+l[7]*f[14],l[4]*f[3]+l[5]*f[7]+l[6]*f[11]+l[7]*f[15],l[8]*f[0]+l[9]*f[4]+l[10]*f[8]+l[11]*f[12],l[8]*f[1]+l[9]*f[5]+l[10]*f[9]+l[11]*f[13],l[8]*f[2]+l[9]*f[6]+l[10]*f[10]+l[11]*f[14],l[8]*f[3]+l[9]*f[7]+l[10]*f[11]+l[11]*f[15],l[12]*f[0]+l[13]*f[4]+l[14]*f[8]+l[15]*f[12],l[12]*f[1]+l[13]*f[5]+l[14]*f[9]+l[15]*f[13],l[12]*f[2]+l[13]*f[6]+l[14]*f[10]+l[15]*f[14],l[12]*f[3]+l[13]*f[7]+l[14]*f[11]+l[15]*f[15])},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,l){var f=a.val,u=l.val,v=f[0],m=f[4],x=f[8],g=f[12],y=f[1],T=f[5],C=f[9],E=f[13],M=f[2],P=f[6],A=f[10],R=f[14],F=f[3],w=f[7],I=f[11],U=f[15],N=u[0],D=u[4],B=u[8],L=u[12],G=u[1],O=u[5],X=u[9],z=u[13],V=u[2],Y=u[6],W=u[10],H=u[14],K=u[3],b=u[7],J=u[11],$=u[15];return this.setValues(v*N+m*G+x*V+g*K,y*N+T*G+C*V+E*K,M*N+P*G+A*V+R*K,F*N+w*G+I*V+U*K,v*D+m*O+x*Y+g*b,y*D+T*O+C*Y+E*b,M*D+P*O+A*Y+R*b,F*D+w*O+I*Y+U*b,v*B+m*X+x*W+g*J,y*B+T*X+C*W+E*J,M*B+P*X+A*W+R*J,F*B+w*X+I*W+U*J,v*L+m*z+x*H+g*$,y*L+T*z+C*H+E*$,M*L+P*z+A*H+R*$,F*L+w*z+I*H+U*$)},translate:function(a){return this.translateXYZ(a.x,a.y,a.z)},translateXYZ:function(a,l,f){var u=this.val;return u[12]=u[0]*a+u[4]*l+u[8]*f+u[12],u[13]=u[1]*a+u[5]*l+u[9]*f+u[13],u[14]=u[2]*a+u[6]*l+u[10]*f+u[14],u[15]=u[3]*a+u[7]*l+u[11]*f+u[15],this},scale:function(a){return this.scaleXYZ(a.x,a.y,a.z)},scaleXYZ:function(a,l,f){var u=this.val;return u[0]=u[0]*a,u[1]=u[1]*a,u[2]=u[2]*a,u[3]=u[3]*a,u[4]=u[4]*l,u[5]=u[5]*l,u[6]=u[6]*l,u[7]=u[7]*l,u[8]=u[8]*f,u[9]=u[9]*f,u[10]=u[10]*f,u[11]=u[11]*f,this},makeRotationAxis:function(a,l){var f=Math.cos(l),u=Math.sin(l),v=1-f,m=a.x,x=a.y,g=a.z,y=v*m,T=v*x;return this.setValues(y*m+f,y*x-u*g,y*g+u*x,0,y*x+u*g,T*x+f,T*g-u*m,0,y*g-u*x,T*g+u*m,v*g*g+f,0,0,0,0,1)},rotate:function(a,l){var f=this.val,u=l.x,v=l.y,m=l.z,x=Math.sqrt(u*u+v*v+m*m);if(Math.abs(x){var S=function(t,d,c){return Math.min(t+d,c)};p.exports=S}),50040:(p=>{var S=function(t){var d=t.length;if(d===0)return 0;t.sort(function(h,r){return h-r});var c=Math.floor(d/2);return d%2===0?(t[c]+t[c-1])/2:t[c]};p.exports=S}),37204:(p=>{var S=function(t,d,c){return Math.max(t-d,c)};p.exports=S}),65201:(p=>{var S=function(t,d,c,h){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?h!==void 0?(r=(h-t)/(h-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S}),15746:((p,S,t)=>{var d=t(83419),c=t(94434),h=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),o=new r(1,0,0),i=new r(0,1,0),a=new r,l=new c,f=new d({initialize:function(v,m,x,g){this.onChangeCallback=h,this.set(v,m,x,g)},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(u){this._w=u,this.onChangeCallback(this)}},copy:function(u){return this.set(u)},set:function(u,v,m,x,g){return g===void 0&&(g=!0),typeof u=="object"?(this._x=u.x||0,this._y=u.y||0,this._z=u.z||0,this._w=u.w||0):(this._x=u||0,this._y=v||0,this._z=m||0,this._w=x||0),g&&this.onChangeCallback(this),this},add:function(u){return this._x+=u.x,this._y+=u.y,this._z+=u.z,this._w+=u.w,this.onChangeCallback(this),this},subtract:function(u){return this._x-=u.x,this._y-=u.y,this._z-=u.z,this._w-=u.w,this.onChangeCallback(this),this},scale:function(u){return this._x*=u,this._y*=u,this._z*=u,this._w*=u,this.onChangeCallback(this),this},length:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return Math.sqrt(u*u+v*v+m*m+x*x)},lengthSq:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return u*u+v*v+m*m+x*x},normalize:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x;return g>0&&(g=1/Math.sqrt(g),this._x=u*g,this._y=v*g,this._z=m*g,this._w=x*g),this.onChangeCallback(this),this},dot:function(u){return this.x*u.x+this.y*u.y+this.z*u.z+this.w*u.w},lerp:function(u,v){v===void 0&&(v=0);var m=this.x,x=this.y,g=this.z,y=this.w;return this.set(m+v*(u.x-m),x+v*(u.y-x),g+v*(u.z-g),y+v*(u.w-y))},rotationTo:function(u,v){var m=u.x*v.x+u.y*v.y+u.z*v.z;return m<-.999999?(a.copy(o).cross(u).length().999999?this.set(0,0,0,1):(a.copy(u).cross(v),this._x=a.x,this._y=a.y,this._z=a.z,this._w=1+m,this.normalize())},setAxes:function(u,v,m){var x=l.val;return x[0]=v.x,x[3]=v.y,x[6]=v.z,x[1]=m.x,x[4]=m.y,x[7]=m.z,x[2]=-u.x,x[5]=-u.y,x[8]=-u.z,this.fromMat3(l).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(u,v){v=v*.5;var m=Math.sin(v);return this.set(m*u.x,m*u.y,m*u.z,Math.cos(v))},multiply:function(u){var v=this.x,m=this.y,x=this.z,g=this.w,y=u.x,T=u.y,C=u.z,E=u.w;return this.set(v*E+g*y+m*C-x*T,m*E+g*T+x*y-v*C,x*E+g*C+v*T-m*y,g*E-v*y-m*T-x*C)},slerp:function(u,v){var m=this.x,x=this.y,g=this.z,y=this.w,T=u.x,C=u.y,E=u.z,M=u.w,P=m*T+x*C+g*E+y*M;P<0&&(P=-P,T=-T,C=-C,E=-E,M=-M);var A=1-v,R=v;if(1-P>n){var F=Math.acos(P),w=Math.sin(F);A=Math.sin((1-v)*F)/w,R=Math.sin(v*F)/w}return this.set(A*m+R*T,A*x+R*C,A*g+R*E,A*y+R*M)},invert:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x,y=g?1/g:0;return this.set(-u*y,-v*y,-m*y,x*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+g*y,m*T+x*y,x*T-m*y,g*T-v*y)},rotateY:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T-x*y,m*T+g*y,x*T+v*y,g*T-m*y)},rotateZ:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+m*y,m*T-v*y,x*T+g*y,g*T-x*y)},calculateW:function(){var u=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-u*u-v*v-m*m),this},setFromEuler:function(u,v){var m=u.x/2,x=u.y/2,g=u.z/2,y=Math.cos(m),T=Math.cos(x),C=Math.cos(g),E=Math.sin(m),M=Math.sin(x),P=Math.sin(g);switch(u.order){case"XYZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"YXZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"ZXY":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"ZYX":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"YZX":{this.set(E*T*C+y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C-E*M*P,v);break}case"XZY":{this.set(E*T*C-y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C+E*M*P,v);break}}return this},setFromRotationMatrix:function(u){var v=u.val,m=v[0],x=v[4],g=v[8],y=v[1],T=v[5],C=v[9],E=v[2],M=v[6],P=v[10],A=m+T+P,R;return A>0?(R=.5/Math.sqrt(A+1),this.set((M-C)*R,(g-E)*R,(y-x)*R,.25/R)):m>T&&m>P?(R=2*Math.sqrt(1+m-T-P),this.set(.25*R,(x+y)/R,(g+E)/R,(M-C)/R)):T>P?(R=2*Math.sqrt(1+T-m-P),this.set((x+y)/R,.25*R,(C+M)/R,(g-E)/R)):(R=2*Math.sqrt(1+P-m-T),this.set((g+E)/R,(C+M)/R,.25*R,(y-x)/R)),this},fromMat3:function(u){var v=u.val,m=v[0]+v[4]+v[8],x;if(m>0)x=Math.sqrt(m+1),this.w=.5*x,x=.5/x,this._x=(v[7]-v[5])*x,this._y=(v[2]-v[6])*x,this._z=(v[3]-v[1])*x;else{var g=0;v[4]>v[0]&&(g=1),v[8]>v[g*3+g]&&(g=2);var y=e[g],T=e[y];x=Math.sqrt(v[g*3+g]-v[y*3+y]-v[T*3+T]+1),s[g]=.5*x,x=.5/x,s[y]=(v[y*3+g]+v[g*3+y])*x,s[T]=(v[T*3+g]+v[g*3+T])*x,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[T*3+y]-v[y*3+T])*x}return this.onChangeCallback(this),this}});p.exports=f}),43396:((p,S,t)=>{var d=t(36383),c=function(h){return h*d.RAD_TO_DEG};p.exports=c}),74362:(p=>{var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*d,t.y=Math.sin(c)*d,t};p.exports=S}),60706:(p=>{var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI,h=Math.random()*2-1,r=Math.sqrt(1-h*h)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=h*d,t};p.exports=S}),67421:(p=>{var S=function(t,d){return d===void 0&&(d=1),t.x=(Math.random()*2-1)*d,t.y=(Math.random()*2-1)*d,t.z=(Math.random()*2-1)*d,t.w=(Math.random()*2-1)*d,t};p.exports=S}),36305:(p=>{var S=function(t,d){var c=t.x,h=t.y;return t.x=c*Math.cos(d)-h*Math.sin(d),t.y=c*Math.sin(d)+h*Math.cos(d),t};p.exports=S}),11520:(p=>{var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x-d,s=t.y-c;return t.x=e*r-s*n+d,t.y=e*n+s*r+c,t};p.exports=S}),1163:(p=>{var S=function(t,d,c,h,r){var n=h+Math.atan2(t.y-c,t.x-d);return t.x=d+r*Math.cos(n),t.y=c+r*Math.sin(n),t};p.exports=S}),70336:(p=>{var S=function(t,d,c,h,r){return t.x=d+r*Math.cos(h),t.y=c+r*Math.sin(h),t};p.exports=S}),72678:((p,S,t)=>{var d=t(25836),c=t(37867),h=t(15746),r=new c,n=new h,e=new d,s=function(o,i,a){return n.setAxisAngle(i,a),r.fromRotationTranslation(n,e.set(0,0,0)),o.transformMat4(r)};p.exports=s}),2284:(p=>{var S=function(t){return t>0?Math.ceil(t):Math.floor(t)};p.exports=S}),41013:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.round(t*h)/h};p.exports=S}),16922:(p=>{var S=function(t,d,c,h){d===void 0&&(d=1),c===void 0&&(c=1),h===void 0&&(h=1),h*=Math.PI/t;for(var r=[],n=[],e=0;e{var S=function(t,d,c){return t<=d?0:t>=c?1:(t=(t-d)/(c-d),t*t*(3-2*t))};p.exports=S}),54261:(p=>{var S=function(t,d,c){return t=Math.max(0,Math.min(1,(t-d)/(c-d))),t*t*t*(t*(t*6-15)+10)};p.exports=S}),44408:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e){e===void 0&&(e=new d);var s=0,o=0,i=r*n;return h>0&&h<=i&&(h>r-1?(o=Math.floor(h/r),s=h-o*r):s=h),e.set(s,o)};p.exports=c}),85955:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o,i,a){a===void 0&&(a=new d);var l=Math.sin(s),f=Math.cos(s),u=f*o,v=l*o,m=-l*i,x=f*i,g=1/(u*x+m*-v);return a.x=x*g*h+-m*g*r+(e*m-n*x)*g,a.y=u*g*r+-v*g*h+(-e*u+n*v)*g,a};p.exports=c}),26099:((p,S,t)=>{var d=t(83419),c=t(43855),h=new d({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 h(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,s=this.y;return this.x=e+n*(r.x-e),this.y=s+n*(r.y-s),this},transformMat3:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[3]*e+s[6],this.y=s[1]*n+s[4]*e+s[7],this},transformMat4:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[4]*e+s[12],this.y=s[1]*n+s[5]*e+s[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)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),p.exports=h}),25836:((p,S,t)=>{var d=t(83419),c=new d({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(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(h,r){return this.x=h.x+r.x,this.y=h.y+r.y,this.z=h.z+r.z,this},subVectors:function(h,r){return this.x=h.x-r.x,this.y=h.y-r.y,this.z=h.z-r.z,this},crossVectors:function(h,r){var n=h.x,e=h.y,s=h.z,o=r.x,i=r.y,a=r.z;return this.x=e*a-s*i,this.y=s*o-n*a,this.z=n*i-e*o,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,r,n){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,r){return this.fromArray(h.val,r*4)},fromArray:function(h,r){return r===void 0&&(r=0),this.x=h[r],this.y=h[r+1],this.z=h[r+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,r){return this.x+=h.x*r,this.y+=h.y*r,this.z+=h.z*r||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return r*r+n*n+e*e},length:function(){var h=this.x,r=this.y,n=this.z;return Math.sqrt(h*h+r*r+n*n)},lengthSq:function(){var h=this.x,r=this.y,n=this.z;return h*h+r*r+n*n},normalize:function(){var h=this.x,r=this.y,n=this.z,e=h*h+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=h*e,this.y=r*e,this.z=n*e),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z;return this.x=n*i-e*o,this.y=e*s-r*i,this.z=r*o-n*s,this},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this},applyMatrix3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[3]*n+s[6]*e,this.y=s[1]*r+s[4]*n+s[7]*e,this.z=s[2]*r+s[5]*n+s[8]*e,this},applyMatrix4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=1/(s[3]*r+s[7]*n+s[11]*e+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*e+s[12])*o,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*o,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*o,this},transformMat3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=r*s[0]+n*s[3]+e*s[6],this.y=r*s[1]+n*s[4]+e*s[7],this.z=r*s[2]+n*s[5]+e*s[8],this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[4]*n+s[8]*e+s[12],this.y=s[1]*r+s[5]*n+s[9]*e+s[13],this.z=s[2]*r+s[6]*n+s[10]*e+s[14],this},transformCoordinates:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=r*s[0]+n*s[4]+e*s[8]+s[12],i=r*s[1]+n*s[5]+e*s[9]+s[13],a=r*s[2]+n*s[6]+e*s[10]+s[14],l=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=o/l,this.y=i/l,this.z=a/l,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,f=a*n+i*r-s*e,u=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+f*-i-u*-o,this.y=f*a+v*-o+u*-s-l*-i,this.z=u*a+v*-i+l*-o-f*-s,this},project:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,o=s[0],i=s[1],a=s[2],l=s[3],f=s[4],u=s[5],v=s[6],m=s[7],x=s[8],g=s[9],y=s[10],T=s[11],C=s[12],E=s[13],M=s[14],P=s[15],A=1/(r*l+n*m+e*T+P);return this.x=(r*o+n*f+e*x+C)*A,this.y=(r*i+n*u+e*g+E)*A,this.z=(r*a+n*v+e*y+M)*A,this},projectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unprojectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unproject:function(h,r){var n=h.x,e=h.y,s=h.z,o=h.w,i=this.x-n,a=o-this.y-1-e,l=this.z;return this.x=2*i/s-1,this.y=2*a/o-1,this.z=2*l-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),p.exports=c}),61369:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){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=s||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this.w=h.w||0,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z&&this.w===h.w},set:function(h,r,n,e){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this.w+=h.w||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this.w-=h.w||0,this},scale:function(h){return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},length:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(h*h+r*r+n*n+e*e)},lengthSq:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return h*h+r*r+n*n+e*e},normalize:function(){var h=this.x,r=this.y,n=this.z,e=this.w,s=h*h+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=h*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z+this.w*h.w},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,o=this.w;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this.w=o+r*(h.w-o),this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this.w*=h.w||1,this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this.w/=h.w||1,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return r*r+n*n+e*e+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=this.w,o=h.val;return this.x=o[0]*r+o[4]*n+o[8]*e+o[12]*s,this.y=o[1]*r+o[5]*n+o[9]*e+o[13]*s,this.z=o[2]*r+o[6]*n+o[10]*e+o[14]*s,this.w=o[3]*r+o[7]*n+o[11]*e+o[15]*s,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,o=h.y,i=h.z,a=h.w,l=a*r+o*e-i*n,f=a*n+i*r-s*e,u=a*e+s*n-o*r,v=-s*r-o*n-i*e;return this.x=l*a+v*-s+f*-i-u*-o,this.y=f*a+v*-o+u*-s-l*-i,this.z=u*a+v*-i+l*-o-f*-s,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,p.exports=c}),60417:(p=>{var S=function(t,d,c){return Math.abs(t-d)<=c};p.exports=S}),15994:(p=>{var S=function(t,d,c){var h=c-d;return d+((t-d)%h+h)%h};p.exports=S}),31040:(p=>{var S=function(t,d,c,h){return Math.atan2(h-d,c-t)};p.exports=S}),55495:(p=>{var S=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)};p.exports=S}),128:(p=>{var S=function(t,d){return Math.atan2(d.x-t.x,d.y-t.y)};p.exports=S}),41273:(p=>{var S=function(t,d,c,h){return Math.atan2(c-t,h-d)};p.exports=S}),1432:((p,S,t)=>{var d=t(36383),c=function(h){return h>Math.PI&&(h-=d.PI2),Math.abs(((h+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c}),49127:((p,S,t)=>{var d=t(12407),c=function(h,r){return d(r-h)};p.exports=c}),52285:((p,S,t)=>{var d=t(12407),c=2*Math.PI,h=function(r,n){var e=d(n-r);return e>0&&(e-=c),e};p.exports=h}),67317:((p,S,t)=>{var d=t(86554),c=function(h,r){return d(r-h)};p.exports=c}),12407:(p=>{var S=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};p.exports=S}),53993:((p,S,t)=>{var d=t(99472),c=function(){return d(-Math.PI,Math.PI)};p.exports=c}),86564:((p,S,t)=>{var d=t(99472),c=function(){return d(-180,180)};p.exports=c}),90154:((p,S,t)=>{var d=t(12407),c=function(h){return d(h+Math.PI)};p.exports=c}),48736:((p,S,t)=>{var d=t(36383),c=function(h,r,n){return n===void 0&&(n=.05),h===r||(Math.abs(r-h)<=n||Math.abs(r-h)>=d.PI2-n?h=r:(Math.abs(r-h)>Math.PI&&(rh?h+=n:r{var S=function(t,d){var c=d-t;if(c===0)return 0;var h=Math.floor((c- -180)/360);return c-h*360};p.exports=S}),86554:((p,S,t)=>{var d=t(15994),c=function(h){return d(h,-Math.PI,Math.PI)};p.exports=c}),30954:((p,S,t)=>{var d=t(15994),c=function(h){return d(h,-180,180)};p.exports=c}),25588:((p,S,t)=>{p.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),GetClockwiseDistance:t(49127),GetCounterClockwiseDistance:t(52285),GetShortestDistance:t(67317),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:(p=>{var S={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};p.exports=S}),20339:(p=>{var S=function(t,d,c,h){var r=t-c,n=d-h;return Math.sqrt(r*r+n*n)};p.exports=S}),52816:(p=>{var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return Math.sqrt(c*c+h*h)};p.exports=S}),64559:(p=>{var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return c*c+h*h};p.exports=S}),82340:(p=>{var S=function(t,d,c,h){return Math.max(Math.abs(t-c),Math.abs(d-h))};p.exports=S}),14390:(p=>{var S=function(t,d,c,h,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(h-d,r))};p.exports=S}),2243:(p=>{var S=function(t,d,c,h){return Math.abs(t-c)+Math.abs(d-h)};p.exports=S}),89774:(p=>{var S=function(t,d,c,h){var r=t-c,n=d-h;return r*r+n*n};p.exports=S}),50994:((p,S,t)=>{p.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}}),62640:((p,S,t)=>{var d=t(54178),c=t(41521),h=t(79980),r=t(85433),n=t(99140),e=t(48857),s=t(81596),o=t(59133),i=t(98516),a=t(35248),l=t(82500),f=t(49752);p.exports={Power0:s,Power1:o.Out,Power2:r.Out,Power3:i.Out,Power4:a.Out,Linear:s,Quad:o.Out,Cubic:r.Out,Quart:i.Out,Quint:a.Out,Sine:l.Out,Expo:e.Out,Circ:h.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:f,"Quad.easeIn":o.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":a.In,"Sine.easeIn":l.In,"Expo.easeIn":e.In,"Circ.easeIn":h.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":o.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":a.Out,"Sine.easeOut":l.Out,"Expo.easeOut":e.Out,"Circ.easeOut":h.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":o.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":a.InOut,"Sine.easeInOut":l.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":h.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}}),1639:(p=>{var S=function(t,d){return d===void 0&&(d=1.70158),t*t*((d+1)*t-d)};p.exports=S}),50099:(p=>{var S=function(t,d){d===void 0&&(d=1.70158);var c=d*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};p.exports=S}),41286:(p=>{var S=function(t,d){return d===void 0&&(d=1.70158),--t*t*((d+1)*t+d)+1};p.exports=S}),54178:((p,S,t)=>{p.exports={In:t(1639),Out:t(41286),InOut:t(50099)}}),59590:(p=>{var S=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)};p.exports=S}),41788:(p=>{var S=function(t){var d=!1;return t<.5?(t=1-t*2,d=!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,d?(1-t)*.5:t*.5+.5};p.exports=S}),69905:(p=>{var S=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};p.exports=S}),41521:((p,S,t)=>{p.exports={In:t(59590),Out:t(69905),InOut:t(41788)}}),91861:(p=>{var S=function(t){return 1-Math.sqrt(1-t*t)};p.exports=S}),4177:(p=>{var S=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};p.exports=S}),57512:(p=>{var S=function(t){return Math.sqrt(1- --t*t)};p.exports=S}),79980:((p,S,t)=>{p.exports={In:t(91861),Out:t(57512),InOut:t(4177)}}),51150:(p=>{var S=function(t){return t*t*t};p.exports=S}),82820:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};p.exports=S}),35033:(p=>{var S=function(t){return--t*t*t+1};p.exports=S}),85433:((p,S,t)=>{p.exports={In:t(51150),Out:t(35033),InOut:t(82820)}}),69965:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c))};p.exports=S}),50665:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)*.5+1};p.exports=S}),7744:(p=>{var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-h)*(2*Math.PI)/c)+1};p.exports=S}),99140:((p,S,t)=>{p.exports={In:t(69965),Out:t(7744),InOut:t(50665)}}),24590:(p=>{var S=function(t){return Math.pow(2,10*(t-1))-.001};p.exports=S}),87844:(p=>{var S=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};p.exports=S}),89433:(p=>{var S=function(t){return 1-Math.pow(2,-10*t)};p.exports=S}),48857:((p,S,t)=>{p.exports={In:t(24590),Out:t(89433),InOut:t(87844)}}),48820:((p,S,t)=>{p.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:(p=>{var S=function(t){return t};p.exports=S}),81596:((p,S,t)=>{p.exports=t(7147)}),34826:(p=>{var S=function(t){return t*t};p.exports=S}),20544:(p=>{var S=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};p.exports=S}),92029:(p=>{var S=function(t){return t*(2-t)};p.exports=S}),59133:((p,S,t)=>{p.exports={In:t(34826),Out:t(92029),InOut:t(20544)}}),64413:(p=>{var S=function(t){return t*t*t*t};p.exports=S}),78137:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};p.exports=S}),45840:(p=>{var S=function(t){return 1- --t*t*t*t};p.exports=S}),98516:((p,S,t)=>{p.exports={In:t(64413),Out:t(45840),InOut:t(78137)}}),87745:(p=>{var S=function(t){return t*t*t*t*t};p.exports=S}),16509:(p=>{var S=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};p.exports=S}),17868:(p=>{var S=function(t){return--t*t*t*t*t+1};p.exports=S}),35248:((p,S,t)=>{p.exports={In:t(87745),Out:t(17868),InOut:t(16509)}}),80461:(p=>{var S=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};p.exports=S}),34025:(p=>{var S=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};p.exports=S}),52768:(p=>{var S=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};p.exports=S}),82500:((p,S,t)=>{p.exports={In:t(80461),Out:t(52768),InOut:t(34025)}}),72251:(p=>{var S=function(t,d){return d===void 0&&(d=1),t<=0?0:t>=1?1:((d*t|0)+1)*(1/d)};p.exports=S}),49752:((p,S,t)=>{p.exports=t(72251)}),75698:(p=>{var S=function(t,d){return d===void 0&&(d=1e-4),Math.ceil(t-d)};p.exports=S}),43855:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),Math.abs(t-d){var S=function(t,d){return d===void 0&&(d=1e-4),Math.floor(t+d)};p.exports=S}),5470:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),t>d-c};p.exports=S}),94977:(p=>{var S=function(t,d,c){return c===void 0&&(c=1e-4),t{p.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}}),75508:((p,S,t)=>{var d=t(36383),c=t(79291),h={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};h=c(!1,h,d),p.exports=h}),89318:((p,S,t)=>{var d=t(85710),c=function(h,r){for(var n=0,e=h.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*h[s]*d(e,s);return n};p.exports=c}),77259:((p,S,t)=>{var d=t(87842),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return h[0]===h[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,h[(s-1+n)%n],h[s],h[(s+1)%n],h[(s+2)%n])):r<0?h[0]-(d(-e,h[0],h[0],h[1],h[1])-h[0]):r>1?h[n]-(d(e-n,h[n],h[n],h[n-1],h[n-1])-h[n]):d(e-s,h[s?s-1:0],h[s],h[n{function S(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 d(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var h=function(r,n,e,s,o){return S(r,n)+t(r,e)+d(r,s)+c(r,o)};p.exports=h}),28392:((p,S,t)=>{var d=t(28915),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return r<0?d(h[0],h[1],e):r>1?d(h[n],h[n-1],n-e):d(h[s],h[s+1>n?n:s+1],e-s)};p.exports=c}),32112:(p=>{function S(h,r){var n=1-h;return n*n*r}function t(h,r){return 2*(1-h)*h*r}function d(h,r){return h*h*r}var c=function(h,r,n,e){return S(h,r)+t(h,n)+d(h,e)};p.exports=c}),47235:((p,S,t)=>{var d=t(7602),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c}),50178:((p,S,t)=>{var d=t(54261),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c}),38289:((p,S,t)=>{p.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}}),98439:(p=>{var S=function(t){var d=Math.log(t)/.6931471805599453;return 1<{var S=function(t,d){return t>0&&(t&t-1)===0&&d>0&&(d&d-1)===0};p.exports=S}),81230:(p=>{var S=function(t){return t>0&&(t&t-1)===0};p.exports=S}),49001:((p,S,t)=>{p.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}}),28453:((p,S,t)=>{var d=t(83419),c=new d({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 h=2091639*this.s0+this.c*23283064365386963e-26;return this.c=h|0,this.s0=this.s1,this.s1=this.s2,this.s2=h-this.c,this.s2},hash:function(h){var r,n=this.n;h=h.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(h){typeof h=="string"?this.state(h):this.sow(h)},sow:function(h){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!h)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),s=h[e];h[e]=h[n],h[n]=s}return h}});p.exports=c}),63448:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),h?(c+t)/d:c+t)};p.exports=S}),56583:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),h?(c+t)/d:c+t)};p.exports=S}),77720:(p=>{var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),h?(c+t)/d:c+t)};p.exports=S}),73697:((p,S,t)=>{p.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}}),85454:((p,S,t)=>{t(63595);var d=t(8054),c=t(79291),h={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};h.Sound=t(23717),h=c(!1,h,d),p.exports=h,t.g.Phaser=h}),71289:((p,S,t)=>{var d=t(83419),c=t(92209),h=t(88571),r=new d({Extends:h,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,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r}),86689:((p,S,t)=>{var d=t(83419),c=t(39506),h=t(20339),r=t(89774),n=t(66022),e=t(95540),s=t(46975),o=t(72441),i=t(47956),a=t(37277),l=t(44594),f=t(26099),u=t(82248),v=new d({initialize:function(x){this.scene=x,this.systems=x.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,x.sys.events.once(l.BOOT,this.boot,this),x.sys.events.on(l.START,this.start,this)},boot:function(){this.world=new u(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new u(this.scene,this.config),this.add=new n(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(l.UPDATE,this.world.update,this.world),m.on(l.POST_UPDATE,this.world.postUpdate,this.world),m.once(l.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(l.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(l.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,x=this.systems.settings.physics,g=s(e(x,"arcade",{}),e(m,"arcade",{}));return g},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!0)},collide:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!1)},collideTiles:function(m,x,g,y,T){return this.world.collideTiles(m,x,g,y,T)},overlapTiles:function(m,x,g,y,T){return this.world.overlapTiles(m,x,g,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,x,g,y,T,C){y===void 0&&(y=60);var E=Math.atan2(g-m.y,x-m.x);return m.body.acceleration.setToPolar(E,y),T!==void 0&&C!==void 0&&m.body.maxVelocity.set(T,C),E},accelerateToObject:function(m,x,g,y,T){return this.accelerateTo(m,x.x,x.y,g,y,T)},closest:function(m,x){x||(x=this.world.bodies.entries);for(var g=Number.MAX_VALUE,y=null,T=m.x,C=m.y,E=x.length,M=0;Mg&&(y=P,g=R)}}return y},moveTo:function(m,x,g,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var C=Math.atan2(g-m.y,x-m.x);return T>0&&(y=h(m.x,m.y,x,g)/(T/1e3)),m.body.velocity.setToPolar(C,y),C},moveToObject:function(m,x,g,y){return this.moveTo(m,x.x,x.y,g,y)},velocityFromAngle:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(c(m),x)},velocityFromRotation:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(m,x)},overlapRect:function(m,x,g,y,T,C){return i(this.world,m,x,g,y,T,C)},overlapCirc:function(m,x,g,y,T){return o(this.world,m,x,g,y,T)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(l.UPDATE,this.world.update,this.world),m.off(l.POST_UPDATE,this.world.postUpdate,this.world),m.off(l.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(l.START,this.start,this),this.scene=null,this.systems=null}});a.register("ArcadePhysics",v,"arcadePhysics"),p.exports=v}),13759:((p,S,t)=>{var d=t(83419),c=t(92209),h=t(68287),r=new d({Extends:h,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,s,o,i,a){h.call(this,e,s,o,i,a),this.body=null}});p.exports=r}),37742:((p,S,t)=>{var d=t(83419),c=t(78389),h=t(37747),r=t(63012),n=t(43396),e=t(87841),s=t(37303),o=t(95829),i=t(26099),a=new d({Mixins:[c],initialize:function(f,u){var v=64,m=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=u!==void 0;g&&u.displayWidth&&(v=u.displayWidth,m=u.displayHeight),g||(u=x),this.world=f,this.gameObject=g?u:void 0,this.isBody=!0,this.transform={x:u.x,y:u.y,rotation:u.angle,scaleX:u.scaleX,scaleY:u.scaleY,displayOriginX:u.displayOriginX,displayOriginY:u.displayOriginY},this.debugShowBody=f.defaults.debugShowBody,this.debugShowVelocity=f.defaults.debugShowVelocity,this.debugBodyColor=f.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(u.x-u.scaleX*u.displayOriginX,u.y-u.scaleY*u.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=u.angle,this.preRotation=u.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,u.frame&&(this.sourceWidth=u.frame.realWidth,this.sourceHeight=u.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=f.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=o(!1),this.touching=o(!0),this.wasTouching=o(!0),this.blocked=o(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=u.scaleX,this._sy=u.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 l=this.gameObject,f=this.transform;if(l.parentContainer){var u=l.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);f.x=u.tx,f.y=u.ty,f.rotation=n(u.rotation),f.scaleX=u.scaleX,f.scaleY=u.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY}else f.x=l.x,f.y=l.y,f.rotation=l.angle,f.scaleX=l.scaleX,f.scaleY=l.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY;var v=!1;if(this.syncBounds){var m=l.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var x=Math.abs(f.scaleX),g=Math.abs(f.scaleY);(this._sx!==x||this._sy!==g)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*g,this._sx=x,this._sy=g,v=!0)}v&&(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 l=this.transform;this.position.x=l.x+l.scaleX*(this.offset.x-l.displayOriginX),this.position.y=l.y+l.scaleY*(this.offset.y-l.displayOriginY),this.updateCenter()},resetFlags:function(l){l===void 0&&(l=!1);var f=this.wasTouching,u=this.touching,v=this.blocked;l?o(!0,f):(f.none=u.none,f.up=u.up,f.down=u.down,f.left=u.left,f.right=u.right),o(!0,u),o(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(l,f){if(l&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var u=this.position;this.prev.x=u.x,this.prev.y=u.y,this.prevFrame.x=u.x,this.prevFrame.y=u.y}l&&this.update(f)},update:function(l){var f=this.prev,u=this.position,v=this.velocity;if(f.set(u.x,u.y),!this.moves){this._dx=u.x-f.x,this._dy=u.y-f.y;return}if(this.directControl){var m=this.autoFrame;v.set((u.x-m.x)/l,(u.y-m.y)/l),this.world.updateMotion(this,l),this._dx=u.x-m.x,this._dy=u.y-m.y}else this.world.updateMotion(this,l),this.newVelocity.set(v.x*l,v.y*l),u.add(this.newVelocity),this._dx=u.x-f.x,this._dy=u.y-f.y;var x=v.x,g=v.y;if(this.updateCenter(),this.angle=Math.atan2(g,x),this.speed=Math.sqrt(x*x+g*g),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var y=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,y.up,y.down,y.left,y.right)}},postUpdate:function(){var l=this.position,f=l.x-this.prevFrame.x,u=l.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,x=this.deltaMax.y;m!==0&&f!==0&&(f<0&&f<-m?f=-m:f>0&&f>m&&(f=m)),x!==0&&u!==0&&(u<0&&u<-x?u=-x:u>0&&u>x&&(u=x)),v&&(v.x+=f,v.y+=u)}f<0?this.facing=h.FACING_LEFT:f>0&&(this.facing=h.FACING_RIGHT),u<0?this.facing=h.FACING_UP:u>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=f,this._ty=u,this.autoFrame.set(l.x,l.y)},setBoundsRectangle:function(l){return this.customBoundsRectangle=l||this.world.bounds,this},checkWorldBounds:function(){var l=this.position,f=this.velocity,u=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,g=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return l.xv.right&&m.right&&(l.x=v.right-this.width,f.x*=x,u.right=!0,y=!0),l.yv.bottom&&m.down&&(l.y=v.bottom-this.height,f.y*=g,u.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(l,f){return f===void 0&&(f=l),this.offset.set(l,f),this},setGameObject:function(l,f){if(f===void 0&&(f=!0),!l||!l.hasTransformComponent)return this;var u=this.world;return this.gameObject&&this.gameObject.body&&(u.disable(this.gameObject),this.gameObject.body=null),l.body&&u.disable(l),this.gameObject=l,l.body=this,this.setSize(),this.enable=f,this},setSize:function(l,f,u){u===void 0&&(u=!0);var v=this.gameObject;if(v&&(!l&&v.frame&&(l=v.frame.realWidth),!f&&v.frame&&(f=v.frame.realHeight)),this.sourceWidth=l,this.sourceHeight=f,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(),u&&v&&v.getCenter){var m=(v.width-l)/2,x=(v.height-f)/2;this.offset.set(m,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(l,f,u){return f===void 0&&(f=this.offset.x),u===void 0&&(u=this.offset.y),l>0?(this.isCircle=!0,this.radius=l,this.sourceWidth=l*2,this.sourceHeight=l*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(f,u),this.updateCenter()):this.isCircle=!1,this},reset:function(l,f){this.stop();var u=this.gameObject;u&&(u.setPosition(l,f),this.rotation=u.angle,this.preRotation=u.angle);var v=this.position;u&&u.getTopLeft?u.getTopLeft(v):v.set(l,f),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),u&&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(l){return l.x=this.x,l.y=this.y,l.right=this.right,l.bottom=this.bottom,l},hitTest:function(l,f){if(!this.isCircle)return s(this,l,f);if(this.radius>0&&l>=this.left&&l<=this.right&&f>=this.top&&f<=this.bottom){var u=(this.center.x-l)*(this.center.x-l),v=(this.center.y-f)*(this.center.y-f);return u+v<=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(l){var f=this.position,u=f.x+this.halfWidth,v=f.y+this.halfHeight;this.debugShowBody&&(l.lineStyle(l.defaultStrokeWidth,this.debugBodyColor),this.isCircle?l.strokeCircle(u,v,this.width/2):(this.checkCollision.up&&l.lineBetween(f.x,f.y,f.x+this.width,f.y),this.checkCollision.right&&l.lineBetween(f.x+this.width,f.y,f.x+this.width,f.y+this.height),this.checkCollision.down&&l.lineBetween(f.x,f.y+this.height,f.x+this.width,f.y+this.height),this.checkCollision.left&&l.lineBetween(f.x,f.y,f.x,f.y+this.height))),this.debugShowVelocity&&(l.lineStyle(l.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),l.lineBetween(u,v,u+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(l){return l===void 0&&(l=!0),this.directControl=l,this},setCollideWorldBounds:function(l,f,u,v){l===void 0&&(l=!0),this.collideWorldBounds=l;var m=f!==void 0,x=u!==void 0;return(m||x)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=f),x&&(this.worldBounce.y=u)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(l,f){return this.velocity.set(l,f),l=this.velocity.x,f=this.velocity.y,this.speed=Math.sqrt(l*l+f*f),this},setVelocityX:function(l){return this.setVelocity(l,this.velocity.y)},setVelocityY:function(l){return this.setVelocity(this.velocity.x,l)},setMaxVelocity:function(l,f){return this.maxVelocity.set(l,f),this},setMaxVelocityX:function(l){return this.maxVelocity.x=l,this},setMaxVelocityY:function(l){return this.maxVelocity.y=l,this},setMaxSpeed:function(l){return this.maxSpeed=l,this},setSlideFactor:function(l,f){return this.slideFactor.set(l,f),this},setBounce:function(l,f){return this.bounce.set(l,f),this},setBounceX:function(l){return this.bounce.x=l,this},setBounceY:function(l){return this.bounce.y=l,this},setAcceleration:function(l,f){return this.acceleration.set(l,f),this},setAccelerationX:function(l){return this.acceleration.x=l,this},setAccelerationY:function(l){return this.acceleration.y=l,this},setAllowDrag:function(l){return l===void 0&&(l=!0),this.allowDrag=l,this},setAllowGravity:function(l){return l===void 0&&(l=!0),this.allowGravity=l,this},setAllowRotation:function(l){return l===void 0&&(l=!0),this.allowRotation=l,this},setDrag:function(l,f){return this.drag.set(l,f),this},setDamping:function(l){return this.useDamping=l,this},setDragX:function(l){return this.drag.x=l,this},setDragY:function(l){return this.drag.y=l,this},setGravity:function(l,f){return this.gravity.set(l,f),this},setGravityX:function(l){return this.gravity.x=l,this},setGravityY:function(l){return this.gravity.y=l,this},setFriction:function(l,f){return this.friction.set(l,f),this},setFrictionX:function(l){return this.friction.x=l,this},setFrictionY:function(l){return this.friction.y=l,this},setAngularVelocity:function(l){return this.angularVelocity=l,this},setAngularAcceleration:function(l){return this.angularAcceleration=l,this},setAngularDrag:function(l){return this.angularDrag=l,this},setMass:function(l){return this.mass=l,this},setImmovable:function(l){return l===void 0&&(l=!0),this.immovable=l,this},setEnable:function(l){return l===void 0&&(l=!0),this.enable=l,this},processX:function(l,f,u,v){this.x+=l,this.updateCenter(),f!==null&&(this.velocity.x=f*this.slideFactor.x);var m=this.blocked;u&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(l,f,u,v){this.y+=l,this.updateCenter(),f!==null&&(this.velocity.y=f*this.slideFactor.y);var m=this.blocked;u&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(l){this.position.x=l}},y:{get:function(){return this.position.y},set:function(l){this.position.y=l}},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}}});p.exports=a}),79342:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=o,this.processCallback=i,this.callbackContext=a},setName:function(h){return this.name=h,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});p.exports=c}),66022:((p,S,t)=>{var d=t(71289),c=t(13759),h=t(37742),r=t(83419),n=t(37747),e=t(60758),s=t(72624),o=t(71464),i=new r({initialize:function(l){this.world=l,this.scene=l.scene,this.sys=l.scene.sys},collider:function(a,l,f,u,v){return this.world.addCollider(a,l,f,u,v)},overlap:function(a,l,f,u,v){return this.world.addOverlap(a,l,f,u,v)},existing:function(a,l){var f=l?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(a,f),a},staticImage:function(a,l,f,u){var v=new d(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(a,l,f,u){var v=new d(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(a,l,f,u){var v=new c(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(a,l,f,u){var v=new c(this.scene,a,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(a,l){return this.sys.updateList.add(new o(this.world,this.world.scene,a,l))},group:function(a,l){return this.sys.updateList.add(new e(this.world,this.world.scene,a,l))},body:function(a,l,f,u){var v=new h(this.world);return v.position.set(a,l),f&&u&&v.setSize(f,u),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(a,l,f,u){var v=new s(this.world);return v.position.set(a,l),f&&u&&v.setSize(f,u),this.world.add(v,n.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i}),79599:(p=>{var S=function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsX()+r.deltaAbsX()+e;return h._dx===0&&r._dx===0?(h.embedded=!0,r.embedded=!0):h._dx>r._dx?(s=h.right-r.x,s>o&&!n||h.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(h.touching.none=!1,h.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):h._dxo&&!n||h.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(h.touching.none=!1,h.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),h.overlapX=s,r.overlapX=s,s};p.exports=c}),45170:((p,S,t)=>{var d=t(37747),c=function(h,r,n,e){var s=0,o=h.deltaAbsY()+r.deltaAbsY()+e;return h._dy===0&&r._dy===0?(h.embedded=!0,r.embedded=!0):h._dy>r._dy?(s=h.bottom-r.y,s>o&&!n||h.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(h.touching.none=!1,h.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):h._dyo&&!n||h.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(h.touching.none=!1,h.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),h.overlapY=s,r.overlapY=s,s};p.exports=c}),60758:((p,S,t)=>{var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,f,u){if(!f&&!u)u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(f))u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(f)&&s(f[0])){var v=this;f.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=n(m,"classType",d)}),u=null}else u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=a,u&&(u.classType=n(u,"classType",d)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:n(u,"collideWorldBounds",!1),setBoundsRectangle:n(u,"customBoundsRectangle",null),setAccelerationX:n(u,"accelerationX",0),setAccelerationY:n(u,"accelerationY",0),setAllowDrag:n(u,"allowDrag",!0),setAllowGravity:n(u,"allowGravity",!0),setAllowRotation:n(u,"allowRotation",!0),setDamping:n(u,"useDamping",!1),setBounceX:n(u,"bounceX",0),setBounceY:n(u,"bounceY",0),setDragX:n(u,"dragX",0),setDragY:n(u,"dragY",0),setEnable:n(u,"enable",!0),setGravityX:n(u,"gravityX",0),setGravityY:n(u,"gravityY",0),setFrictionX:n(u,"frictionX",0),setFrictionY:n(u,"frictionY",0),setMaxSpeed:n(u,"maxSpeed",-1),setMaxVelocityX:n(u,"maxVelocityX",1e4),setMaxVelocityY:n(u,"maxVelocityY",1e4),setVelocityX:n(u,"velocityX",0),setVelocityY:n(u,"velocityY",0),setAngularVelocity:n(u,"angularVelocity",0),setAngularAcceleration:n(u,"angularAcceleration",0),setAngularDrag:n(u,"angularDrag",0),setMass:n(u,"mass",1),setImmovable:n(u,"immovable",!1)},e.call(this,l,f,u),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var a=i.body;for(var l in this.defaults)a[l](this.defaults[l])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,a,l){l===void 0&&(l=0);for(var f=this.getChildren(),u=0;u{var S,t,d,c,h,r,n,e,s,o,i,a,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var R=S.velocity.x,F=t.velocity.x;return d=S.pushable,s=S._dx<0,o=S._dx>0,i=S._dx===0,u=Math.abs(S.right-t.x)<=Math.abs(t.right-S.x),n=F-R*S.bounce.x,c=t.pushable,a=t._dx<0,l=t._dx>0,f=t._dx===0,v=!u,e=R-F*t.bounce.x,m=Math.abs(A),g()},g=function(){return o&&u&&t.blocked.right?(S.processX(-m,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(m,n,!0),1):l&&v&&S.blocked.right?(t.processX(-m,e,!1,!0),2):a&&u&&S.blocked.left?(t.processX(m,e,!0),2):0},y=function(){var M=S.velocity.x,P=t.velocity.x,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.x,r=F+R*t.bounce.x,s&&v?T(0):a&&u?T(1):o&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processX(m,h),t.processX(-m,r)):(S.processX(-m,h),t.processX(m,r));else if(d&&!c)M===0||M===3?S.processX(m,n,!0):S.processX(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var P=m*.5;M===0?f?(S.processX(m,0,!0),t.processX(0,null,!1,!0)):l?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):M===1?i?(S.processX(0,null,!1,!0),t.processX(m,0,!0)):o?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):M===2?f?(S.processX(-m,0,!1,!0),t.processX(0,null,!0)):a?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,t.velocity.x,!1,!0),t.processX(P,null,!0)):M===3&&(i?(S.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.y,!0),t.processX(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.x=0:u?t.processX(m,e,!0):t.processX(-m,e,!1,!0),S.moves){var P=S.directControl?S.y-S.autoFrame.y:S.y-S.prev.y;t.y+=P*S.friction.y,t._dy=t.y-t.prev.y}},E=function(M){if(M===2?S.velocity.x=0:v?S.processX(m,n,!0):S.processX(-m,n,!1,!0),t.moves){var P=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;S.y+=P*t.friction.y,S._dy=S.y-S.prev.y}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}}),47962:(p=>{var S,t,d,c,h,r,n,e,s,o,i,a,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var R=S.velocity.y,F=t.velocity.y;return d=S.pushable,s=S._dy<0,o=S._dy>0,i=S._dy===0,u=Math.abs(S.bottom-t.y)<=Math.abs(t.bottom-S.y),n=F-R*S.bounce.y,c=t.pushable,a=t._dy<0,l=t._dy>0,f=t._dy===0,v=!u,e=R-F*t.bounce.y,m=Math.abs(A),g()},g=function(){return o&&u&&t.blocked.down?(S.processY(-m,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(m,n,!0),1):l&&v&&S.blocked.down?(t.processY(-m,e,!1,!0),2):a&&u&&S.blocked.up?(t.processY(m,e,!0),2):0},y=function(){var M=S.velocity.y,P=t.velocity.y,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),R=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),F=(A+R)*.5;return A-=F,R-=F,h=F+A*S.bounce.y,r=F+R*t.bounce.y,s&&v?T(0):a&&u?T(1):o&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processY(m,h),t.processY(-m,r)):(S.processY(-m,h),t.processY(m,r));else if(d&&!c)M===0||M===3?S.processY(m,n,!0):S.processY(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var P=m*.5;M===0?f?(S.processY(m,0,!0),t.processY(0,null,!1,!0)):l?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):M===1?i?(S.processY(0,null,!1,!0),t.processY(m,0,!0)):o?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):M===2?f?(S.processY(-m,0,!1,!0),t.processY(0,null,!0)):a?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,t.velocity.y,!1,!0),t.processY(P,null,!0)):M===3&&(i?(S.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.y=0:u?t.processY(m,e,!0):t.processY(-m,e,!1,!0),S.moves){var P=S.directControl?S.x-S.autoFrame.x:S.x-S.prev.x;t.x+=P*S.friction.x,t._dx=t.x-t.prev.x}},E=function(M){if(M===2?S.velocity.y=0:v?S.processY(m,n,!0):S.processY(-m,n,!1,!0),t.moves){var P=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;S.x+=P*t.friction.x,S._dx=S.x-S.prev.x}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}}),14087:((p,S,t)=>{var d=t(64897),c=t(3017),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateX||n.customSeparateX)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h}),89936:((p,S,t)=>{var d=t(45170),c=t(47962),h=function(r,n,e,s,o){o===void 0&&(o=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||o===0||i&&a||r.customSeparateY||n.customSeparateY)return o!==0||r.embedded&&n.embedded;var l=c.Set(r,n,o);return!i&&!a?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):a&&c.RunImmovableBody2(l),!0)};p.exports=h}),95829:(p=>{var S=function(t,d){return d===void 0&&(d={}),d.none=t,d.up=!1,d.down=!1,d.left=!1,d.right=!1,t||(d.up=!0,d.down=!0,d.left=!0,d.right=!0),d};p.exports=S}),72624:((p,S,t)=>{var d=t(87902),c=t(83419),h=t(78389),r=t(37747),n=t(37303),e=t(95829),s=t(26099),o=new c({Mixins:[h],initialize:function(a,l){var f=64,u=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=l!==void 0;m&&l.displayWidth&&(f=l.displayWidth,u=l.displayHeight),m||(l=v),this.world=a,this.gameObject=m?l:void 0,this.isBody=!0,this.debugShowBody=a.defaults.debugShowStaticBody,this.debugBodyColor=a.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(l.x-f*l.originX,l.y-u*l.originY),this.width=f,this.height=u,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.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(i,a,l){if(a===void 0&&(a=!0),l===void 0&&(l=!0),!i||!i.hasTransformComponent)return this;var f=this.world;return this.gameObject&&this.gameObject.body&&(f.disable(this.gameObject),this.gameObject.body=null),i.body&&f.disable(i),this.gameObject=i,i.body=this,this.setSize(),a&&this.updateFromGameObject(),this.enable=l,this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(i,a){return a===void 0&&(a=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,a),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,a,l){l===void 0&&(l=!0);var f=this.gameObject;if(f&&f.frame&&(i||(i=f.frame.realWidth),a||(a=f.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=a,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(a/2),l&&f&&f.getCenter){var u=f.displayWidth/2,v=f.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(u-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,a,l){return a===void 0&&(a=this.offset.x),l===void 0&&(l=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(a,l),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,a){var l=this.gameObject;i===void 0&&(i=l.x),a===void 0&&(a=l.y),this.world.staticTree.remove(this),l.setPosition(i,a),l.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,a){return this.isCircle?d(this,i,a):n(this,i,a)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var a=this.position,l=a.x+this.halfWidth,f=a.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(l,f,this.width/2):i.strokeRect(a.x,a.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=o}),71464:((p,S,t)=>{var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),o=new c({Extends:e,Mixins:[h],initialize:function(a,l,f,u){!f&&!u?u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(f)?(u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=n(u,"classType",d)):Array.isArray(f)&&s(f[0])?(u=f,f=null,u.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=n(v,"classType",d)})):u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=a,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,l,f,u),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,a=0;a{var d=t(55495),c=t(37742),h=t(45319),r=t(83419),n=t(79342),e=t(37747),s=t(20339),o=t(52816),i=t(50792),a=t(63012),l=t(43855),f=t(5470),u=t(94977),v=t(64897),m=t(45170),x=t(96523),g=t(35154),y=t(36383),T=t(25774),C=t(96602),E=t(87841),M=t(59542),P=t(40012),A=t(14087),R=t(89936),F=t(35072),w=t(72624),I=t(2483),U=t(61340),N=t(26099),D=t(15994),B=new r({Extends:i,initialize:function(G,O){i.call(this),this.scene=G,this.bodies=new F,this.staticBodies=new F,this.pendingDestroy=new F,this.colliders=new T,this.gravity=new N(g(O,"gravity.x",0),g(O,"gravity.y",0)),this.bounds=new E(g(O,"x",0),g(O,"y",0),g(O,"width",G.sys.scale.width),g(O,"height",G.sys.scale.height)),this.checkCollision={up:g(O,"checkCollision.up",!0),down:g(O,"checkCollision.down",!0),left:g(O,"checkCollision.left",!0),right:g(O,"checkCollision.right",!0)},this.fps=g(O,"fps",60),this.fixedStep=g(O,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(O,"timeScale",1),this.OVERLAP_BIAS=g(O,"overlapBias",4),this.TILE_BIAS=g(O,"tileBias",16),this.forceX=g(O,"forceX",!1),this.isPaused=g(O,"isPaused",!1),this._total=0,this.drawDebug=g(O,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(O,"debugShowBody",!0),debugShowStaticBody:g(O,"debugShowStaticBody",!0),debugShowVelocity:g(O,"debugShowVelocity",!0),bodyDebugColor:g(O,"debugBodyColor",16711935),staticBodyDebugColor:g(O,"debugStaticBodyColor",255),velocityDebugColor:g(O,"debugVelocityColor",65280)},this.maxEntries=g(O,"maxEntries",16),this.useTree=g(O,"useTree",!0),this.tree=new M(this.maxEntries),this.staticTree=new M(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new U,this._tempMatrix2=new U,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(L,G){G===void 0&&(G=e.DYNAMIC_BODY),Array.isArray(L)||(L=[L]);for(var O=0;O=z;for(this.fixedStep||(X=G*.001,W=!0,this._elapsed=0),O=0;O=z;)this._elapsed-=z,this.step(X)}},step:function(L){var G,O,X=this.bodies.entries,z=X.length;for(G=0;G0){var H=this.tree,K=this.staticTree;for(O=W.entries,X=O.length,L=0;L-1&&L.velocity.length()>J&&(L.velocity.normalize().scale(J),b=J),L.speed=b},separate:function(L,G,O,X,z){var V,Y,W=!1,H=!0;if(!L.enable||!G.enable||L.checkCollision.none||G.checkCollision.none||!this.intersects(L,G)||(L.collisionMask&G.collisionCategory)===0||(G.collisionMask&L.collisionCategory)===0||O&&O.call(X,L.gameObject||L,G.gameObject||G)===!1)return W;if(L.isCircle||G.isCircle){var K=this.separateCircle(L,G,z);K.result?(W=!0,H=!1):(V=K.x,Y=K.y,H=!0)}if(H){var b=!1,J=!1,$=this.OVERLAP_BIAS;z?(b=A(L,G,z,$,V),J=R(L,G,z,$,Y)):this.forceX||Math.abs(this.gravity.y+L.gravity.y)j&&(J=s(Z,q,j,Q)-_):q>k&&(Zj&&(J=s(Z,q,j,k)-_)),J*=-1}else J=L.halfWidth+G.halfWidth-o(V,Y);L.overlapR=J,G.overlapR=J;var et=d(V,Y),nt=(J+y.EPSILON)*Math.cos(et),lt=(J+y.EPSILON)*Math.sin(et),it={overlap:J,result:!1,x:nt,y:lt};if(O&&(!$||$&&J!==0))return it.result=!0,it;if(!$&&J===0||W&&H||L.customSeparateX||G.customSeparateX)return it.x=void 0,it.y=void 0,it;var st=!L.pushable&&!G.pushable;if($){var ft=V.x-Y.x,ct=V.y-Y.y,rt=Math.sqrt(Math.pow(ft,2)+Math.pow(ct,2)),dt=(Y.x-V.x)/rt||0,vt=(Y.y-V.y)/rt||0,pt=2*(K.x*dt+K.y*vt-b.x*dt-b.y*vt)/(L.mass+G.mass);(W||H||!L.pushable||!G.pushable)&&(pt*=2),!W&&L.pushable&&(K.x=K.x-pt/L.mass*dt,K.y=K.y-pt/L.mass*vt,K.multiply(L.bounce)),!H&&G.pushable&&(b.x=b.x+pt/G.mass*dt,b.y=b.y+pt/G.mass*vt,b.multiply(G.bounce)),!W&&!H&&(nt*=.5,lt*=.5),(!W||L.pushable||st)&&(L.x-=nt,L.y-=lt,L.updateCenter()),(!H||G.pushable||st)&&(G.x+=nt,G.y+=lt,G.updateCenter()),it.result=!0}else!W&&(L.pushable||st)&&(L.x-=nt,L.y-=lt,L.updateCenter()),!H&&(G.pushable||st)&&(G.x+=nt,G.y+=lt,G.updateCenter()),it.x=void 0,it.y=void 0;return it},intersects:function(L,G){return L===G?!1:!L.isCircle&&!G.isCircle?!(L.right<=G.left||L.bottom<=G.top||L.left>=G.right||L.top>=G.bottom):L.isCircle?G.isCircle?o(L.center,G.center)<=L.halfWidth+G.halfWidth:this.circleBodyIntersects(L,G):this.circleBodyIntersects(G,L)},circleBodyIntersects:function(L,G){var O=h(L.center.x,G.left,G.right),X=h(L.center.y,G.top,G.bottom),z=(L.center.x-O)*(L.center.x-O),V=(L.center.y-X)*(L.center.y-X);return z+V<=L.halfWidth*L.halfWidth},overlap:function(L,G,O,X,z){return O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O),this.collideObjects(L,G,O,X,z,!0)},collide:function(L,G,O,X,z){return O===void 0&&(O=null),X===void 0&&(X=null),z===void 0&&(z=O),this.collideObjects(L,G,O,X,z,!1)},collideObjects:function(L,G,O,X,z,V){var Y,W;L.isParent&&(L.physicsType===void 0||G===void 0||L===G)&&(L=L.children.entries),G&&G.isParent&&G.physicsType===void 0&&(G=G.children.entries);var H=Array.isArray(L),K=Array.isArray(G);if(this._total=0,!H&&!K)this.collideHandler(L,G,O,X,z,V);else if(!H&&K)for(Y=0;Y0},collideHandler:function(L,G,O,X,z,V){if(G===void 0&&L.isParent)return this.collideGroupVsGroup(L,L,O,X,z,V);if(!L||!G)return!1;if(L.body||L.isBody){if(G.body||G.isBody)return this.collideSpriteVsSprite(L,G,O,X,z,V);if(G.isParent)return this.collideSpriteVsGroup(L,G,O,X,z,V);if(G.isTilemap)return this.collideSpriteVsTilemapLayer(L,G,O,X,z,V)}else if(L.isParent){if(G.body||G.isBody)return this.collideSpriteVsGroup(G,L,O,X,z,V);if(G.isParent)return this.collideGroupVsGroup(L,G,O,X,z,V);if(G.isTilemap)return this.collideGroupVsTilemapLayer(L,G,O,X,z,V)}else if(L.isTilemap){if(G.body||G.isBody)return this.collideSpriteVsTilemapLayer(G,L,O,X,z,V);if(G.isParent)return this.collideGroupVsTilemapLayer(G,L,O,X,z,V)}},canCollide:function(L,G){return L&&G&&(L.collisionMask&G.collisionCategory)!==0&&(G.collisionMask&L.collisionCategory)!==0},collideSpriteVsSprite:function(L,G,O,X,z,V){var Y=L.isBody?L:L.body,W=G.isBody?G:G.body;return this.canCollide(Y,W)?(this.separate(Y,W,X,z,V)&&(O&&O.call(z,L,G),this._total++),!0):!1},collideSpriteVsGroup:function(L,G,O,X,z,V){var Y=L.isBody?L:L.body;if(!(G.getLength()===0||!Y||!Y.enable||Y.checkCollision.none||!this.canCollide(Y,G))){var W,H,K;if(this.useTree||G.physicsType===e.STATIC_BODY){var b=this.treeMinMax;b.minX=Y.left,b.minY=Y.top,b.maxX=Y.right,b.maxY=Y.bottom;var J=G.physicsType===e.DYNAMIC_BODY?this.tree.search(b):this.staticTree.search(b);for(H=J.length,W=0;W{var S={setAcceleration:function(t,d){return this.body.acceleration.set(t,d),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};p.exports=S}),59023:(p=>{var S={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}};p.exports=S}),62069:(p=>{var S={setBounce:function(t,d){return this.body.bounce.set(t,d),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,d,c,h){return this.body.setCollideWorldBounds(t,d,c,h),this}};p.exports=S}),78389:((p,S,t)=>{var d=t(79599),c={setCollisionCategory:function(h){var r=this.body?this.body:this;return r.collisionCategory=h,this},willCollideWith:function(h){var r=this.body?this.body:this;return(r.collisionMask&h)!==0},addCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|h,this},removeCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~h,this},setCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=d(h),this},resetCollisionCategory:function(){var h=this.body?this.body:this;return h.collisionCategory=1,h.collisionMask=2147483647,this}};p.exports=c}),87118:(p=>{var S={setDebug:function(t,d,c){return this.debugShowBody=t,this.debugShowVelocity=d,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}}};p.exports=S}),52819:(p=>{var S={setDrag:function(t,d){return this.body.drag.set(t,d),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}};p.exports=S}),4074:(p=>{var S={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,d,c,h,r){return t&&this.body.reset(d,c),h&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,d){return t===void 0&&(t=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=S}),40831:(p=>{var S={setFriction:function(t,d){return this.body.friction.set(t,d),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};p.exports=S}),26775:(p=>{var S={setGravity:function(t,d){return this.body.gravity.set(t,d),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};p.exports=S}),9437:(p=>{var S={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};p.exports=S}),30621:(p=>{var S={setMass:function(t){return this.body.mass=t,this}};p.exports=S}),72441:((p,S,t)=>{var d=t(47956),c=t(96503),h=t(2044),r=t(81491),n=function(e,s,o,i,a,l){var f=d(e,s-i,o-i,2*i,2*i,a,l);if(f.length===0)return f;for(var u=new c(s,o,i),v=new c,m=[],x=0;x{var S=function(t,d,c,h,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],o=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+h,i.maxY=c+r,e&&(o=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var a=t.bodies,l={position:{x:d,y:c},left:d,top:c,right:d+h,bottom:c+r,isCircle:!1},f=t.intersects;a.iterate(function(u){f(u,l)&&s.push(u)})}return o.concat(s)};p.exports=S}),62121:(p=>{var S={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};p.exports=S}),29384:(p=>{var S={setOffset:function(t,d){return this.body.setOffset(t,d),this},setSize:function(t,d,c){return this.body.setSize(t,d,c),this},setBodySize:function(t,d,c){return this.body.setSize(t,d,c),this},setCircle:function(t,d,c){return this.body.setCircle(t,d,c),this}};p.exports=S}),15098:(p=>{var S={setVelocity:function(t,d){return this.body.setVelocity(t,d),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,d){return this.body.maxVelocity.set(t,d),this}};p.exports=S}),92209:((p,S,t)=>{p.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:(p=>{var S={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};p.exports=S}),20009:(p=>{p.exports="collide"}),36768:(p=>{p.exports="overlap"}),60473:(p=>{p.exports="pause"}),89954:(p=>{p.exports="resume"}),61804:(p=>{p.exports="tilecollide"}),7161:(p=>{p.exports="tileoverlap"}),34689:(p=>{p.exports="worldbounds"}),16006:(p=>{p.exports="worldstep"}),63012:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(37747),c=t(79291),h={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};h=c(!1,h,d),p.exports=h}),96602:(p=>{var S=function(t,d){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,d,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,d,t):!0};p.exports=S}),36294:(p=>{var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.left=!0):d>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=d,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};p.exports=S}),67013:(p=>{var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.up=!0):d>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=d,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};p.exports=S}),40012:((p,S,t)=>{var d=t(21329),c=t(53442),h=t(2483),r=function(n,e,s,o,i,a,l){var f=o.left,u=o.top,v=o.right,m=o.bottom,x=s.faceLeft||s.faceRight,g=s.faceTop||s.faceBottom;if(l||(x=!0,g=!0),!x&&!g)return!1;var y=0,T=0,C=0,E=1;if(e.deltaAbsX()>e.deltaAbsY()?C=-1:e.deltaAbsX(){var d=t(36294),c=function(h,r,n,e,s,o){var i=0,a=r.faceLeft,l=r.faceRight,f=r.collideLeft,u=r.collideRight;return o||(a=!0,l=!0,f=!0,u=!0),h.deltaX()<0&&u&&h.checkCollision.left?l&&h.x0&&f&&h.checkCollision.right&&a&&h.right>n&&(i=h.right-n,i>s&&(i=0)),i!==0&&(h.customSeparateX?h.overlapX=i:d(h,i)),i};p.exports=c}),53442:((p,S,t)=>{var d=t(67013),c=function(h,r,n,e,s,o){var i=0,a=r.faceTop,l=r.faceBottom,f=r.collideUp,u=r.collideDown;return o||(a=!0,l=!0,f=!0,u=!0),h.deltaY()<0&&u&&h.checkCollision.up?l&&h.y0&&f&&h.checkCollision.down&&a&&h.bottom>n&&(i=h.bottom-n,i>s&&(i=0)),i!==0&&(h.customSeparateY?h.overlapY=i:d(h,i)),i};p.exports=c}),2483:(p=>{var S=function(t,d){return!(d.right<=t.left||d.bottom<=t.top||d.position.x>=t.right||d.position.y>=t.bottom)};p.exports=S}),55173:((p,S,t)=>{var d={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};p.exports=d}),44563:((p,S,t)=>{p.exports={Arcade:t(27064),Matter:t(3875)}}),68174:((p,S,t)=>{var d=t(83419),c=t(26099),h=new d({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,s=r.bounds.max.x-r.bounds.min.x,o=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,a=o*r.centerOfMass.y;return n.set(s/2,o/2),e.set(i-n.x,a-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+s.y+o.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e+s.y+o.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+s.y+o.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e+o.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.centerDiff;return new c(n+s.x,e+s.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e+o.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+s.x+o.x,e-(s.y-o.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n+o.x,e-(s.y-o.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,o=this.centerDiff;return new c(n-(s.x-o.x),e-(s.y-o.y))}return!1}});p.exports=h}),19933:((p,S,t)=>{var d=t(6790);d.Body=t(22562),d.Composite=t(69351),d.World=t(4372),d.Collision=t(52284),d.Detector=t(81388),d.Pairs=t(99561),d.Pair=t(4506),d.Query=t(73296),d.Resolver=t(66272),d.Constraint=t(48140),d.Common=t(53402),d.Engine=t(48413),d.Events=t(35810),d.Sleeping=t(53614),d.Plugin=t(73832),d.Bodies=t(66280),d.Composites=t(74116),d.Axes=t(66615),d.Bounds=t(15647),d.Svg=t(74058),d.Vector=t(31725),d.Vertices=t(41598),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,p.exports=d}),28137:((p,S,t)=>{var d=t(66280),c=t(83419),h=t(74116),r=t(48140),n=t(74058),e=t(75803),s=t(23181),o=t(34803),i=t(73834),a=t(19496),l=t(85791),f=t(98713),u=t(41598),v=new c({initialize:function(x){this.world=x,this.scene=x.scene,this.sys=x.scene.sys},rectangle:function(m,x,g,y,T){var C=d.rectangle(m,x,g,y,T);return this.world.add(C),C},trapezoid:function(m,x,g,y,T,C){var E=d.trapezoid(m,x,g,y,T,C);return this.world.add(E),E},circle:function(m,x,g,y,T){var C=d.circle(m,x,g,y,T);return this.world.add(C),C},polygon:function(m,x,g,y,T){var C=d.polygon(m,x,g,y,T);return this.world.add(C),C},fromVertices:function(m,x,g,y,T,C,E){typeof g=="string"&&(g=u.fromPath(g));var M=d.fromVertices(m,x,g,y,T,C,E);return this.world.add(M),M},fromPhysicsEditor:function(m,x,g,y,T){T===void 0&&(T=!0);var C=a.parseBody(m,x,g,y);return T&&!this.world.has(C)&&this.world.add(C),C},fromSVG:function(m,x,g,y,T,C){y===void 0&&(y=1),T===void 0&&(T={}),C===void 0&&(C=!0);for(var E=g.getElementsByTagName("path"),M=[],P=0;P{var d=t(31884),c=t(95540),h=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,o,i){o===void 0&&(o={}),i===void 0&&(i=!0);var a=s.x,l=s.y;s.body={temp:!0,position:{x:a,y:l}};var f=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];if(f.forEach(function(v){for(var m in v)r(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new h(a,l),o.hasOwnProperty("type")&&o.type==="body")s.setExistingBody(o,i);else{var u=c(o,"shape",null);u||(u="rectangle"),o.addToWorld=i,s.setBody(u,o)}return s};p.exports=n}),23181:((p,S,t)=>{var d=t(83419),c=t(31884),h=t(95643),r=t(95540),n=t(88571),e=t(72699),s=t(26099),o=new d({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(a,l,f,u,v,m){h.call(this,a.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(u,v),this.setSizeToFrame(),this.setOrigin(),this.world=a,this._tempVec2=new s(l,f);var x=r(m,"shape",null);x?this.setBody(x,m):this.setRectangle(this.width,this.height,m),this.setPosition(l,f),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=o}),42045:((p,S,t)=>{var d=t(60461),c=t(66615),h=t(66280),r=t(22562),n=t(68174),e=t(15647),s=t(83419),o=t(52284),i=t(53402),a=t(69351),l=t(74116),f=t(48140),u=t(81388),v=t(20339),m=t(28137),x=t(95540),g=t(35154),y=t(46975),T=t(4506),C=t(99561),E=t(37277),M=t(73296),P=t(66272),A=t(44594),R=t(74058),F=t(31725),w=t(41598),I=t(68243);i.setDecomp(t(55973));var U=new s({initialize:function(D){this.scene=D,this.systems=D.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=a,this.collision=o,this.detector=u,this.pair=T,this.pairs=C,this.query=M,this.resolver=P,this.constraint=f,this.bodies=h,this.composites=l,this.axes=c,this.bounds=e,this.svg=R,this.vector=F,this.vertices=w,this.verts=w,this._tempVec2=F.create(),P._restingThresh=g(this.config,"restingThresh",4),P._restingThreshTangent=g(this.config,"restingThreshTangent",6),P._positionDampen=g(this.config,"positionDampen",.9),P._positionWarming=g(this.config,"positionWarming",.8),P._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),D.sys.events.once(A.BOOT,this.boot,this),D.sys.events.on(A.START,this.start,this)},boot:function(){this.world=new I(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new n,this.systems.events.once(A.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new I(this.scene,this.config),this.add=new m(this.world));var N=this.systems.events;N.on(A.UPDATE,this.world.update,this.world),N.on(A.POST_UPDATE,this.world.postUpdate,this.world),N.once(A.SHUTDOWN,this.shutdown,this)},getConfig:function(){var N=this.systems.game.config.physics,D=this.systems.settings.physics,B=y(x(D,"matter",{}),x(N,"matter",{}));return B},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(N,D){this.world.step(N,D)},containsPoint:function(N,D,B){N=this.getMatterBodies(N);var L=F.create(D,B),G=M.point(N,L);return G.length>0},intersectPoint:function(N,D,B){B=this.getMatterBodies(B);var L=F.create(N,D),G=[],O=M.point(B,L);return O.forEach(function(X){G.indexOf(X)===-1&&G.push(X)}),G},intersectRect:function(N,D,B,L,G,O){G===void 0&&(G=!1),O=this.getMatterBodies(O);var X={min:{x:N,y:D},max:{x:N+B,y:D+L}},z=[],V=M.region(O,X,G);return V.forEach(function(Y){z.indexOf(Y)===-1&&z.push(Y)}),z},intersectRay:function(N,D,B,L,G,O){G===void 0&&(G=1),O=this.getMatterBodies(O);for(var X=[],z=M.ray(O,F.create(N,D),F.create(B,L),G),V=0;V{var d=t(9674),c=t(83419),h=t(31884),r=t(95643),n=t(95540),e=t(72699),s=t(68287),o=t(26099),i=new c({Extends:s,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,e],initialize:function(l,f,u,v,m,x){r.call(this,l.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new o(f,u);var g=n(x,"shape",null);g?this.setBody(g,x):this.setRectangle(this.width,this.height,x),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i}),73834:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(83419),r=t(31884),n=t(62644),e=t(50792),s=t(95540),o=t(97022),i=t(41598),a=new h({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(f,u,v){e.call(this),this.tile=u,this.world=f,u.physics.matterBody&&u.physics.matterBody.destroy(),u.physics.matterBody=this;var m=s(v,"body",null),x=s(v,"addToWorld",!0);if(m)this.setBody(m,x);else{var g=u.getCollisionGroup(),y=s(g,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(u.flipX||u.flipY){var T={x:u.getCenterX(),y:u.getCenterY()},C=u.flipX?-1:1,E=u.flipY?-1:1;c.scale(m,C,E,T)}},setFromTileRectangle:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);var f=this.tile.getBounds(),u=f.x+f.width/2,v=f.y+f.height/2,m=d.rectangle(u,v,f.width,f.height,l);return this.setBody(m,l.addToWorld),this},setFromTileCollision:function(l){l===void 0&&(l={}),o(l,"isStatic")||(l.isStatic=!0),o(l,"addToWorld")||(l.addToWorld=!0);for(var f=this.tile.tilemapLayer.scaleX,u=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),x=this.tile.getCollisionGroup(),g=s(x,"objects",[]),y=[],T=0;T1){var N=n(l);N.parts=y,this.setBody(c.create(N),N.addToWorld)}return this},setBody:function(l,f){return f===void 0&&(f=!0),this.body&&this.removeBody(),this.body=l,this.body.gameObject=this,f&&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()}});p.exports=a}),19496:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(53402),r=t(95540),n=t(41598),e={parseBody:function(s,o,i,a){a===void 0&&(a={});for(var l=r(i,"fixtures",[]),f=[],u=0;u{var d=t(66280),c=t(22562),h={parseBody:function(r,n,e,s){s===void 0&&(s={});var o,i=e.vertices;if(i.length===1)s.vertices=i[0],o=c.create(s),d.flagCoincidentParts(o.parts);else{for(var a=[],l=0;l{var d=t(15647),c=t(83419),h=t(69351),r=t(48140),n=t(81388),e=t(1121),s=t(8214),o=t(46975),i=t(53614),a=t(26099),l=t(41598),f=new c({initialize:function(v,m,x){x===void 0&&(x={});var g={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=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new a,this.body=null,this.part=null,this.constraint=r.create(o(x,g)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(u){this.pointer||(this.pointer=u,this.camera=u.camera)},onUp:function(u){u===this.pointer&&(this.pointer=null)},getBody:function(u){var v=this.position,m=this.constraint;this.camera.getWorldPoint(u.x,u.y,v);for(var x=h.allBodies(this.world.localWorld),g=0;g1?1:0,y=g;y{var d=t(66280),c=t(22562),h=t(83419),r=t(53402),n=t(69351),e=t(48413),s=t(50792),o=t(1121),i=t(95540),a=t(35154),l=t(22562),f=t(35810),u=t(73834),v=t(4372),m=t(13037),x=t(31725),g=new h({Extends:s,initialize:function(T,C){s.call(this),this.scene=T,this.engine=e.create(C),this.localWorld=this.engine.world;var E=a(C,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=a(C,"enabled",!0),this.getDelta=a(C,"getDelta",this.update60Hz);var M=i(C,"runner",{}),P=i(M,"fps",!1);P&&(M.delta=1e3/i(M,"fps",60)),this.runner=m.create(M),this.autoUpdate=a(C,"autoUpdate",!0);var A=a(C,"debug",!1);if(this.drawDebug=typeof A=="object"?!0:A,this.debugGraphic,this.debugConfig={showAxes:i(A,"showAxes",!1),showAngleIndicator:i(A,"showAngleIndicator",!1),angleColor:i(A,"angleColor",15208787),showBroadphase:i(A,"showBroadphase",!1),broadphaseColor:i(A,"broadphaseColor",16757760),showBounds:i(A,"showBounds",!1),boundsColor:i(A,"boundsColor",16777215),showVelocity:i(A,"showVelocity",!1),velocityColor:i(A,"velocityColor",44783),showCollisions:i(A,"showCollisions",!1),collisionColor:i(A,"collisionColor",16094476),showSeparations:i(A,"showSeparations",!1),separationColor:i(A,"separationColor",16753920),showBody:i(A,"showBody",!0),showStaticBody:i(A,"showStaticBody",!0),showInternalEdges:i(A,"showInternalEdges",!1),renderFill:i(A,"renderFill",!1),renderLine:i(A,"renderLine",!0),fillColor:i(A,"fillColor",1075465),fillOpacity:i(A,"fillOpacity",1),lineColor:i(A,"lineColor",2678297),lineOpacity:i(A,"lineOpacity",1),lineThickness:i(A,"lineThickness",1),staticFillColor:i(A,"staticFillColor",857979),staticLineColor:i(A,"staticLineColor",1255396),showSleeping:i(A,"showSleeping",!1),staticBodySleepOpacity:i(A,"staticBodySleepOpacity",.7),sleepFillColor:i(A,"sleepFillColor",4605510),sleepLineColor:i(A,"sleepLineColor",10066585),showSensors:i(A,"showSensors",!0),sensorFillColor:i(A,"sensorFillColor",857979),sensorLineColor:i(A,"sensorLineColor",1255396),showPositions:i(A,"showPositions",!0),positionSize:i(A,"positionSize",4),positionColor:i(A,"positionColor",14697178),showJoint:i(A,"showJoint",!0),jointColor:i(A,"jointColor",14737474),jointLineOpacity:i(A,"jointLineOpacity",1),jointLineThickness:i(A,"jointLineThickness",2),pinSize:i(A,"pinSize",4),pinColor:i(A,"pinColor",4382944),springColor:i(A,"springColor",14697184),anchorColor:i(A,"anchorColor",15724527),anchorSize:i(A,"anchorSize",4),showConvexHulls:i(A,"showConvexHulls",!1),hullColor:i(A,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(C,"setBounds",!1)){var R=C.setBounds;if(typeof R=="boolean")this.setBounds();else{var F=i(R,"x",0),w=i(R,"y",0),I=i(R,"width",T.sys.scale.width),U=i(R,"height",T.sys.scale.height),N=i(R,"thickness",64),D=i(R,"left",!0),B=i(R,"right",!0),L=i(R,"top",!0),G=i(R,"bottom",!0);this.setBounds(F,w,I,U,N,D,B,L,G)}}},setCompositeRenderStyle:function(y){var T=y.bodies,C=y.constraints,E=y.composites,M,P,A;for(M=0;M0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collide",P,A,R),A.gameObject&&A.gameObject.emit("collide",A,P,R),f.trigger(P,"onCollide",{pair:R}),f.trigger(A,"onCollide",{pair:R}),P.onCollideCallback&&P.onCollideCallback(R),A.onCollideCallback&&A.onCollideCallback(R),P.onCollideWith[A.id]&&P.onCollideWith[A.id](A,R),A.onCollideWith[P.id]&&A.onCollideWith[P.id](P,R)}),y.emit(o.COLLISION_START,E,P,A)}),f.on(T,"collisionActive",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideActive",P,A,R),A.gameObject&&A.gameObject.emit("collideActive",A,P,R),f.trigger(P,"onCollideActive",{pair:R}),f.trigger(A,"onCollideActive",{pair:R}),P.onCollideActiveCallback&&P.onCollideActiveCallback(R),A.onCollideActiveCallback&&A.onCollideActiveCallback(R)}),y.emit(o.COLLISION_ACTIVE,E,P,A)}),f.on(T,"collisionEnd",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(R){P=R.bodyA,A=R.bodyB,P.gameObject&&P.gameObject.emit("collideEnd",P,A,R),A.gameObject&&A.gameObject.emit("collideEnd",A,P,R),f.trigger(P,"onCollideEnd",{pair:R}),f.trigger(A,"onCollideEnd",{pair:R}),P.onCollideEndCallback&&P.onCollideEndCallback(R),A.onCollideEndCallback&&A.onCollideEndCallback(R)}),y.emit(o.COLLISION_END,E,P,A)})},setBounds:function(y,T,C,E,M,P,A,R,F){return y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),M===void 0&&(M=64),P===void 0&&(P=!0),A===void 0&&(A=!0),R===void 0&&(R=!0),F===void 0&&(F=!0),this.updateWall(P,"left",y-M,T-M,M,E+M*2),this.updateWall(A,"right",y+C,T-M,M,E+M*2),this.updateWall(R,"top",y,T-M,C,M),this.updateWall(F,"bottom",y,T+E,C,M),this},updateWall:function(y,T,C,E,M,P){var A=this.walls[T];y?(A&&v.remove(this.localWorld,A),C+=M/2,E+=P/2,this.walls[T]=this.create(C,E,M,P,{isStatic:!0,friction:0,frictionStatic:0})):(A&&v.remove(this.localWorld,A),this.walls[T]=null)},createDebugGraphic:function(){var y=this.scene.sys.add.graphics({x:0,y:0});return y.setDepth(Number.MAX_VALUE),this.debugGraphic=y,this.drawDebug=!0,y},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(y,T,C){return y===void 0&&(y=0),T===void 0&&(T=1),C===void 0&&(C=.001),this.localWorld.gravity.x=y,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=C,this},create:function(y,T,C,E,M){var P=d.rectangle(y,T,C,E,M);return v.add(this.localWorld,P),P},add:function(y){return v.add(this.localWorld,y),this},remove:function(y,T){Array.isArray(y)||(y=[y]);for(var C=0;CMath.max(m._maxFrameDelta,C.maxFrameTime))&&(A=C.frameDelta||m._frameDeltaFallback),C.frameDeltaSmoothing){C.frameDeltaHistory.push(A),C.frameDeltaHistory=C.frameDeltaHistory.slice(-C.frameDeltaHistorySize);var R=C.frameDeltaHistory.slice(0).sort(),F=C.frameDeltaHistory.slice(R.length*m._smoothingLowerBound,R.length*m._smoothingUpperBound),w=m._mean(F);A=w||A}C.frameDeltaSnapping&&(A=1e3/Math.round(1e3/A)),C.frameDelta=A,C.timeLastTick=y,C.timeBuffer+=C.frameDelta,C.timeBuffer=r.clamp(C.timeBuffer,0,C.frameDelta+M*m._timeBufferMargin),C.lastUpdatesDeferred=0;for(var I=C.maxUpdates||Math.ceil(C.maxFrameTime/M),U=r.now();M>0&&C.timeBuffer>=M*m._timeBufferMargin;){e.update(T,M),C.timeBuffer-=M,P+=1;var N=r.now()-E,D=r.now()-U,B=N+m._elapsedNextEstimate*D/P;if(P>=I||B>C.maxFrameTime){C.lastUpdatesDeferred=Math.round(Math.max(0,C.timeBuffer/M-m._timeBufferMargin));break}}}},step:function(y){e.update(this.engine,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(y){var T=y.hasOwnProperty("body")?y.body:y;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 y=this.debugConfig,T=this.engine,C=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),y.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,C,y.broadphaseColor,.5),y.showBounds&&this.renderBodyBounds(E,C,y.boundsColor,.5),(y.showBody||y.showStaticBody)&&this.renderBodies(E),y.showJoint&&this.renderJoints(),(y.showAxes||y.showAngleIndicator)&&this.renderBodyAxes(E,C,y.showAxes,y.angleColor,.5),y.showVelocity&&this.renderBodyVelocity(E,C,y.velocityColor,1,2),y.showSeparations&&this.renderSeparations(T.pairs.list,C,y.separationColor),y.showCollisions&&this.renderCollisions(T.pairs.list,C,y.collisionColor)}},renderGrid:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=r.keys(y.buckets),P=0;P0){var I=w[0].vertex.x,U=w[0].vertex.y;M.contactCount===2&&(I=(w[0].vertex.x+w[1].vertex.x)/2,U=(w[0].vertex.y+w[1].vertex.y)/2),F.bodyB===F.supports[0].body||F.bodyA.isStatic?T.lineBetween(I-F.normal.x*8,U-F.normal.y*8,I,U):T.lineBetween(I+F.normal.x*8,U+F.normal.y*8,I,U)}}return this},renderBodyBounds:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=0;M1?1:0;F1?1:0;w1?1:0;w1&&this.renderConvexHull(L,T,D,X)}}},renderBody:function(y,T,C,E,M,P,A,R){E===void 0&&(E=null),M===void 0&&(M=null),P===void 0&&(P=1),A===void 0&&(A=null),R===void 0&&(R=null);for(var F=this.debugConfig,w=F.sensorFillColor,I=F.sensorLineColor,U=y.parts,N=U.length,D=N>1?1:0;D1){var A=y.vertices;T.lineStyle(E,C),T.beginPath(),T.moveTo(A[0].x,A[0].y);for(var R=1;R0&&(T.fillStyle(A),T.fillCircle(U.x,U.y,R),T.fillCircle(N.x,N.y,R)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=g}),70410:(p=>{var S={setBounce:function(t){return this.body.restitution=t,this}};p.exports=S}),66968:(p=>{var S={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{var d=t(22562),c={applyForce:function(h){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,h),this},applyForceFrom:function(h,r){return d.applyForce(this.body,h,r),this},thrust:function(h){var r=this.body.angle;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(h){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(h){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(h){var r=this.body.angle-Math.PI;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=c}),5436:(p=>{var S={setFriction:function(t,d,c){return this.body.friction=t,d!==void 0&&(this.body.frictionAir=d),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}};p.exports=S}),39858:(p=>{var S={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};p.exports=S}),37302:((p,S,t)=>{var d=t(22562),c=t(26099),h={setMass:function(r){return d.setMass(this.body,r),this},setDensity:function(r){return d.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=h}),39132:(p=>{var S={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};p.exports=S}),57772:((p,S,t)=>{var d=t(66280),c=t(22562),h=t(43855),r=t(95540),n=t(19496),e=t(85791),s=t(41598),o={setRectangle:function(i,a,l){return this.setBody({type:"rectangle",width:i,height:a},l)},setCircle:function(i,a){return this.setBody({type:"circle",radius:i},a)},setPolygon:function(i,a,l){return this.setBody({type:"polygon",sides:a,radius:i},l)},setTrapezoid:function(i,a,l,f){return this.setBody({type:"trapezoid",width:i,height:a,slope:l},f)},setExistingBody:function(i,a){a===void 0&&(a=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var l=0;l{var d=t(1121),c=t(53614),h=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;h.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else h.off(this.body,"sleepEnd");return this}};p.exports=r}),90556:((p,S,t)=>{var d=t(22562),c={setStatic:function(h){return d.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};p.exports=c}),85436:((p,S,t)=>{var d=t(22562),c=t(36383),h=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),d.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this.setScale(s,s)}},scaleX:{get:function(){return this._scaleX},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var o=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,o,i),d.scale(this.body,this._scaleX,s)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=h(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,o){return s===void 0&&(s=0),o===void 0&&(o=s),this._tempVec2.set(s,o),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=h(s),d.setAngle(this.body,s),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,d.setAngle(this.body,this.rotation),this},setScale:function(s,o,i){s===void 0&&(s=1),o===void 0&&(o=s);var a=1/this._scaleX,l=1/this._scaleY;return this._scaleX=s,this._scaleY=o,d.scale(this.body,a,l,i),d.scale(this.body,s,o,i),this}};p.exports=e}),42081:((p,S,t)=>{var d=t(22562),c={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,r){return this._tempVec2.set(h,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(h){return d.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(h){return d.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c}),31884:((p,S,t)=>{p.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:(p=>{p.exports="afteradd"}),1213:(p=>{p.exports="afterremove"}),25968:(p=>{p.exports="afterupdate"}),67205:(p=>{p.exports="beforeadd"}),39438:(p=>{p.exports="beforeremove"}),44823:(p=>{p.exports="beforeupdate"}),92593:(p=>{p.exports="collisionactive"}),60128:(p=>{p.exports="collisionend"}),76861:(p=>{p.exports="collisionstart"}),92362:(p=>{p.exports="dragend"}),76408:(p=>{p.exports="drag"}),93971:(p=>{p.exports="dragstart"}),5656:(p=>{p.exports="pause"}),47861:(p=>{p.exports="resume"}),79099:(p=>{p.exports="sleepend"}),35906:(p=>{p.exports="sleepstart"}),1121:((p,S,t)=>{p.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:((p,S,t)=>{p.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:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(53402),e=t(15647),s=t(66615);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(i){var a={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:i.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=c.centre(i.vertices):i.hasOwnProperty("vertices")||(a.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var l=n.extend(a,i);return o(l,i),l.setOnCollideWith=function(f,u){return u?this.onCollideWith[f.id]=u:delete this.onCollideWith[f.id],this},l},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var o=function(i,a){if(a=a||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||h.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),c.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),d.set(i,{axes:a.axes||i.axes,area:a.area||i.area,mass:a.mass||i.mass,inertia:a.inertia||i.inertia}),i.parts.length===1){var l=i.bounds,f=i.centerOfMass,u=i.centerOffset,v=l.max.x-l.min.x,m=l.max.y-l.min.y;f.x=-(l.min.x-i.position.x)/v,f.y=-(l.min.y-i.position.y)/m,u.x=v*f.x,u.y=m*f.y}};d.set=function(i,a,l){var f;typeof a=="string"&&(f=a,a={},a[f]=l);for(f in a)if(Object.prototype.hasOwnProperty.call(a,f))switch(l=a[f],f){case"isStatic":d.setStatic(i,l);break;case"isSleeping":r.set(i,l);break;case"mass":d.setMass(i,l);break;case"density":d.setDensity(i,l);break;case"inertia":d.setInertia(i,l);break;case"vertices":d.setVertices(i,l);break;case"position":d.setPosition(i,l);break;case"angle":d.setAngle(i,l);break;case"velocity":d.setVelocity(i,l);break;case"angularVelocity":d.setAngularVelocity(i,l);break;case"speed":d.setSpeed(i,l);break;case"angularSpeed":d.setAngularSpeed(i,l);break;case"parts":d.setParts(i,l);break;case"centre":d.setCentre(i,l);break;default:i[f]=l}},d.setStatic=function(i,a){for(var l=0;l0&&h.rotateAbout(v.position,f,i.position,v.position)}},d.setVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-a.x*l,i.positionPrev.y=i.position.y-a.y*l,i.velocity.x=(i.position.x-i.positionPrev.x)/l,i.velocity.y=(i.position.y-i.positionPrev.y)/l,i.speed=h.magnitude(i.velocity)},d.getVelocity=function(i){var a=d._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*a,y:(i.position.y-i.positionPrev.y)*a}},d.getSpeed=function(i){return h.magnitude(d.getVelocity(i))},d.setSpeed=function(i,a){d.setVelocity(i,h.mult(h.normalise(d.getVelocity(i)),a))},d.setAngularVelocity=function(i,a){var l=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-a*l,i.angularVelocity=(i.angle-i.anglePrev)/l,i.angularSpeed=Math.abs(i.angularVelocity)},d.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*d._baseDelta/i.deltaTime},d.getAngularSpeed=function(i){return Math.abs(d.getAngularVelocity(i))},d.setAngularSpeed=function(i,a){d.setAngularVelocity(i,n.sign(d.getAngularVelocity(i))*a)},d.translate=function(i,a,l){d.setPosition(i,h.add(i.position,a),l)},d.rotate=function(i,a,l,f){if(!l)d.setAngle(i,i.angle+a,f);else{var u=Math.cos(a),v=Math.sin(a),m=i.position.x-l.x,x=i.position.y-l.y;d.setPosition(i,{x:l.x+(m*u-x*v),y:l.y+(m*v+x*u)},f),d.setAngle(i,i.angle+a,f)}},d.scale=function(i,a,l,f){var u=0,v=0;f=f||i.position;for(var m=i.inertia===1/0,x=0;x0&&(u+=g.area,v+=g.inertia),g.position.x=f.x+(g.position.x-f.x)*a,g.position.y=f.y+(g.position.y-f.y)*l,e.update(g.bounds,g.vertices,i.velocity)}i.parts.length>1&&(i.area=u,i.isStatic||(d.setMass(i,i.density*u),d.setInertia(i,v))),i.circleRadius&&(a===l?i.circleRadius*=a:i.circleRadius=null),m&&d.setInertia(i,1/0)},d.update=function(i,a){a=(typeof a<"u"?a:16.666666666666668)*i.timeScale;var l=a*a,f=d._timeCorrection?a/(i.deltaTime||a):1,u=1-i.frictionAir*(a/n._baseDelta),v=(i.position.x-i.positionPrev.x)*f,m=(i.position.y-i.positionPrev.y)*f;i.velocity.x=v*u+i.force.x/i.mass*l,i.velocity.y=m*u+i.force.y/i.mass*l,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=a,i.angularVelocity=(i.angle-i.anglePrev)*u*f+i.torque/i.inertia*l,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=h.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var x=0;x0&&(g.position.x+=i.velocity.x,g.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(g.vertices,i.angularVelocity,i.position),s.rotate(g.axes,i.angularVelocity),x>0&&h.rotateAbout(g.position,i.angularVelocity,i.position,g.position)),e.update(g.bounds,g.vertices,i.velocity)}},d.updateVelocities=function(i){var a=d._baseDelta/i.deltaTime,l=i.velocity;l.x=(i.position.x-i.positionPrev.x)*a,l.y=(i.position.y-i.positionPrev.y)*a,i.speed=Math.sqrt(l.x*l.x+l.y*l.y),i.angularVelocity=(i.angle-i.anglePrev)*a,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,a,l){var f={x:a.x-i.position.x,y:a.y-i.position.y};i.force.x+=l.x,i.force.y+=l.y,i.torque+=f.x*l.y-f.y*l.x},d._totalProperties=function(i){for(var a={mass:0,area:0,inertia:0,centre:{x:0,y:0}},l=i.parts.length===1?0:1;l{var d={};p.exports=d;var c=t(35810),h=t(53402),r=t(15647),n=t(22562);(function(){d.create=function(e){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,o,i){if(c.trigger(e,"compositeModified",e),e.isModified=s,s&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),o&&e.parent&&d.setModified(e.parent,s,o,i),i)for(var a=0;a{var d={};p.exports=d;var c=t(69351);(function(){d.create=c.create,d.add=c.add,d.remove=c.remove,d.clear=c.clear,d.addComposite=c.addComposite,d.addBody=c.addBody,d.addConstraint=c.addConstraint})()}),52284:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,o){return{pair:null,collided:!1,bodyA:s,bodyB:o,parentA:s.parent,parentB:o.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},d.collides=function(s,o,i){if(d._overlapAxes(n,s.vertices,o.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,o.vertices,s.vertices,o.axes),e.overlap<=0))return null;var a=i&&i.table[h.id(s,o)],l;a?l=a.collision:(l=d.create(s,o),l.collided=!0,l.bodyA=s.id=0&&(T=-T,C=-C),u.x=T,u.y=C,v.x=-C,v.y=T,m.x=T*g,m.y=C*g,l.depth=g;var P=d._findSupports(s,o,u,1),A=0;if(c.contains(s.vertices,P[0])&&(x[A++]=P[0]),c.contains(s.vertices,P[1])&&(x[A++]=P[1]),A<2){var R=d._findSupports(o,s,u,-1);c.contains(o.vertices,R[0])&&(x[A++]=R[0]),A<2&&c.contains(o.vertices,R[1])&&(x[A++]=R[1])}return A===0&&(x[A++]=P[0]),l.supportCount=A,l},d._overlapAxes=function(s,o,i,a){var l=o.length,f=i.length,u=o[0].x,v=o[0].y,m=i[0].x,x=i[0].y,g=a.length,y=Number.MAX_VALUE,T=0,C,E,M,P,A,R;for(A=0;AD?D=P:PB?B=P:P{var S={};p.exports=S,(function(){S.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}})()}),81388:((p,S,t)=>{var d={};p.exports=d;var c=t(53402),h=t(52284);(function(){d.create=function(r){var n={bodies:[],collisions:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[],r.collisions=[]},d.collisions=function(r){var n=r.pairs,e=r.bodies,s=e.length,o=d.canCollide,i=h.collides,a=r.collisions,l=0,f,u;for(e.sort(d._compareBoundsX),f=0;fx)break;if(!(gP.max.y)&&!(T&&(M.isStatic||M.isSleeping))&&o(v.collisionFilter,M.collisionFilter)){var A=M.parts.length;if(E&&A===1){var R=i(v,M,n);R&&(a[l++]=R)}else for(var F=C>1?1:0,w=A>1?1:0,I=F;IP.max.x||m.max.xP.max.y)){var R=i(U,D,n);R&&(a[l++]=R)}}}}}return a.length!==l&&(a.length=l),a},d.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},d._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()}),4506:((p,S,t)=>{var d={};p.exports=d;var c=t(43424);(function(){d.create=function(h,r){var n=h.bodyA,e=h.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:h,contacts:[c.create(),c.create()],contactCount:0,separation:0,isActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,h,r),s},d.update=function(h,r,n){var e=r.supports,s=r.supportCount,o=h.contacts,i=r.parentA,a=r.parentB;h.isActive=!0,h.timeUpdated=n,h.collision=r,h.separation=r.depth,h.inverseMass=i.inverseMass+a.inverseMass,h.friction=i.frictiona.frictionStatic?i.frictionStatic:a.frictionStatic,h.restitution=i.restitution>a.restitution?i.restitution:a.restitution,h.slop=i.slop>a.slop?i.slop:a.slop,h.contactCount=s,r.pair=h;var l=e[0],f=o[0],u=e[1],v=o[1];(v.vertex===l||f.vertex===u)&&(o[1]=f,o[0]=f=v,v=o[1]),f.vertex=l,v.vertex=u},d.setActive=function(h,r,n){r?(h.isActive=!0,h.timeUpdated=n):(h.isActive=!1,h.contactCount=0)},d.id=function(h,r){return h.id{var d={};p.exports=d;var c=t(4506),h=t(53402);(function(){d.create=function(r){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=c.update,o=c.create,i=c.setActive,a=r.table,l=r.list,f=l.length,u=f,v=r.collisionStart,m=r.collisionEnd,x=r.collisionActive,g=n.length,y=0,T=0,C=0,E,M,P;for(P=0;P=e?l[u++]=M:(i(M,!1,e),M.collision.bodyA.sleepCounter>0&&M.collision.bodyB.sleepCounter>0?l[u++]=M:(m[T++]=M,delete a[M.id]));l.length!==u&&(l.length=u),v.length!==y&&(v.length=y),m.length!==T&&(m.length=T),x.length!==C&&(x.length=C)},d.clear=function(r){return r.table={},r.list.length=0,r.collisionStart.length=0,r.collisionActive.length=0,r.collisionEnd.length=0,r}})()}),73296:((p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){d.collides=function(s,o){for(var i=[],a=o.length,l=s.bounds,f=h.collides,u=r.overlaps,v=0;v{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(15647);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(n){var e,s,o,i=n.length;for(e=0;ent?(x=j>0?j:-j,m=T.friction*(j>0?1:-1)*i,m<-x?m=-x:m>x&&(m=x)):(m=j,x=u);var lt=W*A-H*P,it=K*A-b*P,st=D/(w+E.inverseInertia*lt*lt+M.inverseInertia*it*it),ft=(1+T.restitution)*Q*st;if(m*=st,Q0&&(V.normalImpulse=0),ft=V.normalImpulse-ct}if(j<-l||j>l)V.tangentImpulse=0;else{var rt=V.tangentImpulse;V.tangentImpulse+=m,V.tangentImpulse<-x&&(V.tangentImpulse=-x),V.tangentImpulse>x&&(V.tangentImpulse=x),m=V.tangentImpulse-rt}var dt=P*ft+R*m,vt=A*ft+F*m;E.isStatic||E.isSleeping||(E.positionPrev.x+=dt*E.inverseMass,E.positionPrev.y+=vt*E.inverseMass,E.anglePrev+=(W*vt-H*dt)*E.inverseInertia),M.isStatic||M.isSleeping||(M.positionPrev.x-=dt*M.inverseMass,M.positionPrev.y-=vt*M.inverseMass,M.anglePrev-=(K*vt-b*dt)*M.inverseInertia)}}}}})()}),48140:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(15647),e=t(66615),s=t(53402);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(o){var i=o;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var a=i.bodyA?h.add(i.bodyA.position,i.pointA):i.pointA,l=i.bodyB?h.add(i.bodyB.position,i.pointB):i.pointB,f=h.magnitude(h.sub(a,l));i.length=typeof i.length<"u"?i.length:f,i.id=i.id||s.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var u={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(u.type="pin",u.anchors=!1):i.stiffness<.9&&(u.type="spring"),i.render=s.extend(u,i.render),i},d.preSolveAll=function(o){for(var i=0;i=1||o.length===0,C=T?o.stiffness*i:o.stiffness*i*i,E=o.damping*i,M=h.mult(x,y*C),P=(a?a.inverseMass:0)+(l?l.inverseMass:0),A=(a?a.inverseInertia:0)+(l?l.inverseInertia:0),R=P+A,F,w,I,U,N;if(E>0){var D=h.create();I=h.div(x,g),N=h.sub(l&&h.sub(l.position,l.positionPrev)||D,a&&h.sub(a.position,a.positionPrev)||D),U=h.dot(I,N)}a&&!a.isStatic&&(w=a.inverseMass/P,a.constraintImpulse.x-=M.x*w,a.constraintImpulse.y-=M.y*w,a.position.x-=M.x*w,a.position.y-=M.y*w,E>0&&(a.positionPrev.x-=E*I.x*U*w,a.positionPrev.y-=E*I.y*U*w),F=h.cross(f,M)/R*d._torqueDampen*a.inverseInertia*(1-o.angularStiffness),a.constraintImpulse.angle-=F,a.angle-=F),l&&!l.isStatic&&(w=l.inverseMass/P,l.constraintImpulse.x+=M.x*w,l.constraintImpulse.y+=M.y*w,l.position.x+=M.x*w,l.position.y+=M.y*w,E>0&&(l.positionPrev.x+=E*I.x*U*w,l.positionPrev.y+=E*I.y*U*w),F=h.cross(u,M)/R*d._torqueDampen*l.inverseInertia*(1-o.angularStiffness),l.constraintImpulse.angle+=F,l.angle+=F)}}},d.postSolveAll=function(o){for(var i=0;i0&&(u.position.x+=l.x,u.position.y+=l.y),l.angle!==0&&(c.rotate(u.vertices,l.angle,a.position),e.rotate(u.axes,l.angle),f>0&&h.rotateAbout(u.position,l.angle,a.position,u.position)),n.update(u.bounds,u.vertices,a.velocity)}l.angle*=d._warming,l.x*=d._warming,l.y*=d._warming}}},d.pointAWorld=function(o){return{x:(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),y:(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0)}},d.pointBWorld=function(o){return{x:(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),y:(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0)}},d.currentLength=function(o){var i=(o.bodyA?o.bodyA.position.x:0)+(o.pointA?o.pointA.x:0),a=(o.bodyA?o.bodyA.position.y:0)+(o.pointA?o.pointA.y:0),l=(o.bodyB?o.bodyB.position.x:0)+(o.pointB?o.pointB.x:0),f=(o.bodyB?o.bodyB.position.y:0)+(o.pointB?o.pointB.y:0),u=i-l,v=a-f;return Math.sqrt(u*u+v*v)}})()}),53402:((p,S,t)=>{var d={};p.exports=d,(function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(h,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var s=n;s0;r--){var n=Math.floor(d.random()*(r+1)),e=h[r];h[r]=h[n],h[n]=e}return h},d.choose=function(h){return h[Math.floor(d.random()*h.length)]},d.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},d.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},d.isFunction=function(h){return typeof h=="function"},d.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},d.isString=function(h){return toString.call(h)==="[object String]"},d.clamp=function(h,r,n){return hn?n:h},d.sign=function(h){return h<0?-1:1},d.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-d._nowStartTime},d.random=function(h,r){return h=typeof h<"u"?h:0,r=typeof r<"u"?r:1,h+c()*(r-h)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[h]||(d.warn(h),d._warnedOnce[h]=!0)},d.deprecated=function(h,r,n){h[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},h[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(h,r){if(h.indexOf)return h.indexOf(r);for(var n=0;n{var d={};p.exports=d;var c=t(53614),h=t(66272),r=t(81388),n=t(99561),e=t(35810),s=t(69351),o=t(48140),i=t(53402),a=t(22562);(function(){d._deltaMax=16.666666666666668,d.create=function(l){l=l||{};var f={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,lastUpdatesPerFrame:0}},u=i.extend(f,l);return u.world=l.world||s.create({label:"World"}),u.pairs=l.pairs||n.create(),u.detector=l.detector||r.create(),u.detector.pairs=u.pairs,u.grid={buckets:[]},u.world.gravity=u.gravity,u.broadphase=u.grid,u.metrics={},u},d.update=function(l,f){var u=i.now(),v=l.world,m=l.detector,x=l.pairs,g=l.timing,y=g.timestamp,T;f>d._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",d._deltaMax.toFixed(3),"ms."),f=typeof f<"u"?f:i._baseDelta,f*=g.timeScale,g.timestamp+=f,g.lastDelta=f;var C={timestamp:g.timestamp,delta:f};e.trigger(l,"beforeUpdate",C);var E=s.allBodies(v),M=s.allConstraints(v),P=s.allComposites(v);for(v.isModified&&(r.setBodies(m,E),s.setModified(v,!1,!1,!0)),l.enableSleeping&&c.update(E,f),d._bodiesApplyGravity(E,l.gravity),d.wrap(E,P),d.attractors(E),f>0&&d._bodiesUpdate(E,f),e.trigger(l,"beforeSolve",C),o.preSolveAll(E),T=0;T0&&e.trigger(l,"collisionStart",{pairs:x.collisionStart,timestamp:g.timestamp,delta:f});var R=i.clamp(20/l.positionIterations,0,1);for(h.preSolvePosition(x.list),T=0;T0&&e.trigger(l,"collisionActive",{pairs:x.collisionActive,timestamp:g.timestamp,delta:f}),x.collisionEnd.length>0&&e.trigger(l,"collisionEnd",{pairs:x.collisionEnd,timestamp:g.timestamp,delta:f}),d._bodiesClearForces(E),e.trigger(l,"afterUpdate",C),l.timing.lastElapsed=i.now()-u,l},d.merge=function(l,f){if(i.extend(l,f),f.world){l.world=f.world,d.clear(l);for(var u=s.allBodies(l.world),v=0;v0)for(var m=0;m{var d={};p.exports=d;var c=t(53402);(function(){d.on=function(h,r,n){for(var e=r.split(" "),s,o=0;o0){n||(n={}),e=r.split(" ");for(var l=0;l{var d={};p.exports=d;var c=t(73832),h=t(53402);(function(){d.name="matter-js",d.version="0.20.0",d.uses=[],d.used=[],d.use=function(){c.use(d,Array.prototype.slice.call(arguments))},d.before=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathAfter(d,r,n)}})()}),73832:((p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d._registry={},d.register=function(h){if(d.isPlugin(h)||c.warn("Plugin.register:",d.toString(h),"does not implement all required fields."),h.name in d._registry){var r=d._registry[h.name],n=d.versionParse(h.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(h)),d._registry[h.name]=h):n-1},d.isFor=function(h,r){var n=h.for&&d.dependencyParse(h.for);return!h.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(h,r){if(h.uses=(h.uses||[]).concat(r||[]),h.uses.length===0){c.warn("Plugin.use:",d.toString(h),"does not specify any dependencies to install.");return}for(var n=d.dependencies(h),e=c.topologicalSort(n),s=[],o=0;o0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(h,r){var n=d.dependencyParse(h),e=n.name;if(r=r||{},!(e in r)){h=d.resolve(h)||h,r[e]=c.map(h.uses||[],function(o){d.isPlugin(o)&&d.register(o);var i=d.dependencyParse(o),a=d.resolve(o);return a&&!d.versionSatisfies(a.version,i.range)?(c.warn("Plugin.dependencies:",d.toString(a),"does not satisfy",d.toString(i),"used by",d.toString(n)+"."),a._warned=!0,h._warned=!0):a||(c.warn("Plugin.dependencies:",d.toString(o),"used by",d.toString(n),"could not be resolved."),h._warned=!0),i.name});for(var s=0;s=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(h)||c.warn("Plugin.versionParse:",h,"is not a valid version or range.");var n=r.exec(h),e=Number(n[4]),s=Number(n[5]),o=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:h,operator:n[1]||n[2]||"",major:e,minor:s,patch:o,parts:[e,s,o],prerelease:n[7],number:e*1e8+s*1e4+o}},d.versionSatisfies=function(h,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(h);if(n.isRange){if(n.operator==="*"||h==="*")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 h===r||h==="*"}})()}),13037:((p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(48413),r=t(53402);(function(){d._maxFrameDelta=66.66666666666667,d._frameDeltaFallback=16.666666666666668,d._timeBufferMargin=1.5,d._elapsedNextEstimate=1,d._smoothingLowerBound=.1,d._smoothingUpperBound=.9,d.create=function(e){var s={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},o=r.extend(s,e);return o.fps=0,o},d.run=function(e,s){return e.timeBuffer=d._frameDeltaFallback,(function o(i){e.frameRequestId=d._onNextFrame(e,o),i&&e.enabled&&d.tick(e,s,i)})(),e},d.tick=function(e,s,o){var i=r.now(),a=e.delta,l=0,f=o-e.timeLastTick;if((!f||!e.timeLastTick||f>Math.max(d._maxFrameDelta,e.maxFrameTime))&&(f=e.frameDelta||d._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(f),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var u=e.frameDeltaHistory.slice(0).sort(),v=e.frameDeltaHistory.slice(u.length*d._smoothingLowerBound,u.length*d._smoothingUpperBound),m=n(v);f=m||f}e.frameDeltaSnapping&&(f=1e3/Math.round(1e3/f)),e.frameDelta=f,e.timeLastTick=o,e.timeBuffer+=e.frameDelta,e.timeBuffer=r.clamp(e.timeBuffer,0,e.frameDelta+a*d._timeBufferMargin),e.lastUpdatesDeferred=0;var x=e.maxUpdates||Math.ceil(e.maxFrameTime/a),g={timestamp:s.timing.timestamp};c.trigger(e,"beforeTick",g),c.trigger(e,"tick",g);for(var y=r.now();a>0&&e.timeBuffer>=a*d._timeBufferMargin;){c.trigger(e,"beforeUpdate",g),h.update(s,a),c.trigger(e,"afterUpdate",g),e.timeBuffer-=a,l+=1;var T=r.now()-i,C=r.now()-y,E=T+d._elapsedNextEstimate*C/l;if(l>=x||E>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/a-d._timeBufferMargin));break}}s.timing.lastUpdatesPerFrame=l,c.trigger(e,"afterTick",g),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/a)>x?r.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&r.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof e.isFixed<"u"&&r.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&r.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),e.fps!==0&&r.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},d.stop=function(e){d._cancelNextFrame(e)},d._onNextFrame=function(e,s){if(typeof window<"u"&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(s);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},d._cancelNextFrame=function(e){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var n=function(e){for(var s=0,o=e.length,i=0;i{var d={};p.exports=d;var c=t(22562),h=t(35810),r=t(53402);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(n,e){for(var s=e/r._baseDelta,o=d._motionSleepThreshold,i=0;i0&&a.motion=a.sleepThreshold/s&&d.set(a,!0)):a.sleepCounter>0&&(a.sleepCounter-=1)}},d.afterCollisions=function(n){for(var e=d._motionSleepThreshold,s=0;se&&d.set(f,!1)}}}},d.set=function(n,e){var s=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,s||h.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&h.trigger(n,"sleepEnd"))}})()}),66280:((p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){d.rectangle=function(s,o,i,a,l){l=l||{};var f={label:"Rectangle Body",position:{x:s,y:o},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+a+" L 0 "+a)};if(l.chamfer){var u=l.chamfer;f.vertices=c.chamfer(f.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete l.chamfer}return r.create(h.extend({},f,l))},d.trapezoid=function(s,o,i,a,l,f){f=f||{},l>=1&&h.warn("Bodies.trapezoid: slope parameter must be < 1."),l*=.5;var u=(1-l*2)*i,v=i*l,m=v+u,x=m+v,g;l<.5?g="L 0 0 L "+v+" "+-a+" L "+m+" "+-a+" L "+x+" 0":g="L 0 0 L "+m+" "+-a+" L "+x+" 0";var y={label:"Trapezoid Body",position:{x:s,y:o},vertices:c.fromPath(g)};if(f.chamfer){var T=f.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete f.chamfer}return r.create(h.extend({},y,f))},d.circle=function(s,o,i,a,l){a=a||{};var f={label:"Circle Body",circleRadius:i};l=l||25;var u=Math.ceil(Math.max(10,Math.min(l,i)));return u%2===1&&(u+=1),d.polygon(s,o,u,i,h.extend({},f,a))},d.polygon=function(s,o,i,a,l){if(l=l||{},i<3)return d.circle(s,o,a,l);for(var f=2*Math.PI/i,u="",v=f*.5,m=0;m0&&c.area(N)1?(g=r.create(h.extend({parts:y.slice(0)},a)),r.setPosition(g,{x:s,y:o}),g):y[0]},d.flagCoincidentParts=function(s,o){o===void 0&&(o=5);for(var i=0;i{var d={};p.exports=d;var c=t(69351),h=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){d.stack=function(s,o,i,a,l,f,u){for(var v=c.create({label:"Stack"}),m=s,x=o,g,y=0,T=0;TC&&(C=P),n.translate(M,{x:A*.5,y:P*.5}),m=M.bounds.max.x+l,c.addBody(v,M),g=M,y+=1}else m+=l}x+=C+f,m=s}return v},d.chain=function(s,o,i,a,l,f){for(var u=s.bodies,v=1;v0)for(v=0;v0&&(g=f[v-1+(u-1)*o],c.addConstraint(s,h.create(r.extend({bodyA:g,bodyB:x},l)))),a&&vC)){g=C-g;var M=g,P=i-1-g;if(!(xP)){T===1&&n.translate(y,{x:(x+(i%2===1?1:-1))*E,y:0});var A=y?x*E:0;return u(s+A+x*l,m,x,g,y,T)}}})},d.newtonsCradle=function(s,o,i,a,l){for(var f=c.create({label:"Newtons Cradle"}),u=0;u{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.fromVertices=function(r){for(var n={},e=0;e{var S={};p.exports=S,(function(){S.create=function(t){var d={min:{x:0,y:0},max:{x:0,y:0}};return t&&S.update(d,t),d},S.update=function(t,d,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var h=0;ht.max.x&&(t.max.x=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)},S.contains=function(t,d){return d.x>=t.min.x&&d.x<=t.max.x&&d.y>=t.min.y&&d.y<=t.max.y},S.overlaps=function(t,d){return t.min.x<=d.max.x&&t.max.x>=d.min.x&&t.max.y>=d.min.y&&t.min.y<=d.max.y},S.translate=function(t,d){t.min.x+=d.x,t.max.x+=d.x,t.min.y+=d.y,t.max.y+=d.y},S.shift=function(t,d){var c=t.max.x-t.min.x,h=t.max.y-t.min.y;t.min.x=d.x,t.max.x=d.x+c,t.min.y=d.y,t.max.y=d.y+h},S.wrap=function(t,d,c){var h=null,r=null;if(typeof d.min.x<"u"&&typeof d.max.x<"u"&&(t.min.x>d.max.x?h=d.min.x-t.max.x:t.max.xd.max.y?r=d.min.y-t.max.y:t.max.y{var d={};p.exports=d,t(15647);var c=t(53402);(function(){d.pathToVertices=function(h,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,o,i,a,l,f,u,v,m=[],x,g,y=0,T=0,C=0;r=r||15;var E=function(P,A,R){var F=R%2===1&&R>1;if(!u||P!=u.x||A!=u.y){u&&F?(x=u.x,g=u.y):(x=0,g=0);var w={x:x+P,y:g+A};(F||!u)&&(u=w),m.push(w),T=x+P,C=g+A}},M=function(P){var A=P.pathSegTypeAsLetter.toUpperCase();if(A!=="Z"){switch(A){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,C=P.y;break;case"H":T=P.x;break;case"V":C=P.y;break}E(T,C,P.pathSegType)}};for(d._svgPathToAbsolute(h),s=h.getTotalLength(),a=[],n=0;n{var S={};p.exports=S,(function(){S.create=function(t,d){return{x:t||0,y:d||0}},S.clone=function(t){return{x:t.x,y:t.y}},S.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},S.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},S.rotate=function(t,d,c){var h=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*h-t.y*r;return c.y=t.x*r+t.y*h,c.x=n,c},S.rotateAbout=function(t,d,c,h){var r=Math.cos(d),n=Math.sin(d);h||(h={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return h.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),h.x=e,h},S.normalise=function(t){var d=S.magnitude(t);return d===0?{x:0,y:0}:{x:t.x/d,y:t.y/d}},S.dot=function(t,d){return t.x*d.x+t.y*d.y},S.cross=function(t,d){return t.x*d.y-t.y*d.x},S.cross3=function(t,d,c){return(d.x-t.x)*(c.y-t.y)-(d.y-t.y)*(c.x-t.x)},S.add=function(t,d,c){return c||(c={}),c.x=t.x+d.x,c.y=t.y+d.y,c},S.sub=function(t,d,c){return c||(c={}),c.x=t.x-d.x,c.y=t.y-d.y,c},S.mult=function(t,d){return{x:t.x*d,y:t.y*d}},S.div=function(t,d){return{x:t.x/d,y:t.y/d}},S.perp=function(t,d){return d=d===!0?-1:1,{x:d*-t.y,y:d*t.x}},S.neg=function(t){return{x:-t.x,y:-t.y}},S.angle=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)},S._temp=[S.create(),S.create(),S.create(),S.create(),S.create(),S.create()]})()}),41598:((p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.create=function(r,n){for(var e=[],s=0;s0)return!1;i=a}return!0},d.scale=function(r,n,e,s){if(n===1&&e===1)return r;s=s||d.centre(r);for(var o,i,a=0;a=0?a-1:r.length-1],f=r[a],u=r[(a+1)%r.length],v=n[a0&&(n|=2),n===3)return!1;return n!==0?!0:null},d.hull=function(r){var n=[],e=[],s,o;for(r=r.slice(0),r.sort(function(i,a){var l=i.x-a.x;return l!==0?l:i.y-a.y}),o=0;o=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(o=r.length-1;o>=0;o-=1){for(s=r[o];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return n.pop(),e.pop(),n.concat(e)}})()}),55973:(p=>{p.exports={decomp:M,quickDecomp:F,isSimple:A,removeCollinearPoints:w,removeDuplicatePoints:I,makeCCW:u};function S(D,B,L){L=L||0;var G=[0,0],O,X,z,V,Y,W,H;return O=D[1][1]-D[0][1],X=D[0][0]-D[1][0],z=O*D[0][0]+X*D[0][1],V=B[1][1]-B[0][1],Y=B[0][0]-B[1][0],W=V*B[0][0]+Y*B[0][1],H=O*Y-V*X,U(H,0,L)||(G[0]=(Y*z-X*W)/H,G[1]=(O*W-V*z)/H),G}function t(D,B,L,G){var O=B[0]-D[0],X=B[1]-D[1],z=G[0]-L[0],V=G[1]-L[1];if(z*X-V*O===0)return!1;var Y=(O*(L[1]-D[1])+X*(D[0]-L[0]))/(z*X-V*O),W=(z*(D[1]-L[1])+V*(L[0]-D[0]))/(V*O-z*X);return Y>=0&&Y<=1&&W>=0&&W<=1}function d(D,B,L){return(B[0]-D[0])*(L[1]-D[1])-(L[0]-D[0])*(B[1]-D[1])}function c(D,B,L){return d(D,B,L)>0}function h(D,B,L){return d(D,B,L)>=0}function r(D,B,L){return d(D,B,L)<0}function n(D,B,L){return d(D,B,L)<=0}var e=[],s=[];function o(D,B,L,G){if(G){var O=e,X=s;O[0]=B[0]-D[0],O[1]=B[1]-D[1],X[0]=L[0]-B[0],X[1]=L[1]-B[1];var z=O[0]*X[0]+O[1]*X[1],V=Math.sqrt(O[0]*O[0]+O[1]*O[1]),Y=Math.sqrt(X[0]*X[0]+X[1]*X[1]),W=Math.acos(z/(V*Y));return WL[B][0])&&(B=G);return c(a(D,B-1),a(D,B),a(D,B+1))?!1:(v(D),!0)}function v(D){for(var B=[],L=D.length,G=0;G!==L;G++)B.push(D.pop());for(var G=0;G!==L;G++)D[G]=B[G]}function m(D,B){return r(a(D,B-1),a(D,B),a(D,B+1))}var x=[],g=[];function y(D,B,L){var G,O,X=x,z=g;if(h(a(D,B+1),a(D,B),a(D,L))&&n(a(D,B-1),a(D,B),a(D,L)))return!1;O=i(a(D,B),a(D,L));for(var V=0;V!==D.length;++V)if(!((V+1)%D.length===B||V===B)&&h(a(D,B),a(D,L),a(D,V+1))&&n(a(D,B),a(D,L),a(D,V))&&(X[0]=a(D,B),X[1]=a(D,L),z[0]=a(D,V),z[1]=a(D,V+1),G=S(X,z),i(a(D,B),G)0?P(D,B):[D]}function P(D,B){if(B.length===0)return[D];if(B instanceof Array&&B.length&&B[0]instanceof Array&&B[0].length===2&&B[0][0]instanceof Array){for(var L=[D],G=0;GX)return console.warn("quickDecomp: max level ("+X+") reached."),B;for(var k=0;k$&&($+=D.length),J=Number.MAX_VALUE,$3&&G>=0;--G)o(a(D,G-1),a(D,G),a(D,G+1),B)&&(D.splice(G%D.length,1),L++);return L}function I(D,B){for(var L=D.length-1;L>=1;--L)for(var G=D[L],O=L-1;O>=0;--O)if(N(G,D[O],B)){D.splice(L,1);continue}}function U(D,B,L){return L=L||0,Math.abs(D-B)<=L}function N(D,B,L){return U(D[0],B[0],L)&&U(D[1],B[1],L)}}),52018:((p,S,t)=>{var d=t(83419),c=new d({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}});p.exports=c}),42363:(p=>{var S={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"]};p.exports=S}),37277:(p=>{var S={},t={},d={};d.register=function(c,h,r,n){n===void 0&&(n=!1),S[c]={plugin:h,mapping:r,custom:n}},d.registerCustom=function(c,h,r,n){t[c]={plugin:h,mapping:r,data:n}},d.hasCore=function(c){return S.hasOwnProperty(c)},d.hasCustom=function(c){return t.hasOwnProperty(c)},d.getCore=function(c){return S[c]},d.getCustom=function(c){return t[c]},d.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},d.remove=function(c){S.hasOwnProperty(c)&&delete S[c]},d.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},d.destroyCorePlugins=function(){for(var c in S)S.hasOwnProperty(c)&&delete S[c]},d.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},p.exports=d}),77332:((p,S,t)=>{var d=t(83419),c=t(8443),h=t(50792),r=t(74099),n=t(44603),e=t(39429),s=t(95540),o=t(37277),i=t(72905),a=t(8054),l=new d({Extends:h,initialize:function(u){h.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted||u.config.renderType===a.HEADLESS?this.boot():u.events.once(c.BOOT,this.boot,this)},boot:function(){var f,u,v,m,x,g,y,T=this.game.config,C=T.installGlobalPlugins;for(C=C.concat(this._pendingGlobal),f=0;f{var d=t(52018),c=t(83419),h=t(44594),r=new c({Extends:d,initialize:function(e,s,o){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=o,e.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=r}),18922:((p,S,t)=>{p.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}}),63595:(()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(p){const S=performance.now(),t=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(h,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>d){const s=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,o=r-h;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+o,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+o/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(h=>c(S,h)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})}),10312:(p=>{p.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:(p=>{var S={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=S}),68627:((p,S,t)=>{var d=t(19715),c=t(32880),h=t(83419),r=t(8054),n=t(50792),e=t(92503),s=t(56373),o=t(97480),i=t(69442),a=t(8443),l=t(61340),f=new h({Extends:n,initialize:function(v){n.call(this);var m=v.config;this.config={clearBeforeRender:m.clearBeforeRender,backgroundColor:m.backgroundColor,antialias:m.antialias,roundPixels:m.roundPixels,transparent:m.transparent},this.game=v,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=v.canvas;var x={alpha:m.transparent,desynchronized:m.desynchronized,willReadFrequently:!1};this.gameContext=m.context?m.context:this.gameCanvas.getContext("2d",x),this.currentContext=this.gameContext,this.antialias=m.antialias,this.blendModes=s(),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(){var u=this.game;u.events.once(a.BOOT,function(){var v=this.config;if(!v.transparent){var m=this.gameContext,x=this.gameCanvas;m.fillStyle=v.backgroundColor.rgba,m.fillRect(0,0,x.width,x.height)}},this),u.textures.once(i.READY,this.boot,this)},boot:function(){var u=this.game,v=u.scale.baseSize;this.width=v.width,this.height=v.height,this.isBooted=!0,u.scale.on(o.RESIZE,this.onResize,this),this.resize(v.width,v.height)},onResize:function(u,v){(v.width!==this.width||v.height!==this.height)&&this.resize(v.width,v.height)},resize:function(u,v){this.width=u,this.height=v,this.emit(e.RESIZE,u,v)},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,v=this.config,m=this.width,x=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),this.emit(e.PRE_RENDER_CLEAR),v.clearBeforeRender&&(u.clearRect(0,0,m,x),v.transparent||(u.fillStyle=v.backgroundColor.rgba,u.fillRect(0,0,m,x))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,v,m){var x=v.length;this.emit(e.RENDER,u,m);var g=m.x,y=m.y,T=m.width,C=m.height,E=m.renderToTexture?m.context:u.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(g,y,T,C),E.clip()),m.emit(d.PRE_RENDER,m),this.currentContext=E;var M=m.mask;M&&M.preRenderCanvas(this,null,m._maskCamera),m.transparent||(E.fillStyle=m.backgroundColor.rgba,E.fillRect(g,y,T,C)),E.globalAlpha=m.alpha,E.globalCompositeOperation="source-over",this.drawCount+=x,m.renderToTexture&&m.emit(d.PRE_RENDER,m),m.matrix.copyToContext(E);for(var P=0;P=0?N=-(N+A):N<0&&(N=Math.abs(N)-A)),u.flipY&&(D>=0?D=-(D+R):D<0&&(D=Math.abs(D)-R))}var L=1,G=1;u.flipX&&(F||(N+=-v.realWidth+I*2),L=-1),u.flipY&&(F||(D+=-v.realHeight+U*2),G=-1);var O=u.x,X=u.y;if(m.roundPixels&&(O=Math.floor(O),X=Math.floor(X)),C.applyITRS(O,X,u.rotation,u.scaleX*L,u.scaleY*G),T.copyFrom(m.matrix),x?(T.multiplyWithOffset(x,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),C.e=O,C.f=X):(C.e-=m.scrollX*u.scrollFactorX,C.f-=m.scrollY*u.scrollFactorY),T.multiply(C),m.renderRoundPixels&&(T.e=Math.floor(T.e+.5),T.f=Math.floor(T.f+.5)),y.save(),T.setToContext(y),y.globalCompositeOperation=this.blendModes[u.blendMode],y.globalAlpha=g,y.imageSmoothingEnabled=!v.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,m),A>0&&R>0){var z=A/w,V=R/w;m.roundPixels&&(N=Math.floor(N+.5),D=Math.floor(D+.5),z+=.5,V+=.5),y.drawImage(v.source.image,M,P,A,R,N,D,z,V)}u.mask&&u.mask.postRenderCanvas(this,u,m),y.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=f}),55830:((p,S,t)=>{p.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}}),56373:((p,S,t)=>{var d=t(10312),c=t(89289),h=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[d.NORMAL]=e,r[d.ADD]="lighter",r[d.MULTIPLY]=n?"multiply":e,r[d.SCREEN]=n?"screen":e,r[d.OVERLAY]=n?"overlay":e,r[d.DARKEN]=n?"darken":e,r[d.LIGHTEN]=n?"lighten":e,r[d.COLOR_DODGE]=n?"color-dodge":e,r[d.COLOR_BURN]=n?"color-burn":e,r[d.HARD_LIGHT]=n?"hard-light":e,r[d.SOFT_LIGHT]=n?"soft-light":e,r[d.DIFFERENCE]=n?"difference":e,r[d.EXCLUSION]=n?"exclusion":e,r[d.HUE]=n?"hue":e,r[d.SATURATION]=n?"saturation":e,r[d.COLOR]=n?"color":e,r[d.LUMINOSITY]=n?"luminosity":e,r[d.ERASE]="destination-out",r[d.SOURCE_IN]="source-in",r[d.SOURCE_OUT]="source-out",r[d.SOURCE_ATOP]="source-atop",r[d.DESTINATION_OVER]="destination-over",r[d.DESTINATION_IN]="destination-in",r[d.DESTINATION_OUT]="destination-out",r[d.DESTINATION_ATOP]="destination-atop",r[d.LIGHTER]="lighter",r[d.COPY]="copy",r[d.XOR]="xor",r};p.exports=h}),20926:((p,S,t)=>{var d=t(91296),c=function(h,r,n,e,s){var o=e.alpha*n.alpha;if(o<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=h.blendModes[n.blendMode],r.globalAlpha=o,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:h.antialias,!0};p.exports=c}),63899:(p=>{p.exports="losewebgl"}),6119:(p=>{p.exports="postrender"}),48070:(p=>{p.exports="prerender"}),15640:(p=>{p.exports="render"}),8912:(p=>{p.exports="resize"}),87124:(p=>{p.exports="restorewebgl"}),92503:((p,S,t)=>{p.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}}),36909:((p,S,t)=>{p.exports={Events:t(92503),Snapshot:t(89966)},p.exports.Canvas=t(55830),p.exports.WebGL=t(4159)}),32880:((p,S,t)=>{var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=h(e,"callback"),o=h(e,"type","image/png"),i=h(e,"encoder",.92),a=Math.abs(Math.round(h(e,"x",0))),l=Math.abs(Math.round(h(e,"y",0))),f=Math.floor(h(e,"width",n.width)),u=Math.floor(h(e,"height",n.height)),v=h(e,"getPixel",!1);if(v){var m=n.getContext("2d",{willReadFrequently:!1}),x=m.getImageData(a,l,1,1),g=x.data;s.call(null,new c(g[0],g[1],g[2],g[3]))}else if(a!==0||l!==0||f!==n.width||u!==n.height){var y=d.createWebGL(this,f,u),T=y.getContext("2d",{willReadFrequently:!0});f>0&&u>0&&T.drawImage(n,a,l,f,u,0,0,f,u);var C=new Image;C.onerror=function(){s.call(null),d.remove(y)},C.onload=function(){s.call(null,C),d.remove(y)},C.src=y.toDataURL(o,i)}else{var E=new Image;E.onerror=function(){s.call(null)},E.onload=function(){s.call(null,E)},E.src=n.toDataURL(o,i)}};p.exports=r}),88815:((p,S,t)=>{var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=n,o=h(e,"callback"),i=h(e,"type","image/png"),a=h(e,"encoder",.92),l=Math.abs(Math.round(h(e,"x",0))),f=Math.abs(Math.round(h(e,"y",0))),u=h(e,"getPixel",!1),v=h(e,"isFramebuffer",!1),m=v?h(e,"bufferWidth",1):s.drawingBufferWidth,x=v?h(e,"bufferHeight",1):s.drawingBufferHeight;if(u){var g=new Uint8Array(4),y=v?f:x-f;s.readPixels(l,y,1,1,s.RGBA,s.UNSIGNED_BYTE,g),o.call(null,new c(g[0],g[1],g[2],g[3]))}else{var T=Math.floor(h(e,"width",m)),C=Math.floor(h(e,"height",x)),E=T*C*4,M=new Uint8Array(E);s.readPixels(l,x-f-C,T,C,s.RGBA,s.UNSIGNED_BYTE,M);for(var P=d.createWebGL(this,T,C),A=P.getContext("2d",{willReadFrequently:!0}),R=A.getImageData(0,0,T,C),F=R.data,w=0;w{p.exports={Canvas:t(32880),WebGL:t(88815)}}),7530:((p,S,t)=>{var d=t(83419),c=t(36060),h=t(90330),r=t(82264),n=t(95540),e=t(32302),s=t(63448),o=t(31302),i=t(58918),a=t(14811),l=t(92651),f=t(96569),u=t(56527),v=t(57516),m=t(43439),x=t(81041),g=t(12385),y=t(7589),T=t(95428),C=t(72905),E=new d({initialize:function(P){this.game=P.game,this.renderer=P,this.classes=new h([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,o],[c.SINGLE_PIPELINE,g],[c.ROPE_PIPELINE,x],[c.LIGHT_PIPELINE,f],[c.POINTLIGHT_PIPELINE,m],[c.MOBILE_PIPELINE,u]]),this.postPipelineClasses=new h,this.pipelines=new h,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(M,P,A){var R=this.renderer,F=this.renderTargets;this.frameInc=Math.floor(n(M,"frameInc",32));var w=R.width,I=R.height,U=this.game.config.disablePreFX,N=this.game.config.disablePostFX;if(N||this.postPipelineClasses.setAll([[String(a.BARREL),i.Barrel],[String(a.BLOOM),i.Bloom],[String(a.BLUR),i.Blur],[String(a.BOKEH),i.Bokeh],[String(a.CIRCLE),i.Circle],[String(a.COLOR_MATRIX),i.ColorMatrix],[String(a.DISPLACEMENT),i.Displacement],[String(a.GLOW),i.Glow],[String(a.GRADIENT),i.Gradient],[String(a.PIXELATE),i.Pixelate],[String(a.SHADOW),i.Shadow],[String(a.SHINE),i.Shine],[String(a.VIGNETTE),i.Vignette],[String(a.WIPE),i.Wipe]]),!U){this.classes.set(c.FX_PIPELINE,l);for(var D=Math.min(w,I),B=Math.ceil(D/this.frameInc),L=1;L=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A=0;A--){var R=P[A];R.active&&R.preBatch(M)}}},postBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;Athis.maxDimension)return this.targetIndex=P.length-A,P[this.targetIndex];var R=(s(M,this.frameInc,0,!0)-1)*A;return this.targetIndex=R,P[R]},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}});p.exports=E}),32302:((p,S,t)=>{var d=t(83419),c=t(92503),h=new d({initialize:function(n,e,s,o,i,a,l,f,u){o===void 0&&(o=1),i===void 0&&(i=0),a===void 0&&(a=!0),l===void 0&&(l=!1),f===void 0&&(f=!0),u===void 0&&(u=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=o,this.minFilter=i,this.autoClear=a,this.autoResize=!0,this.hasDepthBuffer=f,this.forceClamp=u,this.init(e,s),l?this.renderer.on(c.RESIZE,this.resize,this):this.autoResize=!1},init:function(r,n){var e=this.renderer;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},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(this.autoResize&&this.willResize(r,n)){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 typeof r!="number"||typeof n!="number"?!1:(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r=Math.max(r,1),n=Math.max(n,1),r!==this.width||n!==this.height)},bind:function(r,n,e){r===void 0&&(r=!1);var s=this.renderer;if(r&&s.flush(),n&&e&&this.resize(n,e),s.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var o=this.renderer.gl;o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(r,n,e,s){var o=this.renderer,i=o.gl;o.pushFramebuffer(this.framebuffer),r!==void 0&&n!==void 0&&e!==void 0&&s!==void 0?(i.enable(i.SCISSOR_TEST),i.scissor(r,n,e,s)):i.disable(i.SCISSOR_TEST),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),o.popFramebuffer(),o.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}});p.exports=h}),70554:(p=>{p.exports={getTintFromFloats:function(S,t,d,c){var h=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|h<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(S,t){var d=(t*255|0)&255;return(d<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,t){var d=(S>>16|0)&255,c=(S>>8|0)&255,h=(S|0)&255,r=(t*255|0)&255;return(r<<24|h<<16|c<<8|d)>>>0},getFloatsFromUintRGB:function(S){var t=(S>>16|0)&255,d=(S>>8|0)&255,c=(S|0)&255;return[t/255,d/255,c/255]},checkShaderMax:function(S,t){var d=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?d:Math.min(d,t)},parseFragmentShaderMaxTextures:function(S,t){if(!S)return"";for(var d="",c=0;c0&&(d+=` + else `),c{var d=t(83419),c=t(62644),h=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),o=t(32302),i=t(70554),a=t(38683),l=new d({Extends:h,initialize:function(u){h.call(this);var v=u.game,m=v.renderer,x=m.gl;this.name=n(u,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=x,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(u,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(u,"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=u,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(u,"resizeUniform","")},boot:function(){var f,u=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,g=n(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var y=m.width,T=m.height;if(typeof g=="number")for(f=0;fw&&(w=F[f].vertexSize);var I=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=I*6;var U=new ArrayBuffer(this.vertexCapacity*w);this.vertexData=U,this.bytes=new Uint8Array(U),this.vertexViewF32=new Float32Array(U),this.vertexViewU32=new Uint32Array(U);var N=n(v,"vertices",null);for(N?(this.vertexViewF32.set(N),this.vertexBuffer=m.createVertexBuffer(U,u.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(U.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),f=F.length-1;f>=0;f--)F[f].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(f,u,v){var m=this.renderer;if(f!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!u&&(u=!0),f.bind(u,!1),this.currentShader=f}return this},getShaderByName:function(f){for(var u=this.shaders,v=0;v-1&&(F=D.substring(20))}w&&I&&A.push(new a(this,F,w,I,c(U)))}this.shaders=A}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(f){return this.currentBatch={start:this.vertexCount,count:0,texture:[f],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=f,this.batch.push(this.currentBatch),0},addTextureToBatch:function(f){var u=this.currentBatch;u&&(u.texture.push(f),u.unit++,u.maxUnit++)},pushBatch:function(f){if(!this.currentBatch||this.forceZero&&f!==this.currentTexture)return this.createBatch(f);if(f===this.currentTexture)return this.currentUnit;var u=this.currentBatch,v=u.texture.indexOf(f);return v===-1?u.texture.length===this.renderer.maxTextures?this.createBatch(f):(u.unit++,u.maxUnit++,u.texture.push(f),this.currentUnit=u.unit,this.currentTexture=f,u.unit):(this.currentUnit=v,this.currentTexture=f,v)},setGameObject:function(f,u){return u===void 0&&(u=f.frame),this.pushBatch(u.source.glTexture)},shouldFlush:function(f){return f===void 0&&(f=0),this.vertexCount+f>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(f,u){(f!==this.width||u!==this.height)&&this.flush(),this.width=f,this.height=u;for(var v=this.renderTargets,m=0;m=0;v--){var m=u[v].rebind();(!f||m===f)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var f=this.shaders,u=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,u&&this.setVertexBuffer();for(var v=0;v0){this.emit(r.BEFORE_FLUSH,this,f),this.onBeforeFlush(f);var u=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.DYNAMIC_DRAW):u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,y,T,C=this.batch,E=this.activeTextures;if(this.forceZero)for(E[0]||u.activeTexture(u.TEXTURE0),g=0;g{var d=t(95428),c=t(72905),h=t(19715),r=t(83419),n=t(8054),e=t(50792),s=t(92503),o=t(50030),i=t(37867),a=t(29747),l=t(7530),f=t(32302),u=t(97480),v=t(69442),m=t(70554),x=t(88815),g=t(26128),y=t(1482),T=t(82751),C=t(84387),E=t(93567),M=t(57183),P=new r({Extends:e,initialize:function(R){e.call(this);var F=R.config,w={alpha:F.transparent,desynchronized:F.desynchronized,depth:!0,antialias:F.antialiasGL,premultipliedAlpha:F.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:F.failIfMajorPerformanceCaveat,powerPreference:F.powerPreference,preserveDrawingBuffer:F.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:F.clearBeforeRender,antialias:F.antialias,backgroundColor:F.backgroundColor,contextCreation:w,roundPixels:F.roundPixels,maxTextures:F.maxTextures,maxTextureSize:F.maxTextureSize,batchSize:F.batchSize,maxLights:F.maxLights,mipmapFilter:F.mipmapFilter},this.game=R,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=R.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=a,this.contextRestoredHandler=a,this.previousContextLostHandler=a,this.previousContextRestoredHandler=a,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(A){var R,F=this.game,w=this.canvas,I=A.backgroundColor;if(F.config.context?R=F.config.context:R=w.getContext("webgl",A.contextCreation)||w.getContext("experimental-webgl",A.contextCreation),!R||R.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=R,this.setExtensions(),this.setContextHandlers(),F.context=R;for(var U=0;U<=27;U++)this.blendModes.push({func:[R.ONE,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_ADD});this.blendModes[1].func=[R.ONE,R.DST_ALPHA],this.blendModes[2].func=[R.DST_COLOR,R.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[R.ONE,R.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[R.ZERO,R.ONE_MINUS_SRC_ALPHA],equation:R.FUNC_REVERSE_SUBTRACT},this.glFormats=[R.BYTE,R.SHORT,R.UNSIGNED_BYTE,R.UNSIGNED_SHORT,R.FLOAT],this.glFuncMap={mat2:{func:R.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:R.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:R.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:R.uniform1f,length:1},"1fv":{func:R.uniform1fv,length:1},"1i":{func:R.uniform1i,length:1},"1iv":{func:R.uniform1iv,length:1},"2f":{func:R.uniform2f,length:2},"2fv":{func:R.uniform2fv,length:1},"2i":{func:R.uniform2i,length:2},"2iv":{func:R.uniform2iv,length:1},"3f":{func:R.uniform3f,length:3},"3fv":{func:R.uniform3fv,length:1},"3i":{func:R.uniform3i,length:3},"3iv":{func:R.uniform3iv,length:1},"4f":{func:R.uniform4f,length:4},"4fv":{func:R.uniform4fv,length:1},"4i":{func:R.uniform4i,length:4},"4iv":{func:R.uniform4iv,length:1}},(!A.maxTextures||A.maxTextures===-1)&&(A.maxTextures=R.getParameter(R.MAX_TEXTURE_IMAGE_UNITS)),A.maxTextureSize||(A.maxTextureSize=R.getParameter(R.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),R.disable(R.DEPTH_TEST),R.disable(R.CULL_FACE),R.enable(R.BLEND),R.clearColor(I.redGL,I.greenGL,I.blueGL,I.alphaGL),R.clear(R.COLOR_BUFFER_BIT);var N=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return N.indexOf(A.mipmapFilter)!==-1&&(this.mipmapFilter=R[A.mipmapFilter]),this.maxTextures=m.checkShaderMax(R,A.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new l(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),F.textures.once(v.READY,this.boot,this),this},boot:function(){var A=this.game,R=this.pipelines,F=A.scale.baseSize,w=F.width,I=F.height;this.width=w,this.height=I,this.isBooted=!0,this.renderTarget=new f(this,w,I,1,0,!0,!0),this.maskTarget=new f(this,w,I,1,0,!0,!0),this.maskSource=new f(this,w,I,1,0,!0,!0);var U=A.config;R.boot(U.pipeline,U.defaultPipeline,U.autoMobilePipeline),this.blankTexture=A.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=A.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=A.textures.getFrame("__WHITE").glTexture;var N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,null),N.enable(N.SCISSOR_TEST),A.scale.on(u.RESIZE,this.onResize,this),this.resize(w,I)},setExtensions:function(){var A=this.gl,R=A.getSupportedExtensions();this.supportedExtensions=R;var F="ANGLE_instanced_arrays";this.instancedArraysExtension=R.indexOf(F)>-1?A.getExtension(F):null;var w="OES_vertex_array_object";this.vaoExtension=R.indexOf(w)>-1?A.getExtension(w):null},setContextHandlers:function(A,R){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof A=="function"?this.contextLostHandler=A.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof R=="function"?this.contextRestoredHandler=R.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(A){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(s.LOSE_WEBGL,this),A.preventDefault()},dispatchContextRestored:function(A){var R=this.gl;if(R.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(n.BlendModes.NORMAL),R.disable(R.BLEND),R.disable(R.DEPTH_TEST),R.enable(R.CULL_FACE),this.compression=this.getCompressedTextures();var F=function(w){w.createResource()};d(this.glTextureWrappers,F),d(this.glBufferWrappers,F),d(this.glFramebufferWrappers,F),d(this.glProgramWrappers,F),d(this.glAttribLocationWrappers,F),d(this.glUniformLocationWrappers,F),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(s.RESTORE_WEBGL,this),A.preventDefault()},createTemporaryTextures:function(){for(var A=this.gl,R=0;R0&&w>0;if(N&&D){var B=N[0],L=N[1],G=N[2],O=N[3];D=B!==A||L!==R||G!==F||O!==w}D&&(this.flush(),U.scissor(A,I-R-w,F,w))},resetScissor:function(){var A=this.gl;A.enable(A.SCISSOR_TEST);var R=this.currentScissor;if(R){var F=R[0],w=R[1],I=R[2],U=R[3];I>0&&U>0&&A.scissor(F,this.drawingBufferHeight-w-U,I,U)}},popScissor:function(){var A=this.scissorStack;A.pop();var R=A[A.length-1];R&&this.setScissor(R[0],R[1],R[2],R[3]),this.currentScissor=R},hasActiveStencilMask:function(){var A=this.currentMask.mask,R=this.currentCameraMask.mask;return A&&A.isStencil||R&&R.isStencil},resetViewport:function(){var A=this.gl;A.viewport(0,0,this.width,this.height),this.drawingBufferHeight=A.drawingBufferHeight},setBlendMode:function(A,R){R===void 0&&(R=!1);var F=this.gl,w=this.blendModes[A];return R||A!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==A?(this.flush(),F.enable(F.BLEND),F.blendEquation(w.equation),w.func.length>2?F.blendFuncSeparate(w.func[0],w.func[1],w.func[2],w.func[3]):F.blendFunc(w.func[0],w.func[1]),this.currentBlendMode=A,!0):!1},addBlendMode:function(A,R){var F=this.blendModes.push({func:A,equation:R});return F-1},updateBlendMode:function(A,R,F){return this.blendModes[A]&&(this.blendModes[A].func=R,F&&(this.blendModes[A].equation=F)),this},removeBlendMode:function(A){return A>17&&this.blendModes[A]&&this.blendModes.splice(A,1),this},pushFramebuffer:function(A,R,F,w,I){return A===this.currentFramebuffer?this:(this.fboStack.push(A),this.setFramebuffer(A,R,F,w,I))},setFramebuffer:function(A,R,F,w,I){if(R===void 0&&(R=!1),F===void 0&&(F=!0),w===void 0&&(w=null),I===void 0&&(I=!1),A===this.currentFramebuffer)return this;var U=this.gl,N=this.width,D=this.height;return A&&A.renderTexture&&F?(N=A.renderTexture.width,D=A.renderTexture.height):this.flush(),A?U.bindFramebuffer(U.FRAMEBUFFER,A.webGLFramebuffer):U.bindFramebuffer(U.FRAMEBUFFER,null),F&&U.viewport(0,0,N,D),w&&U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_2D,w.webGLTexture,0),I&&(U.clearColor(0,0,0,0),U.clear(U.COLOR_BUFFER_BIT)),R&&(A?(this.drawingBufferHeight=D,this.pushScissor(0,0,N,D)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=A,this},popFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack;F.pop();var w=F[F.length-1];return w||(w=null),this.setFramebuffer(w,A,R),w},restoreFramebuffer:function(A,R){A===void 0&&(A=!1),R===void 0&&(R=!0);var F=this.fboStack,w=F[F.length-1];w||(w=null),this.currentFramebuffer=null,this.setFramebuffer(w,A,R)},setProgram:function(A){return A!==this.currentProgram?(this.flush(),this.gl.useProgram(A.webGLProgram),this.currentProgram=A,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(A,R,F,w,I){I===void 0&&(I=!1);var U=this.gl,N=U.NEAREST,D=U.NEAREST,B=U.CLAMP_TO_EDGE,L=null;R=A?A.width:R,F=A?A.height:F;var G=o(R,F);if(G&&!I&&(B=U.REPEAT),w===n.ScaleModes.LINEAR&&this.config.antialias){var O=A&&A.compressed,X=!O&&G||O&&A.mipmaps.length>1;N=this.mipmapFilter&&X?this.mipmapFilter:U.LINEAR,D=U.LINEAR}return!A&&typeof R=="number"&&typeof F=="number"?L=this.createTexture2D(0,N,D,B,B,U.RGBA,null,R,F):L=this.createTexture2D(0,N,D,B,B,U.RGBA,A),L},createTexture2D:function(A,R,F,w,I,U,N,D,B,L,G,O){typeof D!="number"&&(D=N?N.width:1),typeof B!="number"&&(B=N?N.height:1);var X=new T(this.gl,A,R,F,w,I,U,N,D,B,L,G,O);return this.glTextureWrappers.push(X),X},createFramebuffer:function(A,R,F,w){this.currentFramebuffer=null;var I=new C(this.gl,A,R,F,w);return this.glFramebufferWrappers.push(I),I},beginBitmapMask:function(A,R){var F=this.gl;F&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==A&&(this.currentMask.mask=A,this.currentMask.camera=R))},drawBitmapMask:function(A,R,F){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),A.renderWebGL(this,A,R),this.maskSource.unbind(!0),this.maskTarget.unbind();var w=this.gl,I=this.getCurrentStencilMask();I?(w.enable(w.STENCIL_TEST),I.mask.applyStencil(this,I.camera,!0)):this.currentMask.mask=null,this.pipelines.set(F),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,this.maskTarget.texture.webGLTexture),w.activeTexture(w.TEXTURE1),w.bindTexture(w.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(A,R){var F=new y(this.gl,A,R);return this.glProgramWrappers.push(F),F},createVertexBuffer:function(A,R){var F=this.gl,w=new g(F,A,F.ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},createAttribLocation:function(A,R){var F=new E(this.gl,A,R);return this.glAttribLocationWrappers.push(F),F},createUniformLocation:function(A,R){var F=new M(this.gl,A,R);return this.glUniformLocationWrappers.push(F),F},createIndexBuffer:function(A,R){var F=this.gl,w=new g(F,A,F.ELEMENT_ARRAY_BUFFER,R);return this.glBufferWrappers.push(w),w},deleteTexture:function(A){if(A)return c(this.glTextureWrappers,A),A.destroy(),this},deleteFramebuffer:function(A){return A?(c(this.fboStack,A),c(this.glFramebufferWrappers,A),A.destroy(),this):this},deleteProgram:function(A){return A&&(c(this.glProgramWrappers,A),A.destroy()),this},deleteAttribLocation:function(A){return A&&(c(this.glAttribLocationWrappers,A),A.destroy()),this},deleteUniformLocation:function(A){return A&&(c(this.glUniformLocationWrappers,A),A.destroy()),this},deleteBuffer:function(A){return A?(c(this.glBufferWrappers,A),A.destroy(),this):this},preRenderCamera:function(A){var R=A.x,F=A.y,w=A.width,I=A.height,U=A.backgroundColor;if(A.emit(h.PRE_RENDER,A),this.pipelines.preBatchCamera(A),this.pushScissor(R,F,w,I),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),U.alphaGL>0){var N=this.pipelines.setMulti();N.drawFillRect(R,F,w,I,m.getTintFromFloats(U.blueGL,U.greenGL,U.redGL,1),U.alphaGL)}},getCurrentStencilMask:function(){var A=null,R=this.maskStack,F=this.currentCameraMask;return R.length>0?A=R[R.length-1]:F.mask&&F.mask.isStencil&&(A=F),A},postRenderCamera:function(A){var R=A.flashEffect,F=A.fadeEffect;if(R.isRunning||F.isRunning||F.isComplete){var w=this.pipelines.setMulti();R.postRenderWebGL(w,m.getTintFromFloats),F.postRenderWebGL(w,m.getTintFromFloats)}A.dirty=!1,this.popScissor(),A.mask&&(this.currentCameraMask.mask=null,A.mask.postRenderWebGL(this,A._maskCamera)),this.pipelines.postBatchCamera(A),A.emit(h.POST_RENDER,A)},preRender:function(){if(!this.contextLost){var A=this.gl;if(A.bindFramebuffer(A.FRAMEBUFFER,null),this.emit(s.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var R=this.config.backgroundColor;A.clearColor(R.redGL,R.greenGL,R.blueGL,R.alphaGL),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)}A.enable(A.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&A.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(s.PRE_RENDER)}},render:function(A,R,F){if(!this.contextLost){var w=R.length;if(this.emit(s.RENDER,A,F),this.preRenderCamera(F),w===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(F);return}this.currentType="";for(var I=this.currentMask,U=0;U{var d=t(83419),c=t(95428),h=t(95540),r=t(14500),n=new d({initialize:function(s,o,i,a,l){this.pipeline=s,this.name=o,this.renderer=s.renderer,this.gl=this.renderer.gl,this.fragSrc=a,this.vertSrc=i,this.program=this.renderer.createProgram(i,a),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(l),this.createUniforms()},createAttributes:function(e){var s=0,o=0,i=[];this.vertexComponentCount=0;for(var a=0;a=0?(s.enableVertexAttribArray(C.webGLAttribLocation),s.vertexAttribPointer(C.webGLAttribLocation,v,m,T,i,x),u.enabled=!0,u.location=C):C.webGLAttribLocation!==-1&&s.disableVertexAttribArray(C.webGLAttribLocation)}else g?s.vertexAttribPointer(y.webGLAttribLocation,v,m,T,i,x):!g&&y!==-1&&y.webGLAttribLocation>-1&&(s.disableVertexAttribArray(y.webGLAttribLocation),u.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,o=this.uniforms,i,a,l,f=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i0&&(a=a.substr(0,v),o.hasOwnProperty(a)||(l=this.renderer.createUniformLocation(s,a),l!==null&&(o[a]={name:a,location:l,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 s in this.uniforms){var o=this.uniforms[s];o.setter&&o.setter.call(e,o.location.webGLUniformLocation,o.value1,o.value2,o.value3,o.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var s=this.uniforms[e];return s&&(s.value1=null,s.value2=null,s.value3=null,s.value4=null),this},setUniform1:function(e,s,o,i){var a=this.uniforms[s];return a?((i||a.value1!==o)&&(a.setter||(a.setter=e),a.value1=o,this.renderer.setProgram(this.program),e.call(this.gl,a.location.webGLUniformLocation,o),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,o,i,a){var l=this.uniforms[s];return l?((a||l.value1!==o||l.value2!==i)&&(l.setter||(l.setter=e),l.value1=o,l.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,o,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,o,i,a,l){var f=this.uniforms[s];return f?((l||f.value1!==o||f.value2!==i||f.value3!==a)&&(f.setter||(f.setter=e),f.value1=o,f.value2=i,f.value3=a,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,o,i,a),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,o,i,a,l,f){var u=this.uniforms[s];return u?((f||u.value1!==o||u.value2!==i||u.value3!==a||u.value4!==l)&&(u.setter||(u.setter=e),u.value1=o,u.value2=i,u.value3=a,u.value4=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,o,i,a,l),this.pipeline.currentShader=this),this):this},setBoolean:function(e,s){return this.setUniform1(this.gl.uniform1i,e,Number(s))},set1f:function(e,s){return this.setUniform1(this.gl.uniform1f,e,s)},set2f:function(e,s,o){return this.setUniform2(this.gl.uniform2f,e,s,o)},set3f:function(e,s,o,i){return this.setUniform3(this.gl.uniform3f,e,s,o,i)},set4f:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4f,e,s,o,i,a)},set1fv:function(e,s){return this.setUniform1(this.gl.uniform1fv,e,s,!0)},set2fv:function(e,s){return this.setUniform1(this.gl.uniform2fv,e,s,!0)},set3fv:function(e,s){return this.setUniform1(this.gl.uniform3fv,e,s,!0)},set4fv:function(e,s){return this.setUniform1(this.gl.uniform4fv,e,s,!0)},set1iv:function(e,s){return this.setUniform1(this.gl.uniform1iv,e,s,!0)},set2iv:function(e,s){return this.setUniform1(this.gl.uniform2iv,e,s,!0)},set3iv:function(e,s){return this.setUniform1(this.gl.uniform3iv,e,s,!0)},set4iv:function(e,s){return this.setUniform1(this.gl.uniform4iv,e,s,!0)},set1i:function(e,s){return this.setUniform1(this.gl.uniform1i,e,s)},set2i:function(e,s,o){return this.setUniform2(this.gl.uniform2i,e,s,o)},set3i:function(e,s,o,i){return this.setUniform3(this.gl.uniform3i,e,s,o,i)},set4i:function(e,s,o,i,a){return this.setUniform4(this.gl.uniform4i,e,s,o,i,a)},setMatrix2fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix2fv,e,s,o,!0)},setMatrix3fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix3fv,e,s,o,!0)},setMatrix4fv:function(e,s,o){return this.setUniform2(this.gl.uniformMatrix4fv,e,s,o,!0)},createProgram:function(e,s){return e===void 0&&(e=this.vertSrc),s===void 0&&(s=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=s,this.program=this.renderer.createProgram(e,s),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;c(this.uniforms,function(s){e.deleteUniformLocation(s.location)}),this.uniforms=null,c(this.attributes,function(s){e.deleteAttribLocation(s.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});p.exports=n}),14500:(p=>{var S={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}};p.exports=S}),4159:((p,S,t)=>{var d=t(14500),c=t(79291),h={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};h=c(!1,h,d),p.exports=h}),31302:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(78908),r=t(85191),n=t(14500),e=t(29100),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",h),i.vertShader=c(i,"vertShader",r),i.batchSize=c(i,"batchSize",1),i.vertices=c(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=c(i,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(o,i){e.prototype.resize.call(this,o,i),this.set2f("uResolution",o,i)},beginMask:function(o,i,a){this.renderer.beginBitmapMask(o,a)},endMask:function(o,i,a){var l=this.gl,f=this.renderer,u=o.bitmapMask;u&&l&&(f.drawBitmapMask(u,i,this),a&&this.set2f("uResolution",a.width,a.height),this.set1i("uInvertMaskAlpha",o.invertAlpha),l.drawArrays(this.topology,0,3),a&&this.set2f("uResolution",this.width,this.height),l.bindTexture(l.TEXTURE_2D,null))}});p.exports=s}),92651:((p,S,t)=>{var d=t(83419),c=t(58918),h=t(14811),r=t(95540),n=t(43558),e=t(89350),s=t(70554),o=new d({Extends:n,initialize:function(a){a.shaders=[s.setGlowQuality(e.FXGlowFrag,a.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,a);var l=this.game;this.glow=new c.Glow(l),this.shadow=new c.Shadow(l),this.pixelate=new c.Pixelate(l),this.vignette=new c.Vignette(l),this.shine=new c.Shine(l),this.gradient=new c.Gradient(l),this.circle=new c.Circle(l),this.barrel=new c.Barrel(l),this.wipe=new c.Wipe(l),this.bokeh=new c.Bokeh(l);var f=[];f[h.GLOW]=this.onGlow,f[h.SHADOW]=this.onShadow,f[h.PIXELATE]=this.onPixelate,f[h.VIGNETTE]=this.onVignette,f[h.SHINE]=this.onShine,f[h.BLUR]=this.onBlur,f[h.GRADIENT]=this.onGradient,f[h.BLOOM]=this.onBloom,f[h.COLOR_MATRIX]=this.onColorMatrix,f[h.CIRCLE]=this.onCircle,f[h.BARREL]=this.onBarrel,f[h.DISPLACEMENT]=this.onDisplacement,f[h.WIPE]=this.onWipe,f[h.BOKEH]=this.onBokeh,this.fxHandlers=f,this.source,this.target,this.swap},onDraw:function(i,a,l){this.source=i,this.target=a,this.swap=l;var f=i.width,u=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var x=v.preFX.list,g=0;g{var d=t(83419),c=t(95540),h=t(31063),r=t(57516),n=t(61340),e=t(26099),s=t(29100),o=new d({Extends:r,initialize:function(a){var l=c(a,"fragShader",h);a.fragShader=l.replace("%LIGHT_COUNT%",a.game.renderer.config.maxLights),r.call(this,a),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(){s.prototype.boot.call(this)},onRender:function(i,a){var l=i.sys.lights;if(this.lightsActive=!1,!(!l||!l.active)){var f=l.getLights(a),u=f.length;this.lightsActive=!0;var v,m=this.renderer,x=m.height,g=a.matrix,y=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",a.x,a.y,a.rotation,a.zoom),this.set3f("uAmbientLightColor",l.ambientColor.r,l.ambientColor.g,l.ambientColor.b),this.set1i("uLightCount",u),v=0;v0&&this.flush();var a=this.inverseRotationMatrix;if(i){var l=-i,f=Math.cos(l),u=Math.sin(l);a[1]=u,a[3]=-u,a[0]=a[4]=f}else a[0]=a[4]=1,a[1]=a[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,a),this.currentNormalMapRotation=i}},setTexture2D:function(i,a){var l=this.renderer;i===void 0&&(i=l.whiteTexture);var f=this.getNormalMap(a);this.isNewNormalMap(i,f)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(f),this.currentNormalMap=f);var u=0;if(a&&a.parentContainer){var v=a.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);u=v.rotationNormalized}else a&&(u=a.rotation);return this.currentBatch===null&&(this.createBatch(i),this.addTextureToBatch(f)),this.setNormalMapRotation(u),0},setGameObject:function(i,a){a===void 0&&(a=i.frame);var l=a.glTexture,f=this.getNormalMap(i);if(this.isNewNormalMap(l,f)&&(this.flush(),this.createBatch(l),this.addTextureToBatch(f),this.currentNormalMap=f),i.parentContainer){var u=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(u.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return this.currentBatch===null&&(this.createBatch(l),this.addTextureToBatch(f)),0},isNewNormalMap:function(i,a){return this.currentTexture!==i||this.currentNormalMap!==a},getNormalMap:function(i){var a;if(i)i.displayTexture?a=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?a=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?a=i.tileset[0].image.dataSource[0]:a=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return a?a.glTexture:this.renderer.normalTexture},batchSprite:function(i,a,l){this.lightsActive&&r.prototype.batchSprite.call(this,i,a,l)},batchTexture:function(i,a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W){this.lightsActive&&r.prototype.batchTexture.call(this,i,a,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W)},batchTextureFrame:function(i,a,l,f,u,v,m){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,a,l,f,u,v,m)}});p.exports=o}),56527:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(14500),s=t(29100),o=new d({Extends:h,initialize:function(a){a.fragShader=c(a,"fragShader",r),a.vertShader=c(a,"vertShader",n),a.attributes=c(a,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),a.forceZero=!0,a.resizeUniform="uResolution",h.call(this,a)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height)}});p.exports=o}),57516:((p,S,t)=>{var d=t(83419),c=t(94811),h=t(95540),r=t(98840),n=t(44667),e=t(61340),s=t(70554),o=t(14500),i=t(29100),a=new d({Extends:i,initialize:function(f){var u=f.game.renderer,v=h(f,"fragShader",r);f.fragShader=s.parseFragmentShaderMaxTextures(v,u.maxTextures),f.vertShader=h(f,"vertShader",n),f.attributes=h(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:o.UNSIGNED_BYTE,normalized:!0}]),f.resizeUniform="uResolution",i.call(this,f),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){i.prototype.boot.call(this);var l=this.renderer;this.set1iv("uMainSampler",l.textureIndexes),this.set2f("uResolution",l.width,l.height)},batchSprite:function(l,f,u){this.manager.set(this,l);var v=this._tempMatrix1,m=this._tempMatrix2,x=this._tempMatrix3,g=l.frame,y=g.glTexture,T=g.u0,C=g.v0,E=g.u1,M=g.v1,P=g.x,A=g.y,R=g.cutWidth,F=g.cutHeight,w=g.customPivot,I=l.displayOriginX,U=l.displayOriginY,N=-I+P,D=-U+A;if(l.isCropped){var B=l._crop;(B.flipX!==l.flipX||B.flipY!==l.flipY)&&g.updateCropUVs(B,l.flipX,l.flipY),T=B.u0,C=B.v0,E=B.u1,M=B.v1,R=B.width,F=B.height,P=B.x,A=B.y,N=-I+P,D=-U+A}var L=1,G=1;l.flipX&&(w||(N+=-g.realWidth+I*2),L=-1),l.flipY&&(w||(D+=-g.realHeight+U*2),G=-1);var O=l.x,X=l.y;f.roundPixels&&(O=Math.floor(O),X=Math.floor(X)),m.applyITRS(O,X,l.rotation,l.scaleX*L,l.scaleY*G),v.copyFrom(f.matrix),u?(v.multiplyWithOffset(u,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),m.e=O,m.f=X):(m.e-=f.scrollX*l.scrollFactorX,m.f-=f.scrollY*l.scrollFactorY),v.multiply(m,x);var z=x.setQuad(N,D,N+R,D+F,f.renderRoundPixels),V=s.getTintAppendFloatAlpha,Y=f.alpha,W=V(l.tintTopLeft,Y*l._alphaTL),H=V(l.tintTopRight,Y*l._alphaTR),K=V(l.tintBottomLeft,Y*l._alphaBL),b=V(l.tintBottomRight,Y*l._alphaBR);this.shouldFlush(6)&&this.flush();var J=this.setGameObject(l,g);this.manager.preBatch(l),this.batchQuad(l,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7],T,C,E,M,W,H,K,b,l.tintFill,y,J),this.manager.postBatch(l)},batchTexture:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B,L,G,O,X,z,V,Y,W,H,K,b){b===void 0&&(b=!1),this.manager.set(this,l);var J=this._tempMatrix1,$=this._tempMatrix2,Z=this._tempMatrix3,q=I/u+z,_=U/v+V,tt=(I+N)/u+z,Q=(U+D)/v+V,j=g,k=y,et=-F,nt=-w;if(l.isCropped){var lt=l._crop,it=lt.width,st=lt.height;j=it,k=st,g=it,y=st,I=lt.x,U=lt.y;var ft=I,ct=U;M&&(ft=N-lt.x-it),P&&(ct=D-lt.y-st),q=ft/u+z,_=ct/v+V,tt=(ft+it)/u+z,Q=(ct+st)/v+V,et=-F+I,nt=-w+U}P=P^(!H&&f.isRenderTexture?1:0),M&&(j*=-1,et+=g),P&&(k*=-1,nt+=y),Y.roundPixels&&(m=Math.floor(m),x=Math.floor(x)),$.applyITRS(m,x,E,T,C),J.copyFrom(Y.matrix),W?(J.multiplyWithOffset(W,-Y.scrollX*A,-Y.scrollY*R),$.e=m,$.f=x):($.e-=Y.scrollX*A,$.f-=Y.scrollY*R),J.multiply($,Z);var rt=Z.setQuad(et,nt,et+j,nt+k,Y.renderRoundPixels);K==null&&(K=this.setTexture2D(f)),l&&!b&&this.manager.preBatch(l),this.batchQuad(l,rt[0],rt[1],rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],q,_,tt,Q,B,L,G,O,X,f,K),l&&!b&&this.manager.postBatch(l)},batchTextureFrame:function(l,f,u,v,m,x,g){this.manager.set(this);var y=this._tempMatrix1.copyFrom(x),T=this._tempMatrix2;g?y.multiply(g,T):T=y;var C=T.setQuad(f,u,f+l.width,u+l.height),E=this.setTexture2D(l.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],l.u0,l.v0,l.u1,l.v1,v,v,v,v,0,l.glTexture,E)},batchFillRect:function(l,f,u,v,m,x){this.renderer.pipelines.set(this);var g=this.calcMatrix;x&&x.multiply(m,g);var y=g.setQuad(l,f,l+u,f+v),T=this.fillTint;this.batchQuad(null,y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],0,0,1,1,T.TL,T.TR,T.BL,T.BR,2)},batchFillTriangle:function(l,f,u,v,m,x,g,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(g,T);var C=T.getX(l,f),E=T.getY(l,f),M=T.getX(u,v),P=T.getY(u,v),A=T.getX(m,x),R=T.getY(m,x),F=this.fillTint;this.batchTri(null,C,E,M,P,A,R,0,0,1,1,F.TL,F.TR,F.BL,2)},batchStrokeTriangle:function(l,f,u,v,m,x,g,y,T){var C=this.tempTriangle;C[0].x=l,C[0].y=f,C[0].width=g,C[1].x=u,C[1].y=v,C[1].width=g,C[2].x=m,C[2].y=x,C[2].width=g,C[3].x=l,C[3].y=f,C[3].width=g,this.batchStrokePath(C,g,!1,y,T)},batchFillPath:function(l,f,u){this.renderer.pipelines.set(this);var v=this.calcMatrix;u&&u.multiply(f,v);for(var m=l.length,x=this.polygonCache,g,y,T=this.fillTint.TL,C=this.fillTint.TR,E=this.fillTint.BL,M=0;M0&&j[4]?this.batchQuad(null,J,$,W,H,j[0],j[1],j[2],j[3],0,0,1,1,q,_,tt,Q,2):(k[0]=J,k[1]=$,k[2]=W,k[3]=H,k[4]=1),T&&k[4]?this.batchQuad(null,V,Y,K,b,k[0],k[1],k[2],k[3],0,0,1,1,q,_,tt,Q,2):(j[0]=V,j[1]=Y,j[2]=K,j[3]=b,j[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});p.exports=a}),43439:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(4127),r=t(89924),n=t(29100),e=new d({Extends:n,initialize:function(o){o.vertShader=c(o,"vertShader",r),o.fragShader=c(o,"fragShader",h),o.attributes=c(o,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,o)},onRender:function(s,o){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",o.zoom)},batchPointLight:function(s,o,i,a,l,f,u,v,m,x,g,y){var T=s.color,C=s.intensity,E=s.radius,M=s.attenuation,P=T.r*C,A=T.g*C,R=T.b*C,F=o.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,a,g,y,E,M,P,A,R,F),this.batchLightVert(l,f,g,y,E,M,P,A,R,F),this.batchLightVert(u,v,g,y,E,M,P,A,R,F),this.batchLightVert(i,a,g,y,E,M,P,A,R,F),this.batchLightVert(u,v,g,y,E,M,P,A,R,F),this.batchLightVert(m,x,g,y,E,M,P,A,R,F),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,o,i,a,l,f,u,v,m,x){var g=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;g[++y]=s,g[++y]=o,g[++y]=i,g[++y]=a,g[++y]=l,g[++y]=f,g[++y]=u,g[++y]=v,g[++y]=m,g[++y]=x,this.vertexCount++}});p.exports=e}),84057:((p,S,t)=>{var d=t(83419),c=t(89422),h=t(95540),r=t(27681),n=t(49627),e=t(29100),s=new d({Extends:e,initialize:function(i){i.renderTarget=h(i,"renderTarget",1),i.fragShader=h(i,"fragShader",r),i.vertShader=h(i,"vertShader",n),i.attributes=h(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new 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 o=this.manager.UTILITY_PIPELINE;this.fullFrame1=o.fullFrame1,this.fullFrame2=o.fullFrame2,this.halfFrame1=o.halfFrame1,this.halfFrame2=o.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height);for(var a=this.renderTargets,l=0;l{var d=t(10312),c=t(67502),h=t(83419),r=t(96293),n=t(95540),e=t(57516),s=t(27681),o=t(87841),i=t(32302),a=t(45561),l=t(60722),f=t(29100),u=new h({Extends:e,initialize:function(m){var x=n(m,"fragShader",s),g=n(m,"vertShader",l),y=n(m,"drawShader",s),T=[{name:"DrawSprite",fragShader:a,vertShader:l},{name:"CopySprite",fragShader:x,vertShader:g},{name:"DrawGame",fragShader:y,vertShader:l},{name:"ColorMatrix",fragShader:r}],C=n(m,"shaders",[]);m.shaders=T.concat(C),m.vertShader||(m.vertShader=g),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new o,this.targetBounds=new o,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var x=new ArrayBuffer(168);this.quadVertexData=x,this.quadVertexViewF32=new Float32Array(x),this.quadVertexBuffer=m.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height)},onResize:function(v,m){var x=this.quadVertexViewF32;x[1]=m,x[22]=m,x[14]=v,x[28]=v,x[35]=v,x[36]=m},batchQuad:function(v,m,x,g,y,T,C,E,M,P,A,R,F,w,I,U,N,D,B){var L=Math.min(m,g,T,E),G=Math.min(x,y,C,M),O=Math.max(m,g,T,E),X=Math.max(x,y,C,M),z=O-L,V=X-G,Y=this.spriteBounds.setTo(L,G,z,V),W=v?v.preFX.padding:0,H=z+W*2,K=V+W*2,b=Math.abs(Math.max(H,K)),J=this.manager.getRenderTarget(b),$=this.targetBounds.setTo(0,0,J.width,J.height);c($,Math.round(Y.centerX),Math.round(Y.centerY)),this.tempSprite=v;var Z=this.gl,q=this.renderer;q.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",q.width,q.height),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,J),v.preFX.onFX(this));var _=this.fsTarget;return this.flush(),Z.viewport(0,0,q.width,q.height),Z.bindFramebuffer(Z.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_2D,_.texture.webGLTexture,0),Z.clearColor(0,0,0,0),Z.clear(Z.COLOR_BUFFER_BIT),this.setTexture2D(B),this.batchVert(m,x,P,A,0,D,w),this.batchVert(g,y,P,F,0,D,U),this.batchVert(T,C,R,F,0,D,N),this.batchVert(m,x,P,A,0,D,w),this.batchVert(T,C,R,F,0,D,N),this.batchVert(E,M,R,A,0,D,I),this.flush(),this.flipProjectionMatrix(!1),Z.activeTexture(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,J.texture.webGLTexture),Z.copyTexSubImage2D(Z.TEXTURE_2D,0,0,0,$.x,$.y,$.width,$.height),Z.bindFramebuffer(Z.FRAMEBUFFER,null),Z.bindTexture(Z.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(J,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,x,g,y,T,C){x===void 0&&(x=!0),g===void 0&&(g=!0),y===void 0&&(y=!1),C===void 0&&(C=this.copyShader);var E=this.gl,M=this.tempSprite;T&&(C=this.colorMatrixShader),this.currentShader=C;var P=this.setVertexBuffer(this.quadVertexBuffer);C.bind(P,!1);var A=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",A.width,A.height),M.preFX.onFXCopy(this),this.onCopySprite(v,m,M),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)E.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var R=m.height-v.height;E.viewport(0,R,v.width,v.height),this.resetUVs()}if(E.bindFramebuffer(E.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,m.texture.webGLTexture,0),x&&(E.clearColor(0,0,0,+!g),E.clear(E.COLOR_BUFFER_BIT)),y){var F=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}E.bufferData(E.ARRAY_BUFFER,this.quadVertexData,E.STATIC_DRAW),E.drawArrays(E.TRIANGLES,0,6),y&&this.renderer.setBlendMode(F),E.bindFramebuffer(E.FRAMEBUFFER,null)},copy:function(v,m){var x=this.gl;this.set1i("uMainSampler",0),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,v.texture.webGLTexture),x.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),x.bindFramebuffer(x.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,m.texture.webGLTexture,0),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.quadVertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null)},blendFrames:function(v,m,x,g,y){this.manager.blendFrames(v,m,x,g,y)},blendFramesAdditive:function(v,m,x,g,y){this.manager.blendFramesAdditive(v,m,x,g,y)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var g=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,C=y+v.width,E=T+v.height,M=g.getX(y,T),P=g.getX(y,E),A=g.getX(C,E),R=g.getX(C,T),F=g.getY(y,T),w=g.getY(y,E),I=g.getY(C,E),U=g.getY(C,T),N=16777215;this.batchVert(M,F,0,0,0,0,N),this.batchVert(P,w,0,1,0,0,N),this.batchVert(A,I,1,1,0,0,N),this.batchVert(M,F,0,0,0,0,N),this.batchVert(A,I,1,1,0,0,N),this.batchVert(R,U,1,0,0,0,N),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||m.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,x,g,y,T,C,E){var M=this.quadVertexViewF32;M[2]=v,M[3]=m,M[9]=x,M[10]=g,M[16]=y,M[17]=T,M[23]=v,M[24]=m,M[30]=y,M[31]=T,M[37]=C,M[38]=E},setTargetUVs:function(v,m){var x=m.height/v.height;x>.5?x=.5-(x-.5):x=.5+(.5-x),this.setUVs(0,x,0,1+x,1,1+x,1,x)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});p.exports=u}),81041:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=new d({Extends:h,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),h.call(this,e)}});p.exports=r}),12385:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(29100),s=new d({Extends:h,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,h.call(this,i)},boot:function(){e.prototype.boot.call(this);var o=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height)}});p.exports=s}),7589:((p,S,t)=>{var d=t(35407),c=t(10312),h=t(83419),r=t(89422),n=t(96293),e=t(36682),s=t(95540),o=t(48247),i=t(49627),a=t(29100),l=new h({Extends:a,initialize:function(u){u.renderTarget=s(u,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),u.vertShader=s(u,"vertShader",i),u.shaders=s(u,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:o},{name:"ColorMatrix",fragShader:n}]),u.attributes=s(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.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],u.batchSize=1,a.call(this,u),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){a.prototype.boot.call(this);var f=this.shaders,u=this.renderTargets;this.copyShader=f[0],this.addShader=f[1],this.linearShader=f[2],this.colorMatrixShader=f[3],this.fullFrame1=u[0],this.fullFrame2=u[1],this.halfFrame1=u[2],this.halfFrame2=u[3]},copyFrame:function(f,u,v,m,x){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0);var g=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,f.texture.webGLTexture),u?(g.viewport(0,0,u.width,u.height),g.bindFramebuffer(g.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,u.texture.webGLTexture,0)):g.viewport(0,0,f.width,f.height),m&&(x?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT)),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blitFrame:function(f,u,v,m,x,g,y){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0),g===void 0&&(g=!1),y===void 0&&(y=!1);var T=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,f.texture.webGLTexture),f.height>u.height)T.viewport(0,0,f.width,f.height),this.setTargetUVs(f,u);else{var C=u.height-f.height;T.viewport(0,C,f.width,f.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,u.texture.webGLTexture,0),m&&(x?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),g){var E=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}y&&this.flipY(),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),g&&this.renderer.setBlendMode(E),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(f,u,v,m,x,g,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var C=this.gl;C.bindFramebuffer(C.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,f.texture.webGLTexture,0),y&&(T?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),C.copyTexSubImage2D(C.TEXTURE_2D,0,0,0,v,m,x,g),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},copyToGame:function(f){var u=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,f.texture.webGLTexture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6)},drawFrame:function(f,u,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,f.texture.webGLTexture),u?(x.viewport(0,0,u.width,u.height),x.bindFramebuffer(x.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,u.texture.webGLTexture,0)):x.viewport(0,0,f.width,f.height),v?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blendFrames:function(f,u,v,m,x,g){m===void 0&&(m=1),x===void 0&&(x=!0),g===void 0&&(g=this.linearShader);var y=this.gl;this.setShader(g),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,f.texture.webGLTexture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),v?(y.bindFramebuffer(y.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,v.texture.webGLTexture,0),y.viewport(0,0,v.width,v.height)):y.viewport(0,0,f.width,f.height),x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(f,u,v,m,x){this.blendFrames(f,u,v,m,x,this.addShader)},clearFrame:function(f,u){u===void 0&&(u=!0);var v=this.gl;v.viewport(0,0,f.width,f.height),v.bindFramebuffer(v.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),u?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m.webGLFramebuffer)},setUVs:function(f,u,v,m,x,g,y,T){var C=this.vertexViewF32;C[2]=f,C[3]=u,C[6]=v,C[7]=m,C[10]=x,C[11]=g,C[14]=f,C[15]=u,C[18]=x,C[19]=g,C[22]=y,C[23]=T},setTargetUVs:function(f,u){var v=u.height/f.height;v>.5?v=.5-(v-.5):v=.5+(.5-v),this.setUVs(0,v,0,1+v,1,1+v,1,v)},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)}});p.exports=l}),36060:(p=>{var S={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"};p.exports=S}),84817:(p=>{p.exports="pipelineafterflush"}),36712:(p=>{p.exports="pipelinebeforeflush"}),40285:(p=>{p.exports="pipelinebind"}),65918:(p=>{p.exports="pipelineboot"}),92852:(p=>{p.exports="pipelinedestroy"}),56072:(p=>{p.exports="pipelinerebind"}),57566:(p=>{p.exports="pipelineresize"}),77085:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=t(99155),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});p.exports=r}),67329:((p,S,t)=>{var d=t(83419),c=t(24400),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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(),s=this.fullFrame1,o=this.fullFrame2;this.copyFrame(n,o);for(var i=2/n.width*e.offsetX,a=2/n.height*e.offsetY,l=0;l{var d=t(83419),c=t(41514),h=t(51078),r=t(94328),n=t(84057),e=new d({Extends:n,initialize:function(o){n.call(this,{game:o,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:h},{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(s){var o=this.getController(),i=this.gl,a=this.fullFrame1,l=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[o.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,s.width,s.height),this.set1i("uMainSampler",0),this.set2f("resolution",s.width,s.height),this.set1f("strength",o.strength),this.set3fv("color",o.glcolor);for(var f=0;f{var d=t(83419),c=t(90610),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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,s,o){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),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),89428:((p,S,t)=>{var d=t(83419),c=t(91899),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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,s,o){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),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),88904:((p,S,t)=>{var d=t(83419),c=t(84057),h=new d({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)}});p.exports=h}),63563:((p,S,t)=>{var d=t(83419),c=t(47838),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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(),s=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,s),this.copyToGame(s)}});p.exports=r}),94045:((p,S,t)=>{var d=t(83419),c=t(95540),h=t(98656),r=t(84057),n=t(70554),e=new d({Extends:r,initialize:function(o,i){var a=c(i,"quality",.1),l=c(i,"distance",10);r.call(this,{game:o,fragShader:n.setGlowQuality(h,o,a,l)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,o,i,a){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,o),this.set1f("innerStrength",s.innerStrength,o),this.set4fv("glowColor",s.glcolor,o),this.setBoolean("knockout",s.knockout,o),i&&a&&this.set2f("resolution",i,a,o)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});p.exports=e}),74088:((p,S,t)=>{var d=t(83419),c=t(70463),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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)}});p.exports=r}),99636:((p,S,t)=>{var d=t(83419),c=t(50831),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,o){n=this.getController(n),this.set1f("amount",n.amount,e),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),34700:((p,S,t)=>{var d=t(83419),c=t(92595),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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 s=n.samples;this.set1i("samples",s,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/s,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});p.exports=r}),91157:((p,S,t)=>{var d=t(83419),c=t(72464),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,o){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),s&&o&&this.set2f("resolution",s,o,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r}),27797:((p,S,t)=>{var d=t(83419),c=t(39249),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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)}});p.exports=r}),67603:((p,S,t)=>{var d=t(83419),c=t(2878),h=t(84057),r=new d({Extends:h,initialize:function(e){h.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 s=n.progress,o=n.wipeWidth,i=n.direction,a=n.axis;this.set4f("config",s,o,i,a,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r}),58918:((p,S,t)=>{var d={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)};p.exports=d}),96615:((p,S,t)=>{var d=t(36060),c=t(79291),h={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};h=c(!1,h,d),p.exports=h}),35407:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","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);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)}),98840:(p=>{p.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:(p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","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);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)}),4127:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.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:(p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","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);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)}),89350:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(83419),c=new d({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 h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});p.exports=c}),26128:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var r=this.bufferType,n=h.createBuffer();this.webGLBuffer=n,h.bindBuffer(r,this.webGLBuffer),h.bufferData(r,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(r,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});p.exports=c}),84387:((p,S,t)=>{var d=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new d({initialize:function(n,e,s,o,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=o,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,s=r.createFramebuffer();if(this.webGLFramebuffer=s,r.bindFramebuffer(r.FRAMEBUFFER,s),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 o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}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}}});p.exports=h}),1482:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var r=h.createProgram(),n=h.createShader(h.VERTEX_SHADER),e=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(n,this.vertexSource),h.shaderSource(e,this.fragmentSource),h.compileShader(n),h.compileShader(e);var s=`Shader failed: +`;if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Vertex "+s+h.getShaderInfoLog(n));if(!h.getShaderParameter(e,h.COMPILE_STATUS))throw new Error("Fragment "+s+h.getShaderInfoLog(e));if(h.attachShader(r,n),h.attachShader(r,e),h.linkProgram(r),!h.getProgramParameter(r,h.LINK_STATUS))throw new Error("Link "+s+h.getProgramInfoLog(r));h.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});p.exports=c}),82751:((p,S,t)=>{var d=t(83419),c=t(50030),h=new d({initialize:function(n,e,s,o,i,a,l,f,u,v,m,x,g){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=o,this.wrapT=i,this.wrapS=a,this.format=l,this.pixels=f,this.width=u,this.height=v,this.pma=m??!0,this.forceSize=!!x,this.flipY=!!g,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof h){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,s,o,i,a,l,f){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=s,this.wrapS=o,this.wrapT=i,this.minFilter=a,this.magFilter=l,this.format=f;var u=this.gl;u.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,s=this.mipLevel,o=this.width,i=this.height,a=this.format,l=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,null),l=c(o,i);else if(e.compressed){o=e.width,i=e.height,l=e.generateMipmap;for(var f=0;f{var d=t(83419),c=new d({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 h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});p.exports=c}),9503:((p,S,t)=>{var d={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};p.exports=d}),76531:((p,S,t)=>{var d=t(13560),c=t(83419),h=t(45319),r=t(50792),n=t(97480),e=t(8443),s=t(57811),o=t(74403),i=t(45818),a=t(29747),l=t(87841),f=t(86555),u=t(56583),v=t(26099),m=t(38058),x=new c({Extends:r,initialize:function(y){r.call(this),this.game=y,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.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:a,windowResize:a,fullScreenChange:a,fullScreenError:a}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(e.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var y=this.scaleMode;y!==d.SCALE_MODE.RESIZE&&y!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(y),y===d.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()),g.events.on(e.PRE_STEP,this.step,this),g.events.once(e.READY,this.refresh,this),g.events.once(e.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var y=g.width,T=g.height,C=g.scaleMode,E=g.zoom,M=g.autoRound;if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var P=this.parentSize.width;P===0&&(P=window.innerWidth);var A=parseInt(y,10)/100;y=Math.floor(P*A)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var R=this.parentSize.height;R===0&&(R=window.innerHeight);var F=parseInt(T,10)/100;T=Math.floor(R*F)}this.scaleMode=C,this.autoRound=M,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,M&&(y=Math.floor(y),T=Math.floor(T)),this.gameSize.setSize(y,T),E===d.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(y,T),M&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*E,g.minHeight*E),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*E,g.maxHeight*E),this.displaySize.setSize(y,T),(g.snapWidth>0||g.snapHeight>0)&&this.displaySize.setSnap(g.snapWidth,g.snapHeight),this.orientation=i(y,T)},getParent:function(g){var y=g.parent;if(y!==null){if(this.parent=o(y),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==d.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%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=o(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,y=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(y.height=s(!0));var T=y.width,C=y.height;if(g.width!==T||g.height!==C)return g.setSize(T,C),!0;if(this.canvas){var E=this.canvasBounds,M=this.canvas.getBoundingClientRect();if(M.x!==E.x||M.y!==E.y)return!0}return!1},lockOrientation:function(g){var y=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return y?y.call(screen,g):!1},setParentSize:function(g,y){return this.parentSize.setSize(g,y),this.refresh()},setGameSize:function(g,y){var T=this.autoRound;T&&(g=Math.floor(g),y=Math.floor(y));var C=this.width,E=this.height;return this.gameSize.resize(g,y),this.baseSize.resize(g,y),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(C,E)},resize:function(g,y){var T=this.zoom,C=this.autoRound;C&&(g=Math.floor(g),y=Math.floor(y));var E=this.width,M=this.height;this.gameSize.resize(g,y),this.baseSize.resize(g,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*T,y*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var P=this.canvas.style,A=g*T,R=y*T;return C&&(A=Math.floor(A),R=Math.floor(R)),(A!==g||R!==y)&&(P.width=A+"px",P.height=R+"px"),this.refresh(E,M)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(g,y){return g===void 0&&(g=0),y===void 0&&(y=g),this.displaySize.setSnap(g,y),this.refresh()},refresh:function(g,y){g===void 0&&(g=this.width),y===void 0&&(y=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var C=this.canvas.style,E=T.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=C.marginLeft,E.marginTop=C.marginTop}return this.emit(n.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,y),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=i(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(n.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,y=this.gameSize.width,T=this.gameSize.height,C,E,M=this.zoom,P=this.autoRound;if(this.scaleMode===d.SCALE_MODE.NONE)this.displaySize.setSize(y*M,T*M),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this._resetZoom&&(g.width=C+"px",g.height=E+"px",this._resetZoom=!1);else if(this.scaleMode===d.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this.canvas.width=C,this.canvas.height=E;else if(this.scaleMode===d.SCALE_MODE.EXPAND){var A=this.game.config.width,R=this.game.config.height,F=this.parentSize.width,w=this.parentSize.height,I=F/A,U=w/R,N,D;I=0?0:-(E.x*M.x),A=E.y>=0?0:-(E.y*M.y),R;C.width>=E.width?R=T.width:R=T.width-(E.width-C.width)*M.x;var F;return C.height>=E.height?F=T.height:F=T.height-(E.height-C.height)*M.y,y.setTo(P,A,R,F),g&&(y.width/=g.zoomX,y.height/=g.zoomY,y.centerX=g.centerX+g.scrollX,y.centerY=g.centerY+g.scrollY),y},step:function(g,y){this.parent&&(this._lastCheck+=y,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",g.orientationChange,!1):window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var y=["webkit","moz",""];y.forEach(function(T){document.removeEventListener(T+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.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===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=x}),64743:(p=>{p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}}),39218:(p=>{p.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}}),81050:(p=>{p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}}),80805:(p=>{p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}}),13560:((p,S,t)=>{var d={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};p.exports=d}),56139:(p=>{p.exports="enterfullscreen"}),2336:(p=>{p.exports="fullscreenfailed"}),47412:(p=>{p.exports="fullscreenunsupported"}),51452:(p=>{p.exports="leavefullscreen"}),20666:(p=>{p.exports="orientationchange"}),47945:(p=>{p.exports="resize"}),97480:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(79291),c=t(13560),h={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};h=d(!1,h,c.CENTER),h=d(!1,h,c.ORIENTATION),h=d(!1,h,c.SCALE_MODE),h=d(!1,h,c.ZOOM),p.exports=h}),27397:((p,S,t)=>{var d=t(95540),c=t(35355),h=function(r){var n=r.game.config.defaultPhysicsSystem,e=d(r.settings,"physics",!1);if(!(!n&&!e)){var s=[];if(n&&s.push(c(n+"Physics")),e)for(var o in e)o=c(o.concat("Physics")),s.indexOf(o)===-1&&s.push(o);return s}};p.exports=h}),52106:((p,S,t)=>{var d=t(95540),c=function(h){var r=h.plugins.getDefaultScenePlugins(),n=d(h.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c}),87033:(p=>{var S={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"};p.exports=S}),97482:((p,S,t)=>{var d=t(83419),c=t(2368),h=new d({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(){}});p.exports=h}),60903:((p,S,t)=>{var d=t(83419),c=t(89993),h=t(44594),r=t(8443),n=t(35154),e=t(54899),s=t(29747),o=t(97482),i=t(2368),a=new d({initialize:function(f,u){if(this.game=f,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,u){Array.isArray(u)||(u=[u]);for(var v=0;v-1&&(delete this.keys[v],this.scenes.splice(u,1),this._start.indexOf(v)>-1&&(u=this._start.indexOf(v),this._start.splice(u,1)),f.sys.destroy()),this},bootScene:function(l){var f=l.sys,u=f.settings;f.sceneUpdate=s,l.init&&(l.init.call(l,u.data),u.status=c.INIT,u.isTransition&&f.events.emit(h.TRANSITION_INIT,u.transitionFrom,u.transitionDuration));var v;f.load&&(v=f.load,v.reset()),v&&l.preload?(l.preload.call(l),u.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(l)},loadComplete:function(l){this.create(l.scene)},payloadComplete:function(l){this.bootScene(l.scene)},update:function(l,f){this.processQueue(),this.isProcessing=!0;for(var u=this.scenes.length-1;u>=0;u--){var v=this.scenes[u].sys;v.settings.status>c.START&&v.settings.status<=c.RUNNING&&v.step(l,f),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(l,f)}},render:function(l){for(var f=0;f=c.LOADING&&u.settings.status=c.START&&m<=c.CREATING)return this;if(m>=c.RUNNING&&m<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(f);else{v.sceneUpdate=s,v.start(f);var x;if(v.load&&(x=v.load),x&&v.settings.hasOwnProperty("pack")&&(x.reset(),x.addPack({payload:v.settings.pack})))return v.settings.status=c.LOADING,x.once(e.COMPLETE,this.payloadComplete,this),x.start(),this}return this.bootScene(u),this},stop:function(l,f){var u=this.getScene(l);if(u&&!u.sys.isTransitioning()&&u.sys.settings.status!==c.SHUTDOWN){var v=u.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),u.sys.shutdown(f)}return this},switch:function(l,f,u){var v=this.getScene(l),m=this.getScene(f);return v&&m&&v!==m&&(this.sleep(l),this.isSleeping(f)?this.wake(f,u):this.start(f,u)),this},getAt:function(l){return this.scenes[l]},getIndex:function(l){var f=this.getScene(l);return this.scenes.indexOf(f)},bringToTop:function(l){if(this.isProcessing)return this.queueOp("bringToTop",l);var f=this.getIndex(l),u=this.scenes;if(f!==-1&&f0){var u=this.getScene(l);this.scenes.splice(f,1),this.scenes.unshift(u)}return this},moveDown:function(l){if(this.isProcessing)return this.queueOp("moveDown",l);var f=this.getIndex(l);if(f>0){var u=f-1,v=this.getScene(l),m=this.getAt(u);this.scenes[f]=m,this.scenes[u]=v}return this},moveUp:function(l){if(this.isProcessing)return this.queueOp("moveUp",l);var f=this.getIndex(l);if(fu),0,m)}return this},moveBelow:function(l,f){if(l===f)return this;if(this.isProcessing)return this.queueOp("moveBelow",l,f);var u=this.getIndex(l),v=this.getIndex(f);if(u!==-1&&v!==-1&&v>u){var m=this.getAt(v);this.scenes.splice(v,1),u===0?this.scenes.unshift(m):this.scenes.splice(u-(v{var d=t(45319),c=t(83419),h=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(o){this.scene=o,this.systems=o.sys,this.settings=o.sys.settings,this.key=o.sys.settings.key,this.manager=o.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,o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,o),this},restart:function(s){var o=this.key;return this.manager.queueOp("stop",o),this.manager.queueOp("start",o,s),this},transition:function(s){s===void 0&&(s={});var o=r(s,"target",!1),i=this.manager.getScene(o);if(!o||!this.checkValidTransition(i))return!1;var a=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=a,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var l=r(s,"onUpdate",null);l&&(this._onUpdate=l,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var f=r(s,"allowInput",!1);this.settings.transitionAllowInput=f;var u=i.sys.settings;u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=a,u.transitionAllowInput=f,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,o):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,o),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(o,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,a),this.systems.events.emit(h.TRANSITION_OUT,i,a),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,o){this._elapsed+=o,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,o=this._target.sys.settings;s.events.emit(h.TRANSITION_COMPLETE,this.scene),o.isTransition=!1,o.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(s,o,i,a){return this.manager.add(s,o,i,a)},launch:function(s,o){return s&&s!==this.key&&this.manager.queueOp("start",s,o),this},run:function(s,o){return s&&s!==this.key&&this.manager.queueOp("run",s,o),this},pause:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,o),this},resume:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,o),this},sleep:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,o),this},wake:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,o),this},switch:function(s,o){return s!==this.key&&this.manager.queueOp("switch",this.key,s,o),this},stop:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,o),this},setActive:function(s,o,i){o===void 0&&(o=this.key);var a=this.manager.getScene(o);return a&&a.sys.setActive(s,i),this},setVisible:function(s,o){o===void 0&&(o=this.key);var i=this.manager.getScene(o);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.swapPosition(s,o),this},moveAbove:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveAbove(s,o),this},moveBelow:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveBelow(s,o),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var o=this.manager.getScene(s);if(o)return o.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),this.manager.getIndex(s)},shutdown:function(){var s=this.systems.events;s.off(h.SHUTDOWN,this.shutdown,this),s.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),p.exports=e}),55681:((p,S,t)=>{var d=t(89993),c=t(35154),h=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:d.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",h(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};p.exports=n}),2368:((p,S,t)=>{var d=t(83419),c=t(89993),h=t(42363),r=t(44594),n=t(27397),e=t(52106),s=t(29747),o=t(55681),i=new d({initialize:function(l,f){this.scene=l,this.game,this.renderer,this.config=f,this.settings=o.create(f),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=s},init:function(a){this.settings.status=c.INIT,this.sceneUpdate=s,this.game=a,this.renderer=a.renderer,this.canvas=a.canvas,this.context=a.context;var l=a.plugins;this.plugins=l,l.addToScene(this,h.Global,[h.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(a,l){var f=this.events;f.emit(r.PRE_UPDATE,a,l),f.emit(r.UPDATE,a,l),this.sceneUpdate.call(this.scene,a,l),f.emit(r.POST_UPDATE,a,l)},render:function(a){var l=this.displayList;l.depthSort(),this.events.emit(r.PRE_RENDER,a),this.cameras.render(a,l),this.events.emit(r.RENDER,a)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(a){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot pause non-running Scene",l.key):this.settings.active&&(l.status=c.PAUSED,l.active=!1,this.events.emit(r.PAUSE,this,a)),this},resume:function(a){var l=this.events,f=this.settings;return this.settings.active||(f.status=c.RUNNING,f.active=!0,l.emit(r.RESUME,this,a)),this},sleep:function(a){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot sleep non-running Scene",l.key):(l.status=c.SLEEPING,l.active=!1,l.visible=!1,this.events.emit(r.SLEEP,this,a)),this},wake:function(a){var l=this.events,f=this.settings;return f.status=c.RUNNING,f.active=!0,f.visible=!0,l.emit(r.WAKE,this,a),f.isTransition&&l.emit(r.TRANSITION_WAKE,f.transitionFrom,f.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var a=this.settings.status;return a>c.PENDING&&a<=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(a){return this.settings.visible=a,this},setActive:function(a,l){return a?this.resume(l):this.pause(l)},start:function(a){var l=this.events,f=this.settings;a&&(f.data=a),f.status=c.START,f.active=!0,f.visible=!0,l.emit(r.START,this),l.emit(r.READY,this,a)},shutdown:function(a){var l=this.events,f=this.settings;l.off(r.TRANSITION_INIT),l.off(r.TRANSITION_START),l.off(r.TRANSITION_COMPLETE),l.off(r.TRANSITION_OUT),f.status=c.SHUTDOWN,f.active=!1,f.visible=!1,l.emit(r.SHUTDOWN,this,a)},destroy:function(){var a=this.events,l=this.settings;l.status=c.DESTROYED,l.active=!1,l.visible=!1,a.emit(r.DESTROY,this),a.removeAllListeners();for(var f=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],u=0;u{var S={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=S}),69830:(p=>{p.exports="addedtoscene"}),7919:(p=>{p.exports="boot"}),46763:(p=>{p.exports="create"}),11763:(p=>{p.exports="destroy"}),71555:(p=>{p.exports="pause"}),36735:(p=>{p.exports="postupdate"}),3809:(p=>{p.exports="prerender"}),90716:(p=>{p.exports="preupdate"}),58262:(p=>{p.exports="ready"}),91633:(p=>{p.exports="removedfromscene"}),10319:(p=>{p.exports="render"}),87132:(p=>{p.exports="resume"}),81961:(p=>{p.exports="shutdown"}),90194:(p=>{p.exports="sleep"}),6265:(p=>{p.exports="start"}),33178:(p=>{p.exports="transitioncomplete"}),43063:(p=>{p.exports="transitioninit"}),11259:(p=>{p.exports="transitionout"}),61611:(p=>{p.exports="transitionstart"}),45209:(p=>{p.exports="transitionwake"}),22966:(p=>{p.exports="update"}),21747:(p=>{p.exports="wake"}),44594:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(89993),c=t(79291),h={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};h=c(!1,h,d),p.exports=h}),30341:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(14463),r=t(79291),n=t(29747),e=new d({Extends:c,initialize:function(o,i,a){c.call(this),this.manager=o,this.key=i,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=r(this.config,a),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(console.error("addMarker "+s.name+" already exists in Sound"),!1):(s=r(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},s),this.markers[s.name]=s,!0)},updateMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(this.markers[s.name]=r(!0,this.markers[s.name],s),!0):(console.warn("Audio Marker: "+s.name+" missing in Sound: "+this.key),!1)},removeMarker:function(s){var o=this.markers[s];return o?(this.markers[s]=null,o):null},play:function(s,o){if(s===void 0&&(s=""),typeof s=="object"&&(o=s,s=""),typeof s!="string")return!1;if(!s)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[s])return console.warn("Marker: "+s+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[s],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,o),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 s=1.0005777895065548,o=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,o);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e}),85034:((p,S,t)=>{var d=t(83419),c=t(41786),h=t(50792),r=t(14463),n=t(8443),e=t(46710),s=t(58731),o=t(29747),i=t(26099),a=new d({Extends:h,initialize:function(f){h.call(this),this.game=f,this.jsonCache=f.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new i;var u=f.events;u.on(n.BLUR,this.onGameBlur,this),u.on(n.FOCUS,this.onGameFocus,this),u.on(n.PRE_STEP,this.update,this),u.once(n.DESTROY,this.destroy,this)},add:o,addAudioSprite:function(l,f){f===void 0&&(f={});var u=this.add(l,f);u.spritemap=this.jsonCache.get(l).spritemap;for(var v in u.spritemap)if(u.spritemap.hasOwnProperty(v)){var m=c(f),x=u.spritemap[v];m.loop=x.hasOwnProperty("loop")?x.loop:!1,u.addMarker({name:v,start:x.start,duration:x.end-x.start,config:m})}return u},get:function(l){return s(this.sounds,"key",l)},getAll:function(l){return l?e(this.sounds,"key",l):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(l,f){var u=this.add(l);return u.once(r.COMPLETE,u.destroy,u),f?f.name?(u.addMarker(f),u.play(f.name)):u.play(f):u.play()},playAudioSprite:function(l,f,u){var v=this.addAudioSprite(l);return v.once(r.COMPLETE,v.destroy,v),v.play(f,u)},remove:function(l){var f=this.sounds.indexOf(l);return f!==-1?(l.destroy(),this.sounds.splice(f,1),!0):!1},removeAll:function(){this.sounds.forEach(function(l){l.destroy()}),this.sounds.length=0},removeByKey:function(l){for(var f=0,u=this.sounds.length-1;u>=0;u--){var v=this.sounds[u];v.key===l&&(v.destroy(),this.sounds.splice(u,1),f++)}return f},pauseAll:function(){this.forEachActiveSound(function(l){l.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(l){l.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:o,stopAll:function(){this.forEachActiveSound(function(l){l.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(l){var f=0;return this.getAll(l).forEach(function(u){u.stop()&&f++}),f},isPlaying:function(l){var f=this.sounds,u=f.length-1,v;if(l===void 0){for(;u>=0;u--)if(v=this.sounds[u],v.isPlaying)return!0}else for(;u>=0;u--)if(v=this.sounds[u],v.key===l&&v.isPlaying)return!0;return!1},unlock:o,onBlur:o,onFocus:o,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(l,f){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var u=this.sounds.length-1;u>=0;u--)this.sounds[u].pendingRemove&&this.sounds.splice(u,1);this.sounds.forEach(function(v){v.update(l,f)})},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(l,f){var u=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&l.call(f||u,v,m,u.sounds)})},setRate:function(l){return this.rate=l,this},rate:{get:function(){return this._rate},set:function(l){this._rate=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_RATE,this,l)}},setDetune:function(l){return this.detune=l,this},detune:{get:function(){return this._detune},set:function(l){this._detune=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,l)}}});p.exports=a}),14747:((p,S,t)=>{var d=t(33684),c=t(25960),h=t(57490),r={create:function(n){var e=n.config.audio,s=n.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new c(n):s.webAudio&&!e.disableWebAudio?new h(n):new d(n)}};p.exports=r}),19723:(p=>{p.exports="complete"}),98882:(p=>{p.exports="decodedall"}),57506:(p=>{p.exports="decoded"}),73146:(p=>{p.exports="destroy"}),11305:(p=>{p.exports="detune"}),40577:(p=>{p.exports="detune"}),30333:(p=>{p.exports="mute"}),20394:(p=>{p.exports="rate"}),21802:(p=>{p.exports="volume"}),1299:(p=>{p.exports="looped"}),99190:(p=>{p.exports="loop"}),97125:(p=>{p.exports="mute"}),89259:(p=>{p.exports="pan"}),79986:(p=>{p.exports="pauseall"}),17586:(p=>{p.exports="pause"}),19618:(p=>{p.exports="play"}),42306:(p=>{p.exports="rate"}),10387:(p=>{p.exports="resumeall"}),48959:(p=>{p.exports="resume"}),9960:(p=>{p.exports="seek"}),19180:(p=>{p.exports="stopall"}),98328:(p=>{p.exports="stop"}),50401:(p=>{p.exports="unlocked"}),52498:(p=>{p.exports="volume"}),14463:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(14463),r=t(45319),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(o),!this.tags)throw new Error('No cached audio asset with key "'+o);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,s,o,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!d.prototype.play.call(this,e,s)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,o=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=o,this.audio.currentTime=o,this.applyConfig(),s===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+s*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=o-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-o),i=this.audio.currentTime):i=o){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=i}},destroy:function(){d.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(){d.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(h.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(h.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,h.RATE,e)&&(this.calculateRate(),this.emit(h.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,h.DETUNE,e)&&(this.calculateRate(),this.emit(h.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(h.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(h.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(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n}),33684:((p,S,t)=>{var d=t(85034),c=t(83419),h=t(14463),r=t(64895),n=new c({Extends:d,initialize:function(s){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,d.call(this,s)},add:function(e,s){var o=new r(this,e,s);return this.sounds.push(o),o},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(a,l){for(var f=0;f{p.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:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(50792),r=t(79291),n=t(29747),e=function(){return!1},s=function(){return null},o=function(){return this},i=new c({Extends:h,initialize:function(l,f,u){u===void 0&&(u={}),h.call(this),this.manager=l,this.key=f,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},u),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:s,play:e,pause:e,resume:e,stop:e,setMute:o,setVolume:o,setRate:o,setDetune:o,setSeek:o,setLoop:o,setPan:o,applyConfig:s,resetConfig:s,update:n,calculateRate:s,destroy:function(){d.prototype.destroy.call(this)}});p.exports=i}),25960:((p,S,t)=>{var d=t(85034),c=t(83419),h=t(50792),r=t(4603),n=t(29747),e=new c({Extends:h,initialize:function(o){h.call(this),this.game=o,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,o){var i=new r(this,s,o);return this.sounds.push(i),i},addAudioSprite:function(s,o){var i=this.add(s,o);return i.spritemap={},i},get:function(s){return d.prototype.get.call(this,s)},getAll:function(s){return d.prototype.getAll.call(this,s)},play:function(s,o){return!1},playAudioSprite:function(s,o,i){return!1},remove:function(s){return d.prototype.remove.call(this,s)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(s){return d.prototype.removeByKey.call(this,s)},stopByKey:function(s){return d.prototype.stopByKey.call(this,s)},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(s,o){d.prototype.forEachActiveSound.call(this,s,o)},destroy:function(){d.prototype.destroy.call(this)}});p.exports=e}),71741:((p,S,t)=>{var d=t(30341),c=t(83419),h=t(14463),r=t(95540),n=new c({Extends:d,initialize:function(s,o,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(o),!this.audioBuffer)throw new Error('Audio key "'+o+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.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),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,s,o,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{var d=t(53134),c=t(85034),h=t(83419),r=t(14463),n=t(8443),e=t(71741),s=t(95540),o=new h({Extends:c,initialize:function(a){this.context=this.createAudioContext(a),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",c.call(this,a),this.locked&&(a.isBooted?this.unlock():a.events.once(n.BOOT,this.unlock,this)),a.events.on(n.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var i=this.context;window.setTimeout(function(){i&&(i.suspend(),i.resume())},100)},createAudioContext:function(i){var a=i.config.audio;if(a.context)return a.context.resume(),a.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,a){var l=new e(this,i,a);return this.sounds.push(l),l},decodeAudio:function(i,a){var l;Array.isArray(i)?l=i:l=[{key:i,data:a}];for(var f=this.game.cache.audio,u=l.length,v=0;v{var d=t(37105),c=t(83419),h=t(29747),r=t(19186),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(e,s){return s?d.Add(this.list,e):d.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,o){return o?d.AddAt(this.list,e,s):d.AddAt(this.list,e,s,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,s){return e?(s===void 0&&(s=function(o,i){return o[e]-i[e]}),r(this.list,s),this):this},getByName:function(e){return d.GetFirst(this.list,"name",e)},getRandom:function(e,s){return d.GetRandom(this.list,e,s)},getFirst:function(e,s,o,i){return d.GetFirst(this.list,e,s,o,i)},getAll:function(e,s,o,i){return d.GetAll(this.list,e,s,o,i)},count:function(e,s){return d.CountAllMatching(this.list,e,s)},swap:function(e,s){d.Swap(this.list,e,s)},moveTo:function(e,s){return d.MoveTo(this.list,e,s)},moveAbove:function(e,s){return d.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return d.MoveBelow(this.list,e,s)},remove:function(e,s){return s?d.Remove(this.list,e):d.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?d.RemoveAt(this.list,e):d.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,o){return o?d.RemoveBetween(this.list,e,s):d.RemoveBetween(this.list,e,s,this.removeCallback,this)},removeAll:function(e){for(var s=this.list.length;s--;)this.remove(this.list[s],e);return this},bringToTop:function(e){return d.BringToTop(this.list,e)},sendToBack:function(e){return d.SendToBack(this.list,e)},moveUp:function(e){return d.MoveUp(this.list,e),e},moveDown:function(e){return d.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(e,s){return d.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,o,i){return d.SetAll(this.list,e,s,o,i),this},each:function(e,s){for(var o=[null],i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});p.exports=n}),90330:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(h){if(Array.isArray(h))for(var r=0;r{var d=t(83419),c=t(50792),h=t(82348),r=new d({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,s=e.indexOf(n);s!==-1&&e.splice(s,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,s=n.length;s--;)e.push(n[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,s,o;for(s=0;s{var d=t(43886);function c(g){if(!(this instanceof c))return new c(g);this._maxEntries=Math.max(4,g||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(g){var y=this.data,T=[],C=this.toBBox;if(!v(g,y))return T;for(var E=[],M,P,A,R;y;){for(M=0,P=y.children.length;M=0&&M[y].children.length>this._maxEntries;)this._split(M,y),y--;this._adjustParentBBoxes(E,M,y)},_split:function(g,y){var T=g[y],C=T.children.length,E=this._minEntries;this._chooseSplitAxis(T,E,C);var M=this._chooseSplitIndex(T,E,C),P=m(T.children.splice(M,T.children.length-M));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?g[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(g,y){this.data=m([g,y]),this.data.height=g.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(g,y,T){var C,E,M,P,A,R,F,w;for(R=F=1/0,C=y;C<=T-y;C++)E=n(g,0,C,this.toBBox),M=n(g,C,T,this.toBBox),P=f(E,M),A=i(E)+i(M),P=y;R--)F=g.children[R],e(P,g.leaf?E(F):F),A+=a(P);return A},_adjustParentBBoxes:function(g,y,T){for(var C=T;C>=0;C--)e(y[C],g)},_condense:function(g){for(var y=g.length-1,T;y>=0;y--)g[y].children.length===0?y>0?(T=g[y-1].children,T.splice(T.indexOf(g[y]),1)):this.clear():r(g[y],this.toBBox)},compareMinX:function(g,y){return g.left-y.left},compareMinY:function(g,y){return g.top-y.top},toBBox:function(g){return{minX:g.left,minY:g.top,maxX:g.right,maxY:g.bottom}}};function h(g,y,T){if(!T)return y.indexOf(g);for(var C=0;C=g.minX&&y.maxY>=g.minY}function m(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(g,y,T,C,E){for(var M=[y,T],P;M.length;)T=M.pop(),y=M.pop(),!(T-y<=C)&&(P=y+Math.ceil((T-y)/C/2)*C,d(g,P,y,T,E),M.push(y,P,P,T))}p.exports=c}),35072:((p,S,t)=>{var d=t(83419),c=new d({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 h=0;h-1},union:function(h){var r=new c;return h.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)&&r.set(n)}),r},difference:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(h){return h{var d=t(45319),c=t(83419),h=t(56583),r=t(26099),n=new c({initialize:function(s,o,i,a){s===void 0&&(s=0),o===void 0&&(o=s),i===void 0&&(i=0),a===void 0&&(a=null),this._width=s,this._height=o,this._parent=a,this.aspectMode=i,this.aspectRatio=o===0?1:s/o,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,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.snapTo.set(e,s),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.minWidth=d(e,0,this.maxWidth),this.minHeight=d(s,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,s){return e===void 0&&(e=Number.MAX_VALUE),s===void 0&&(s=e),this.maxWidth=d(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(s,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,s){switch(e===void 0&&(e=0),s===void 0&&(s=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(h(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,s,!0);break;case n.ENVELOP:this.constrain(e,s,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,s){return this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minWidth,this.maxWidth),s&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minHeight,this.maxHeight),s&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,s,o){e===void 0&&(e=0),s===void 0&&(s=e),o===void 0&&(o=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,a=s===0?1:e/s;return o&&this.aspectRatio>a||!o&&this.aspectRatio0&&(s=h(s,i.y),e=s*this.aspectRatio)):(o&&this.aspectRatioa)&&(s=h(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=h(e,i.x),s=e*(1/this.aspectRatio))),this._width=e,this._height=s,this},fitTo:function(e,s){return this.constrain(e,s,!0)},envelop:function(e,s){return this.constrain(e,s,!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,p.exports=n}),15238:(p=>{p.exports="add"}),56187:(p=>{p.exports="remove"}),82348:((p,S,t)=>{p.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}}),41392:((p,S,t)=>{p.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}}),57382:((p,S,t)=>{var d=t(83419),c=t(45319),h=t(40987),r=t(8054),n=t(50030),e=t(79237),s=new d({Extends:e,initialize:function(i,a,l,f,u){e.call(this,i,a,l,f,u),this.add("__BASE",0,0,0,f,u),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=f,this.height=u,this.imageData=this.context.getImageData(0,0,f,u),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(o,i,a,l){return l===void 0&&(l=!0),this.context.drawImage(a,o,i),l&&this.update(),this},drawFrame:function(o,i,a,l,f){a===void 0&&(a=0),l===void 0&&(l=0),f===void 0&&(f=!0);var u=this.manager.getFrame(o,i);if(u){var v=u.canvasData,m=u.cutWidth,x=u.cutHeight,g=u.source.resolution;this.context.drawImage(u.source.image,v.x,v.y,m,x,a,l,m/g,x/g),f&&this.update()}return this},setPixel:function(o,i,a,l,f,u){u===void 0&&(u=255),o=Math.abs(Math.floor(o)),i=Math.abs(Math.floor(i));var v=this.getIndex(o,i);if(v>-1){var m=this.context.getImageData(o,i,1,1);m.data[0]=a,m.data[1]=l,m.data[2]=f,m.data[3]=u,this.context.putImageData(m,o,i)}return this},putData:function(o,i,a,l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=o.width),v===void 0&&(v=o.height),this.context.putImageData(o,i,a,l,f,u,v),this},getData:function(o,i,a,l){o=c(Math.floor(o),0,this.width-1),i=c(Math.floor(i),0,this.height-1),a=c(a,1,this.width-o),l=c(l,1,this.height-i);var f=this.context.getImageData(o,i,a,l);return f},getPixel:function(o,i,a){a||(a=new h);var l=this.getIndex(o,i);if(l>-1){var f=this.data,u=f[l+0],v=f[l+1],m=f[l+2],x=f[l+3];a.setTo(u,v,m,x)}return a},getPixels:function(o,i,a,l){o===void 0&&(o=0),i===void 0&&(i=0),a===void 0&&(a=this.width),l===void 0&&(l=a),o=Math.abs(Math.round(o)),i=Math.abs(Math.round(i));for(var f=c(o,0,this.width),u=c(o+a,0,this.width),v=c(i,0,this.height),m=c(i+l,0,this.height),x=new h,g=[],y=v;y{var d=t(10312),c=t(38058),h=t(27919),r=t(83419),n=t(8054),e=t(4327),s=t(95540),o=t(36060),i=t(32302),a=t(79237),l=t(70554),f=new r({Extends:a,initialize:function(v,m,x,g,y){x===void 0&&(x=256),g===void 0&&(g=256),y===void 0&&(y=!0),this.type="DynamicTexture";var T=v.game.renderer,C=T&&T.type===n.CANVAS,E=C?h.create2D(this,x,g):[this];a.call(this,v,m,E,x,g),this.add("__BASE",0,0,0,x,g),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=C?E:null,this.context=C?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,x,g).setScene(v.game.scene.systemScene,!1),this.renderTarget=C?null:new i(T,x,g,1,0,!1,!1,!0,!1),this.pipeline=C?null:T.pipelines.get(o.SINGLE_PIPELINE),this.setSize(x,g,y)},setSize:function(u,v,m){v===void 0&&(v=u),m===void 0&&(m=!0),m&&(u=Math.floor(u),v=Math.floor(v),u%2!==0&&u++,v%2!==0&&v++);var x=this.get(),g=x.source;if(u!==this.width||v!==this.height){this.canvas&&(this.canvas.width=u,this.canvas.height=v);var y=this.renderTarget;y&&(y.willResize(u,v)&&y.resize(u,v),y.texture!==g.glTexture&&this.renderer.deleteTexture(g.glTexture),this.setFromRenderTarget()),this.camera.setSize(u,v),g.width=u,g.height=v,x.setSize(u,v),this.width=u,this.height=v}else{var T=this.getSourceImage();x.cutX+u>T.width&&(u=T.width-x.cutX),x.cutY+v>T.height&&(v=T.height-x.cutY),x.setSize(u,v,x.cutX,x.cutY)}return this},setFromRenderTarget:function(){var u=this.get(),v=u.source,m=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,this},setIsSpriteTexture:function(u){return this.isSpriteTexture=u,this},fill:function(u,v,m,x,g,y){var T=this.camera,C=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height);var E=u>>16&255,M=u>>8&255,P=u&255,A=this.renderTarget;if(T.preRender(),A){A.bind(!0);var R=this.pipeline.manager.set(this.pipeline),F=C.width/A.width,w=C.height/A.height,I=A.height-(x+y);R.drawFillRect(m*F,I*w,g*F,y*w,l.getTintFromFloats(P/255,M/255,E/255,1),v),A.unbind(!0)}else{var U=this.context;C.setContext(U),U.globalCompositeOperation="source-over",U.fillStyle="rgba("+E+","+M+","+P+","+v+")",U.fillRect(m,x,g,y),C.setContext()}return this.dirty=!0,this},clear:function(u,v,m,x){if(this.dirty){var g=this.context,y=this.renderTarget;y?y.clear(u,v,m,x):g&&(u!==void 0&&v!==void 0&&m!==void 0&&x!==void 0?g.clearRect(u,v,m,x):(g.save(),g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,this.width,this.height),g.restore())),this.dirty=!1}return this},stamp:function(u,v,m,x,g){m===void 0&&(m=0),x===void 0&&(x=0);var y=s(g,"alpha",1),T=s(g,"tint",16777215),C=s(g,"angle",0),E=s(g,"rotation",0),M=s(g,"scale",1),P=s(g,"scaleX",M),A=s(g,"scaleY",M),R=s(g,"originX",.5),F=s(g,"originY",.5),w=s(g,"blendMode",0),I=s(g,"erase",!1),U=s(g,"skipBatch",!1),N=this.manager.resetStamp(y,T);return N.setAngle(0),C!==0?N.setAngle(C):E!==0&&N.setRotation(E),N.setScale(P,A),N.setTexture(u,v),N.setOrigin(R,F),N.setBlendMode(w),I&&(this._eraseMode=!0),U?this.batchGameObject(N,m,x):this.draw(N,m,x),I&&(this._eraseMode=!1),this},erase:function(u,v,m){return this._eraseMode=!0,this.draw(u,v,m),this._eraseMode=!1,this},draw:function(u,v,m,x,g){return this.beginDraw(),this.batchDraw(u,v,m,x,g),this.endDraw(),this},drawFrame:function(u,v,m,x,g,y){return this.beginDraw(),this.batchDrawFrame(u,v,m,x,g,y),this.endDraw(),this},repeat:function(u,v,m,x,g,y,T,C,E){if(m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),C===void 0&&(C=16777215),E===void 0&&(E=!1),u instanceof e?v=u:v=this.manager.getFrame(u,v),!v)return this;var M=this.manager.resetStamp(T,C);M.setFrame(v),M.setOrigin(0);var P=v.width,A=v.height;g=Math.floor(g),y=Math.floor(y);var R=Math.ceil(g/P),F=Math.ceil(y/A),w=R*P-g,I=F*A-y;w>0&&(w=P-w),I>0&&(I=A-I),m<0&&(R+=Math.ceil(Math.abs(m)/P)),x<0&&(F+=Math.ceil(Math.abs(x)/A));var U=m,N=x,D=!1,B=this.manager.stampCrop.setTo(0,0,P,A);E||this.beginDraw();for(var L=0;L0&&G===R-1&&(D=!0,B.width=w),I>0&&L===F-1&&(D=!0,B.height=I),D&&M.setCrop(B),this.batchGameObject(M,U,N),M.isCropped=!1,B.setTo(0,0,P,A),U+=P}U=m,N+=A}return E||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var u=this.camera,v=this.renderer,m=this.renderTarget;u.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(u,v,m,x,g){return Array.isArray(u)||(u=[u]),this.batchList(u,v,m,x,g),this},batchDrawFrame:function(u,v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(u,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,m,x,y,g,this.camera.matrix,null):this.batchTextureFrame(T,m,x,g,y)),this},endDraw:function(u){if(u===void 0&&(u=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var x=v.endCapture(),g=v.pipelines.setUtility();g.blitFrame(x,m,1,!1,!1,u,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(u,v,m,x,g){var y=u.length;if(y!==0)for(var T=0;T0&&E.height>0&&C.drawImage(M,E.x,E.y,E.width,E.height,v,m,E.width,E.height),C.restore()}},snapshotArea:function(u,v,m,x,g,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,g,!1,u,v,m,x,y,T):this.renderer.snapshotCanvas(this.canvas,g,!1,u,v,m,x,y,T),this},snapshot:function(u,v,m){return this.snapshotArea(0,0,this.width,this.height,u,v,m)},snapshotPixel:function(u,v,m){return this.snapshotArea(u,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(u,v,m,x){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGL(u,g,m,x)},renderCanvas:function(){},destroy:function(){var u=this.manager.stamp;u&&u.texture===this&&this.manager.resetStamp(),a.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=f}),4327:((p,S,t)=>{var d=t(83419),c=t(45319),h=t(79291),r=new d({initialize:function(e,s,o,i,a,l,f){this.texture=e,this.name=s,this.source=e.source[o],this.sourceIndex=o,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(l,f,i,a)},setCutPosition:function(n,e){return n===void 0&&(n=0),e===void 0&&(e=0),this.cutX=n,this.cutY=e,this.updateUVs()},setCutSize:function(n,e){return this.cutWidth=n,this.cutHeight=e,this.updateUVs()},setSize:function(n,e,s,o){s===void 0&&(s=0),o===void 0&&(o=0),this.setCutPosition(s,o),this.setCutSize(n,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 i=this.data,a=i.cut;a.x=s,a.y=o,a.w=n,a.h=e,a.r=s+n,a.b=o+e,i.sourceSize.w=n,i.sourceSize.h=e,i.spriteSourceSize.w=n,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(n*n+e*e);var l=i.drawImage;return l.x=s,l.y=o,l.width=n,l.height=e,this.updateUVs()},setTrim:function(n,e,s,o,i,a){var l=this.data,f=l.spriteSourceSize;return l.trim=!0,l.sourceSize.w=n,l.sourceSize.h=e,f.x=s,f.y=o,f.w=i,f.h=a,f.r=s+i,f.b=o+a,this.x=s,this.y=o,this.width=i,this.height=a,this.halfWidth=i*.5,this.halfHeight=a*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(a/2),this.updateUVs()},setScale9:function(n,e,s,o){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&o===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=o,this},setCropUVs:function(n,e,s,o,i,a,l){var f=this.cutX,u=this.cutY,v=this.cutWidth,m=this.cutHeight,x=this.realWidth,g=this.realHeight;e=c(e,0,x),s=c(s,0,g),o=c(o,0,x-e),i=c(i,0,g-s);var y=f+e,T=u+s,C=o,E=i,M=this.data;if(M.trim){var P=M.spriteSourceSize;o=c(o,0,P.x+v-e),i=c(i,0,P.y+m-s);var A=e+o,R=s+i,F=!(P.rA||P.y>R);if(F){var w=Math.max(P.x,e),I=Math.max(P.y,s),U=Math.min(P.r,A)-w,N=Math.min(P.b,R)-I;C=U,E=N,a?y=f+(v-(w-P.x)-U):y=f+(w-P.x),l?T=u+(m-(I-P.y)-N):T=u+(I-P.y),e=w,s=I,o=U,i=N}else y=0,T=0,C=0,E=0}else a&&(y=f+(v-e-o)),l&&(T=u+(m-s-i));var D=this.source.width,B=this.source.height;return n.u0=Math.max(0,y/D),n.v0=Math.max(0,T/B),n.u1=Math.min(1,(y+C)/D),n.v1=Math.min(1,(T+E)/B),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=C,n.ch=E,n.width=o,n.height=i,n.flipX=a,n.flipY=l,n},updateCropUVs:function(n,e,s){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,s)},setUVs:function(n,e,s,o,i,a){var l=this.data.drawImage;return l.width=n,l.height=e,this.u0=s,this.v0=o,this.u1=i,this.v1=a,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,o=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=o;var a=this.source.width,l=this.source.height;return this.u0=n/a,this.v0=e/l,this.u1=(n+s)/a,this.v1=(e+o)/l,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=h(!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}}});p.exports=r}),79237:((p,S,t)=>{var d=t(83419),c=t(4327),h=t(11876),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,o,i,a,l){Array.isArray(i)||(i=[i]),this.manager=s,this.key=o,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var f=0;fl&&(l=v.cutX+v.cutWidth),v.cutY+v.cutHeight>f&&(f=v.cutY+v.cutHeight)}return{x:i,y:a,width:l-i,height:f-a}},getFrameNames:function(e){e===void 0&&(e=!1);var s=Object.keys(this.frames);if(!e){var o=s.indexOf("__BASE");o!==-1&&s.splice(o,1)}return s},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e];return s?s.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e],o;return s?o=s.sourceIndex:(console.warn(r,this.key,e),o=this.frames.__BASE.sourceIndex),this.dataSource[o].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var s=0;s{var d=t(27919),c=t(57382),h=t(83419),r=t(40987),n=t(8054),e=t(81320),s=t(50792),o=t(69442),i=t(4327),a=t(8443),l=t(99584),f=t(35154),u=t(88571),v=t(41212),m=t(61309),x=t(87841),g=t(79237),y=new h({Extends:s,initialize:function(C){s.call(this),this.game=C,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,C.events.once(a.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(o.LOAD,this.updatePending,this),this.on(o.ERROR,this.updatePending,this);var T=this.game.config;T.defaultImage!==null&&this.addBase64("__DEFAULT",T.defaultImage),T.missingImage!==null&&this.addBase64("__MISSING",T.missingImage),T.whiteImage!==null&&this.addBase64("__WHITE",T.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(a.DESTROY,this.destroy,this),this.game.events.once(a.SYSTEM_READY,function(C){this.stamp=new u(C).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(o.LOAD),this.off(o.ERROR),this.emit(o.READY))},checkKey:function(T){return!T||typeof T!="string"||this.exists(T)?(this.silentWarnings||console.error("Texture key already in use: "+T),!1):!0},remove:function(T){if(typeof T=="string")if(this.exists(T))T=this.get(T);else return this.silentWarnings||console.warn("No texture found matching key: "+T),this;var C=T.key;return this.list.hasOwnProperty(C)&&(T.destroy(),this.emit(o.REMOVE,C),this.emit(o.REMOVE_KEY+C)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,C){if(this.checkKey(T)){var E=this,M=new Image;M.onerror=function(){E.emit(o.ERROR,T)},M.onload=function(){var P=E.create(T,M);P&&(m.Image(P,0),E.emit(o.ADD,T,P),E.emit(o.ADD_KEY+T,P),E.emit(o.LOAD,T,P))},M.src=C}return this},getBase64:function(T,C,E,M){E===void 0&&(E="image/png"),M===void 0&&(M=.92);var P="",A=this.getFrame(T,C);if(A&&(A.source.isRenderTexture||A.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(A){var R=A.canvasData,F=d.create2D(this,R.width,R.height),w=F.getContext("2d",{willReadFrequently:!0});R.width>0&&R.height>0&&w.drawImage(A.source.image,R.x,R.y,R.width,R.height,0,0,R.width,R.height),P=F.toDataURL(E,M),d.remove(F)}return P},addImage:function(T,C,E){var M=null;return this.checkKey(T)&&(M=this.create(T,C),m.Image(M,0),E&&M.setDataSource(E),this.emit(o.ADD,T,M),this.emit(o.ADD_KEY+T,M)),M},addGLTexture:function(T,C){var E=null;if(this.checkKey(T)){var M=C.width,P=C.height;E=this.create(T,C,M,P),E.add("__BASE",0,0,0,M,P),this.emit(o.ADD,T,E),this.emit(o.ADD_KEY+T,E)}return E},addCompressedTexture:function(T,C,E){var M=null;if(this.checkKey(T)){if(M=this.create(T,C),M.add("__BASE",0,0,0,C.width,C.height),E){var P=function(R,F,w){Array.isArray(w.textures)||Array.isArray(w.frames)?m.JSONArray(R,F,w):m.JSONHash(R,F,w)};if(Array.isArray(E))for(var A=0;A=A.x&&T=A.y&&C=A.x&&T=A.y&&C{var d=t(27919),c=t(83419),h=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(o,i,a,l,f){f===void 0&&(f=!1);var u=o.manager.game;this.renderer=u.renderer,this.texture=o,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=a||i.naturalWidth||i.videoWidth||i.width||0,this.height=l||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=i instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&i instanceof HTMLVideoElement,this.isRenderTexture=i.type==="RenderTexture"||i.type==="DynamicTexture",this.isGLTexture=i instanceof n,this.isPowerOf2=h(this.width,this.height),this.glTexture=null,this.flipY=f,this.init(u)},init:function(s){var o=this.renderer;if(o){var i=this.source;if(o.gl){var a=this.image,l=this.flipY,f=this.width,u=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=o.createCanvasTexture(a,!1,l):this.isVideo?this.glTexture=o.createVideoTexture(a,!1,l):this.isRenderTexture?this.glTexture=o.createTextureFromSource(null,f,u,v):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=o.createTextureFromSource(i,void 0,void 0,v):i instanceof Uint8Array?this.glTexture=o.createUint8ArrayTexture(i,f,u,v):this.glTexture=o.createTextureFromSource(a,f,u,v)}else this.isRenderTexture&&(this.image=i.canvas)}s.config.antialias||this.setFilter(1)},setFilter:function(s){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,s),this.scaleMode=s},setFlipY:function(s){return s===void 0&&(s=!0),s===this.flipY?this:(this.flipY=s,this.update(),this)},update:function(){var s=this.renderer,o=this.image,i=this.flipY,a=s.gl;a&&this.isCanvas?s.updateCanvasTexture(o,this.glTexture,i):a&&this.isVideo&&s.updateVideoTexture(o,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=e}),19673:(p=>{var S={LINEAR:0,NEAREST:1};p.exports=S}),44538:(p=>{p.exports="addtexture"}),63486:(p=>{p.exports="addtexture-"}),94851:(p=>{p.exports="onerror"}),29099:(p=>{p.exports="onload"}),8678:(p=>{p.exports="ready"}),86415:(p=>{p.exports="removetexture"}),30879:(p=>{p.exports="removetexture-"}),69442:((p,S,t)=>{p.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:((p,S,t)=>{var d=t(79291),c=t(19673),h={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)};h=d(!1,h,c),p.exports=h}),89905:(p=>{var S=function(t,d,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=t.source[d];t.add("__BASE",d,0,0,h.width,h.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e{var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S}),4832:(p=>{var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S}),78566:((p,S,t)=>{var d=t(41786),c=function(h,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,o,i=0;i{var d=t(41786),c=function(h,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,o;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];if(o=h.add(i,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!o){console.warn("Invalid atlas json, frame already exists: "+i);continue}a.trimmed&&o.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(o.rotated=!0,o.updateUVsInverted());var l=a.anchor||a.pivot;l&&(o.customPivot=!0,o.pivotX=l.x,o.pivotY=l.y),a.scale9Borders&&o.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),o.customData=d(a)}for(var f in n)f!=="frames"&&(Array.isArray(n[f])?h.customData[f]=n[f].slice(0):h.customData[f]=n[f]);return h};p.exports=c}),31403:(p=>{var S=function(t){var d=[171,75,84,88,32,49,49,187,13,10,26,10],c,h=new Uint8Array(t,0,12);for(c=0;c>1),x=Math.max(1,x>>1),v+=g}return{mipmaps:u,width:i,height:a,internalFormat:o,compressed:!0,generateMipmap:!1}};p.exports=S}),82038:(p=>{function S(C,E,M,P,A,R,F){return F===void 0&&(F=16),Math.floor((C+M)/A)*Math.floor((E+P)/R)*F}function t(C,E){return C=Math.max(C,16),E=Math.max(E,8),C*E/4}function d(C,E){return C=Math.max(C,8),E=Math.max(E,8),C*E/2}function c(C,E){return Math.ceil(C/4)*Math.ceil(E/4)*16}function h(C,E){return S(C,E,3,3,4,4,8)}function r(C,E){return S(C,E,3,3,4,4)}function n(C,E){return S(C,E,4,3,5,4)}function e(C,E){return S(C,E,4,4,5,5)}function s(C,E){return S(C,E,5,4,6,5)}function o(C,E){return S(C,E,5,5,6,6)}function i(C,E){return S(C,E,7,4,8,5)}function a(C,E){return S(C,E,7,5,8,6)}function l(C,E){return S(C,E,7,7,8,8)}function f(C,E){return S(C,E,9,4,10,5)}function u(C,E){return S(C,E,9,5,10,6)}function v(C,E){return S(C,E,9,7,10,8)}function m(C,E){return S(C,E,9,9,10,10)}function x(C,E){return S(C,E,11,9,12,10)}function g(C,E){return S(C,E,11,11,12,12)}var y={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:d,glFormat:[35840]},3:{sizeFunc:d,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,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:h,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,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:s,glFormat:[37811,37843]},31:{sizeFunc:o,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:a,glFormat:[37814,37846]},34:{sizeFunc:l,glFormat:[37815,37847]},35:{sizeFunc:f,glFormat:[37816,37848]},36:{sizeFunc:u,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:m,glFormat:[37819,37851]},39:{sizeFunc:x,glFormat:[37820,37852]},40:{sizeFunc:g,glFormat:[37821,37853]}},T=function(C){for(var E=new Uint32Array(C,0,13),M=E[0],P=M===55727696,A=P?E[2]:E[3],R=E[4],F=y[A].glFormat[R],w=y[A].sizeFunc,I=E[11],U=E[7],N=E[6],D=52+E[12],B=new Uint8Array(C,D),L=new Array(I),G=0,O=U,X=N,z=0;z>1),X=Math.max(1,X>>1),G+=V}return{mipmaps:L,width:U,height:N,internalFormat:F,compressed:!0,generateMipmap:!1}};p.exports=T}),75549:((p,S,t)=>{var d=t(95540),c=function(h,r,n,e,s,o,i){var a=d(i,"frameWidth",null),l=d(i,"frameHeight",a);if(a===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var f=h.source[r];h.add("__BASE",r,0,0,f.width,f.height);var u=d(i,"startFrame",0),v=d(i,"endFrame",-1),m=d(i,"margin",0),x=d(i,"spacing",0),g=Math.floor((s-m+x)/(a+x)),y=Math.floor((o-m+x)/(l+x)),T=g*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(u>T||u<-T)&&(u=0),u<0&&(u=T+u),(v===-1||v>T||vs&&(M=F-s),w>o&&(P=w-o),R>=u&&R<=v&&(h.add(A,r,n+C,e+E,a-M,l-P),A++),C+=a+x,C+a>s&&(C=m,E+=l+x)}return h};p.exports=c}),47534:((p,S,t)=>{var d=t(95540),c=function(h,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=h.source[0];h.add("__BASE",0,0,0,o.width,o.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),a=d(n,"spacing",0),l=r.cutX,f=r.cutY,u=r.cutWidth,v=r.cutHeight,m=r.realWidth,x=r.realHeight,g=Math.floor((m-i+a)/(e+a)),y=Math.floor((x-i+a)/(s+a)),T=r.x,C=e-T,E=e-(m-u-T),M=r.y,P=s-M,A=s-(x-v-M),R,F=i,w=i,I=0,U=0,N=0;N{var S=0,t=function(c,h,r,n){var e=S-n.y-n.height;c.add(r,h,n.x,e,n.width,n.height)},d=function(c,h,r){var n=c.source[h];c.add("__BASE",h,0,0,n.width,n.height),S=n.height;for(var e=r.split(` +`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",i="",a={x:0,y:0,width:0,height:0},l=0;l{var d=t(50030),c=function(o){for(var i=o.mipmaps,a=1;a{p.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:(p=>{p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}}),16536:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),o===void 0&&(o=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=o|0,this.imageSpacing=i|0,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h{var d=t(83419),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{var d=t(80341),c=t(87010),h=t(46177),r=t(49075),n=function(e,s,o,i,a,l,f,u){o===void 0&&(o=32),i===void 0&&(i=32),a===void 0&&(a=10),l===void 0&&(l=10),u===void 0&&(u=!1);var v=null;if(Array.isArray(f)){var m=s!==void 0?s:"map";v=h(m,d.ARRAY_2D,f,o,i,u)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=h(s,x.format,x.data,o,i,u):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:o,tileHeight:i,width:a,height:l})),new r(e,v)};p.exports=n}),23029:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(o,i,a,l,f,u,v,m){this.layer=o,this.index=i,this.x=a,this.y=l,this.width=f,this.height=u,this.right,this.bottom,this.baseWidth=v!==void 0?v:f,this.baseHeight=m!==void 0?m:u,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(s,o){return!(sthis.right||o>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=r(s.properties),this.visible=s.visible,this.setFlip(s.flipX,s.flipY),this.tint=s.tint,this.rotation=s.rotation,this.collideUp=s.collideUp,this.collideDown=s.collideDown,this.collideLeft=s.collideLeft,this.collideRight=s.collideRight,this.collisionCallback=s.collisionCallback,this.collisionCallbackContext=s.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(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var o=this.tilemapLayer;return o?this.getLeft(s)+this.width*o.scaleX:this.getLeft(s)+this.width},getTop:function(s){var o=this.tilemapLayer;if(o){var i=o.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var o=this.tilemapLayer;return o?this.getTop(s)+this.height*o.scaleY:this.getTop(s)+this.height},getBounds:function(s,o){return o===void 0&&(o=new n),o.x=this.getLeft(s),o.y=this.getTop(s),o.width=this.getRight(s)-o.x,o.height=this.getBottom(s)-o.y,o},getCenterX:function(s){return(this.getLeft(s)+this.getRight(s))/2},getCenterY:function(s){return(this.getTop(s)+this.getBottom(s))/2},intersects:function(s,o,i,a){return!(i<=this.pixelX||a<=this.pixelY||s>=this.right||o>=this.bottom)},isInteresting:function(s,o){return s&&o?this.canCollide||this.hasInterestingFace:s?this.collides:o?this.hasInterestingFace:!1},resetCollision:function(s){if(s===void 0&&(s=!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,s){var o=this.tilemapLayer;o&&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(s,o,i,a,l){if(o===void 0&&(o=s),i===void 0&&(i=s),a===void 0&&(a=s),l===void 0&&(l=!0),this.collideLeft=s,this.collideRight=o,this.collideUp=i,this.collideDown=a,this.faceLeft=s,this.faceRight=o,this.faceTop=i,this.faceBottom=a,l){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,o){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=o),this},setSize:function(s,o,i,a){return s!==void 0&&(this.width=s),o!==void 0&&(this.height=o),i!==void 0&&(this.baseWidth=i),a!==void 0&&(this.baseHeight=a),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===h.HEXAGONAL){var o=this.layer.staggerAxis,i=this.layer.staggerIndex,a=this.layer.hexSideLength,l,f;o==="y"?(f=(this.baseHeight-a)/2+a,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*f):o==="x"&&(l=(this.baseWidth-a)/2+a,this.pixelX=this.x*l,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var s=this.layer.tilemapLayer;if(s){var o=s.gidMap[this.index];if(o)return o}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var s=this.tilemapLayer;return s?s.tilemap:null}}});p.exports=e}),49075:((p,S,t)=>{var d=t(84101),c=t(83419),h=t(39506),r=t(80341),n=t(95540),e=t(14977),s=t(27462),o=t(91907),i=t(36305),a=t(19133),l=t(68287),f=t(23029),u=t(81086),v=t(20442),m=t(33629),x=new c({initialize:function(y,T){this.scene=y,this.tileWidth=T.tileWidth,this.tileHeight=T.tileHeight,this.width=T.width,this.height=T.height,this.orientation=T.orientation,this.renderOrder=T.renderOrder,this.format=T.format,this.version=T.version,this.properties=T.properties,this.widthInPixels=T.widthInPixels,this.heightInPixels=T.heightInPixels,this.imageCollections=T.imageCollections,this.images=T.images,this.layers=T.layers,this.tiles=T.tiles,this.tilesets=T.tilesets,this.objects=T.objects,this.currentLayerIndex=0,this.hexSideLength=T.hexSideLength;var C=this.orientation;this._convert={WorldToTileXY:u.GetWorldToTileXYFunction(C),WorldToTileX:u.GetWorldToTileXFunction(C),WorldToTileY:u.GetWorldToTileYFunction(C),TileToWorldXY:u.GetTileToWorldXYFunction(C),TileToWorldX:u.GetTileToWorldXFunction(C),TileToWorldY:u.GetTileToWorldYFunction(C),GetTileCorners:u.GetTileCornersFunction(C)}},setRenderOrder:function(g){var y=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=y[g]),y.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,y,T,C,E,M,P,A){if(g===void 0)return null;y==null&&(y=g);var R=this.scene.sys.textures;if(!R.exists(y))return console.warn('Texture key "%s" not found',y),null;var F=R.get(y),w=this.getTilesetIndex(g);if(w===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',g,this.tilesets),null;var I=this.tilesets[w];return I?((T||C)&&I.setTileSize(T,C),(E||M)&&I.setSpacing(E,M),I.setImage(F),I):(T===void 0&&(T=this.tileWidth),C===void 0&&(C=this.tileHeight),E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P=0),A===void 0&&(A={x:0,y:0}),I=new m(g,P,T,C,E,M,void 0,void 0,A),I.setImage(F),this.tilesets.push(I),this.tiles=d(this),I)},copy:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A!==null?(u.Copy(g,y,T,C,E,M,P,A),this):null},createBlankLayer:function(g,y,T,C,E,M,P,A){T===void 0&&(T=0),C===void 0&&(C=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height),P===void 0&&(P=this.tileWidth),A===void 0&&(A=this.tileHeight);var R=this.getLayerIndex(g);if(R!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var F=new e({name:g,tileWidth:P,tileHeight:A,width:E,height:M,orientation:this.orientation,hexSideLength:this.hexSideLength}),w,I=0;I-1&&this.putTileAt(y,M.x,M.y,T,M.tilemapLayer)}return C},removeTileAt:function(g,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:u.RemoveTileAt(g,y,T,C,E)},removeTileAtWorldXY:function(g,y,T,C,E,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:u.RemoveTileAtWorldXY(g,y,T,C,E,M)},renderDebug:function(g,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===o.ORTHOGONAL&&u.RenderDebug(g,y,T),this)},renderDebugFull:function(g,y){for(var T=this.layers,C=0;C{var d=t(44603),c=t(31989);d.register("tilemap",function(h){var r=h!==void 0?h:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})}),46029:((p,S,t)=>{var d=t(39429),c=t(31989);d.register("tilemap",function(h,r,n,e,s,o,i){return h===null&&(h=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),s===null&&(s=void 0),c(this.scene,h,r,n,e,s,o,i)})}),20442:((p,S,t)=>{var d=t(83419),c=t(78389),h=t(31401),r=t(95643),n=t(81086),e=t(19218),s=t(26099),o=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,c,e],initialize:function(a,l,f,u,v,m){r.call(this,a,"TilemapLayer"),this.isTilemap=!0,this.tilemap=l,this.layerIndex=f,this.layer=l.layers[f],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 s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(u),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(l.tileWidth*this.layer.width,l.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var a=[],l=[],f=this.tilemap;Array.isArray(i)||(i=[i]);for(var u=0;u=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,a){return n.CalculateFacesAt(i,a,this.layer),this},calculateFacesWithin:function(i,a,l,f){return n.CalculateFacesWithin(i,a,l,f,this.layer),this},createFromTiles:function(i,a,l,f,u){return n.CreateFromTiles(i,a,l,f,u,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,a,l,f,u,v,m){return n.Copy(i,a,l,f,u,v,m,this.layer),this},fill:function(i,a,l,f,u,v){return n.Fill(i,a,l,f,u,v,this.layer),this},filterTiles:function(i,a,l,f,u,v,m){return n.FilterTiles(i,a,l,f,u,v,m,this.layer)},findByIndex:function(i,a,l){return n.FindByIndex(i,a,l,this.layer)},findTile:function(i,a,l,f,u,v,m){return n.FindTile(i,a,l,f,u,v,m,this.layer)},forEachTile:function(i,a,l,f,u,v,m){return n.ForEachTile(i,a,l,f,u,v,m,this.layer),this},setTint:function(i,a,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!1};return this.forEachTile(m,this,a,l,f,u,v)},setTintFill:function(i,a,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!0};return this.forEachTile(m,this,a,l,f,u,v)},getTileAt:function(i,a,l){return n.GetTileAt(i,a,l,this.layer)},getTileAtWorldXY:function(i,a,l,f){return n.GetTileAtWorldXY(i,a,l,f,this.layer)},getIsoTileAtWorldXY:function(i,a,l,f,u){l===void 0&&(l=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,a,!0,v,u,this.layer,l),this.getTileAt(v.x,v.y,f)},getTilesWithin:function(i,a,l,f,u){return n.GetTilesWithin(i,a,l,f,u,this.layer)},getTilesWithinShape:function(i,a,l){return n.GetTilesWithinShape(i,a,l,this.layer)},getTilesWithinWorldXY:function(i,a,l,f,u,v){return n.GetTilesWithinWorldXY(i,a,l,f,u,v,this.layer)},hasTileAt:function(i,a){return n.HasTileAt(i,a,this.layer)},hasTileAtWorldXY:function(i,a,l){return n.HasTileAtWorldXY(i,a,l,this.layer)},putTileAt:function(i,a,l,f){return n.PutTileAt(i,a,l,f,this.layer)},putTileAtWorldXY:function(i,a,l,f,u){return n.PutTileAtWorldXY(i,a,l,f,u,this.layer)},putTilesAt:function(i,a,l,f){return n.PutTilesAt(i,a,l,f,this.layer),this},randomize:function(i,a,l,f,u){return n.Randomize(i,a,l,f,u,this.layer),this},removeTileAt:function(i,a,l,f){return n.RemoveTileAt(i,a,l,f,this.layer)},removeTileAtWorldXY:function(i,a,l,f,u){return n.RemoveTileAtWorldXY(i,a,l,f,u,this.layer)},renderDebug:function(i,a){return n.RenderDebug(i,a,this.layer),this},replaceByIndex:function(i,a,l,f,u,v){return n.ReplaceByIndex(i,a,l,f,u,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=1),this.cullPaddingX=i,this.cullPaddingY=a,this},setCollision:function(i,a,l,f){return n.SetCollision(i,a,l,this.layer,f),this},setCollisionBetween:function(i,a,l,f){return n.SetCollisionBetween(i,a,l,f,this.layer),this},setCollisionByProperty:function(i,a,l){return n.SetCollisionByProperty(i,a,l,this.layer),this},setCollisionByExclusion:function(i,a,l){return n.SetCollisionByExclusion(i,a,l,this.layer),this},setCollisionFromCollisionGroup:function(i,a){return n.SetCollisionFromCollisionGroup(i,a,this.layer),this},setTileIndexCallback:function(i,a,l){return n.SetTileIndexCallback(i,a,l,this.layer),this},setTileLocationCallback:function(i,a,l,f,u,v){return n.SetTileLocationCallback(i,a,l,f,u,v,this.layer),this},shuffle:function(i,a,l,f){return n.Shuffle(i,a,l,f,this.layer),this},swapByIndex:function(i,a,l,f,u,v){return n.SwapByIndex(i,a,l,f,u,v,this.layer),this},tileToWorldX:function(i,a){return this.tilemap.tileToWorldX(i,a,this)},tileToWorldY:function(i,a){return this.tilemap.tileToWorldY(i,a,this)},tileToWorldXY:function(i,a,l,f){return this.tilemap.tileToWorldXY(i,a,l,f,this)},getTileCorners:function(i,a,l){return this.tilemap.getTileCorners(i,a,l,this)},weightedRandomize:function(i,a,l,f,u){return n.WeightedRandomize(a,l,f,u,i,this.layer),this},worldToTileX:function(i,a,l){return this.tilemap.worldToTileX(i,a,l,this)},worldToTileY:function(i,a,l){return this.tilemap.worldToTileY(i,a,l,this)},worldToTileXY:function(i,a,l,f,u){return this.tilemap.worldToTileXY(i,a,l,f,u,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});p.exports=o}),16153:((p,S,t)=>{var d=t(61340),c=new d,h=new d,r=new d,n=function(e,s,o,i){var a=s.cull(o),l=a.length,f=o.alpha*s.alpha;if(!(l===0||f<=0)){var u=c,v=h,m=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),u.copyFrom(o.matrix);var x=e.currentContext,g=s.gidMap;x.save(),i?(u.multiplyWithOffset(i,-o.scrollX*s.scrollFactorX,-o.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,u.multiply(v,m),m.copyToContext(x)):(v.e-=o.scrollX*s.scrollFactorX,v.f-=o.scrollY*s.scrollFactorY,v.copyToContext(x)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(x.imageSmoothingEnabled=!1);for(var y=0;y{var d=t(29747),c=d,h=d;c=t(99558),h=t(16153),p.exports={renderWebGL:c,renderCanvas:h}}),99558:((p,S,t)=>{var d=t(70554),c=function(h,r,n){var e=r.cull(n),s=e.length,o=n.alpha*r.alpha;if(!(s===0||o<=0)){var i=r.gidMap,a=h.pipelines.set(r.pipeline,r),l=d.getTintAppendFloatAlpha,f=r.scrollFactorX,u=r.scrollFactorY,v=r.x,m=r.y,x=r.scaleX,g=r.scaleY;h.pipelines.preBatch(r);for(var y=0;y{var d=t(83419),c=t(26099),h=new d({initialize:function(n,e,s,o,i,a,l,f,u){(s===void 0||s<=0)&&(s=32),(o===void 0||o<=0)&&(o=32),i===void 0&&(i=0),a===void 0&&(a=0),l===void 0&&(l={}),f===void 0&&(f={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=o,this.tileMargin=i,this.tileSpacing=a,this.tileProperties=l,this.tileData=f,this.tileOffset=new c,u!==void 0&&this.tileOffset.set(u.x,u.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,s){e===void 0&&(e=0),s===void 0&&(s=0);var o=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(o%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),o=Math.floor(o),i=Math.floor(i),this.rows=o,this.columns=i,this.total=o*i,this.texCoordinates.length=0;for(var a=this.tileMargin+e,l=this.tileMargin+s,f=0;f{var d=t(7423),c=function(h,r,n){var e=d(h,r,!0,n),s=d(h,r-1,!0,n),o=d(h,r+1,!0,n),i=d(h-1,r,!0,n),a=d(h+1,r,!0,n),l=e&&e.collides;return l&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(l&&(e.faceTop=!1),s.faceBottom=!l),o&&o.collides&&(l&&(e.faceBottom=!1),o.faceTop=!l),i&&i.collides&&(l&&(e.faceLeft=!1),i.faceRight=!l),a&&a.collides&&(l&&(e.faceRight=!1),a.faceLeft=!l),e&&!e.collides&&e.resetFaces(),e};p.exports=c}),42573:((p,S,t)=>{var d=t(7423),c=t(7386),h=function(r,n,e,s,o){for(var i=null,a=null,l=null,f=null,u=c(r,n,e,s,null,o),v=0;v{var d=t(26099),c=new d,h=function(r,n,e,s){var o=e.tilemapLayer,i=o.cullPaddingX,a=o.cullPaddingY,l=o.tilemap.tileToWorldXY(r,n,c,s,o);return l.x>s.worldView.x+o.scaleX*e.tileWidth*(-i-.5)&&l.xs.worldView.y+o.scaleY*e.tileHeight*(-a-1)&&l.y{var d=t(42573),c=t(7386),h=t(62991),r=t(23029),n=function(e,s,o,i,a,l,f,u){f===void 0&&(f=!0);var v=c(e,s,o,i,null,u),m=[];v.forEach(function(M){var P=new r(M.layer,M.index,M.x,M.y,M.width,M.height,M.baseWidth,M.baseHeight);P.copy(M),m.push(P)});for(var x=a-e,g=l-s,y=0;y{var d=t(62644),c=t(7386),h=t(27987),r=function(n,e,s,o,i,a){s||(s={}),Array.isArray(n)||(n=[n]);var l=a.tilemapLayer;o||(o=l.scene),i||(i=o.cameras.main);var f=a.width,u=a.height,v=c(0,0,f,u,null,a),m=[],x,g=function(E,M,P){for(var A=0;A{var d=t(87841),c=t(63448),h=t(56583),r=new d,n=function(e,s){var o=e.tilemapLayer.tilemap,i=e.tilemapLayer,a=Math.floor(o.tileWidth*i.scaleX),l=Math.floor(o.tileHeight*i.scaleY),f=h(s.worldView.x-i.x,a,0,!0)-i.cullPaddingX,u=c(s.worldView.right-i.x,a,0,!0)+i.cullPaddingX,v=h(s.worldView.y-i.y,l,0,!0)-i.cullPaddingY,m=c(s.worldView.bottom-i.y,l,0,!0)+i.cullPaddingY;return r.setTo(f,v,u-f,m-v)};p.exports=n}),30003:((p,S,t)=>{var d=t(19545),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return(o.skipCull||o.scrollFactorX!==1||o.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),35137:((p,S,t)=>{var d=t(7386),c=t(42573),h=t(20576),r=function(n,e,s,o,i,a,l){for(var f=l.collideIndexes.indexOf(n)!==-1,u=d(e,s,o,i,null,l),v=0;v{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.filter(h,r)};p.exports=c}),52692:(p=>{var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=h.height-1;e>=0;e--)for(n=h.width-1;n>=0;n--)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);return l.find(h,r)||null};p.exports=c}),97560:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i,a){var l=d(n,e,s,o,i,a);l.forEach(h,r)};p.exports=c}),43305:((p,S,t)=>{var d=t(91907),c=t(30003),h=t(9474),r=t(14018),n=t(29747),e=t(54503),s=function(o){return o===d.ORTHOGONAL?c:o===d.HEXAGONAL?h:o===d.STAGGERED?e:o===d.ISOMETRIC?r:n};p.exports=s}),7423:((p,S,t)=>{var d=t(62991),c=function(h,r,n,e){if(d(h,r,e)){var s=e.data[r][h]||null;return s?s.index===-1?n?s:null:s:null}else return null};p.exports=c}),60540:((p,S,t)=>{var d=t(7423),c=t(26099),h=new c,r=function(n,e,s,o,i){return i.tilemapLayer.worldToTileXY(n,e,!0,h,o),d(h.x,h.y,s,i)};p.exports=r}),55826:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e){var s=e.baseTileWidth,o=e.baseTileHeight,i=e.tilemapLayer,a=0,l=0;i&&(n||(n=i.scene.cameras.main),a=i.x+n.scrollX*(1-i.scrollFactorX),l=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,o*=i.scaleY);var f=a+h*s,u=l+r*o;return[new d(f,u),new d(f+s,u),new d(f+s,u+o),new d(f,u+o)]};p.exports=c}),11758:((p,S,t)=>{var d=t(91907),c=t(27229),h=t(29747),r=t(55826),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?h:e===d.HEXAGONAL?c:(e===d.STAGGERED,h)};p.exports=n}),39167:((p,S,t)=>{var d=t(91907),c=t(29747),h=t(97281),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r}),62e3:((p,S,t)=>{var d=t(91907),c=t(19951),h=t(14127),r=t(29747),n=t(97202),e=t(70326),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s}),5984:((p,S,t)=>{var d=t(91907),c=t(29747),h=t(28054),r=t(29650),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n}),7386:((p,S,t)=>{var d=t(95540),c=function(h,r,n,e,s,o){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=o.width),e===void 0&&(e=o.height),s||(s={});var i=d(s,"isNotEmpty",!1),a=d(s,"isColliding",!1),l=d(s,"hasInterestingFace",!1);h<0&&(n+=h,h=0),r<0&&(e+=r,r=0),h+n>o.width&&(n=Math.max(o.width-h,0)),r+e>o.height&&(e=Math.max(o.height-r,0));for(var f=[],u=r;u{var d=t(55738),c=t(7386),h=t(91865),r=t(29747),n=t(26099),e=t(91907),s=function(f,u){return h.RectangleToTriangle(u,f)},o=new n,i=new n,a=new n,l=function(f,u,v,m){if(m.orientation!==e.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(f===void 0)return[];var x=r;f instanceof d.Circle?x=h.CircleToRectangle:f instanceof d.Rectangle?x=h.RectangleToRectangle:f instanceof d.Triangle?x=s:f instanceof d.Line&&(x=h.LineToRectangle),m.tilemapLayer.worldToTileXY(f.left,f.top,!0,i,v);var g=i.x,y=i.y;m.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,a,v);var T=Math.ceil(a.x),C=Math.ceil(a.y),E=Math.max(T-g,1),M=Math.max(C-y,1),P=c(g,y,E,M,u,m),A=m.tileWidth,R=m.tileHeight;m.tilemapLayer&&(A*=m.tilemapLayer.scaleX,R*=m.tilemapLayer.scaleY);for(var F=[],w=new d.Rectangle(0,0,A,R),I=0;I{var d=t(7386),c=t(26099),h=new c,r=new c,n=function(e,s,o,i,a,l,f){var u=f.tilemapLayer.tilemap._convert.WorldToTileXY;u(e,s,!0,h,l,f);var v=h.x,m=h.y;u(e+o,s+i,!1,r,l,f);var x=Math.ceil(r.x),g=Math.ceil(r.y);return d(v,m,x-v,g-m,a,f)};p.exports=n}),96113:((p,S,t)=>{var d=t(91907),c=t(20242),h=t(10095),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r}),16926:((p,S,t)=>{var d=t(91907),c=t(86625),h=t(96897),r=t(29747),n=t(15108),e=t(85896),s=function(o){return o===d.ORTHOGONAL?e:o===d.ISOMETRIC?h:o===d.HEXAGONAL?c:o===d.STAGGERED?n:r};p.exports=s}),55762:((p,S,t)=>{var d=t(91907),c=t(20242),h=t(51900),r=t(63288),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n}),45091:((p,S,t)=>{var d=t(62991),c=function(h,r,n){if(d(h,r,n)){var e=n.data[r][h];return e!==null&&e.index>-1}else return!1};p.exports=c}),24152:((p,S,t)=>{var d=t(45091),c=t(26099),h=new c,r=function(n,e,s,o){o.tilemapLayer.worldToTileXY(n,e,!0,h,s);var i=h.x,a=h.y;return d(i,a,o)};p.exports=r}),90454:((p,S,t)=>{var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=r.hexSideLength,l,f,u,v;if(r.staggerAxis==="y"){var m=(i-a)/2+a;l=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var x=(o-a)/2+a;l=c(n.worldView.x-s.x,x,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,x,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:l,right:f,top:u,bottom:v}};p.exports=h}),9474:((p,S,t)=>{var d=t(90454),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),27229:((p,S,t)=>{var d=t(19951),c=t(26099),h=new c,r=function(n,e,s,o){var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(i*=l.scaleX,a*=l.scaleY);var f=d(n,e,h,s,o),u=[],v=.5773502691896257,m,x;o.staggerAxis==="y"?(m=v*i,x=a/2):(m=i/2,x=v*a);for(var g=0;g<6;g++){var y=2*Math.PI*(.5-g)/6;u.push(new c(f.x+m*Math.cos(y),f.y+x*Math.sin(y)))}return u};p.exports=r}),19951:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),f=a.y+e.scrollY*(1-a.scrollFactorY),o*=a.scaleX,i*=a.scaleY);var u=o/2,v=i/2,m,x,g=s.staggerAxis,y=s.staggerIndex;return g==="y"?(m=l+o*h+o,x=f+1.5*r*v+v,r%2===0&&(y==="odd"?m-=u:m+=u)):g==="x"&&y==="odd"&&(m=l+1.5*h*u+u,x=f+i*h+i,h%2===0&&(y==="odd"?x-=v:x+=v)),n.set(m,x)};p.exports=c}),86625:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var f=.5773502691896257,u=-.3333333333333333,v=0,m=.6666666666666666,x=i/2,g=a/2,y,T,C,E,M;o.staggerAxis==="y"?(y=(h-x)/(f*i),T=(r-g)/g,C=f*y+u*T,E=v*y+m*T):(y=(h-x)/x,T=(r-g)/(f*a),C=u*y+f*T,E=m*y+v*T),M=-C-E;var P=Math.round(C),A=Math.round(E),R=Math.round(M),F=Math.abs(P-C),w=Math.abs(A-E),I=Math.abs(R-M);F>w&&F>I?P=-A-R:w>I&&(A=-P-R);var U,N=A;return o.staggerIndex==="odd"?U=N%2===0?A/2+P:A/2+P-.5:U=N%2===0?A/2+P:A/2+P+.5,e.set(U,N)};p.exports=c}),62991:(p=>{var S=function(t,d,c){return t>=0&&t=0&&d{var d=t(33528),c=function(h,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=h.tilemapLayer,o=h.data,i=h.width,a=h.height,l=s.skipCull,f=0,u=i,v=0,m=a,x,g,y;if(e===0)for(g=v;g=f;x--)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));else if(e===2)for(g=m;g>=v;g--)for(x=f;x=v;g--)for(x=u;x>=f;x--)y=o[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));return s.tilesDrawn=n.length,s.tilesTotal=i*a,n};p.exports=c}),14127:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,f=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var u=l+(h-r)*(o/2),v=f+(h+r)*(i/2);return n.set(u,v)};p.exports=c}),96897:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o,i){e||(e=new d);var a=o.baseTileWidth,l=o.baseTileHeight,f=o.tilemapLayer;f&&(s||(s=f.scene.cameras.main),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,h=h-(f.x+s.scrollX*(1-f.scrollFactorX)),a*=f.scaleX);var u=a/2,v=l/2;h=h-u,i||(r=r-l);var m=.5*(h/u+r/v),x=.5*(-h/u+r/v);return n&&(m=Math.floor(m),x=Math.floor(x)),e.set(m,x)};p.exports=c}),71558:((p,S,t)=>{var d=t(23029),c=t(62991),h=t(72023),r=t(20576),n=function(e,s,o,i,a){if(i===void 0&&(i=!0),!c(s,o,a))return null;var l,f=a.data[o][s],u=f&&f.collides;e instanceof d?(a.data[o][s]===null&&(a.data[o][s]=new d(a,e.index,s,o,a.tileWidth,a.tileHeight)),a.data[o][s].copy(e)):(l=e,a.data[o][s]===null?a.data[o][s]=new d(a,l,s,o,a.tileWidth,a.tileHeight):a.data[o][s].index=l);var v=a.data[o][s],m=a.collideIndexes.indexOf(v.index)!==-1;if(l=e instanceof d?e.index:e,l===-1)v.width=a.tileWidth,v.height=a.tileHeight;else{var x=a.tilemapLayer.tilemap,g=x.tiles,y=g[l][2],T=x.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,m),i&&u!==v.collides&&h(s,o,a),v};p.exports=n}),26303:((p,S,t)=>{var d=t(71558),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(e,s,!0,h,i,a),d(n,h.x,h.y,o,a)};p.exports=r}),14051:((p,S,t)=>{var d=t(42573),c=t(71558),h=function(r,n,e,s,o){if(s===void 0&&(s=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var i=r.length,a=r[0].length,l=0;l{var d=t(7386),c=t(26546),h=function(r,n,e,s,o,i){var a,l=d(r,n,e,s,{},i);if(!o)for(o=[],a=0;a{var d=t(23029),c=t(62991),h=t(72023),r=function(n,e,s,o,i){if(s===void 0&&(s=!0),o===void 0&&(o=!0),!c(n,e,i))return null;var a=i.data[e][n];if(a)i.data[e][n]=s?null:new d(i,-1,n,e,i.tileWidth,i.tileHeight);else return null;return o&&a&&a.collides&&h(n,e,i),a};p.exports=r}),94178:((p,S,t)=>{var d=t(63557),c=t(26099),h=new c,r=function(n,e,s,o,i,a){return a.tilemapLayer.worldToTileXY(n,e,!0,h,i,a),d(h.x,h.y,s,o,a)};p.exports=r}),15533:((p,S,t)=>{var d=t(7386),c=t(3956),h=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,o,i){o===void 0&&(o={});var a=o.tileColor!==void 0?o.tileColor:h,l=o.collidingTileColor!==void 0?o.collidingTileColor:r,f=o.faceColor!==void 0?o.faceColor:n,u=d(0,0,i.width,i.height,null,i);s.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),s.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var v=0;v{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l{var S=function(t,d,c,h){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,o=Math.max(0,d.left),i=Math.min(n,d.right),a=Math.max(0,d.top),l=Math.min(e,d.bottom),f,u,v;if(c===0)for(u=a;u=o;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===2)for(u=l;u>=a;u--)for(f=o;r[u]&&f=a;u--)for(f=i;r[u]&&f>=o;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);return s.tilesDrawn=h.length,s.tilesTotal=n*e,h};p.exports=S}),57068:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var a=0;a{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o,i,a){if(s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),!(n>e)){for(var l=n;l<=e;l++)h(l,s,i);if(a)for(var f=0;f=n&&v.index<=e&&d(v,s)}o&&c(0,0,i.width,i.height,i)}};p.exports=r}),75661:((p,S,t)=>{var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var i=0;i{var d=t(20576),c=t(42573),h=t(97022),r=function(n,e,s,o){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i{var d=t(20576),c=t(42573),h=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var s=0;s0&&d(i,r)}}n&&c(0,0,e.width,e.height,e)};p.exports=h}),9589:(p=>{var S=function(t,d,c){var h=c.collideIndexes.indexOf(t);d&&h===-1?c.collideIndexes.push(t):!d&&h!==-1&&c.collideIndexes.splice(h,1)};p.exports=S}),20576:(p=>{var S=function(t,d){d?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};p.exports=S}),79583:(p=>{var S=function(t,d,c,h){if(typeof t=="number")h.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(h,r,n,e,null,i),l=0;l{var d=t(7386),c=t(33680),h=function(r,n,e,s,o){var i=d(r,n,e,s,null,o),a=i.map(function(f){return f.index});c(a);for(var l=0;l{var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,o=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=c(n.worldView.x-s.x,o,0,!0)-s.cullPaddingX,l=d(n.worldView.right-s.x,o,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,u=d(n.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:a,right:l,top:f,bottom:u}};p.exports=h}),54503:((p,S,t)=>{var d=t(61325),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var o=r.tilemapLayer,i=d(r,n);return o.skipCull&&o.scrollFactorX===1&&o.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h}),97202:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var o=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,l=0,f=0;a&&(e||(e=a.scene.cameras.main),l=a.x+e.scrollX*(1-a.scrollFactorX),o*=a.scaleX,f=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var u=l+h*o+r%2*(o/2),v=f+r*(i/2);return n.set(u,v)};p.exports=c}),28054:(p=>{var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d===void 0&&(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*(h/2)+h};p.exports=S}),15108:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),a*=l.scaleY,h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),i*=l.scaleX);var f=n?Math.floor(r/(a/2)):r/(a/2),u=n?Math.floor((h+f%2*.5*i)/i):(h+f%2*.5*i)/i;return e.set(u,f)};p.exports=c}),51900:(p=>{var S=function(t,d,c,h){var r=h.baseTileHeight,n=h.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),d?Math.floor(t/(r/2)):t/(r/2)};p.exports=S}),86560:((p,S,t)=>{var d=t(7386),c=function(h,r,n,e,s,o,i){for(var a=d(n,e,s,o,null,i),l=0;l{var S=function(t,d,c){var h=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),h*=r.scaleX),n+t*h};p.exports=S}),70326:((p,S,t)=>{var d=t(97281),c=t(29650),h=t(26099),r=function(n,e,s,o,i){return s||(s=new h(0,0)),s.x=d(n,o,i),s.y=c(e,o,i),s};p.exports=r}),29650:(p=>{var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*h};p.exports=S}),77366:((p,S,t)=>{var d=t(7386),c=t(75508),h=function(r,n,e,s,o,i){if(o){var a,l=d(r,n,e,s,null,i),f=0;for(a=0;a{var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(n,0,e,h,s,o),h.x};p.exports=r}),85896:((p,S,t)=>{var d=t(26099),c=function(h,r,n,e,s,o){n===void 0&&(n=!0),e||(e=new d);var i=o.baseTileWidth,a=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,a*=l.scaleY);var f=h/i,u=r/a;return n&&(f=Math.floor(f),u=Math.floor(u)),e.set(f,u)};p.exports=c}),63288:((p,S,t)=>{var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,o){return d(0,n,e,h,s,o),h.y};p.exports=r}),81086:((p,S,t)=>{p.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:(p=>{p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}}),21829:((p,S,t)=>{var d={ORIENTATION:t(91907)};p.exports=d}),62501:((p,S,t)=>{var d=t(79291),c=t(21829),h={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};h=d(!1,h,c.ORIENTATION),p.exports=h}),14977:((p,S,t)=>{var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","layer"),this.id=h(e,"id",0),this.x=h(e,"x",0),this.y=h(e,"y",0),this.width=h(e,"width",0),this.height=h(e,"height",0),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.baseTileWidth=h(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(e,"baseTileHeight",this.tileHeight),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.widthInPixels=h(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(e,"alpha",1),this.visible=h(e,"visible",!0),this.properties=h(e,"properties",[]),this.indexes=h(e,"indexes",[]),this.collideIndexes=h(e,"collideIndexes",[]),this.callbacks=h(e,"callbacks",[]),this.bodies=h(e,"bodies",[]),this.data=h(e,"data",[]),this.tilemapLayer=h(e,"tilemapLayer",null),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r}),87010:((p,S,t)=>{var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","map"),this.width=h(e,"width",0),this.height=h(e,"height",0),this.infinite=h(e,"infinite",!1),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.widthInPixels=h(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.tileHeight),this.format=h(e,"format",null),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.renderOrder=h(e,"renderOrder","right-down"),this.version=h(e,"version","1"),this.properties=h(e,"properties",{}),this.layers=h(e,"layers",[]),this.images=h(e,"images",[]),this.objects=h(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(e,"collision",{}),this.tilesets=h(e,"tilesets",[]),this.imageCollections=h(e,"imageCollections",[]),this.tiles=h(e,"tiles",[]),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r}),48700:((p,S,t)=>{var d=t(83419),c=t(95540),h=new d({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=[])}});p.exports=h}),6641:((p,S,t)=>{var d=t(91907),c=function(h){return h=h.toLowerCase(),h==="isometric"?d.ISOMETRIC:h==="staggered"?d.STAGGERED:h==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c}),46177:((p,S,t)=>{var d=t(80341),c=t(2342),h=t(82593),r=t(46594),n=t(87021),e=function(s,o,i,a,l,f){var u;switch(o){case d.ARRAY_2D:u=c(s,i,a,l,f);break;case d.CSV:u=h(s,i,a,l,f);break;case d.TILED_JSON:u=r(s,i,f);break;case d.WELTMEISTER:u=n(s,i,f);break;default:console.warn("Unrecognized tilemap data format: "+o),u=null}return u};p.exports=e}),2342:((p,S,t)=>{var d=t(80341),c=t(14977),h=t(87010),r=t(23029),n=function(e,s,o,i,a){for(var l=new c({tileWidth:o,tileHeight:i}),f=new h({name:e,tileWidth:o,tileHeight:i,format:d.ARRAY_2D,layers:[l]}),u=[],v=s.length,m=0,x=0;x{var d=t(80341),c=t(2342),h=function(r,n,e,s,o){var i=n.trim().split(` +`).map(function(l){return l.split(",")}),a=c(r,i,e,s,o);return a.format=d.CSV,a};p.exports=h}),6656:((p,S,t)=>{var d=t(14977),c=t(23029),h=function(r,n){for(var e=[],s=0;s-1?m=new c(i,v,u,f,o.tilesize,o.tilesize):m=n?null:new c(i,-1,u,f,o.tilesize,o.tilesize),a.push(m)}l.push(a),a=[]}i.data=l,e.push(i)}return e};p.exports=h}),96483:((p,S,t)=>{var d=t(33629),c=function(h){for(var r=[],n=[],e=0;e{var d=t(80341),c=t(87010),h=t(6656),r=t(96483),n=function(e,s,o){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,a=0,l=0;li&&(i=s.layer[l].width),s.layer[l].height>a&&(a=s.layer[l].height);var f=new c({width:i,height:a,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return f.layers=h(s,o),f.tilesets=r(s),f};p.exports=n}),52833:((p,S,t)=>{p.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}}),57442:((p,S,t)=>{p.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}}),51233:((p,S,t)=>{var d=t(79291),c=function(h){for(var r,n,e,s,o,i=0;i{var S=function(t){for(var d=window.atob(t),c=d.length,h=new Array(c/4),r=0;r>>0;return h};p.exports=S}),84101:((p,S,t)=>{var d=t(33629),c=function(h){var r,n,e=[];for(r=0;r{var d=t(95540),c=function(h,r,n){if(!r)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*h.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*h.tileheight+d(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+s}};p.exports=c}),29920:(p=>{var S=2147483648,t=1073741824,d=536870912,c=function(h){var r=!!(h&S),n=!!(h&t),e=!!(h&d);h=h&536870911;var s=0,o=!1;return r&&n&&e?(s=Math.PI/2,o=!0):r&&n&&!e?(s=Math.PI,o=!1):r&&!n&&e?(s=Math.PI/2,o=!1):r&&!n&&!e?(s=0,o=!0):!r&&n&&e?(s=3*Math.PI/2,o=!1):!r&&n&&!e?(s=Math.PI,o=!0):!r&&!n&&e?(s=3*Math.PI/2,o=!0):!r&&!n&&!e&&(s=0,o=!1),{gid:h,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:o}};p.exports=c}),12635:((p,S,t)=>{var d=t(95540),c=t(79677),h=function(r){for(var n=[],e=[],s=c(r);s.i0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var o=s.layers[s.i];if(s.i++,o.type!=="imagelayer"){if(o.type==="group"){var i=c(r,o,s);e.push(s),s=i}continue}var a=d(o,"offsetx",0)+d(o,"startx",0),l=d(o,"offsety",0)+d(o,"starty",0);n.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+l+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:d(o,"properties",{})})}return n};p.exports=h}),46594:((p,S,t)=>{var d=t(51233),c=t(84101),h=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),o=t(12635),i=t(22611),a=t(28200),l=t(24619),f=function(u,v,m){var x=r(v),g=new s({width:x.width,height:x.height,name:u,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});if(g.orientation===h.HEXAGONAL)if(g.hexSideLength=x.hexsidelength,g.staggerAxis=x.staggeraxis,g.staggerIndex=x.staggerindex,g.staggerAxis==="y"){var y=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+y)+y}else{var T=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels=g.width*(g.hexSideLength+T)+T,g.heightInPixels=g.tileHeight*(g.height+.5)}g.layers=a(x,m),g.images=o(x);var C=l(x);return g.tilesets=C.tilesets,g.imageCollections=C.imageCollections,g.objects=i(x),g.tiles=c(g),d(g),g};p.exports=f}),52205:((p,S,t)=>{var d=t(18254),c=t(29920),h=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,o){s===void 0&&(s=0),o===void 0&&(o=0);var i=d(e,r);if(i.x+=s,i.y+=o,e.gid){var a=c(e.gid);i.gid=a.gid,i.flippedHorizontal=a.flippedHorizontal,i.flippedVertical=a.flippedVertical,i.flippedAntiDiagonal=a.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(h):e.polygon?i.polygon=e.polygon.map(h):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};p.exports=n}),22611:((p,S,t)=>{var d=t(95540),c=t(52205),h=t(48700),r=t(79677),n=function(e){for(var s=[],o=[],i=r(e);i.i0;){if(i.i>=i.layers.length){if(o.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=o.pop();continue}var a=i.layers[i.i];if(i.i++,a.opacity*=i.opacity,a.visible=i.visible&&a.visible,a.type!=="objectgroup"){if(a.type==="group"){var l=r(e,a,i);o.push(i),i=l}continue}a.name=i.name+a.name;for(var f=i.x+d(a,"startx",0)+d(a,"offsetx",0),u=i.y+d(a,"starty",0)+d(a,"offsety",0),v=[],m=0;m{var d=t(41868),c=t(91907),h=t(79677),r=t(6641),n=t(95540),e=t(14977),s=t(29920),o=t(23029),i=function(a,l){for(var f=n(a,"infinite",!1),u=[],v=[],m=h(a);m.i0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var x=m.layers[m.i];if(m.i++,x.type!=="tilelayer"){if(x.type==="group"){var g=h(a,x,m);v.push(m),m=g}continue}if(x.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+x.name+"'");continue}else if(x.encoding&&x.encoding==="base64"){if(x.chunks)for(var y=0;y0?(E=new o(T,C.gid,z,V,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,R[V][z]=E):(M=l?null:new o(T,-1,z,V,a.tilewidth,a.tileheight),R[V][z]=M),F++,F===D.width&&(G++,F=0)}}else{T=new e({name:m.name+x.name,id:x.id,x:m.x+n(x,"offsetx",0)+x.x,y:m.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*x.opacity,visible:m.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex,T.staggerAxis==="y"?(P=(T.tileHeight-T.hexSideLength)/2,T.widthInPixels=T.tileWidth*(T.width+.5),T.heightInPixels=T.height*(T.hexSideLength+P)+P):(A=(T.tileWidth-T.hexSideLength)/2,T.widthInPixels=T.width*(T.hexSideLength+A)+A,T.heightInPixels=T.tileHeight*(T.height+.5)));for(var Y=[],W=0,H=x.data.length;W0?(E=new o(T,C.gid,F,R.length,a.tilewidth,a.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,Y.push(E)):(M=l?null:new o(T,-1,F,R.length,a.tilewidth,a.tileheight),Y.push(M)),F++,F===x.width&&(R.push(Y),F=0,Y=[])}T.data=R,u.push(T)}return u};p.exports=i}),24619:((p,S,t)=>{var d=t(33629),c=t(16536),h=t(52205),r=t(57880),n=function(e){for(var s=[],o=[],i=null,a,l=0;l1){var v=void 0,m=void 0;if(Array.isArray(f.tiles)){v=v||{},m=m||{};for(var x=0;x{var S=function(t,d){for(var c=0;c0){var n={},e={},s,o,i;if(Array.isArray(h.edgecolors))for(s=0;s{p.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:((p,S,t)=>{var d=t(83419),c=t(37277),h=t(44594),r=t(94880),n=t(72905),e=new d({initialize:function(o){this.scene=o,this.systems=o.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(h.PRE_UPDATE,this.preUpdate,this),s.on(h.UPDATE,this.update,this),s.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var o;if(s instanceof r){if(o=s,this.removeEvent(o),o.elapsed=o.startAt,o.hasDispatched=!1,o.repeatCount=o.repeat===-1||o.loop?999999999999:o.repeat,o.delay<=0&&o.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else o=new r(s);return this._pendingInsertion.push(o),o},delayedCall:function(s,o,i,a){return this.addEvent({delay:s,callback:o,args:i,callbackScope:a})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var o=0;o-1&&this._active.splice(l,1),a.destroy()}for(i=0;i=a.delay)){var l=a.elapsed-a.delay;if(a.elapsed=a.delay,!a.hasDispatched&&a.callback&&(a.hasDispatched=!0,a.callback.apply(a.callbackScope,a.args)),a.repeatCount>0){if(a.repeatCount--,l>=a.delay)for(;l>=a.delay&&a.repeatCount>0;)a.callback&&a.callback.apply(a.callbackScope,a.args),l-=a.delay,a.repeatCount--;a.elapsed=l,a.hasDispatched=!1}else a.hasDispatched&&this._pendingRemoval.push(a)}}}},shutdown:function(){var s;for(s=0;s{var d=t(83419),c=t(50792),h=t(39429),r=t(95540),n=t(44594),e=t(89809),s=new d({Extends:c,initialize:function(i,a){c.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var l=this.systems.events;l.on(n.PRE_UPDATE,this.preUpdate,this),l.on(n.UPDATE,this.update,this),l.once(n.SHUTDOWN,this.destroy,this),a&&this.add(a)},preUpdate:function(o,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var o,i=this.events,a=!1,l=this.systems,f;for(o=0;o=i.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(o){return o===void 0&&(o=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,o&&this.reset(),this},pause:function(){this.paused=!0;for(var o=this.events,i=0;i0&&(a=i[i.length-1].time);for(var l=0;l{var d=t(83419),c=t(95540),h=new d({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.repeatCount>0)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=[]}});p.exports=h}),35945:(p=>{p.exports="complete"}),89809:((p,S,t)=>{p.exports={COMPLETE:t(35945)}}),90291:((p,S,t)=>{p.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}}),40382:((p,S,t)=>{var d=t(72905),c=t(83419),h=t(43491),r=t(88032),n=t(37277),e=t(44594),s=t(93109),o=t(86081),i=t(8357),a=t(43960),l=t(26012),f=new c({initialize:function(v){this.scene=v,this.events=v.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(u){Array.isArray(u)||(u=[u]);for(var v=[],m=0;m-1},existing:function(u){return this.has(u)||this.tweens.push(u.reset()),this},addCounter:function(u){var v=r(this,u);return this.tweens.push(v.reset()),v},stagger:function(u,v){return s(u,v)},setLagSmooth:function(u,v){return u===void 0&&(u=1/1e-8),v===void 0&&(v=0),this.maxLag=u,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(u){return u===void 0&&(u=240),this.gap=1e3/u,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(u){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,x=m-this.nextTime,g=m-this.time*1e3;return x>0||u?(m/=1e3,this.time=m,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):g=0,g},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(u){u===void 0&&(u=!1);var v=this.getDelta(u);if(!(v<=0)){this.processing=!0;var m,x,g=[],y=this.tweens;for(m=0;m0){for(m=0;m-1&&(x.isPendingRemove()||x.isDestroyed())&&(y.splice(C,1),x.destroy())}g.length=0}this.processing=!1}},remove:function(u){return this.processing?u.setPendingRemoveState():(d(this.tweens,u),u.setRemovedState()),this},reset:function(u){return this.existing(u),u.seek(),u.setActiveState(),this},makeActive:function(u){return this.existing(u),u.setActiveState(),this},each:function(u,v){var m,x=[null];for(m=1;m{var S=function(t,d,c){return t&&t.hasOwnProperty(d)?t[d]:c};p.exports=S}),6113:((p,S,t)=>{var d=t(62640),c=t(35355),h=function(r,n){var e=d.Power0;if(typeof r=="string")if(d.hasOwnProperty(r))e=d[r];else{var s="";if(r.indexOf(".")){s=r.substring(r.indexOf(".")+1);var o=s.toLowerCase();o==="in"?s="easeIn":o==="out"?s="easeOut":o==="inout"&&(s="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+s),d.hasOwnProperty(r)&&(e=d[r])}else typeof r=="function"&&(e=r);if(!n)return e;var i=n.slice(0);return i.unshift(0),function(a){return i[0]=a,e.apply(this,i)}};p.exports=h}),91389:((p,S,t)=>{var d=t(89318),c=t(77259),h=t(28392),r={bezier:d,catmull:c,catmullrom:c,linear:h},n=function(e){if(e===null)return null;var s=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(s=r[e]):typeof e=="function"&&(s=e),s};p.exports=n}),55292:(p=>{var S=function(t,d,c){var h;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?h=function(n,e,s,o,i,a){return t[d](n,e,s,o,i,a)}:h=function(){return t[d]}}else typeof c=="function"?h=c:h=function(){return c};return h};p.exports=S}),82985:((p,S,t)=>{var d=t(81076),c=function(h){var r,n=[];if(h.hasOwnProperty("props"))for(r in h.props)r.substring(0,1)!=="_"&&n.push({key:r,value:h.props[r]});else for(r in h)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:h[r]});return n};p.exports=c}),62329:((p,S,t)=>{var d=t(35154),c=function(h){var r=d(h,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};p.exports=c}),17777:((p,S,t)=>{var d=t(30976),c=t(99472);function h(o){return!!o.getActive&&typeof o.getActive=="function"}function r(o){return!!o.getStart&&typeof o.getStart=="function"}function n(o){return!!o.getEnd&&typeof o.getEnd=="function"}function e(o){return r(o)||n(o)||h(o)}var s=function(o,i){var a,l=function(U,N,D){return D},f=function(U,N,D){return D},u=null,v=typeof i;if(v==="number")l=function(){return i};else if(Array.isArray(i))f=function(){return i[0]},l=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),x=m.substring(0,6)==="random",g=m.substring(0,3)==="int";if(x||g){var y=m.indexOf("("),T=m.indexOf(")"),C=m.indexOf(",");if(y&&T&&C){var E=parseFloat(m.substring(y+1,C)),M=parseFloat(m.substring(C+1,T));x?l=function(){return c(E,M)}:l=function(){return d(E,M)}}else throw new Error("invalid random() format")}else{m=m[0];var P=parseFloat(i.substr(2));switch(m){case"+":l=function(U,N,D){return D+P};break;case"-":l=function(U,N,D){return D-P};break;case"*":l=function(U,N,D){return D*P};break;case"/":l=function(U,N,D){return D/P};break;default:l=function(){return parseFloat(i)}}}}else if(v==="function")l=i;else if(v==="object")if(e(i))h(i)&&(u=i.getActive),n(i)&&(l=i.getEnd),r(i)&&(f=i.getStart);else if(i.hasOwnProperty("value"))a=s(o,i.value);else{var A=i.hasOwnProperty("to"),R=i.hasOwnProperty("from"),F=i.hasOwnProperty("start");if(A&&(R||F)){if(a=s(o,i.to),F){var w=s(o,i.start);a.getActive=w.getEnd}if(R){var I=s(o,i.from);a.getStart=I.getEnd}}}return a||(a={getActive:u,getEnd:l,getStart:f}),a};p.exports=s}),88032:((p,S,t)=>{var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(55292),o=t(35154),i=t(17777),a=t(269),l=t(86081),f=function(u,v,m){if(v instanceof l)return v.parent=u,v;m===void 0?m=c:m=a(c,m);var x=e(v,"from",0),g=e(v,"to",1),y=[{value:x}],T=e(v,"delay",m.delay),C=e(v,"easeParams",m.easeParams),E=e(v,"ease",m.ease),M=i("value",g),P=new l(u,y),A=P.add(0,"value",M.getEnd,M.getStart,M.getActive,n(e(v,"ease",E),e(v,"easeParams",C)),s(v,"delay",T),e(v,"duration",m.duration),r(v,"yoyo",m.yoyo),e(v,"hold",m.hold),e(v,"repeat",m.repeat),e(v,"repeatDelay",m.repeatDelay),!1,!1);A.start=x,A.current=x,P.completeDelay=h(v,"completeDelay",0),P.loop=Math.round(h(v,"loop",0)),P.loopDelay=Math.round(h(v,"loopDelay",0)),P.paused=r(v,"paused",!1),P.persist=r(v,"persist",!1),P.isNumberTween=!0,P.callbackScope=o(v,"callbackScope",P);for(var R=d.TYPES,F=0;F{var d=t(6113),c=t(35154),h=t(36383),r=function(n,e){e===void 0&&(e={});var s,o=c(e,"start",0),i=c(e,"ease",null),a=c(e,"grid",null),l=c(e,"from",0),f=l==="first",u=l==="center",v=l==="last",m=typeof l=="number",x=Array.isArray(n),g=parseFloat(x?n[0]:n),y=x?parseFloat(n[1]):0,T=Math.max(g,y);if(x&&(o+=g),a){var C=a[0],E=a[1],M=0,P=0,A=0,R=0,F=[];v?(M=C-1,P=E-1):m?(M=l%C,P=Math.floor(l/C)):u&&(M=(C-1)/2,P=(E-1)/2);for(var w=h.MIN_SAFE_INTEGER,I=0;Iw&&(w=N),F[I][U]=N}}}var D=i?d(i):null;return a?s=function(B,L,G,O){var X=0,z=O%C,V=Math.floor(O/C);z>=0&&z=0&&V{var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(91389),o=t(55292),i=t(82985),a=t(62329),l=t(35154),f=t(17777),u=t(269),v=t(86081),m=function(x,g,y){if(g instanceof v)return g.parent=x,g;y===void 0?y=c:y=u(c,y);var T=a(g);!T&&y.targets&&(T=y.targets);for(var C=i(g),E=e(g,"delay",y.delay),M=e(g,"duration",y.duration),P=e(g,"easeParams",y.easeParams),A=e(g,"ease",y.ease),R=e(g,"hold",y.hold),F=e(g,"repeat",y.repeat),w=e(g,"repeatDelay",y.repeatDelay),I=r(g,"yoyo",y.yoyo),U=r(g,"flipX",y.flipX),N=r(g,"flipY",y.flipY),D=e(g,"interpolation",y.interpolation),B=function(b,J,$,Z){if($==="texture"){var q=Z,_=void 0;Array.isArray(Z)?(q=Z[0],_=Z[1]):Z.hasOwnProperty("value")?(q=Z.value,Array.isArray(Z.value)?(q=Z.value[0],_=Z.value[1]):typeof Z.value=="string"&&(q=Z.value)):typeof Z=="string"&&(q=Z),b.addFrame(J,q,_,o(Z,"delay",E),e(Z,"duration",M),e(Z,"hold",R),e(Z,"repeat",F),e(Z,"repeatDelay",w),r(Z,"flipX",U),r(Z,"flipY",N))}else{var tt=f($,Z),Q=s(e(Z,"interpolation",D));b.add(J,$,tt.getEnd,tt.getStart,tt.getActive,n(e(Z,"ease",A),e(Z,"easeParams",P)),o(Z,"delay",E),e(Z,"duration",M),r(Z,"yoyo",I),e(Z,"hold",R),e(Z,"repeat",F),e(Z,"repeatDelay",w),r(Z,"flipX",U),r(Z,"flipY",N),Q,Q?Z:null)}},L=new v(x,T),G=0;G{var d=t(70402),c=t(23568),h=t(57355),r=t(62329),n=t(35154),e=t(8357),s=t(43960),o=function(i,a){if(a instanceof s)return a.parent=i,a;var l=new s(i);l.startDelay=n(a,"delay",0),l.completeDelay=c(a,"completeDelay",0),l.loop=Math.round(c(a,"loop",n(a,"repeat",0))),l.loopDelay=Math.round(c(a,"loopDelay",n(a,"repeatDelay",0))),l.paused=h(a,"paused",!1),l.persist=h(a,"persist",!1),l.callbackScope=n(a,"callbackScope",l);var f,u=d.TYPES;for(f=0;f{p.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:(p=>{p.exports="active"}),98540:(p=>{p.exports="complete"}),67233:(p=>{p.exports="loop"}),2859:(p=>{p.exports="pause"}),98336:(p=>{p.exports="repeat"}),25764:(p=>{p.exports="resume"}),32193:(p=>{p.exports="start"}),84371:(p=>{p.exports="stop"}),70766:(p=>{p.exports="update"}),55659:(p=>{p.exports="yoyo"}),842:((p,S,t)=>{p.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:((p,S,t)=>{var d={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)};p.exports=d}),70402:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(842),r=t(86353),n=new d({Extends:c,initialize:function(s){c.call(this),this.parent=s,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(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(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(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,o){return o===void 0&&(o=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:o}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE,this.hasStarted=!1},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"],p.exports=n}),95042:((p,S,t)=>{var d=t(83419),c=t(842),h=t(86353),r=new d({initialize:function(e,s,o,i,a,l,f,u,v,m){this.tween=e,this.targetIndex=s,this.duration=i<=0?.01:i,this.totalDuration=0,this.delay=0,this.getDelay=o,this.yoyo=a,this.hold=l,this.repeat=f,this.repeatDelay=u,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=h.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=h.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=h.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=h.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=h.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=h.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=h.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=h.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===h.CREATED},isDelayed:function(){return this.state===h.DELAY},isPendingRender:function(){return this.state===h.PENDING_RENDER},isPlayingForward:function(){return this.state===h.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===h.PLAYING_BACKWARD},isHolding:function(){return this.state===h.HOLD_DELAY},isRepeating:function(){return this.state===h.REPEAT_DELAY},isComplete:function(){return this.state===h.COMPLETE},setStateFromEnd:function(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,s=this.targetIndex,o=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(o,i,0,s,e,n),this.repeatCounter=this.repeat===-1?h.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var l=a+this.repeatDelay;this.totalDuration=this.delay+a,this.repeat===-1?(this.totalDuration+=l*h.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=l*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var o=this.tween,i=o.totalTargets,a=this.targetIndex,l=o.targets[a],f=this.key,u=f!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&l.toggleFlipX(),this.flipY&&l.toggleFlipY(),u&&(e||s)&&(this.start=this.getStartValue(l,f,this.start,a,i,o)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,u&&(this.end=this.getEndValue(l,f,this.start,a,i,o)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,u&&(this.current=this.start,l[f]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});p.exports=r}),69902:(p=>{var S={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};p.exports=S}),81076:(p=>{p.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:((p,S,t)=>{var d=t(70402),c=t(83419),h=t(842),r=t(44603),n=t(39429),e=t(36383),s=t(86353),o=t(48177),i=t(42220),a=new c({Extends:d,initialize:function(f,u){d.call(this,f),this.targets=u,this.totalTargets=u.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,this.isNumberTween=!1},add:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F){var w=new o(this,l,f,u,v,m,x,g,y,T,C,E,M,P,A,R,F);return this.totalData=this.data.push(w),w},addFrame:function(l,f,u,v,m,x,g,y,T,C){var E=new i(this,l,f,u,v,m,x,g,y,T,C);return this.totalData=this.data.push(E),E},getValue:function(l){l===void 0&&(l=0);var f=null;return this.data&&(f=this.data[l].current),f},hasTarget:function(l){return this.targets&&this.targets.indexOf(l)!==-1},updateTo:function(l,f,u){if(u===void 0&&(u=!1),l!=="texture")for(var v=0;v0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.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(l,f,u){if(l===void 0&&(l=0),f===void 0&&(f=16.6),u===void 0&&(u=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;u||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,l>0){for(var m=Math.floor(l/f),x=l-m*f,g=0;g0&&this.update(x)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(l){l===void 0&&(l=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var f=this.data,u=0;u0?this.totalDuration=v+m+(v+g)*x:this.totalDuration=v+m},reset:function(l){return l===void 0&&(l=!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=s.MAX),l||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(l){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(l*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(l),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(l),!1;this.hasStarted||(this.startDelay-=l,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),l=0));var f=!1;if(this.isActive())for(var u=this.data,v=0;v{var d=t(72905),c=t(70402),h=t(83419),r=t(842),n=t(44603),e=t(39429),s=t(86353),o=new h({Extends:c,initialize:function(a){c.call(this,a),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var a=this.parent.create(i);Array.isArray(a)||(a=[a]);for(var l=this.data,f=0;f0)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 i=this.data,a=this.totalData,l=0;l{var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,f,u,v,m,x,g,y,T,C,E,M,P){d.call(this,s,o,v,m,x,g,y,T,C,E),this.key=i,this.getActiveValue=f,this.getEndValue=a,this.getStartValue=l,this.ease=u,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=M,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],o=this.key;e&&(s[o]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[o]=this.getActiveValue(s,o,0))},update:function(e){var s=this.tween,o=s.totalTargets,i=this.targetIndex,a=s.targets[i],l=this.key;if(!a)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(a,l,a[l],i,o,s),this.end=this.getEndValue(a,l,this.start,i,o,s),this.current=this.start,a[l]=this.start,this.setPlayingForwardState(),!0;var f=this.isPlayingForward(),u=this.isPlayingBackward();if(f||u){var v=this.elapsed,m=this.duration,x=0,g=!1;v+=e,v>=m?(x=v-m,v=m,g=!0):v<0&&(v=0);var y=c(v/m,0,1);this.elapsed=v,this.progress=y,this.previous=this.current,f||(y=1-y);var T=this.ease(y);this.interpolation?this.current=this.interpolation(this.interpolationData,T):this.current=this.start+(this.end-this.start)*T,a[l]=this.current,g&&(f?(s.isNumberTween&&(this.current=this.end,a[l]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(s.isNumberTween&&(this.current=this.start,a[l]=this.current),this.setStateFromStart(x))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key,l=this.current,f=this.previous;o.emit(e,o,a,i,l,f);var u=o.callbacks[s];u&&u.func.apply(o.callbackScope,[o,i,a,l,f].concat(u.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});p.exports=n}),42220:((p,S,t)=>{var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,o,i,a,l,f,u,v,m,x,g){d.call(this,s,o,l,f,!1,u,v,m,x,g),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=a,this.yoyo=v!==0},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=s.texture.key,this.startFrame=s.frame.name),e&&s.setTexture(this.startTexture,this.startFrame)},update:function(e){var s=this.tween,o=this.targetIndex,i=s.targets[o];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var a=this.isPlayingForward(),l=this.isPlayingBackward();if(a||l){var f=this.elapsed,u=this.duration,v=0,m=!1;f+=e,f>=u?(v=f-u,f=u,m=!0):f<0&&(f=0);var x=c(f/u,0,1);this.elapsed=f,this.progress=x,m&&(a?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(v))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var o=this.tween;if(!o.isSeeking){var i=o.targets[this.targetIndex],a=this.key;o.emit(e,o,a,i);var l=o.callbacks[s];l&&l.func.apply(o.callbackScope,[o,i,a].concat(l.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});p.exports=n}),86353:(p=>{var S={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};p.exports=S}),83419:(p=>{function S(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,s){var o=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&o.value&&typeof o.value=="object"&&(o=o.value),o&&S(o)?(typeof o.enumerable>"u"&&(o.enumerable=!0),typeof o.configurable>"u"&&(o.configurable=!0),o):!1}function d(n,e){var s=Object.getOwnPropertyDescriptor(n,e);return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function c(n,e,s,o){for(var i in e)if(e.hasOwnProperty(i)){var a=t(e,i,s);if(a!==!1){var l=o||n;if(d(l.prototype,i)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,i,a)}else n.prototype[i]=e[i]}}function h(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s{var S=function(){};p.exports=S}),20242:(p=>{var S=function(){return null};p.exports=S}),71146:(p=>{var S=function(t,d,c,h,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.push(d),h&&h.call(r,d),d):null;for(var e=d.length-1;e>=0;)t.indexOf(d[e])!==-1&&d.splice(e,1),e--;if(e=d.length,e===0)return null;c>0&&e>n&&(d.splice(n),e=n);for(var s=0;s{var S=function(t,d,c,h,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),h>0){var e=h-t.length;if(e<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.splice(c,0,d),r&&r.call(n,d),d):null;for(var s=d.length-1;s>=0;)t.indexOf(d[s])!==-1&&d.pop(),s--;if(s=d.length,s===0)return null;h>0&&s>e&&(d.splice(e),s=e);for(var o=s-1;o>=0;o--){var i=d[o];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S}),66905:(p=>{var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c{var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=0;if(d(h,e,s))for(var i=e;i{var S=function(t,d,c){var h,r=[null];for(h=3;h{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s)){var o,i=[null];for(o=5;o{var S=function(t,d,c){if(d.length){if(d.length===1)return d[0]}else return NaN;var h=1,r,n;if(c){if(td.length&&(h=d.length),c?(r=d[h-1][c],n=d[h][c],n-t<=t-r?d[h]:d[h-1]):(r=d[h-1],n=d[h],n-t<=t-r?n:r)};p.exports=S}),43491:(p=>{var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c{var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var o=[];if(d(h,e,s))for(var i=e;i{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),e!==-1){if(d(h,e,s))for(var o=e;o=0;o--){var i=h[o];if(!r||r&&n===void 0&&i.hasOwnProperty(r)||r&&n!==void 0&&i[r]===n)return i}return null};p.exports=c}),26546:(p=>{var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=t.length);var h=d+Math.floor(Math.random()*c);return t[h]===void 0?null:t[h]};p.exports=S}),85835:(p=>{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h>r||(t.splice(h,1),r=t.indexOf(c),t.splice(r+1,0,d)),t};p.exports=S}),83371:(p=>{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h{var S=function(t,d){var c=t.indexOf(d);if(c>0){var h=t[c-1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S}),69693:(p=>{var S=function(t,d,c){var h=t.indexOf(d);if(h===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return h!==c&&(t.splice(h,1),t.splice(c,0,d)),d};p.exports=S}),40853:(p=>{var S=function(t,d){var c=t.indexOf(d);if(c!==-1&&c{var S=function(t,d,c,h){var r=[],n,e=!1;if((c||h)&&(e=!0,c||(c=""),h||(h="")),d=d;n--)e?r.push(c+n.toString()+h):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+h):r.push(n);return r};p.exports=S}),593:((p,S,t)=>{var d=t(2284),c=function(h,r,n){h===void 0&&(h=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=h,h=0);for(var e=[],s=Math.max(d((r-h)/(n||1)),0),o=0;o{function S(c,h,r){var n=c[h];c[h]=c[r],c[r]=n}function t(c,h){return ch?1:0}var d=function(c,h,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 s=n-r+1,o=h-r+1,i=Math.log(s),a=.5*Math.exp(2*i/3),l=.5*Math.sqrt(i*a*(s-a)/s)*(o-s/2<0?-1:1),f=Math.max(r,Math.floor(h-o*a/s+l)),u=Math.min(n,Math.floor(h+(s-o)*a/s+l));d(c,h,f,u,e)}var v=c[h],m=r,x=n;for(S(c,r,h),e(c[n],v)>0&&S(c,r,n);m0;)x--}e(c[r],v)===0?S(c,r,x):(x++,S(c,x,n)),x<=h&&(r=x+1),h<=x&&(n=x-1)}};p.exports=d}),88492:((p,S,t)=>{var d=t(35154),c=t(33680),h=function(n,e,s){for(var o=[],i=0;i{var d=t(19133),c=function(h,r,n,e){e===void 0&&(e=h);var s;if(!Array.isArray(r))return s=h.indexOf(r),s!==-1?(d(h,s),n&&n.call(e,r),r):null;for(var o=r.length-1,i=[];o>=0;){var a=r[o];s=h.indexOf(a),s!==-1&&(d(h,s),i.push(a),n&&n.call(e,a)),o--}return i};p.exports=c}),60248:((p,S,t)=>{var d=t(19133),c=function(h,r,n,e){if(e===void 0&&(e=h),r<0||r>h.length-1)throw new Error("Index out of bounds");var s=d(h,r);return n&&n.call(e,s),s};p.exports=c}),81409:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=h.length),s===void 0&&(s=h),d(h,r,n)){var o=n-r,i=h.splice(r,o);if(e)for(var a=0;a{var d=t(19133),c=function(h,r,n){r===void 0&&(r=0),n===void 0&&(n=h.length);var e=r+Math.floor(Math.random()*n);return d(h,e)};p.exports=c}),42169:(p=>{var S=function(t,d,c){var h=t.indexOf(d),r=t.indexOf(c);return h!==-1&&r===-1?(t[h]=c,!0):!1};p.exports=S}),86003:(p=>{var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h{var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h{var S=function(t,d,c,h){var r=t.length;if(d<0||d>=r||d>=c||c>r){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S}),89545:(p=>{var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(d)),d};p.exports=S}),17810:((p,S,t)=>{var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s))for(var o=e;o{var S=function(t){for(var d=t.length-1;d>0;d--){var c=Math.floor(Math.random()*(d+1)),h=t[d];t[d]=t[c],t[c]=h}return t};p.exports=S}),90126:(p=>{var S=function(t){var d=/\D/g;return t.sort(function(c,h){return parseInt(c.replace(d,""),10)-parseInt(h.replace(d,""),10)}),t};p.exports=S}),19133:(p=>{var S=function(t,d){if(!(d>=t.length)){for(var c=t.length-1,h=t[d],r=d;r{var d=t(82264);function c(e,s){return String(e).localeCompare(s)}function h(e,s){var o=e.length;if(o<=1)return e;for(var i=new Array(o),a=1;aa&&(v=a),m>a&&(m=a),x=u,g=v;;)if(x{var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[h]=c,t[r]=d,t};p.exports=S}),37105:((p,S,t)=>{p.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:(p=>{var S=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var d=t[0].length,c=1;c{var d=t(41836),c=t(86922),h=function(r){var n="";if(!c(r))return n;for(var e=0;e{var S=function(t){return t.reverse()};p.exports=S}),21224:(p=>{var S=function(t){for(var d=0;d{var d=t(37829),c=function(h){return d(h,180)};p.exports=c}),44657:((p,S,t)=>{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n{var d=t(86922),c=t(2429),h=function(r,n){if(n===void 0&&(n=90),!d(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{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n{var d=t(86003),c=t(49498),h=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s{var S=function(t){for(var d=t.length,c=t[0].length,h=new Array(c),r=0;r-1;n--)h[r][n]=t[n][r]}return h};p.exports=S}),54915:((p,S,t)=>{p.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:(p=>{var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var h=new Uint8Array(d),r=h.length,n=c?"data:"+c+";base64,":"",e=0;e>2],n+=S[(h[e]&3)<<4|h[e+1]>>4],n+=S[(h[e+1]&15)<<2|h[e+2]>>6],n+=S[h[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};p.exports=t}),53134:(p=>{for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d>4,f[e++]=(o&15)<<4|i>>2,f[e++]=(i&3)<<6|a&63;return l};p.exports=c}),65839:((p,S,t)=>{p.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}}),91799:((p,S,t)=>{p.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}}),41786:(p=>{var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S}),62644:(p=>{var S=function(t){var d,c,h;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(h in t)c=t[h],d[h]=S(c);return d};p.exports=S}),79291:((p,S,t)=>{var d=t(41212),c=function(){var h,r,n,e,s,o,i=arguments[0]||{},a=1,l=arguments.length,f=!1;for(typeof i=="boolean"&&(f=i,i=arguments[1]||{},a=2),l===a&&(i=this,--a);a{var d=t(75508),c=t(35154),h=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=h}),95540:(p=>{var S=function(t,d,c){var h=typeof t;return!t||h==="number"||h==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S}),82840:((p,S,t)=>{var d=t(35154),c=t(45319),h=function(r,n,e,s,o){o===void 0&&(o=e);var i=d(r,n,o);return c(i,e,s)};p.exports=h}),35154:(p=>{var S=function(t,d,c,h){if(!t&&!h||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(h&&h.hasOwnProperty(d))return h[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=h,s=c,o=c,i=!0,a=!0,l=0;l{var S=function(t,d){for(var c=0;c{var S=function(t,d){for(var c=0;c{var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S}),41212:(p=>{var S=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};p.exports=S}),46975:((p,S,t)=>{var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};p.exports=c}),269:((p,S,t)=>{var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};p.exports=c}),18254:((p,S,t)=>{var d=t(97022),c=function(h,r){for(var n={},e=0;e{var S=function(t,d,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(d))return t[d]=c,!0;if(d.indexOf(".")!==-1){for(var h=d.split("."),r=t,n=t,e=0;e{p.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:(p=>{var S=function(t,d){return t.replace(/%([0-9]+)/g,function(c,h){return d[Number(h)-1]})};p.exports=S}),41836:(p=>{var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=" "),h===void 0&&(h=3),t=t.toString();var r=0;if(d+1>=t.length)switch(h){case 1:t=new Array(d+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=d-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(d+1-t.length).join(c);break}return t};p.exports=S}),33628:(p=>{var S=function(t,d){return d===0?t.slice(1):t.slice(0,d)+t.slice(d+1)};p.exports=S}),27671:(p=>{var S=function(t){return t.split("").reverse().join("")};p.exports=S}),45650:(p=>{var S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var d=Math.random()*16|0,c=t==="x"?d:d&3|8;return c.toString(16)})};p.exports=S}),35355:(p=>{var S=function(t){return t&&t[0].toUpperCase()+t.slice(1)};p.exports=S}),31749:((p,S,t)=>{p.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}})},ht={};function at(p){var S=ht[p];if(S!==void 0)return S.exports;var t=ht[p]={exports:{}};return ot[p](t,t.exports,at),t.exports}at.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})();var mt=at(85454);return mt})())})(Pt)),Pt.exports}var Lt=Ft();const xt=Mt(Lt);class Ot{sprite;targetX;targetY;constructor(ut,ot,ht,at){this.sprite=ut.add.rectangle(ot,ht,32,32,at),this.targetX=ot,this.targetY=ht}setTarget(ut,ot){this.targetX=ut,this.targetY=ot}update(){this.sprite.x=xt.Math.Linear(this.sprite.x,this.targetX,.15),this.sprite.y=xt.Math.Linear(this.sprite.y,this.targetY,.15)}destroy(){this.sprite.destroy()}}class Dt{dx=0;dy=0;constructor(ut){let ot=null;ut.input.on("pointerdown",ht=>{ot=new xt.Math.Vector2(ht.x,ht.y)}),ut.input.on("pointermove",ht=>{ot&&(this.dx=xt.Math.Clamp((ht.x-ot.x)/50,-1,1),this.dy=xt.Math.Clamp((ht.y-ot.y)/50,-1,1))}),ut.input.on("pointerup",()=>{ot=null,this.dx=0,this.dy=0})}}class wt{socket;playerId=null;onState;constructor(ut){this.socket=new WebSocket(ut),this.socket.onmessage=ot=>{const ht=JSON.parse(ot.data);ht.type==="init"&&(this.playerId=ht.payload.id),ht.type==="state"&&this.onState?.(ht.payload)}}sendInput(ut,ot){this.playerId&&this.socket.send(JSON.stringify({dx:ut,dy:ot}))}}class Bt extends Phaser.Scene{players=new Map;socket;inputCtrl;create(){this.inputCtrl=new Dt(this),this.socket=new wt("ws://localhost:8080/ws"),this.socket.onState=ut=>{this.syncPlayers(ut.players)}}update(){this.socket.sendInput(this.inputCtrl.dx,this.inputCtrl.dy);for(const ut of this.players.values())ut.update()}syncPlayers(ut){for(const ot in ut){const ht=ut[ot];let at=this.players.get(ot);if(!at){const p=ot===this.socket.playerId?65280:16729156;at=new Ot(this,ht.x,ht.y,p),this.players.set(ot,at)}at.setTarget(ht.x,ht.y)}for(const[ot,ht]of this.players)ut[ot]||(ht.destroy(),this.players.delete(ot))}}const It={type:xt.AUTO,width:360,height:640,scale:{mode:xt.Scale.FIT,autoCenter:xt.Scale.CENTER_BOTH},backgroundColor:"#1e1e1e",scene:[Bt]};new xt.Game(It); diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..3774e37 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,13 @@ + + + + + + + tma-front + + + +
+ + diff --git a/dist/vite.svg b/dist/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/dist/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file