1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="29f0123c-ea59-4f3c-9819-eeef7830e6a8",t._sentryDebugIdIdentifier="sentry-dbid-29f0123c-ea59-4f3c-9819-eeef7830e6a8")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4261],{715:(t,e,i)=>{"use strict";function r(t){let e={};for(let i in t)void 0!==t[i]&&(e[i]=t[i]);return e}i.d(e,{S:()=>r})},3069:(t,e,i)=>{"use strict";i.d(e,{m:()=>a});var r=i(15744),s=i(98737),n=i(29292);class a{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new r.u,this.worldColorAlpha=0xffffffff,this.worldColor=0xffffff,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new s.L,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;let e=t.children;for(let t=0;t<e.length;t++){let i=e[t];i._updateFlags=15,this.addChild(i)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(n.W.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;let t=this._parentCacheAsTextureRenderGroup;t&&!t.textureNeedsUpdate&&t.updateCacheTexture()}reset(){for(let t in this.renderGroupChildren.length=0,this.childrenToUpdate){let e=this.childrenToUpdate[t];e.list.fill(null),e.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){let e=this.renderGroupChildren.indexOf(t);e>-1&&this.renderGroupChildren.splice(e,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup)return void this.addRenderGroupChild(t.renderGroup);t._onRender&&this.addOnRender(t);let e=t.children;for(let t=0;t<e.length;t++)this.addChild(e[t])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&!t.renderGroup&&this.removeOnRender(t),t.parentRenderGroup=null,t.renderGroup)return void this._removeRenderGroupChild(t.renderGroup);let e=t.children;for(let t=0;t<e.length;t++)this.removeChild(e[t])}removeChildren(t){for(let e=0;e<t.length;e++)this.removeChild(t[e])}onChildUpdate(t){let e=this.childrenToUpdate[t.relativeRenderGroupDepth];e||(e=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),e.list[e.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return 7===this.root.localDisplayStatus&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let e=0;e<this._onRenderContainers.length;e++)this._onRenderContainers[e]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){let e=this.root.children;for(let i=0;i<e.length;i++)this._getChildren(e[i],t);return t}_getChildren(t,e=[]){if(e.push(t),t.renderGroup)return e;let i=t.children;for(let t=0;t<i.length;t++)this._getChildren(i[t],e);return e}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(1&this._matrixDirty)==0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new r.u),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(2&this._matrixDirty)==0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new r.u),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((4&this._matrixDirty)==0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;let t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new r.u),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}},3224:(t,e,i)=>{"use strict";i.d(e,{u:()=>r});var r=(t=>(t[t.NONE=0]="NONE",t[t.COLOR=16384]="COLOR",t[t.STENCIL=1024]="STENCIL",t[t.DEPTH=256]="DEPTH",t[t.COLOR_DEPTH=16640]="COLOR_DEPTH",t[t.COLOR_STENCIL=17408]="COLOR_STENCIL",t[t.DEPTH_STENCIL=1280]="DEPTH_STENCIL",t[t.ALL=17664]="ALL",t))(r||{})},4129:(t,e,i)=>{"use strict";i.d(e,{B:()=>r,I:()=>s});let r=1e-4,s=1e-4},4940:(t,e,i)=>{"use strict";i.d(e,{n:()=>n});var r=i(15744),s=i(65129);function n(t,e,i){return e.clear(),i||(i=r.u.IDENTITY),function t(e,i,n,a,o){let l;if(o)l=s.u.get(),l=n.copyTo(l);else{if(!e.visible||!e.measurable)return;e.updateLocalTransform();let t=e.localTransform;(l=s.u.get()).appendFrom(t,n)}let h=i,u=!!e.effects.length;if(u&&(i=s.o.get().clear()),e.boundsArea)i.addRect(e.boundsArea,l);else{e.renderPipeId&&(i.matrix=l,i.addBounds(e.bounds));let r=e.children;for(let e=0;e<r.length;e++)t(r[e],i,l,a,!1)}if(u){for(let t=0;t<e.effects.length;t++)e.effects[t].addLocalBounds?.(i,a);h.addBounds(i,r.u.IDENTITY),s.o.return(i)}s.u.return(l)}(t,e,i,t,!0),e.isValid||e.set(0,0,0,0),e}},5223:(t,e,i)=>{"use strict";i.d(e,{V:()=>h});var r=i(5479),s=i(5341),n=i(48036),a=i(18484),o=i(62093);function l(t,e){if(!(t instanceof a.h)){let i=e?o.S.INDEX:o.S.VERTEX;t instanceof Array&&(e?(t=new Uint32Array(t),i=o.S.INDEX|o.S.COPY_DST):(t=new Float32Array(t),i=o.S.VERTEX|o.S.COPY_DST)),t=new a.h({data:t,label:e?"index-mesh-buffer":"vertex-mesh-buffer",usage:i})}return t}class h extends r.A{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=(0,n.L)("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new s.c,this._boundsDirty=!0;let{attributes:e,indexBuffer:i,topology:r}=t;if(this.buffers=[],this.attributes={},e)for(let t in e)this.addAttribute(t,e[t]);this.instanceCount=t.instanceCount??1,i&&this.addIndex(i),this.topology=r||"triangle-list"}
1onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(let t in this.attributes){let e=this.attributes[t];return e.buffer.data.length/(e.stride/4||e.size)}return 0}addAttribute(t,e){var i;let r=(((i=e)instanceof a.h||Array.isArray(i)||i.BYTES_PER_ELEMENT)&&(i={buffer:i}),i.buffer=l(i.buffer,!1),i);-1===this.buffers.indexOf(r.buffer)&&(this.buffers.push(r.buffer),r.buffer.on("update",this.onBufferUpdate,this),r.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=r}addIndex(t){this.indexBuffer=l(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,function(t,e,i){let r=t.getAttribute(e);if(!r)return i.minX=0,i.minY=0,i.maxX=0,i.maxY=0,i;let s=r.buffer.data,n=1/0,a=1/0,o=-1/0,l=-1/0,h=s.BYTES_PER_ELEMENT,u=(r.offset||0)/h,d=(r.stride||8)/h;for(let t=u;t<s.length;t+=d){let e=s[t],i=s[t+1];e>o&&(o=e),i>l&&(l=i),e<n&&(n=e),i<a&&(a=i)}return i.minX=n,i.minY=a,i.maxX=o,i.maxY=l,i}(this,"aPosition",this._bounds)):this._bounds}unload(){for(let t in this.emit("unload",this),this._gpuData)this._gpuData[t]?.destroy();this._gpuData=Object.create(null)}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(t=>t.destroy()),this.unload(),this.indexBuffer?.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}},5341:(t,e,i)=>{"use strict";i.d(e,{c:()=>a});var r=i(15744),s=i(78773);let n=new r.u;class a{constructor(t=1/0,e=1/0,i=-1/0,r=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=n,this.minX=t,this.minY=e,this.maxX=i,this.maxY=r}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new s.M);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=n,this}set(t,e,i,r){this.minX=t,this.minY=e,this.maxX=i,this.maxY=r}addFrame(t,e,i,r,s){s||(s=this.matrix);let n=s.a,a=s.b,o=s.c,l=s.d,h=s.tx,u=s.ty,d=this.minX,c=this.minY,f=this.maxX,p=this.maxY,m=n*t+o*e+h,g=a*t+l*e+u;m<d&&(d=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g),m=n*i+o*e+h,g=a*i+l*e+u,m<d&&(d=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g),m=n*t+o*r+h,g=a*t+l*r+u,m<d&&(d=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g),m=n*i+o*r+h,g=a*i+l*r+u,m<d&&(d=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g),this.minX=d,this.minY=c,this.maxX=f,this.maxY=p}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){let e=this.minX,i=this.minY,r=this.maxX,s=this.maxY,{a:n,b:a,c:o,d:l,tx:h,ty:u}=t,d=n*e+o*i+h,c=a*e+l*i+u;this.minX=d,this.minY=c,this.maxX=d,this.maxY=c,d=n*r+o*i+h,c=a*r+l*i+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY,d=n*e+o*s+h,c=a*e+l*s+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY,d=n*r+o*s+h,c=a*r+l*s+u,this.minX=d<this.minX?d:this.minX,this.minY=c<this.minY?c:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=c>this.maxY?c:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,i,r){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<i&&(this.minY=i),this.maxY>r&&(this.maxY=r),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new a(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}
1addVertexData(t,e,i,r){let s=this.minX,n=this.minY,a=this.maxX,o=this.maxY;r||(r=this.matrix);let l=r.a,h=r.b,u=r.c,d=r.d,c=r.tx,f=r.ty;for(let r=e;r<i;r+=2){let e=t[r],i=t[r+1],p=l*e+u*i+c,m=h*e+d*i+f;s=p<s?p:s,n=m<n?m:n,a=p>a?p:a,o=m>o?m:o}this.minX=s,this.minY=n,this.maxX=a,this.maxY=o}containsPoint(t,e){return!!(this.minX<=t)&&!!(this.minY<=e)&&!!(this.maxX>=t)&&!!(this.maxY>=e)}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}},5479:(t,e,i)=>{"use strict";i.d(e,{A:()=>s,b:()=>r});var r=i(96112);let s=r},8402:(t,e,i)=>{"use strict";var r=i(59869),s=i(40063);class n{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){let e=this._cache.get(t);return e||(0,r.R)(`[Assets] Asset id ${t} was not found in the Cache`),e}set(t,e){let i,n=(0,s.z)(t);for(let t=0;t<this.parsers.length;t++){let r=this.parsers[t];if(r.test(e)){i=r.getCacheableAssets(n,e);break}}let a=new Map(Object.entries(i||{}));i||n.forEach(t=>{a.set(t,e)});let o=[...a.keys()],l={cacheKeys:o,keys:n};n.forEach(t=>{this._cacheMap.set(t,l)}),o.forEach(t=>{let s=i?i[t]:e;this._cache.has(t)&&this._cache.get(t)!==s&&(0,r.R)("[Cache] already has key:",t),this._cache.set(t,a.get(t))})}remove(t){if(!this._cacheMap.has(t))return void(0,r.R)(`[Assets] Asset id ${t} was not found in the Cache`);let e=this._cacheMap.get(t);e.cacheKeys.forEach(t=>{this._cache.delete(t)}),e.keys.forEach(t=>{this._cacheMap.delete(t)})}get parsers(){return this._parsers}}let a=new n;var o=i(90194),l=i(58862),h=i(25687);let u=[];function d(t={}){let e=t&&t.resource,i=e?t.resource:t,r=e?t:{resource:t};for(let t=0;t<u.length;t++){let e=u[t];if(e.test(i))return new e(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}o.XO.handleByList(o.Ag.TextureSource,u),h.g.from=function(t,e=!1){return"string"==typeof t?a.get(t):t instanceof l.v?new h.g({source:t}):function(t={},e=!1){let i=t&&t.resource,r=i?t.resource:t,s=i?t:{resource:t};if(!e&&a.has(r))return a.get(r);let n=new h.g({source:d(s)});return n.on("destroy",()=>{a.has(r)&&a.remove(r)}),e||a.set(r,n),n}(t,e)},l.v.from=d},8909:(t,e,i)=>{"use strict";i.d(e,{N:()=>n});var r=i(15744);let s=new r.u;class n{constructor(t,e){this.mapCoord=new r.u,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._updateID=0,this.clampOffset=0,void 0===e?this.clampMargin=t.width<10?0:.5:this.clampMargin=e,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture?.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this)),this.update()}multiplyUvs(t,e){void 0===e&&(e=t);let i=this.mapCoord;for(let r=0;r<t.length;r+=2){let s=t[r],n=t[r+1];e[r]=s*i.a+n*i.c+i.tx,e[r+1]=s*i.b+n*i.d+i.ty}return e}update(){let t=this._texture;this._updateID++;let e=t.uvs;this.mapCoord.set(e.x1-e.x0,e.y1-e.y0,e.x3-e.x0,e.y3-e.y0,e.x0,e.y0);let i=t.orig,r=t.trim;r&&(s.set(i.width/r.width,0,0,i.height/r.height,-r.x/r.width,-r.y/r.height),this.mapCoord.append(s));let n=t.source,a=this.uClampFrame,o=this.clampMargin/n._resolution,l=this.clampOffset/n._resolution;return a[0]=(t.frame.x+o+l)/n.width,a[1]=(t.frame.y+o+l)/n.height,a[2]=(t.frame.x+t.frame.width-o+l)/n.width,a[3]=(t.frame.y+t.frame.height-o+l)/n.height,this.uClampOffset[0]=this.clampOffset/n.pixelWidth,this.uClampOffset[1]=this.clampOffset/n.pixelHeight,this.isSimple=t.frame.width===n.width&&t.frame.height===n.height&&0===t.rotate,!0}}}
1,9026:(t,e,i)=>{"use strict";t.exports=i(54286)},9041:(t,e,i)=>{"use strict";i.d(e,{P:()=>a,_:()=>s});let r={};function s(t){return r[t]||(r[t]={name:"texture-batch-bit",vertex:{header:` 2 @in aTextureIdAndRound: vec2<u32>; 3 @out @interpolate(flat) vTextureId : u32; 4 `,main:` 5 vTextureId = aTextureIdAndRound.y; 6 `,end:` 7 if(aTextureIdAndRound.x == 1) 8 { 9 vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw); 10 } 11 `},fragment:{header:` 12 @in @interpolate(flat) vTextureId: u32; 13 14 ${function(t){let e=[];if(1===t)e.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),e.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let i=0;for(let r=0;r<t;r++)e.push(`@group(1) @binding(${i++}) var textureSource${r+1}: texture_2d<f32>;`),e.push(`@group(1) @binding(${i++}) var textureSampler${r+1}: sampler;`)}return e.join("\n")}(t)} 15 `,main:` 16 var uvDx = dpdx(vUV); 17 var uvDy = dpdy(vUV); 18 19 ${function(t){let e=[];
19if(1===t)e.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{e.push("switch vTextureId {");for(let i=0;i<t;i++)i===t-1?e.push(" default:{"):e.push(` case ${i}:{`),e.push(` outColor = textureSampleGrad(textureSource${i+1}, textureSampler${i+1}, vUV, uvDx, uvDy);`),e.push(" break;}");e.push("}")}return e.join("\n")}(t)} 20 `}}),r[t]}let n={};function a(t){return n[t]||(n[t]={name:"texture-batch-bit",vertex:{header:` 21 in vec2 aTextureIdAndRound; 22 out float vTextureId; 23 24 `,main:` 25 vTextureId = aTextureIdAndRound.y; 26 `,end:` 27 if(aTextureIdAndRound.x == 1.) 28 { 29 gl_Position.xy = roundPixels(gl_Position.xy, uResolution); 30 } 31 `},fragment:{header:` 32 in float vTextureId; 33 34 uniform sampler2D uTextures[${t}]; 35 36 `,main:` 37 38 ${function(t){let e=[];for(let i=0;i<t;i++)i>0&&e.push("else"),i<t-1&&e.push(`if(vTextureId < ${i}.5)`),e.push("{"),e.push(` outColor = texture(uTextures[${i}], vUV);`),e.push("}");return e.join("\n")}(t)} 39 `}}),n[t]}},11178:(t,e,i)=>{"use strict";i.d(e,{P:()=>n});var r=i(90194),s=i(58862);class n extends s.v{constructor(t){let e=t.resource||new Float32Array(t.width*t.height*4),i=t.format;i||(e instanceof Float32Array?i="rgba32float":e instanceof Int32Array||e instanceof Uint32Array?i="rgba32uint":e instanceof Int16Array||e instanceof Uint16Array?i="rgba16uint":(Int8Array,i="bgra8unorm")),super({...t,resource:e,format:i}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}n.extension=r.Ag.TextureSource},12996:(t,e)=>{"use strict";function i(t,e){var i=t.length;for(t.push(e);0<i;){var r=i-1>>>1,s=t[r];if(0<n(s,e))t[r]=e,t[i]=s,i=r;else break}}function r(t){return 0===t.length?null:t[0]}function s(t){if(0===t.length)return null;var e=t[0],i=t.pop();if(i!==e){t[0]=i;for(var r=0,s=t.length,a=s>>>1;r<a;){var o=2*(r+1)-1,l=t[o],h=o+1,u=t[h];if(0>n(l,i))h<s&&0>n(u,l)?(t[r]=u,t[h]=i,r=h):(t[r]=l,t[o]=i,r=o);else if(h<s&&0>n(u,i))t[r]=u,t[h]=i,r=h;else break}}return e}function n(t,e){var i=t.sortIndex-e.sortIndex;return 0!==i?i:t.id-e.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a,o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,h=l.now();e.unstable_now=function(){return l.now()-h}}var u=[],d=[],c=1,f=null,p=3,m=!1,g=!1,x=!1,y="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function v(t){for(var e=r(d);null!==e;){if(null===e.callback)s(d);else if(e.startTime<=t)s(d),e.sortIndex=e.expirationTime,i(u,e);else break;e=r(d)}}function w(t){if(x=!1,v(t),!g)if(null!==r(u))g=!0,I();else{var e=r(d);null!==e&&R(w,e.startTime-t)}}var S=!1,C=-1,T=5,A=-1;function M(){return!(e.unstable_now()-A<T)}function P(){if(S){var t=e.unstable_now();A=t;var i=!0;try{t:{g=!1,x&&(x=!1,_(C),C=-1),m=!0;var n=p;try{e:{for(v(t),f=r(u);null!==f&&!(f.expirationTime>t&&M());){var o=f.callback;if("function"==typeof o){f.callback=null,p=f.priorityLevel;var l=o(f.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof l){f.callback=l,v(t),i=!0;break e}f===r(u)&&s(u),v(t)}else s(u);f=r(u)}if(null!==f)i=!0;else{var h=r(d);null!==h&&R(w,h.startTime-t),i=!1}}break t}finally{f=null,p=n,m=!1}}}finally{i?a():S=!1}}}if("function"==typeof b)a=function(){b(P)};else if("undefined"!=typeof MessageChannel){var k=new MessageChannel,E=k.port2;k.port1.onmessage=P,a=function(){E.postMessage(null)}}else a=function(){y(P,0)};function I(){S||(S=!0,a())}function R(t,i){C=y(function(){t(e.unstable_now())},i)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,I())},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(t){switch(p){case 1:case 2:case 3:var e=3;break;default:e=p}var i=p;p=e;try{return t()}finally{p=i}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var i=p;p=t;try{return e()}finally{p=i}},e.unstable_scheduleCallback=function(t,s,n){var a=e.unstable_now();switch(n="object"==typeof n&&null!==n&&"number"==typeof(n=n.delay)&&0<n?a+n:a,t){case 1:var o=-1;break;case 2:o=250;break;case 5:o=0x3fffffff;break;case 4:o=1e4;break;default:o=5e3}
39return o=n+o,t={id:c++,callback:s,priorityLevel:t,startTime:n,expirationTime:o,sortIndex:-1},n>a?(t.sortIndex=n,i(d,t),null===r(u)&&t===r(d)&&(x?(_(C),C=-1):x=!0,R(w,n-a))):(t.sortIndex=o,i(u,t),g||m||(g=!0,I())),t},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(t){var e=p;return function(){var i=p;p=e;try{return t.apply(this,arguments)}finally{p=i}}}},15744:(t,e,i)=>{"use strict";i.d(e,{u:()=>n});var r=i(74349),s=i(50508);class n{constructor(t=1,e=0,i=0,r=1,s=0,n=0){this.array=null,this.a=t,this.b=e,this.c=i,this.d=r,this.tx=s,this.ty=n}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,e,i,r,s,n){return this.a=t,this.b=e,this.c=i,this.d=r,this.tx=s,this.ty=n,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0),i[8]=1,i}apply(t,e){e=e||new s.b;let i=t.x,r=t.y;return e.x=this.a*i+this.c*r+this.tx,e.y=this.b*i+this.d*r+this.ty,e}applyInverse(t,e){e=e||new s.b;let i=this.a,r=this.b,n=this.c,a=this.d,o=this.tx,l=this.ty,h=1/(i*a+-(n*r)),u=t.x,d=t.y;return e.x=a*h*u+-n*h*d+(l*n-o*a)*h,e.y=i*h*d+-r*h*u+(-l*i+o*r)*h,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),r=this.a,s=this.c,n=this.tx;return this.a=r*e-this.b*i,this.b=r*i+this.b*e,this.c=s*e-this.d*i,this.d=s*i+this.d*e,this.tx=n*e-this.ty*i,this.ty=n*i+this.ty*e,this}append(t){let e=this.a,i=this.b,r=this.c,s=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*i+t.b*s,this.c=t.c*e+t.d*r,this.d=t.c*i+t.d*s,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*i+t.ty*s+this.ty,this}appendFrom(t,e){let i=t.a,r=t.b,s=t.c,n=t.d,a=t.tx,o=t.ty,l=e.a,h=e.b,u=e.c,d=e.d;return this.a=i*l+r*u,this.b=i*h+r*d,this.c=s*l+n*u,this.d=s*h+n*d,this.tx=a*l+o*u+e.tx,this.ty=a*h+o*d+e.ty,this}setTransform(t,e,i,r,s,n,a,o,l){return this.a=Math.cos(a+l)*s,this.b=Math.sin(a+l)*s,this.c=-Math.sin(a-o)*n,this.d=Math.cos(a-o)*n,this.tx=t-(i*this.a+r*this.c),this.ty=e-(i*this.b+r*this.d),this}prepend(t){let e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){let e=this.a,i=this.c;this.a=e*t.a+this.b*t.c,this.b=e*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,i=this.b,s=this.c,n=this.d,a=t.pivot,o=-Math.atan2(-s,n),l=Math.atan2(i,e),h=Math.abs(o+l);return h<1e-5||1e-5>Math.abs(r.TO-h)?(t.rotation=l,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=l),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(s*s+n*n),t.position.x=this.tx+(a.x*e+a.y*s),t.position.y=this.ty+(a.x*i+a.y*n),t}invert(){let t=this.a,e=this.b,i=this.c,r=this.d,s=this.tx,n=t*r-e*i;return this.a=r/n,this.b=-e/n,this.c=-i/n,this.d=t/n,this.tx=(i*this.ty-r*s)/n,this.ty=-(t*this.ty-e*s)/n,this}isIdentity(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d&&0===this.tx&&0===this.ty}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new n;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return o.identity()}static get shared(){return a.identity()}}let a=new n,o=new n},16086:(t,e,i)=>{"use strict";i.d(e,{E:()=>d});var r=i(15744);let s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],n=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],o=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],l=[],h=[],u=Math.sign;!function(){for(let t=0;t<16;t++){let e=[];l.push(e);for(let i=0;i<16;i++){let r=u(s[t]*s[i]+a[t]*n[i]),l=u(n[t]*s[i]+o[t]*n[i]),h=u(s[t]*a[i]+a[t]*o[i]),d=u(n[t]*a[i]+o[t]*o[i]);for(let t=0;t<16;t++)if(s[t]===r&&n[t]===l&&a[t]===h&&o[t]===d){e.push(t);break}}}for(let t=0;t<16;t++){let e=new r.u;e.set(s[t],n[t],a[t],o[t],0,0),h.push(e)}}();let d={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>s[t],uY:t=>n[t],vX:t=>a[t],vY:t=>o[t],inv:t=>8&t?15&t:7&-t,add:(t,e)=>l[t][e],sub:(t,e)=>l[t][d.inv(e)],rotate180:t=>4^t,isVertical:t=>(3&t)==2,byDirection:(t,e)=>2*Math.abs(t)<=Math.abs(e)?e>=0?d.S:d.N:2*Math.abs(e)<=Math.abs(t)?t>0?d.E:d.W:e>0?t>0?d.SE:d.SW:t>0?d.NE:d.NW,matrixAppendRotationInv:(t,e,i=0,r=0,s=0,n=0)=>{let a=h[d.inv(e)],o=a.a,l=a.b,u=a.c,c=a.d,f=i-Math.min(0,o*s,u*n,o*s+u*n),p=r-Math.min(0,l*s,c*n,l*s+c*n),m=t.a,g=t.b,x=t.c,y=t.d;t.a=o*m+l*x,t.b=o*g+l*y,t.c=u*m+c*x,t.d=u*g+c*y,t.tx=f*m+p*x+t.tx,t.ty=f*g+p*y+t.ty},transformRectCoords:(t,e,i,r)=>{let{x:s,y:n,width:a,height:o}=t,{x:l,y:h,width:u,height:c}=e;return i===d.E?(r.set(s+l,n+h,a,o),r):i===d.S?r.set(u-n-o+l,s+h,o,a):i===d.W?r.set(u-s-a+l,c-n-o+h,a,o):i===d.N?r.set(n+l,c-s-a+h,o,a):r.set(s+l,n+h,a,o)}}},16269:(t,e,i)=>{"use strict";function r(t,e){return 0xffffff!==t&&e?0xffffff!==e&&t?(((t>>16&255)*(e>>16&255)/255|0)<<16)+(((t>>8&255)*(e>>8&255)/255|0)<<8)+((255&t)*(255&e)/255|0):t:e}i.d(e,{u:()=>r})},16338:(t,e,i)=>{"use strict";i.d(e,{xv:()=>r}),i(5479);let r="8.19.0"},18484:(t,e,i)=>{"use strict";i.d(e,{h:()=>a});var r=i(5479),s=i(48036),n=i(62093);class a extends r.A{constructor(t){let{data:e,size:i}=t,{usage:r,label:n,shrinkToFit:a}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=(0,s.L)("buffer"),this._resourceType="buffer",this._resourceId=(0,s.L)("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,e instanceof Array&&(e=new Float32Array(e)),this._data=e,i??(i=e?.byteLength);let o=!!e;this.descriptor={size:i,usage:r,mappedAtCreation:o,label:n},this.shrinkToFit=a??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&n.S.STATIC)}set static(t){t?this.descriptor.usage|=n.S.STATIC:this.descriptor.usage&=~n.S.STATIC}setDataWithSize(t,e,i){if(this._updateID++,this._updateSize=e*t.BYTES_PER_ELEMENT,this._data===t){i&&this.emit
39("update",this);return}let r=this._data;if(this._data=t,this._dataInt32=null,!r||r.length!==t.length)return void(!this.shrinkToFit&&r&&t.byteLength<r.byteLength?i&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=(0,s.L)("resource"),this.emit("change",this)));i&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}unload(){for(let t in this.emit("unload",this),this._gpuData)this._gpuData[t]?.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}},20489:(t,e,i)=>{"use strict";function r(t,e,i,r){if(i??(i=0),r??(r=Math.min(t.byteLength-i,e.byteLength)),7&i||7&r)if(3&i||3&r)new Uint8Array(e).set(new Uint8Array(t,i,r));else{let s=r/4;new Float32Array(e,0,s).set(new Float32Array(t,i,s))}else{let s=r/8;new Float64Array(e,0,s).set(new Float64Array(t,i,s))}}i.d(e,{W:()=>r})},20915:(t,e,i)=>{"use strict";i.d(e,{R:()=>a});var r=i(86496);class s{constructor(t,e=null,i=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=e,this.priority=i,this._once=r}match(t,e=null){return this._fn===t&&this._context===e}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));let e=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),e}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let e=this.next;return this.next=t?null:e,this.previous=null,e}}let n=class t{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new s(null,null,1/0),this.deltaMS=1/t.targetFPMS,this.elapsedMS=1/t.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,i=r.d.NORMAL){return this._addListener(new s(t,e,i))}addOnce(t,e,i=r.d.NORMAL){return this._addListener(new s(t,e,i,!0))}_addListener(t){let e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this}remove(t,e){let i=this._head.next;for(;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let i;if(e>this.lastTime){if((i=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){let t=e-this._lastFrame|0;if(t<this._minElapsedMS)return;this._lastFrame=e-t%this._minElapsedMS}this.deltaMS=i,this.deltaTime=this.deltaMS*t.targetFPMS;let r=this._head,s=r.next;for(;s;)s=s.emit(this);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){let i=Math.min(Math.max(0,e)/1e3,t.targetFPMS);this._maxElapsedMS=1/i,this._minElapsedMS&&e>this.maxFPS&&(this.maxFPS=e)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}
39set maxFPS(t){0===t?this._minElapsedMS=0:(t<this.minFPS&&(this.minFPS=t),this._minElapsedMS=1/(t/1e3))}static get shared(){if(!t._shared){let e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared}static get system(){if(!t._system){let e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system}};n.targetFPMS=.06;let a=n},21647:(t,e,i)=>{"use strict";t.exports=i(12996)},22027:(t,e,i)=>{"use strict";i.d(e,{GH:()=>p});var r=i(90194),s=i(71108),n=i(22093),a=i(98737),o=i(51263),l=i(74983),h=i(67961),u=i(98974);class d{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{h.Z.return(t)}),this.graphicsData&&h.Z.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class c{constructor(){this.instructions=new a.L}init(t){let e=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(e):this.batcher=new n.J({maxTextures:e}),this.instructions.reset()}get geometry(){return(0,l.t6)(l.Ek,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}let f=class t{constructor(t){this._renderer=t,this._managedContexts=new o.s({renderer:t,type:"resource",name:"graphicsContext"})}init(e){t.defaultOptions.bezierSmoothness=e?.bezierSmoothness??t.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){let e=!!t._gpuData[this._renderer.uid],i=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!e){e&&i.reset(),(0,u.M)(t,i);let r=t.batchMode;t.customShader||"no-batch"===r?i.isBatchable=!1:"auto"===r?i.isBatchable=i.geometryData.vertices.length<400:i.isBatchable=!0,t.dirty=!1}return i}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){let e=h.Z.get(c,{maxTextures:this._renderer.limits.maxBatchableTextures}),i=t._gpuData[this._renderer.uid],{batches:r,geometryData:n}=i;i.graphicsData=e;let a=n.vertices.length,o=n.indices.length;for(let t=0;t<r.length;t++)r[t].applyTransform=!1;let l=e.batcher;l.ensureAttributeBuffer(a),l.ensureIndexBuffer(o),l.begin();for(let t=0;t<r.length;t++){let e=r[t];l.add(e)}l.finish(e.instructions);let u=l.geometry;u.indexBuffer.setDataWithSize(l.indexBuffer,l.indexSize,!0),u.buffers[0].setDataWithSize(l.attributeBuffer.float32View,l.attributeSize,!0);let d=l.batches;for(let t=0;t<d.length;t++){let e=d[t];e.bindGroup=(0,s.w)(e.textures.textures,e.textures.count,this._renderer.limits.maxBatchableTextures)}return e}_initContext(t){let e=new d;return e.context=t,t._gpuData[this._renderer.uid]=e,this._managedContexts.add(t),e}destroy(){this._managedContexts.destroy(),this._renderer=null}};f.extension={type:[r.Ag.WebGLSystem,r.Ag.WebGPUSystem],name:"graphicsContext"},f.defaultOptions={bezierSmoothness:.5};let p=f},22093:(t,e,i)=>{"use strict";i.d(e,{J:()=>D});var r=i(90194),s=i(48036);class n{constructor(t){"number"==typeof t?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw Error(`${t} isn't a valid view type`)}}}
39var a=i(74983),o=i(59818),l=i(20489),h=i(39348);function u(t,e){return"no-premultiply-alpha"===e.alphaMode&&h.Q[t]||t}var d=i(96437),c=i(60593);let f=null;class p{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){let e=this.textures[t];this.textures[t]=null,this.ids[e.uid]=null}this.count=0}}class m{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new p,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}let g=[],x=0;function y(){return x>0?g[--x]:new m}function _(t){t.elements=null,g[x++]=t}o.L.register({clear:()=>{if(g.length>0)for(let t of g)t&&t.destroy();g.length=0,x=0}});let b=0,v=class t{constructor(e){this.uid=(0,s.L)("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],(e={...t.defaultOptions,...e}).maxTextures||((0,a.t6)("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),e.maxTextures=function(){if(f)return f;let t=(0,d.W)();return f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),f=(0,c.u)(f,t),t.getExtension("WEBGL_lose_context")?.loseContext(),f}());let{maxTextures:i,attributesInitialSize:r,indicesInitialSize:o}=e;this.attributeBuffer=new n(4*r),this.indexBuffer=new Uint16Array(o),this.maxTextures=i}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)_(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,e){let i=t._batch.textures.ids[e._source.uid];return(!!i||0===i)&&(t._textureId=i,t.texture=e,!0)}updateElement(t){this.dirty=!0;let e=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId)}break(t){let e=this._elements;if(!e[this.elementStart])return;let i=y(),r=i.textures;r.clear();let s=e[this.elementStart],n=u(s.blendMode,s.texture._source),a=s.topology;4*this.attributeSize>this.attributeBuffer.size&&this._resizeAttributeBuffer(4*this.attributeSize),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);let o=this.attributeBuffer.float32View,l=this.attributeBuffer.uint32View,h=this.indexBuffer,d=this._batchIndexSize,c=this._batchIndexStart,f="startBatch",p=[],m=this.maxTextures;for(let s=this.elementStart;s<this.elementSize;++s){let g=e[s];e[s]=null;let x=g.texture._source,_=u(g.blendMode,x),v=n!==_||a!==g.topology;if(x._batchTick===b&&!v){g._textureId=x._textureBindLocation,d+=g.indexSize,g.packAsQuad?(this.packQuadAttributes(g,o,l,g._attributeStart,g._textureId),this.packQuadIndex(h,g._indexStart,g._attributeStart/this.vertexSize)):(this.packAttributes(g,o,l,g._attributeStart,g._textureId),this.packIndex(g,h,g._indexStart,g._attributeStart/this.vertexSize)),g._batch=i,p.push(g);continue}x._batchTick=b,(r.count>=m||v)&&(this._finishBatch(i,c,d-c,r,n,a,t,f,p),f="renderBatch",c=d,n=_,a=g.topology,(r=(i=y()).textures).clear(),p=[],++b),g._textureId=x._textureBindLocation=r.count,r.ids[x.uid]=r.count,r.textures[r.count++]=x,g._batch=i,p.push(g),d+=g.indexSize,g.packAsQuad?(this.packQuadAttributes(g,o,l,g._attributeStart,g._textureId),this.packQuadIndex(h,g._indexStart,g._attributeStart/this.vertexSize)):(this.packAttributes(g,o,l,g._attributeStart,g._textureId),this.packIndex(g,h,g._indexStart,g._attributeStart/this.vertexSize))}r.count>0&&(this._finishBatch(i,c,d-c,r,n,a,t,f,p),c=d,++b),this.elementStart=this.elementSize,this._batchIndexStart=c,this._batchIndexSize=d}_finishBatch(t,e,i,r,s,n,a,o,l){t.gpuBindGroup=null,t.bindGroup=null,t.action=o,t.batcher=this,t.textures=r,t.blendMode=s,t.topology=n,t.start=e,t.size=i,t.elements=l,++b,this.batches[this.batchIndex++]=t,a.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){4*t<=this.attributeBuffer.size||this._resizeAttributeBuffer(4*t)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){let e=new n(Math.max(t,2*this.attributeBuffer.size));(0,l.W)(this.attributeBuffer.rawBinaryData,e.rawBinaryData),this.attributeBuffer=e}_resizeIndexBuffer(t){let e=this.indexBuffer,i=Math.max(t,1.5*e.length);i+=i%2;let r=i>65535?new Uint32Array(i):new Uint16Array(i);if(r.BYTES_PER_ELEMENT!==e.BYTES_PER_ELEMENT)for(let t=0;t<e.length;t++)r[t]=e[t];else(0,l.W)(e.buffer,r.buffer);this.indexBuffer=r}packQuadIndex(t,e,i){t[e]=i+0,t[e+1]=i+1,t[e+2]=i+2,t[e+3]=i+0,t[e+4]=i+2,t[e+5]=i+3}packIndex(t,e,i,r){let s=t.indices,n=t.indexSize,a=t.indexOffset,o=t.attributeOffset;for(let t=0;t<n;t++)e[i++]=r+s[t+a]-o}destroy(t={}){if(null!==this.batches){for(let t=0;t<this.batchIndex;t++)_(this.batches[t]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&(this.shader?.destroy(),this.shader=null);for(let t=0;t<this._elements.length;t++)this._elements[t]&&(this._elements[t]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};v.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let w=v;var S=i(18484),C=i(62093),T=i(5223);let A=new Float32Array(1),M=new Uint32Array(1);class P extends T.V{constructor(){let t=new S.h({data:A,label:"attribute-batch-buffer",usage:C.S.VERTEX|C.S.COPY_DST,shrinkToFit:!1});super({attributes:{aPosition:{buffer:t,format:"float32x2",stride:24,offset:0},aUV:{buffer:t,format:"float32x2",stride:24,offset:8},aColor:{buffer:t,format:"unorm8x4",stride:24,offset:16},aTextureIdAndRound:{buffer:t,format:"uint16x2",stride:24,offset:20}},indexBuffer:new S.h({data:M,label:"index-batch-buffer",usage:C.S.INDEX|C.S.COPY_DST,shrinkToFit:!1})})}}var k=i(98644),E=i(87946),I=i(9041),R=i(22800),O=i(57825),F=i(35626);class z extends F.M{constructor(t){super({glProgram:(0,k.I)({name:"batch",bits:[E.a,(0,I.P)(t),R.m]}),gpuProgram:(0,k.v)({name:"batch",bits:[E.F,(0,I._)(t),R.b]}),resources:{batchSamplers:(0,O.n)(t)}}),this.maxTextures=t}}let B=null,G=class t extends w{constructor(e){super(e),this.geometry=new P,this.name=t.extension.name,this.vertexSize=6,B??(B=new z(e.maxTextures)),this.shader=B}packAttributes(t,e,i,r,s){let n=s<<16|65535&t.roundPixels,a=t.transform,o=a.a,l=a.b,h=a.c,u=a.d,d=a.tx,c=a.ty,{positions:f,uvs:p}=t,m=t.color,g=t.attributeOffset,x=g+t.attributeSize;
39for(let t=g;t<x;t++){let s=2*t,a=f[s],g=f[s+1];e[r++]=o*a+h*g+d,e[r++]=u*g+l*a+c,e[r++]=p[s],e[r++]=p[s+1],i[r++]=m,i[r++]=n}}packQuadAttributes(t,e,i,r,s){let n=t.texture,a=t.transform,o=a.a,l=a.b,h=a.c,u=a.d,d=a.tx,c=a.ty,f=t.bounds,p=f.maxX,m=f.minX,g=f.maxY,x=f.minY,y=n.uvs,_=t.color,b=s<<16|65535&t.roundPixels;e[r+0]=o*m+h*x+d,e[r+1]=u*x+l*m+c,e[r+2]=y.x0,e[r+3]=y.y0,i[r+4]=_,i[r+5]=b,e[r+6]=o*p+h*x+d,e[r+7]=u*x+l*p+c,e[r+8]=y.x1,e[r+9]=y.y1,i[r+10]=_,i[r+11]=b,e[r+12]=o*p+h*g+d,e[r+13]=u*g+l*p+c,e[r+14]=y.x2,e[r+15]=y.y2,i[r+16]=_,i[r+17]=b,e[r+18]=o*m+h*g+d,e[r+19]=u*g+l*m+c,e[r+20]=y.x3,e[r+21]=y.y3,i[r+22]=_,i[r+23]=b}_updateMaxTextures(t){this.shader.maxTextures!==t&&(B=new z(t),this.shader=B)}destroy(){this.shader=null,super.destroy()}};G.extension={type:[r.Ag.Batcher],name:"default"};let D=G},22800:(t,e,i)=>{"use strict";i.d(e,{b:()=>r,m:()=>s});let r={name:"round-pixels-bit",vertex:{header:` 40 fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32> 41 { 42 return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0; 43 } 44 `}},s={name:"round-pixels-bit",vertex:{header:` 45 vec2 roundPixels(vec2 position, vec2 targetSize) 46 { 47 return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0; 48 } 49 `}}},24618:(t,e,i)=>{"use strict";i.d(e,{E:()=>a,f:()=>n});var r=i(15744),s=i(65129);function n(t,e,i){let n,o;return i.clear(),n=t.parent?e?t.parent.worldTransform:a(t,o=s.u.get().identity()):r.u.IDENTITY,function t(e,i,n,a){let o;if(!e.visible||!e.measurable)return;a?o=e.worldTransform:(e.updateLocalTransform(),(o=s.u.get()).appendFrom(e.localTransform,n));let l=i,h=!!e.effects.length;if(h&&(i=s.o.get().clear()),e.boundsArea)i.addRect(e.boundsArea,o);else{let r=e.bounds;r&&!r.isEmpty()&&(i.matrix=o,i.addBounds(r));for(let r=0;r<e.children.length;r++)t(e.children[r],i,o,a)}if(h){for(let t=0;t<e.effects.length;t++)e.effects[t].addBounds?.(i);l.addBounds(i,r.u.IDENTITY),s.o.return(i)}a||s.u.return(o)}(t,i,n,e),o&&s.u.return(o),i.isValid||i.set(0,0,0,0),i}function a(t,e){let i=t.parent;return i&&(a(i,e),i.updateLocalTransform(),e.append(i.localTransform)),e}},24996:(t,e,i)=>{"use strict";i.d(e,{Y:()=>l});var r=i(15744),s=i(78773),n=i(77813);let a=new r.u,o=new s.M;function l(t,e,i,r){let s=e.matrix?t.copyFrom(e.matrix).invert():t.identity();if("local"===e.textureSpace){let t=i.getBounds(o);e.width&&t.pad(e.width);let{x:r,y:n}=t,a=1/t.width,l=1/t.height,h=-r*a,u=-n*l,d=s.a,c=s.b,f=s.c,p=s.d;s.a*=a,s.b*=a,s.c*=l,s.d*=l,s.tx=h*d+u*f+s.tx,s.ty=h*c+u*p+s.ty}else s.translate(e.texture.frame.x,e.texture.frame.y),s.scale(1/e.texture.source.width,1/e.texture.source.height);let l=e.texture.source.style;return e.fill instanceof n._||"clamp-to-edge"!==l.addressMode||(l.addressMode="repeat",l.update()),r&&s.append(a.copyFrom(r).invert()),s}},25687:(t,e,i)=>{"use strict";i.d(e,{g:()=>c});var r=i(5479),s=i(16086),n=i(78773),a=i(48036),o=i(74983);let l=()=>{};var h=i(11178),u=i(58862),d=i(8909);class c extends r.A{constructor({source:t,label:e,frame:i,orig:r,trim:s,defaultAnchor:o,defaultBorders:l,rotate:h,dynamic:d}={}){if(super(),this.uid=(0,a.L)("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new n.M,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=e,this.source=t?.source??new u.v,this.noFrame=!i,i)this.frame.copyFrom(i);else{let{width:t,height:e}=this._source;this.frame.width=t,this.frame.height=e}this.orig=r||this.frame,this.trim=s,this.rotate=h??0,this.defaultAnchor=o,this.defaultBorders=l,this.destroyed=!1,this.dynamic=d||
49!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new d.N(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){let{uvs:t,frame:e}=this,{width:i,height:r}=this._source,n=e.x/i,a=e.y/r,o=e.width/i,l=e.height/r,h=this.rotate;if(h){let e=o/2,i=l/2,r=n+e,u=a+i;h=s.E.add(h,s.E.NW),t.x0=r+e*s.E.uX(h),t.y0=u+i*s.E.uY(h),h=s.E.add(h,2),t.x1=r+e*s.E.uX(h),t.y1=u+i*s.E.uY(h),h=s.E.add(h,2),t.x2=r+e*s.E.uX(h),t.y2=u+i*s.E.uY(h),h=s.E.add(h,2),t.x3=r+e*s.E.uX(h),t.y3=u+i*s.E.uY(h)}else t.x0=n,t.y0=a,t.x1=n+o,t.y1=a,t.x2=n+o,t.y2=a+l,t.x3=n,t.y3=a+l}destroy(t=!1){this._source&&(this._source.off("resize",this.update,this),t&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return(0,o.t6)(o.lj,"Texture.baseTexture is now Texture.source"),this._source}}c.EMPTY=new c({label:"EMPTY",source:new u.v({label:"EMPTY"})}),c.EMPTY.destroy=l,c.WHITE=new c({source:new h.P({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"}),c.WHITE.destroy=l},27658:(t,e,i)=>{"use strict";var r=i(90194),s=(t=>(t[t.Low=0]="Low",t[t.Normal=1]="Normal",t[t.High=2]="High",t))(s||{}),n=i(59869),a=i(92122);function o(t){if("string"!=typeof t)throw TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function l(t){return t.split("?")[0].split("#")[0]}let h={toPosix:t=>{var e,i;return e=0,i=0,t.replace(RegExp("\\".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),"/")},isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl:t=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t),isBlobUrl:t=>t.startsWith("blob:"),hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){o(t),t=this.toPosix(t);let e=/^file:\/\/\//.exec(t);if(e)return e[0];let i=/^[^/:]+:\/{0,2}/.exec(t);return i?i[0]:""},toAbsolute(t,e,i){if(o(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;let r=l(this.toPosix(e??a.e.get().getBaseUrl())),s=l(this.toPosix(i??this.rootname(r)));return(t=this.toPosix(t)).startsWith("/")?h.join(s,t.slice(1)):this.isAbsolute(t)?t:this.join(r,t)},normalize(t){if(o(t),0===t.length)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="",i=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));let r=t.endsWith("/");return((t=function(t,e){let i="",r=0,s=-1,n=0,a=-1;for(let o=0;o<=t.length;++o){if(o<t.length)a=t.charCodeAt(o);else if(47===a)break;else a=47;if(47===a){if(s===o-1||1===n);else if(s!==o-1&&2===n){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2)){if(i.length>2){let t=i.lastIndexOf("/");if(t!==i.length-1){-1===t?(i="",r=0):r=(i=i.slice(0,t)).length-1-i.lastIndexOf("/"),s=o,n=0;continue}}else if(2===i.length||1===i.length){i="",r=0,s=o,n=0;continue}}e&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+=`/${t.slice(s+1,o)}`:i=t.slice(s+1,o),r=o-s-1;s=o,n=0}else 46===a&&-1!==n?++n:n=-1}return i}(t,!1)).length>0&&r&&(t+="/"),i)?`/${t}`:e+t},isAbsolute(t){return o(t),t=this.toPosix(t),!!this.hasProtocol(t)||t.startsWith("/")},join(...t){let e;if(0===t.length)return".";for(let i=0;i<t.length;++i){let r=t[i];if(o(r),r.length>0)if(void 0===e)e=r;else{let s=t[i-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${r}`:e+=`/${r}`}}return void 0===e?".":this.normalize(e)},dirname(t){if(o(t),0===t.length)return".";let e=(t=this.toPosix(t)).charCodeAt(0),i=47===e,r=-1,s=!0,n=this.getProtocol(t),a=t;t=t.slice(n.length);for(let i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!s){r=i;break}}else s=!1;return -1===r?i?"/":this.isUrl(a)?n+t:n:i&&1===r?"//":n+t.slice(0,r)},rootname(t){o(t);let e="";if(e=(t=this.toPosix(t)).startsWith("/")?"/":this.getProtocol(t),this.isUrl(t)){let i=t.indexOf("/",e.length);(e=-1!==i?t.slice(0,i):t).endsWith("/")||(e+="/")}return e}
49,basename(t,e){let i;o(t),e&&o(e),t=l(this.toPosix(t));let r=0,s=-1,n=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let a=e.length-1,o=-1;for(i=t.length-1;i>=0;--i){let l=t.charCodeAt(i);if(47===l){if(!n){r=i+1;break}}else -1===o&&(n=!1,o=i+1),a>=0&&(l===e.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=o))}return r===s?s=o:-1===s&&(s=t.length),t.slice(r,s)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!n){r=i+1;break}}else -1===s&&(n=!1,s=i+1);return -1===s?"":t.slice(r,s)},extname(t){o(t),t=l(this.toPosix(t));let e=-1,i=0,r=-1,s=!0,n=0;for(let a=t.length-1;a>=0;--a){let o=t.charCodeAt(a);if(47===o){if(!s){i=a+1;break}continue}-1===r&&(s=!1,r=a+1),46===o?-1===e?e=a:1!==n&&(n=1):-1!==e&&(n=-1)}return -1===e||-1===r||0===n||1===n&&e===r-1&&e===i+1?"":t.slice(e,r)},parse(t){let e;o(t);let i={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return i;let r=(t=l(this.toPosix(t))).charCodeAt(0),s=this.isAbsolute(t);i.root=this.rootname(t),e=s||this.hasProtocol(t)?1:0;let n=-1,a=0,h=-1,u=!0,d=t.length-1,c=0;for(;d>=e;--d){if(47===(r=t.charCodeAt(d))){if(!u){a=d+1;break}continue}-1===h&&(u=!1,h=d+1),46===r?-1===n?n=d:1!==c&&(c=1):-1!==n&&(c=-1)}return -1===n||-1===h||0===c||1===c&&n===h-1&&n===a+1?-1!==h&&(0===a&&s?i.base=i.name=t.slice(1,h):i.base=i.name=t.slice(a,h)):(0===a&&s?(i.name=t.slice(1,n),i.base=t.slice(1,h)):(i.name=t.slice(a,n),i.base=t.slice(a,h)),i.ext=t.slice(n,h)),i.dir=this.dirname(t),i},sep:"/",delimiter:":",joinExtensions:[".html"]};var u=i(40063);let d=t=>!Array.isArray(t);class c{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){"string"==typeof t?this._defaultSearchParams=t:this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}getAlias(t){let{alias:e,src:i}=t;return(0,u.z)(e||i,t=>"string"==typeof t?t:Array.isArray(t)?t.map(t=>t?.src??t):t?.src?t.src:t,!0)}removeAlias(t,e){this._assetMap[t]&&(e&&e!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&(0,n.R)("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(t,e){let i=[],r=e;Array.isArray(e)||(r=Object.entries(e).map(([t,e])=>"string"==typeof e||Array.isArray(e)?{alias:t,src:e}:{alias:t,...e})),r.forEach(e=>{let r,s=e.src,n=e.alias;if("string"==typeof n){let e=this._createBundleAssetId(t,n);i.push(e),r=[n,e]}else{let e=n.map(e=>this._createBundleAssetId(t,e));i.push(...e),r=[...n,...e]}this.add({...e,alias:r,src:s})}),this._bundles[t]=i}add(t){let e,i=[];Array.isArray(t)?i.push(...t):i.push(t),e=t=>{this.hasKey(t)&&(0,n.R)(`[Resolver] already has key: ${t} overwriting`)}
49,(0,u.z)(i).forEach(t=>{let{src:i}=t,{data:r,format:s,loadParser:n,parser:a}=t,o=(0,u.z)(i).map(t=>{if("string"==typeof t){let e=t.match(/\{(.*?)\}/g),i=[];if(e){let r=[];e.forEach(t=>{let e=t.substring(1,t.length-1).split(",");r.push(e)}),function t(e,i,r,s,n){let a=i[r];for(let o=0;o<a.length;o++){let l=a[o];r<i.length-1?t(e.replace(s[r],l),i,r+1,s,n):n.push(e.replace(s[r],l))}}(t,r,0,e,i)}else i.push(t);return i}return Array.isArray(t)?t:[t]}),l=this.getAlias(t);Array.isArray(l)?l.forEach(e):e(l);let h=[],d=t=>{let e=this._parsers.find(e=>e.test(t));return{src:t,...e?.parse(t)}};o.forEach(e=>{e.forEach(e=>{let i={};if("object"!=typeof e?i=d(e):(r=e.data??r,s=e.format??s,(e.loadParser||e.parser)&&(n=e.loadParser??n,a=e.parser??a),i={...d(e.src),...e}),!l)throw Error(`[Resolver] alias is undefined for this asset: ${i.src}`);i=this._buildResolvedAsset(i,{aliases:l,data:r,format:s,loadParser:n,parser:a,progressSize:t.progressSize}),h.push(i)})}),l.forEach(t=>{this._assetMap[t]=h})})}resolveBundle(t){let e=d(t);t=(0,u.z)(t);let i={};return t.forEach(t=>{let e=this._bundles[t];if(e){let r=this.resolve(e),s={};for(let e in r){let i=r[e];s[this._extractAssetIdFromBundle(t,e)]=i}i[t]=s}}),e?i[t[0]]:i}resolveUrl(t){let e=this.resolve(t);if("string"!=typeof t){let t={};for(let i in e)t[i]=e[i].src;return t}return e.src}resolve(t){let e=d(t);t=(0,u.z)(t);let i={};return t.forEach(t=>{if(!this._resolverHash[t])if(this._assetMap[t]){let e=this._assetMap[t],i=this._getPreferredOrder(e);i?.priority.forEach(t=>{i.params[t].forEach(i=>{let r=e.filter(e=>!!e[t]&&e[t]===i);r.length&&(e=r)})}),this._resolverHash[t]=e[0]}else this._resolverHash[t]=this._buildResolvedAsset({alias:[t],src:t},{});i[t]=this._resolverHash[t]}),e?i[t[0]]:i}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){let i=t[e],r=this._preferredOrder.find(t=>t.params.format.includes(i.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;let e=/\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}
49_buildResolvedAsset(t,e){let{aliases:i,data:r,loadParser:s,parser:n,format:a,progressSize:o}=e;return(this._basePath||this._rootPath)&&(t.src=h.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=i??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...r||{},...t.data},t.loadParser=s??t.loadParser,t.parser=n??t.parser,t.format=a??t.format??t.src.split(".").pop().split("?").shift().split("#").shift(),void 0!==o&&(t.progressSize=o),t}}c.RETINA_PREFIX=/@([0-9\.]+)x/;let f=(t,e)=>{let i=e.split("?")[1];return i&&(t+=`?${i}`),t};var p=i(25687),m=i(78773),g=i(58862);let x=class t{constructor(t,e){this.linkedSheets=[];let i=t;t?.source instanceof g.v&&(i={texture:t,data:e});let{texture:r,data:s,cachePrefix:n=""}=i;this.cachePrefix=n,this._texture=r instanceof p.g?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=s;let a=parseFloat(s.meta.scale);a?(this.resolution=a,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(e,i=!1){let r=e,s=i?1/0:t.BATCH_SIZE;for(;r-e<s&&r<this._frameKeys.length;){let t=this._frameKeys[r],e=this._frames[t],i=e.frame;if(i){let r=null,s=null,n=!1!==e.trimmed&&e.sourceSize?e.sourceSize:e.frame,a=new m.M(0,0,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution);r=e.rotated?new m.M(Math.floor(i.x)/this.resolution,Math.floor(i.y)/this.resolution,Math.floor(i.h)/this.resolution,Math.floor(i.w)/this.resolution):new m.M(Math.floor(i.x)/this.resolution,Math.floor(i.y)/this.resolution,Math.floor(i.w)/this.resolution,Math.floor(i.h)/this.resolution),!1!==e.trimmed&&e.spriteSourceSize&&(s=new m.M(Math.floor(e.spriteSourceSize.x)/this.resolution,Math.floor(e.spriteSourceSize.y)/this.resolution,Math.floor(i.w)/this.resolution,Math.floor(i.h)/this.resolution)),this.textures[t]=new p.g({source:this.textureSource,frame:r,orig:a,trim:s,rotate:2*!!e.rotated,defaultAnchor:e.anchor,defaultBorders:e.borders,label:t.toString()})}r++}}_processAnimations(){let t=this.data.animations||{};for(let e in t){this.animations[e]=[];for(let i=0;i<t[e].length;i++){let r=t[e][i];this.animations[e].push(this.textures[r])}}}_parseComplete(){let t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*t.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){for(let t in this.textures)this.textures[t].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};x.BATCH_SIZE=1e3;let y=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"],_={extension:r.Ag.Asset,cache:{test:t=>t instanceof x,getCacheableAssets:(t,e)=>(function t(e,i,r){let s={};if(e.forEach(t=>{s[t]=i}),Object.keys(i.textures).forEach(t=>{s[`${i.cachePrefix}${t}`]=i.textures[t]}),!r){let r=h.dirname(e[0]);i.linkedSheets.forEach((e,n)=>{Object.assign(s,t([`${r}/${i.data.meta.related_multi_packs[n]}`],e,!0))})}return s})(t,e,!1)},resolver:{extension:{type:r.Ag.ResolveParser,name:"resolveSpritesheet"},test:t=>{let e=t.split("?")[0].split("."),i=e.pop(),r=e.pop();return"json"===i&&y.includes(r)},parse:t=>{let e=t.split(".");return{resolution:parseFloat(c.RETINA_PREFIX.exec(t)?.[1]??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:r.Ag.LoadParser,priority:s.Normal,name:"spritesheetLoader"},testParse:async(t,e)=>".json"===h.extname(e.src).toLowerCase()&&!!t.frames,async parse(t,e,i){let r,{texture:s,imageFilename:n,textureOptions:a,cachePrefix:o}=e?.data??{},l=h.dirname(e.src);if(l&&l.lastIndexOf("/")!==l.length-1&&(l+="/"),s instanceof p.g)r=s;else{let s=f(l+(n??t.meta.image),e.src);r=(await i.load([{src:s,data:a}]))[s]}let u=new x({texture:r.source,data:t,cachePrefix:o});await u.parse();let d=t?.meta?.related_multi_packs;if(Array.isArray(d)){let t=[];for(let r of d){if("string"!=typeof r)continue;let s=l+r;e.data?.ignoreMultiPack||(s=f(s,e.src),t.push(i.load({src:s,data:{textureOptions:a,ignoreMultiPack:!0}})))}let r=await Promise.all(t);u.linkedSheets=r,r.forEach(t=>{t.linkedSheets=[u].concat(u.linkedSheets.filter(e=>e!==t))})}return u},async unload(t,e,i){await i.unload(t.textureSource._sourceOrigin),t.destroy(!1)}}};r.XO.add(_)},28042:(t,e,i)=>{"use strict";function r(t){return t+=+(0===t),--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function s(t){return!(t&t-1)&&!!t}i.d(e,{U5:()=>r,f3:()=>s})},29292:(t,e,i)=>{"use strict";i.d(e,{W:()=>u});var r=i(28042),s=i(59818),n=i(58862),a=i(25687),o=i(76363);let l=0;class h{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new o.n(this.textureOptions)}createTexture(t,e,i,r){let s=new n.v({...this.textureOptions,width:t,height:e,resolution:1,antialias:i,autoGarbageCollect:!1,autoGenerateMipmaps:r});return new a.g({source:s,label:`texturePool_${l++}`})}getOptimalTexture(t,e,i=1,s,n=!1){let a=Math.ceil(t*i-1e-6),o=Math.ceil(e*i-1e-6);a=(0,r.U5)(a);let l=(a<<17)+((o=(0,r.U5)(o))<<2)+(!!n<<1)+ +!!s;this._texturePool[l]||(this._texturePool[l]=[]);let h=this._texturePool[l].pop();return h||(h=this.createTexture(a,o,s,n)),h.source._resolution=i,h.source.width=a/i,h.source.height=o/i,h.source.pixelWidth=a,h.source.pixelHeight=o,h.frame.x=0,h.frame.y=0,h.frame.width=t,h.frame.height=e,h.updateUvs(),this._poolKeyHash[h.uid]=l,h}getSameSizeTexture(t,e=!1){let i=t.source;return this.getOptimalTexture(t.width,t.height,i._resolution,e)}returnTexture(t,e=!1){let i=this._poolKeyHash[t.uid];e&&(t.source.style=this.textureStyle),this._texturePool[i].push(t)}clear(t){if(t=!1!==t)for(let t in this._texturePool){let e=this._texturePool[t];if(e)for(let t=0;t<e.length;t++)e[t].destroy(!0)}this._texturePool={}}}let u=new h;s.L.register(u)},30214:(t,e,i)=>{"use strict";i.d(e,{Q:()=>I});var r={grad:.9,turn:360,rad:360/(2*Math.PI)},s=function(t){return"string"==typeof t?t.length>0:"number"==typeof t}
49,n=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},a=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=1),t>i?i:t>e?t:e},o=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},l=function(t){return{r:a(t.r,0,255),g:a(t.g,0,255),b:a(t.b,0,255),a:a(t.a)}},h=function(t){return{r:n(t.r),g:n(t.g),b:n(t.b),a:n(t.a,3)}},u=/^#([0-9a-f]{3,8})$/i,d=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},c=function(t){var e=t.r,i=t.g,r=t.b,s=t.a,n=Math.max(e,i,r),a=n-Math.min(e,i,r),o=a?n===e?(i-r)/a:n===i?2+(r-e)/a:4+(e-i)/a:0;return{h:60*(o<0?o+6:o),s:n?a/n*100:0,v:n/255*100,a:s}},f=function(t){var e=t.h,i=t.s,r=t.v,s=t.a;e=e/360*6,i/=100,r/=100;var n=Math.floor(e),a=r*(1-i),o=r*(1-(e-n)*i),l=r*(1-(1-e+n)*i),h=n%6;return{r:255*[r,o,a,a,l,r][h],g:255*[l,r,r,o,a,a][h],b:255*[a,a,l,r,r,o][h],a:s}},p=function(t){return{h:o(t.h),s:a(t.s,0,100),l:a(t.l,0,100),a:a(t.a)}},m=function(t){return{h:n(t.h),s:n(t.s),l:n(t.l),a:n(t.a,3)}},g=function(t){var e,i;return f((e=t.s,{h:t.h,s:(e*=((i=t.l)<50?i:100-i)/100)>0?2*e/(i+e)*100:0,v:i+e,a:t.a}))},x=function(t){var e,i,r,s;return{h:(e=c(t)).h,s:(s=(200-(i=e.s))*(r=e.v)/100)>0&&s<200?i*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a}},y=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w={string:[[function(t){var e=u.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?n(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?n(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=b.exec(t)||v.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:l({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e,i,s=y.exec(t)||_.exec(t);return s?g(p({h:(e=s[1],void 0===(i=s[2])&&(i="deg"),Number(e)*(r[i]||1)),s:Number(s[3]),l:Number(s[4]),a:void 0===s[5]?1:Number(s[5])/(s[6]?100:1)})):null},"hsl"]],object:[[function(t){var e=t.r,i=t.g,r=t.b,n=t.a;return s(e)&&s(i)&&s(r)?l({r:Number(e),g:Number(i),b:Number(r),a:Number(void 0===n?1:n)}):null},"rgb"],[function(t){var e=t.h,i=t.s,r=t.l,n=t.a;return s(e)&&s(i)&&s(r)?g(p({h:Number(e),s:Number(i),l:Number(r),a:Number(void 0===n?1:n)})):null},"hsl"],[function(t){var e,i=t.h,r=t.s,n=t.v,l=t.a;return s(i)&&s(r)&&s(n)?f({h:o((e={h:Number(i),s:Number(r),v:Number(n),a:Number(void 0===l?1:l)}).h),s:a(e.s,0,100),v:a(e.v,0,100),a:a(e.a)}):null},"hsv"]]},S=function(t,e){for(var i=0;i<e.length;i++){var r=e[i][0](t);if(r)return[r,e[i][1]]}return[null,void 0]},C=function(t,e){var i=x(t);return{h:i.h,s:a(i.s+100*e,0,100),l:i.l,a:i.a}},T=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},A=function(t,e){var i=x(t);return{h:i.h,s:i.s,l:a(i.l+100*e,0,100),a:i.a}},M=function(){function t(t){this.parsed=("string"==typeof t?S(t.trim(),w.string):"object"==typeof t&&null!==t?S(t,w.object):[null,void 0])[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return null!==this.parsed},t.prototype.brightness=function(){return n(T(this.rgba),2)},t.prototype.isDark=function(){return .5>T(this.rgba)},t.prototype.isLight=function(){return T(this.rgba)>=.5},t.prototype.toHex=function(){var t,e,i,r,s,a;return e=(t=h(this.rgba)).r,i=t.g,r=t.b,a=(s=t.a)<1?d(n(255*s)):"","#"+d(e)+d(i)+d(r)+a},t.prototype.toRgb=function(){return h(this.rgba)},t.prototype.toRgbString=function(){var t,e,i,r,s;return e=(t=h(this.rgba)).r,i=t.g,r=t.b,(s=t.a)<1?"rgba("+e+", "+i+", "+r+", "+s+")":"rgb("+e+", "+i+", "+r+")"},t.prototype.toHsl=function(){return m(x(this.rgba))},t.prototype.toHslString=function(){var t,e,i,r,s;return e=(t=m(x(this.rgba))).h,i=t.s,r=t.l,(s=t.a)<1?"hsla("+e+", "+i+"%, "+r+"%, "+s+")":"hsl("+e+", "+i+"%, "+r+"%)"},t.prototype.toHsv=function(){var t;return{h:n((t=c(this.rgba)).h),s:n(t.s),v:n(t.v),a:n(t.a,3)}},t.prototype.invert=function(){var t;return P({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a})},t.prototype.saturate=function(t){return void 0===t&&(t=.1),P(C(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),P(C(this.rgba,-t))},t.prototype.grayscale=function(){return P(C(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),P(A(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),P(A(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){var e;return"number"==typeof t?P({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):n(this.rgba.a,3)},t.prototype.hue=function(t){var e=x(this.rgba);return"number"==typeof t?P({h:t,s:e.s,l:e.l,a:e.a}):n(e.h)},t.prototype.isEqual=function(t){return this.toHex()===P(t).toHex()},t}(),P=function(t){return t instanceof M?t:new M(t)},k=[];[function(t,e){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",s
49andybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var s in i)r[i[s]]=s;var n={};t.prototype.toName=function(e){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var s,a=r[this.toHex()];if(a)return a;if(null==e?void 0:e.closest){var o=this.toRgb(),l=1/0,h="black";if(!n.length)for(var u in i)n[u]=new t(i[u]).toRgb();for(var d in i){var c=(s=n[d],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));c<l&&(l=c,h=d)}return h}},e.string.push([function(e){var r=e.toLowerCase(),s="transparent"===r?"#0000":i[r];return s?new t(s).toRgb():null},"name"])}].forEach(function(t){0>k.indexOf(t)&&(t(M,w),k.push(t))});let E=class t{constructor(t=0xffffff){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=0xffffff,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(e){if(e instanceof t)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else if(null===e)throw Error("Cannot set Color#value to null");else null!==this._value&&this._isSourceEqual(this._value,e)||(this._value=this._cloneSource(e),this._normalize(this._value))}get value(){return this._value}_cloneSource(t){if("string"==typeof t||"number"==typeof t||t instanceof Number||null===t);else if(Array.isArray(t)||ArrayBuffer.isView(t))return t.slice(0);else if("object"==typeof t&&null!==t)return{...t};return t}_isSourceEqual(t,e){let i=typeof t;if(i!==typeof e)return!1;if("number"===i||"string"===i||t instanceof Number);else if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length===e.length&&t.every((t,i)=>t===e[i]);else if(null!==t&&null!==e){let i=Object.keys(t),r=Object.keys(e);return i.length===r.length&&i.every(i=>t[i]===e[i])}return t===e}toRgba(){let[t,e,i,r]=this._components;return{r:t,g:e,b:i,a:r}}toRgb(){let[t,e,i]=this._components;return{r:t,g:e,b:i}}toRgbaString(){let[t,e,i]=this.toUint8RgbArray();return`rgba(${t},${e},${i},${this.alpha})`}toUint8RgbArray(t){let[e,i,r]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(255*e),t[1]=Math.round(255*i),t[2]=Math.round(255*r),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,i,r,s]=this._components;return t[0]=e,t[1]=i,t[2]=r,t[3]=s,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,i,r]=this._components;return t[0]=e,t[1]=i,t[2]=r,t}toNumber(){return this._int}toBgrNumber(){let[t,e,i]=this.toUint8RgbArray();return(i<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return(t>>16)+(65280&t)+((255&t)<<16)}multiply(e){let[i,r,s,n]=t._temp.setValue(e)._components;return this._components[0]*=i,this._components[1]*=r,this._components[2]*=s,this._components[3]*=n,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(1===t)return -0x1000000+this._int;if(0===t)return e?0:this._int;let i=this._int>>16&255,r=this._int>>8&255,s=255&this._int;return e&&(i=i*t+.5|0,r=r*t+.5|0,s=s*t+.5|0),(255*t<<24)+(i<<16)+(r<<8)+s}toHex(){let t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){let t=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(e){let i,r,s,n;if(("number"==typeof e||e instanceof Number)&&e>=0&&e<=0xffffff){let t=e;i=(t>>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[i,r,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[i,r,s,n=255]=e,i/=255,r/=255,s/=255,n/=255;else if("string"==typeof e||"object"==typeof e){if("string"==typeof e){let i=t.HEX_PATTERN.exec(e);i&&(e=`#${i[2]}`)}let a=P(e);a.isValid()&&({r:i,g:r,b:s,a:n}=a.rgba,i/=255,r/=255,s/=255)}if(void 0!==i)this._components[0]=i,this._components[1]=r,this._components[2]=s,this._components[3]=n,this._refreshInt();else throw Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);let[t,e,i]=this._components;this._int=(255*t<<16)+(255*e<<8)+(255*i|0)}_clamp(t,e=0,i=1){return"number"==typeof t?Math.min(Math.max(t,e),i):(t.forEach((r,s)=>{t[s]=Math.min(Math.max(r,e),i)}),t)}static isColorLike(e){return"number"==typeof e||"string"==typeof e||e instanceof Number||e instanceof t||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||void 0!==e.r&&void 0!==e.g&&void 0!==e.b||void 0!==e.r&&void 0!==e.g&&void 0!==e.b&&void 0!==e.a||void 0!==e.h&&void 0!==e.s&&void 0!==e.l||void 0!==e.h&&void 0!==e.s&&void 0!==e.l&&void 0!==e.a||void 0!==e.h&&void 0!==e.s&&void 0!==e.v||void 0!==e.h&&void 0!==e.s&&void 0!==e.v&&void 0!==e.a}};E.shared=new E,E._temp=new E,E.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let I=E},30359:(t,e,i)=>{"use strict";i.d(e,{D:()=>o,R:()=>l});var r=i(15744),s=i(24618),n=i(65129),a=i(36120);function o(t){return((255&t)<<16)+(65280&t)+(t>>16&255)}let l={getGlobalAlpha(t){if(t)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,i=this.parent;for(;i;)e*=i.alpha,i=i.parent;return e},getGlobalTransform(t=new r.u,e){if(e)return t.copyFrom(this.worldTransform);this.updateLocalTransform();let i=(0,s.E)(this,n.u.get().identity());return t.appendFrom(this.localTransform,i),n.u.return(i),t},getGlobalTint(t){if(t)return this.renderGroup?o(this.renderGroup.worldColor):this.parentRenderGroup?o((0,a.j)(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,i=this.parent;for(;i;)e=(0,a.j)(e,i.localColor),i=i.parent;return o(e)}}},32574:(t,e,i)=>{"use strict";i.d(e,{mc:()=>F,u:()=>R,ig:()=>I,fR:()=>O});var r=i(5479),s=i(30214),n=i(90194),a=i(15744),o=i(74349),l=i(45317),h=i(48036),u=i(74983),d=i(59869),c=i(67961),f=i(65982),p=i(95792);class m{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEac
49h(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let i=this._tests[e];if(i.test(t))return c.Z.get(i.maskClass,t)}return t}returnMaskEffect(t){c.Z.return(t)}}let g=new m;n.XO.handleByList(n.Ag.MaskEffect,g._effectClasses);var x=i(5341),y=i(65129);let _=new a.u;var b=i(30359),v=i(24618),w=i(4940);let S=new a.u;function C(t,e){return t._zIndex-e._zIndex}var T=i(50508),A=i(3069);let M=new l.o(null),P=new l.o(null),k=new l.o(null,1,1),E=new l.o(null),I=1,R=2,O=4;class F extends r.A{constructor(t={}){super(),this.uid=(0,h.L)("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new a.u,this.relativeGroupTransform=new a.u,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new l.o(this,0,0),this._scale=k,this._pivot=P,this._origin=E,this._skew=M,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=0xffffff,this.localAlpha=1,this.groupAlpha=1,this.groupColor=0xffffff,this.groupColorAlpha=0xffffffff,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],function(t,e,i={}){for(let r in e)i[r]||void 0===e[r]||(t[r]=e[r])}(this,t,{children:!0,parent:!0,effects:!0}),t.children?.forEach(t=>this.addChild(t)),t.parent?.addChild(this)}static mixin(t){(0,u.t6)("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),n.XO.mixin(F,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=4095&t}get _didChangeId(){return 4095&this._didContainerChangeTick|(4095&this._didViewChangeTick)<<12}addChild(...t){if(this.allowChildren||(0,u.t6)(u.lj,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let e=0;e<t.length;e++)this.addChild(t[e]);return t[0]}let e=t[0],i=this.renderGroup||this.parentRenderGroup;return e.parent===this?(this.children.splice(this.children.indexOf(e),1),this.children.push(e),i&&(i.structureDidChange=!0)):(e.parent&&e.parent.removeChild(e),this.children.push(e),this.sortableChildren&&(this.sortDirty=!0),e.parent=this,e.didChange=!0,e._updateFlags=15,i&&i.addChild(e),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this),this._didViewChangeTick++,0!==e._zIndex&&e.depthOfChildModified()),e}removeChild(...t){if(t.length>1){for(let e=0;e<t.length;e++)this.removeChild(t[e]);return t[0]}let e=t[0],i=this.children.indexOf(e);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(e):this.parentRenderGroup&&this.parentRenderGroup.removeChild(e),e.parentRenderLayer&&e.parentRenderLayer.detach(e),e.parent=null,this.emit("childRemoved",e,this,i),e.emit("removed",this)),e}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),this.renderGroup=c.Z.get(A.m,this),this.groupTransform=a.u.IDENTITY,t?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),c.Z.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&0===this.effects.length}get worldTransform(){return this._worldTransform||(this._worldTransform=new a.u),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*o.bO}set angle(t){this.rotation=t*o.Td}get pivot(){return this._pivot===P&&(this._pivot=new l.o(this,0,0)),this._pivot}set pivot(t){this._pivot===P&&(this._pivot=new l.o(this,0,0),this._origin!==E&&(0,d.R)("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),"number"==typeof t?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===M&&(this._skew=new l.o(this,0,0)),this._skew}set skew(t){this._skew===M&&(this._skew=new l.o(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===k&&(this._scale=new l.o(this,1,1)),this._scale}set scale(t){this._scale===k&&(this._scale=new l.o(this,0,0)),"string"==typeof t&&(t=parseFloat(t)),"number"==typeof t?this._scale.set(t):this._scale.copyFrom(t)}get origin(){return this._origin===E&&(this._origin=new l.o(this,0,0)),this._origin}set origin(t){this._origin===E&&(this._origin=new l.o(this,0,0),this._pivot!==P&&(0,d.R)("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),"number"==typeof t?this._origin.set(t):this._origin.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){let e=this.getLocalBounds().width;
49this._setWidth(t,e)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){let e=this.getLocalBounds().height;this._setHeight(t,e)}getSize(t){t||(t={});let e=this.getLocalBounds();return t.width=Math.abs(this.scale.x*e.width),t.height=Math.abs(this.scale.y*e.height),t}setSize(t,e){let i=this.getLocalBounds();"object"==typeof t?(e=t.height??t.width,t=t.width):e??(e=t),void 0!==t&&this._setWidth(t,i.width),void 0!==e&&this._setHeight(e,i.height)}_updateSkew(){let t=this._rotation,e=this._skew;this._cx=Math.cos(t+e._y),this._sx=Math.sin(t+e._y),this._cy=-Math.sin(t-e._x),this._sy=Math.cos(t-e._x)}updateTransform(t){return this.position.set("number"==typeof t.x?t.x:this.position.x,"number"==typeof t.y?t.y:this.position.y),this.scale.set("number"==typeof t.scaleX?t.scaleX:this.scale.x,"number"==typeof t.scaleY?t.scaleY:this.scale.y),this.rotation="number"==typeof t.rotation?t.rotation:this.rotation,this.skew.set("number"==typeof t.skewX?t.skewX:this.skew.x,"number"==typeof t.skewY?t.skewY:this.skew.y),this.pivot.set("number"==typeof t.pivotX?t.pivotX:this.pivot.x,"number"==typeof t.pivotY?t.pivotY:this.pivot.y),this.origin.set("number"==typeof t.originX?t.originX:this.origin.x,"number"==typeof t.originY?t.originY:this.origin.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){let t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;let e=this.localTransform,i=this._scale,r=this._pivot,s=this._origin,n=this._position,a=i._x,o=i._y,l=r._x,h=r._y,u=-s._x,d=-s._y;e.a=this._cx*a,e.b=this._sx*a,e.c=this._cy*o,e.d=this._sy*o,e.tx=n._x-(l*e.a+h*e.c)+(u*e.a+d*e.c)-u,e.ty=n._y-(l*e.b+h*e.d)+(u*e.b+d*e.d)-d}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=I,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){let e=s.Q.shared.setValue(t??0xffffff).toBgrNumber();e!==this.localColor&&(this.localColor=e,this._updateFlags|=I,this._onUpdate())}get tint(){return(0,b.D)(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=R,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(2&this.localDisplayStatus)}set visible(t){let e=2*!!t;(2&this.localDisplayStatus)!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=O,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(4&this.localDisplayStatus)}set culled(t){(4&this.localDisplayStatus)!=4*!t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=O,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(1&this.localDisplayStatus)}set renderable(t){(1&this.localDisplayStatus)!=+!!t&&(this._updateFlags|=O,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return 7===this.localDisplayStatus&&this.groupAlpha>0}destroy(t=!1){let e;if(!this.destroyed){if(this.destroyed=!0,this.children.length&&(e=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),("boolean"==typeof t?t:t?.children)&&e)for(let i=0;i<e.length;++i)e[i].destroy(t);this.renderGroup?.destroy(),this.renderGroup=null}}}n.XO.mixin(F,{allowChildren:!0,removeChildren(t=0,e){let i=e??this.children.length,r=i-t,s=[];if(r>0&&r<=i){for(let e=i-1;e>=t;e--){let t=this.children[e];t&&(s.push(t),t.parent=null)}(0,f.d)(this.children,t,i);let e=this.renderGroup||this.parentRenderGroup;e&&e.removeChildren(s);for(let t=0;t<s.length;++t){let e=s[t];e.parentRenderLayer?.detach(e),this.emit("childRemoved",e,this,t),s[t].emit("removed",this)}return s.length>0&&this._didViewChangeTick++,s}if(0===r&&0===this.children.length)return s;throw RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(t){let e=this.getChildAt(t);return this.removeChild(e)},getChildAt(t){if(t<0||t>=this.children.length)throw Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]},setChildIndex(t,e){if(e<0||e>=this.children.length)throw Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(t),this.addChildAt(t,e)},getChildIndex(t){let e=this.children.indexOf(t);if(-1===e)throw Error("The supplied Container must be a child of the caller");return e},addChildAt(t,e){this.allowChildren||(0,u.t6)(u.lj,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:i}=this;if(e<0||e>i.length)throw Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${i.length}`);let r=t.parent===this;if(t.parent){let i=t.parent.children.indexOf(t);if(r){if(i===e)return t;t.parent.children.splice(i,1)}else t.removeFromParent()}e===i.length?i.push(t):i.splice(e,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;let s=this.renderGroup||this.parentRenderGroup;return s&&s.addChild(t),this.sortableChildren&&(this.sortDirty=!0),r||(this.emit
49("childAdded",t,this,e),t.emit("added",this)),t},swapChildren(t,e){if(t===e)return;let i=this.getChildIndex(t),r=this.getChildIndex(e);this.children[i]=e,this.children[r]=t;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...t){return 1===t.length?this.reparentChildAt(t[0],this.children.length):(t.forEach(t=>this.reparentChildAt(t,this.children.length)),t[0])},reparentChildAt(t,e){if(t.parent===this)return this.setChildIndex(t,e),t;let i=t.worldTransform.clone();t.removeFromParent(),this.addChildAt(t,e);let r=this.worldTransform.clone();return r.invert(),i.prepend(r),t.setFromMatrix(i),t},replaceChild(t,e){t.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(t)),e.setFromMatrix(t.localTransform),e.updateLocalTransform(),this.removeChild(t)}},{getFastGlobalBounds(t,e){e||(e=new x.c),e.clear(),this._getGlobalBoundsRecursive(!!t,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);let i=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(i.worldTransform),e},_getGlobalBoundsRecursive(t,e,i){let r=e;if(t&&this.parentRenderLayer&&this.parentRenderLayer!==i||7!==this.localDisplayStatus||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(r=y.o.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){let t=this.bounds;r.addFrame(t.minX,t.minY,t.maxX,t.maxY,this.groupTransform)}let e=this.children;for(let s=0;s<e.length;s++)e[s]._getGlobalBoundsRecursive(t,r,i)}if(s){let t=!1,i=this.renderGroup||this.parentRenderGroup;for(let e=0;e<this.effects.length;e++)this.effects[e].addBounds&&(t||(t=!0,r.applyMatrix(i.worldTransform)),this.effects[e].addBounds(r,!0));t&&r.applyMatrix(i.worldTransform.copyTo(_).invert()),e.addBounds(r),y.o.return(r)}else this.renderGroup&&(e.addBounds(r,this.relativeGroupTransform),y.o.return(r))}},{getGlobalPosition(t=new T.b,e=!1){return this.parent?this.parent.toGlobal(this._position,t,e):(t.x=this._position.x,t.y=this._position.y),t},toGlobal(t,e,i=!1){let r=this.getGlobalTransform(y.u.get(),i);return e=r.apply(t,e),y.u.return(r),e},toLocal(t,e,i,r){e&&(t=e.toGlobal(t,i,r));let s=this.getGlobalTransform(y.u.get(),r);return i=s.applyInverse(t,i),y.u.return(s),i}},{_onRender:null,set onRender(func){let t=this.renderGroup||this.parentRenderGroup;if(!func){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=func},get onRender(){return this._onRender}},{_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(t,e){let i=Math.sign(this.scale.x)||1;0!==e?this.scale.x=t/e*i:this.scale.x=i},_setHeight(t,e){let i=Math.sign(this.scale.y)||1;0!==e?this.scale.y=t/e*i:this.scale.y=i},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new x.c});let t=this._localBoundsCacheData;return t.index=1,t.didChange=!1,t.data[0]!==this._didViewChangeTick&&(t.didChange=!0,t.data[0]=this._didViewChangeTick),!function t(e,i){let r=e.children;for(let e=0;e<r.length;e++){let s=r[e],n=s.uid,a=(65535&s._didViewChangeTick)<<16|65535&s._didContainerChangeTick,o=i.index;(i.data[o]!==n||i.data[o+1]!==a)&&(i.data[i.index]=n,i.data[i.index+1]=a,i.didChange=!0),i.index=o+2,s.children.length&&t(s,i)}return i.didChange}(this,t),t.didChange&&(0,w.n)(this,t.localBounds,S),t.localBounds},getBounds(t,e){return(0,v.f)(this,t,e||new x.c)}},{_maskEffect:null,_maskOptions:{inverse:!1,channel:"red"},_filterEffect:null,effects:[],_markStructureAsChanged(){let t=this.renderGroup||this.parentRenderGroup;t&&(t.structureDidChange=!0)},addEffect(t){-1===this.effects.indexOf(t)&&(this.effects.push(t),this.effects.sort((t,e)=>t.priority-e.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(t){let e=this.effects.indexOf(t);-1!==e&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(value){let t=this._maskEffect;if(t?.mask===value||(t&&(this.removeEffect(t),g.returnMaskEffect(t),this._maskEffect=null),null==value))return;this._maskEffect=g.getMaskEffect(value),this.addEffect(this._maskEffect)},get mask(){return this._maskEffect?.mask},setMask(t){this._maskOptions={...this._maskOptions,...t},t.mask&&(this.mask=t.mask),this._markStructureAsChanged()},set filters(value){!Array.isArray(value)&&value&&(value=[value]);let t=this._filterEffect||(this._filterEffect=new p.a),e=value?.length>0,i=t.filters?.length>0;t.filters=Object.freeze(value=Array.isArray(value)?value.slice(0):value),e!==i&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=value??null))},get filters(){return this._filterEffect?.filters},set filterArea(value){this._filterEffect||(this._filterEffect=new p.a),this._filterEffect.filterArea=value},get filterArea(){return this._filterEffect?.filterArea}},{label:null,get name(){return(0,u.t6)(u.lj,"Container.name property has been removed, use Container.label instead"),this.label},set name(value){(0,u.t6)(u.lj,"Container.name property has been removed, use Container.label instead"),this.label=value},getChildByName(t,e=!1){return this.getChildByLabel(t,e)},getChildByLabel(t,e=!1){let i=this.children;for(let e=0;e<i.length;e++){let r=i[e];if(r.label===t||t instanceof RegExp&&t.test(r.label))return r}if(e)for(let e=0;e<i.length;e++){let r=i[e].getChildByLabel(t,!0);if(r)return r}return null},getChildrenByLabel(t,e=!1,i=[]){let r=this.children;for(let e=0;e<r.length;e++){let s=r[e];(s.label===t||t instanceof RegExp&&t.test(s.label))&&i.push(s)}if(e)for(let e=0;e<r.length;e++)r[e].getChildrenByLabel(t,!0,i);return i}},{_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(value){if(this._zIndex===value)return;this._zIndex=value,this.depthOfChildModified()},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(C))}}
49,{cullArea:null,cullable:!1,cullableChildren:!0},{get isCachedAsTexture(){var z;return!!(null==(z=this.renderGroup)?void 0:z.isCachedAsTexture)},cacheAsTexture(t){"boolean"==typeof t&&!1===t?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(!0===t?{}:t))},updateCacheTexture(){var t;null==(t=this.renderGroup)||t.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(val){(0,u.t6)("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(val)}},b.R,{collectRenderables(t,e,i){this.parentRenderLayer&&this.parentRenderLayer!==i||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(t,e,i):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,t):this.collectRenderablesWithEffects(t,e,i))},collectRenderablesSimple(t,e,i){let r=this.children,s=r.length;for(let n=0;n<s;n++)r[n].collectRenderables(t,e,i)},collectRenderablesWithEffects(t,e,i){let{renderPipes:r}=e;for(let e=0;e<this.effects.length;e++){let i=this.effects[e];r[i.pipe].push(i,this,t)}this.collectRenderablesSimple(t,e,i);for(let e=this.effects.length-1;e>=0;e--){let i=this.effects[e];r[i.pipe].pop(i,this,t)}}})},32801:(t,e,i)=>{"use strict";function r(t,e,i){let r=(t>>24&255)/255;e[i++]=(255&t)/255*r,e[i++]=(t>>8&255)/255*r,e[i++]=(t>>16&255)/255*r,e[i++]=r}i.d(e,{V:()=>r})},35626:(t,e,i)=>{"use strict";i.d(e,{M:()=>u});var r=i(5479),s=i(48036),n=i(79041),a=i(73552),o=i(85732),l=i(83090),h=i(71252);class u extends r.A{constructor(t){super(),this.uid=(0,s.L)("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:e,glProgram:i,groups:r,resources:n,compatibleRenderers:o,groupMap:u}=t;this.gpuProgram=e,this.glProgram=i,void 0===o&&(o=0,e&&(o|=l.W.WEBGPU),i&&(o|=l.W.WEBGL)),this.compatibleRenderers=o;let d={};if(n||r||(n={}),n&&r)throw Error("[Shader] Cannot have both resources and groups");if(e||!r||u){if(!e&&r&&u)for(let t in u)for(let e in u[t]){let i=u[t][e];d[i]={group:t,binding:e,name:i}}else if(e&&r&&!u){let t=e.structsAndGroups.groups;u={},t.forEach(t=>{u[t.group]=u[t.group]||{},u[t.group][t.binding]=t.name,d[t.name]=t})}else if(n){r={},u={},e&&e.structsAndGroups.groups.forEach(t=>{u[t.group]=u[t.group]||{},u[t.group][t.binding]=t.name,d[t.name]=t});let t=0;for(let e in n)!d[e]&&(r[99]||(r[99]=new a.T,this._ownedBindGroups.push(r[99])),d[e]={group:99,binding:t,name:e},u[99]=u[99]||{},u[99][t]=e,t++);for(let t in n){let e=n[t];e.source||e._resourceType||(e=new h.k(e));let i=d[t];i&&(r[i.group]||(r[i.group]=new a.T,this._ownedBindGroups.push(r[i.group])),r[i.group].setResource(e,i.binding))}}}else throw Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");this.groups=r,this._uniformBindMap=u,this.resources=this._buildResourceAccessor(r,d)}addResource(t,e,i){var r,s;(r=this._uniformBindMap)[e]||(r[e]={}),(s=this._uniformBindMap[e])[i]||(s[i]=t),this.groups[e]||(this.groups[e]=new a.T,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){let i={};for(let r in e){let s=e[r];Object.defineProperty(i,s.name,{get:()=>t[s.group].getResource(s.binding),set(e){t[s.group].setResource(e,s.binding)}})}return i}destroy(t=!1){this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(t=>{t.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){let e,i,{gpu:r,gl:s,...a}=t;return r&&(e=o.B.from(r)),s&&(i=n.M.from(s)),new u({gpuProgram:e,glProgram:i,...a})}}},35658:(t,e,i)=>{"use strict";i.d(e,{lg:()=>$,X$:()=>H,YY:()=>q});var r,s,n=i(67892),a=i(10360);function o(t){try{return Object.defineProperties(t,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(e){return t}}(()=>{var t,e;return"undefined"!=typeof window&&((null==(t=window.document)?void 0:t.createElement)||(null==(e=window.navigator)?void 0:e.product)==="ReactNative")}
49)()?a.useLayoutEffect:a.useEffect;let l=o(a.createContext(null));class h extends a.Component{render(){return a.createElement(l.Provider,{value:this._reactInternals},this.props.children)}}let u=Symbol.for("react.context"),d=t=>null!==t&&"object"==typeof t&&"$$typeof"in t&&t.$$typeof===u;var c=i(80294),f=i(37111);let p=(0,a.createContext)({}),m=p.Provider;function g(t,e){let i=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e);return!(void 0===i||i.writable||i.set)}p.Consumer;let x={currentUpdatePriority:f.DefaultEventPriority,debug:!1,unmountQueue:new Set};function y(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];if(!x.debug)return;let s=console[t];if(!(s instanceof Function))return void console.warn('Attempted to create an invalid log type: "'.concat(t,'"'));s("@pixi/react",...i)}function _(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},e),t}function b(t,e,i){e instanceof c.dJT&&(e.__pixireact.parent=t,"number"==typeof i?t.__pixireact.filters.splice(i,0,e):t.__pixireact.filters.push(e),t.filters=t.__pixireact.filters)}function v(t,e){y("info","lifecycle::appendChild"),e&&(e instanceof c.mcf?t.addChild(e):e instanceof c.dJT&&b(t,e))}let w=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),S=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function C(t){return Array.isArray(t)}let T=Object.freeze(["children","key","ref"]);function A(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.entries(t).reduce((t,i)=>{let[r,s]=i;return e.includes(r)||(t[r]=s),t},{})}(t,T.concat(e))}function M(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=A(t),s=A(e),n=Object.entries(r),a=[];if(i){let t=Object.keys(s),e=0;for(;e<t.length;){let i=t[e];i in r||n.unshift([i,"".concat("__default","remove")]),e+=1}}return n.forEach(t=>{let[e,i]=t;if(function t(e,i){var r;let s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{arrays:"reference",objects:"reference",strict:!0},{arrays:a,objects:o,strict:l}=n;if(typeof e!=typeof i||!!e!=!!i)return!1;if("string"==typeof e||"number"==typeof e)return e===i;let h=!((r=e)!==Object(r)||C(r))&&"function"!=typeof r;if(h&&"reference"===o)return e===i;let u=C(e);if(u&&"reference"===a)return e===i;if((u||h)&&e===i)return!0;for(s in e)if(!(s in i))return!1;let d=e;if(l&&(d=i),h&&"shallow"===a&&"shallow"===o){for(s in d)if(!t(e[s],i[s],{strict:l,objects:"reference"}))return!1}else for(s in d)if(e[s]!==i[s])return!1;if(void 0===s){if(u&&0===e.length&&0===i.length||h&&0===Object.keys(e).length&&0===Object.keys(i).length)return!0;
49if(e!==i)return!1}return!0}(i,s[e]))return;if(e in S)return void a.push([e,i,!0,[]]);let n=[];for(let t in e.includes("-")&&(n=e.split("-")),a.push([e,i,!1,n]),r){let i=r[t];t.startsWith("".concat(e,"-"))&&a.push([t,i,!1,t.split("-")])}}),{changes:a}}let P=new Map,k={};function E(t,e){if(t){let i=t[e];if(null!=i)return i}return t}function I(t,e){let i,{__pixireact:r={},...s}=t,{changes:n}=i=+(!e||!e.changes)?M(e,s):e,a=0;for(;a<n.length;){let e=n[a],i=!1,s=e[0],o=e[1],l=e[2],h=e[3],u=t,d=u[s];if("draw"===s&&"function"==typeof o&&(t instanceof c.A1g?o(t):(i=!0,y("warn","The `draw` prop was used on a `".concat(r.type,"` component, but it's only valid on `graphics` components.")))),s in w){let t=s;i=!0,k[s]||(k[s]=!0,y("warn","Event names must be pascal case; instead of `".concat(s,"`, you probably want `").concat(w[t],"`.")))}if(!i){if(h.length&&!((d=h.reduce(E,u))&&d.set)){let[t,...e]=h.reverse();u=e.reverse().reduce(E,u),s=t}if(o==="".concat("__default","remove"))if(u instanceof c.mcf){let t=P.get(u.constructor);t||(t=new(t=u.constructor),P.set(u.constructor,t)),o=t[s]}else o=0;if(l&&r){let t=S[s];o?u[t]=o:delete u[t]}else g(u,s)||(u[s]=o)}a+=1}return t}let R=Object.freeze([...Object.keys(w),"draw"]),O={};function F(t,e){return e.toLowerCase()}var z=i(9026);let B={};function G(t){if(t instanceof c.dJT){let e=t.__pixireact.parent;if(e){let i=e.__pixireact.filters.indexOf(t);e.__pixireact.filters.splice(i,1),e.filters=e.__pixireact.filters}t.__pixireact.parent=null}}function D(t,e){for(var i=arguments.length,r=Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s]}function U(t,e,i){if(y("info","lifecycle::insertBefore"),D(e!==i,"Cannot insert node before itself"),e instanceof c.mcf){e.parent===t&&t.removeChild(e);let r=t.getChildIndex(i);t.addChildAt(e,r)}else if(e instanceof c.dJT){let r=e.__pixireact.filters.indexOf(i);G(e),b(t,e,r)}}function L(t,e){y("info","lifecycle::removeChild"),e instanceof c.dJT&&G(e),e.destroy()}let j=z({isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:function(){y("info","lifecycle::afterActiveInstanceBlur")},appendChild:v,appendChildToContainer:v,appendInitialChild:v,beforeActiveInstanceBlur:function(){y("info","lifecycle::beforeActiveInstanceBlur")},cancelTimeout:clearTimeout,clearContainer:function(){return y("info","lifecycle::clearContainer"),!1},commitUpdate:function(t,e,i,r){y("info","lifecycle::commitUpdate");let s=function(t,e,i,r){y("info","lifecycle::prepareUpdate");let{children:s,...n}=r,{children:a,...o}=i,l=M(n,o,!0);return l.changes.length?l:null}(0,0,i,r);s&&I(t,s)},createInstance:function(t,e,i){let r;y("info","lifecycle::createInstance");let s=(r=t,t.startsWith("pixi")&&(r=t.replace(/^pixi([A-Z])/,F)),r),n=function(t){let e=t.charAt(0),i=t.substring(1);return"".concat(e.toUpperCase()).concat(i)}(s);if(!(n in O))throw Error("".concat(n," is not part of the PIXI namespace! Did you forget to extend?"));let a=O[n],o=A(e,R);Object.entries(e).forEach(t=>{let[e,i]=t;e in S&&(o[S[e]]=i)});let l=_(new a(o),{root:i,type:s});return I(l,e),l},createTextInstance:function(t,e,i,r){throw y("info","lifecycle::createTextInstance"),Error("Text instances are not yet supported. Please use a `<text>` component.")},hideTextInstance:function(t){throw y("info","lifecycle::hideTextInstance"),Error("Text instances are not yet supported. Please use a `<text>` component.")},unhideTextInstance:function(t){throw y("info","lifecycle::unhideTextInstance"),Error("Text instances are not yet supported. Please use a `<text>` component.")},detachDeletedInstance:function(){y("info","lifecycle::detachDeletedInstance")},finalizeInitialChildren:function(){return y("info","lifecycle::finalizeInitialChildren"),!1},getChildHostContext:function(t){return y("info","lifecycle::getChildHostContext"),null!=t?t:B},getCurrentUpdatePriority:function(){return y("info","lifecycle::getCurrentUpdatePriority"),x.currentUpdatePriority},getInstanceFromNode:function(){return y("info","lifecycle::getInstanceFromNode"),null},getInstanceFromScope:function(t){throw y("info","lifecycle:getInstanceFromScope"),Error("Not yet implemented.")},getPublicInstance:function(t){return y("info","lifecycle::getPublicInstance"),t},getRootHostContext:function(){return y("info","lifecycle::getRootHostContext"),B},hideInstance:function(t){t instanceof c.mcf?t.visible=!1:t instanceof c.dJT&&(t.enabled=!1)},insertBefore:U,insertInContainerBefore:U,maySuspendCommit:function(){return y("info","lifecycle::maySuspendCommit"),!1},preloadInstance:function(){return y("info","lifecycle::preloadInstance"),!0},prepareForCommit:function(){return y("info","lifecycle::prepareForCommit"),null},preparePortalMount:function(){y("info","lifecycle::preparePortalMount")}
49,prepareScopeUpdate:function(){y("info","lifecycle::prepareScopeUpdate")},removeChild:L,removeChildFromContainer:L,requestPostPaintCallback:function(t){y("info","lifecycle::requestPostPaintCallback")},resetAfterCommit:function(){y("info","lifecycle::resetAfterCommit")},resetFormInstance:function(){y("info","lifecycle::resetFormInstance")},resolveEventTimeStamp:function(){return y("info","lifecycle::resolveEventTimeStamp"),-1.1},resolveEventType:function(){return y("info","lifecycle::resolveEventType"),null},resolveUpdatePriority:function(){var t;if(y("info","lifecycle::resolveUpdatePriority"),x.currentUpdatePriority)return x.currentUpdatePriority;let e="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!e)return f.DefaultEventPriority;switch(null==(t=e.event)?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return f.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return f.ContinuousEventPriority;default:return f.DefaultEventPriority}},scheduleTimeout:setTimeout,shouldAttemptEagerTransition:function(){return y("info","lifecycle::shouldAttemptEagerTransition"),!1},setCurrentUpdatePriority:function(t){y("info","lifecycle::setCurrentUpdatePriority"),x.currentUpdatePriority=t},shouldSetTextContent:function(){return y("info","lifecycle::shouldSetTextContent"),!1},startSuspendingCommit:function(){y("info","lifecycle::startSuspendingCommit")},suspendInstance:function(){y("info","lifecycle::suspendInstance")},trackSchedulerEvent:function(){y("info","lifecycle::trackSchedulerEvent")},unhideInstance:function(t){t instanceof c.mcf?t.visible=!0:t instanceof c.dJT&&(t.enabled=!0)},waitForCommitToBeReady:function(){return y("info","lifecycle::waitForCommitToBeReady"),null},rendererPackageName:"@pixi/react",rendererVersion:"0.0.0-development"});j.injectIntoDevTools();let V=new Map;function X(t){x.unmountQueue.delete(t);let e=t.fiber;e&&j.updateContainer(null,e,null,()=>{t.applicationState.app&&t.applicationState.app.destroy(),V.delete(t.internalState.canvas)})}let N="undefined"!=typeof window&&((null==(r=window.document)?void 0:r.createElement)||(null==(s=window.navigator)?void 0:s.product)==="ReactNative")?a.useLayoutEffect:a.useEffect,Y={...c.xJt.defaultTextStyle},W=(0,a.forwardRef)(function(t,e){let{children:i,className:r,defaultTextStyle:s,extensions:u,onInit:p,resizeTo:b,...v}=t,w=function(){let t=function(){let t=function(){let t=a.useContext(l);if(null===t)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let e=a.useId();return a.useMemo(()=>{for(let i of[t,null==t?void 0:t.alternate]){if(!i)continue;let t=function t(e,i,r){if(!e)return;if(!0===r(e))return e;let s=i?e.return:e.child;for(;s;){let e=t(s,i,r);if(e)return e;s=i?null:s.sibling}}(i,!1,t=>{let i=t.memoizedState;for(;i;){if(i.memoizedState===e)return!0;i=i.next}});if(t)return t}},[t,e])}(),[e]=a.useState(()=>new Map);e.clear();let i=t;for(;i;){let t=i.type;d(t)&&t!==l&&!e.has(t)&&e.set(t,a.use(o(t))),i=i.return}return e}();return a.useMemo(()=>Array.from(t.keys()).reduce((e,i)=>r=>a.createElement(e,null,a.createElement(i.Provider,{...r,value:t.get(i)})),t=>a.createElement(h,{...t})),[t])}(),S=(0,a.useRef)(null),C=(0,a.useRef)(null),T=(0,a.useRef)(new Set);(0,a.useImperativeHandle)(e,()=>({getApplication:()=>S.current,getCanvas:()=>C.current}));let A=(0,a.useCallback)(()=>{let t=S.current;t&&(b?"current"in b?b.current instanceof HTMLElement&&(t.resizeTo=b.current):t.resizeTo=b:t.resizeTo=void 0)},[b]),M=(0,a.useCallback)(t=>{for(let t of x.unmountQueue)X(t);S.current=t,A(),null==p||p(t)},[p]);return N(()=>{if(u){let t=[...u],e=T.current;for(let i of e.values()){let r=t.indexOf(i);-1===r&&(c.XOh.remove(i),e.delete(i)),t.splice(r,1)}for(let i of t)c.XOh.add(i),e.add(i)}},[u]),N(()=>{let t=C.current;if(t){let e=V.get(t);e||(e=function(t){var e,i,r;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=V.get(t),o=null!=(e=null==a?void 0:a.applicationState)?e:{isInitialised:!1,isInitialising:!1},l=null!=(i=null==a?void 0:a.internalState)?i:{};a?y("warn","createRoot should only be called once!"):(o.app=new c.lgM,l.rootContainer=_(o.app.stage));let h=null!=(r=null==a?void 0:a.fiber)?r:j.createContainer(l.rootContainer,f.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!a){let e;t instanceof HTMLCanvasElement&&(e=t),e||(e=document.createElement("canvas"),t.innerHTML="",t.appendChild(e)),l.canvas=e;let i=async(t,i)=>{if(!o.app.renderer&&!o.isInitialised&&!o.isInitialising){var r;o.isInitialising=!0,await o.app.init({...i,canvas:e}),o.isInitialising=!1,o.isInitialised=!0,o={...o},null==(r=s.onInit)||r.call(s,o.app)}
49return Object.entries(i).forEach(t=>{let[e,r]=t;g(i,e)||(o.app[e]=r)}),j.updateContainer((0,n.jsx)(m,{value:o,children:t}),h,null,()=>void 0),o.app};a={applicationState:o,fiber:h,internalState:l,render:i},V.set(e,a)}return a}(t,{onInit:M})),e.render((0,n.jsx)(w,{children:i}),v)}},[v,i,M,b]),N(()=>{A()},[b]),N(()=>{s?Object.assign(c.xJt.defaultTextStyle,s):Object.assign(c.xJt.defaultTextStyle,Y)},[s]),(0,a.useEffect)(()=>{let t=C.current;if(t){let e=V.get(t);return e&&x.unmountQueue.delete(e),()=>{let e=V.get(t);e&&(e.applicationState.isInitialised?X(e):x.unmountQueue.add(e))}}},[]),(0,n.jsx)("canvas",{ref:C,className:r})}),$=(0,a.forwardRef)(function(t,e){return(0,n.jsx)(h,{children:(0,n.jsx)(W,{ref:e,...t})})});function H(t){Object.assign(O,t)}function q(){let t=(0,a.useContext)(p);return D(t.app instanceof c.lgM,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}},36120:(t,e,i)=>{"use strict";i.d(e,{j:()=>s});var r=i(16269);function s(t,e){return 0xffffff===t?e:0xffffff===e?t:(0,r.u)(t,e)}},37111:(t,e,i)=>{"use strict";t.exports=i(77878)},39348:(t,e,i)=>{"use strict";i.d(e,{K:()=>s,Q:()=>r});let r={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var s=(t=>(t[t.DISABLED=0]="DISABLED",t[t.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",t[t.MASK_ACTIVE=2]="MASK_ACTIVE",t[t.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",t[t.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",t[t.NONE=5]="NONE",t))(s||{})},40063:(t,e,i)=>{"use strict";i.d(e,{z:()=>r});let r=(t,e,i=!1)=>(Array.isArray(t)||(t=[t]),e)?t.map(t=>"string"==typeof t||i?e(t):t):t},40246:(t,e,i)=>{"use strict";i.d(e,{k:()=>x});var r=i(30214),s=i(90194);let n=[];async function a(t){if(!t)for(let t=0;t<n.length;t++){let e=n[t];if(e.value.test())return void await e.value.load()}}s.XO.handleByNamedList(s.Ag.Environment,n);var o=i(32574),l=i(84992),h=i(48036),u=i(74983),d=i(59818),c=i(3224),f=i(81152),p=i(5479);let m=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],g=class t extends p.A{constructor(t){super(),this.tick=0,this.uid=(0,h.L)("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;let e=[...m,...this.config.runners??[]];this._addRunners(...e),this._unsafeEvalCheck()}async init(e={}){let i=!0===e.skipExtensionImports||!1===e.manageImports;for(let t in await a(i),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors),this._systemsHash)e={...this._systemsHash[t].constructor.defaultOptions,...e};e={...t.defaultOptions,...e},this._roundPixels=+!!e.roundPixels;for(let t=0;t<this.runners.init.items.length;t++)await this.runners.init.items[t].init(e);this._initOptions=e}render(t,e){this.tick++;let i=t;if(i instanceof o.mc&&(i={container:i},e&&((0,u.t6)(u.lj,"passing a second argument is deprecated, please use render options instead"),i.target=e.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor??(i.clearColor=this.background.colorRgba),i.clear??(i.clear=this.background.clearBeforeRender)),i.clearColor){let t=Array.isArray(i.clearColor)&&4===i.clearColor.length;i.clearColor=t?i.clearColor:r.Q.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.visible&&(i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i))}resize(t,e,i){let r=this.view.resolution;this.view.resize(t,e,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),void 0!==i&&i!==r&&this.runners.resolutionChange.emit(i)}clear(t={}){t.target||(t.target=this.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=c.u.ALL);let{clear:e,clearColor:i,target:s,mipLevel:n,layer:a}=t;r.Q.shared.setValue(i??this.background.colorRgba),this.renderTarget.clear(s,e,r.Q.shared.toArray(),n??0,a??0)}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(t=>{this.runners[t]=new f.C(t)})}_addSystems(t){let e;for(e in t){let i=t[e];this._addSystem(i.value,i.name)}}_addSystem(t,e){let i=new t(this);if(this[e])throw Error(`Whoops! The name "${e}" is already in use`);for(let t in this[e]=i,this._systemsHash[e]=i,this.runners)this.runners[t].add(i);return this}_addPipes(t,e){let i=e.reduce((t,e)=>(t[e.name]=e.value,t),{});t.forEach(t=>{let e=t.value,r=t.name,s=i[r];this.renderPipes[r]=new e(this,s?new s:null),this.runners.destroy.add(this.renderPipes[r])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(!0===t||"object"==typeof t&&t.releaseGlobalResources)&&d.L.release(),Object.values(this.runners).forEac
49h(t=>{t.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!(0,l.f)())throw Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};g.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let x=g},42059:(t,e,i)=>{"use strict";i.d(e,{k:()=>o});var r=i(45317),s=i(25687),n=i(74983),a=i(78656);class o extends a.l{constructor(t=s.g.EMPTY){t instanceof s.g&&(t={texture:t});let{texture:e=s.g.EMPTY,anchor:i,roundPixels:n,width:a,height:o,...l}=t;super({label:"Sprite",...l}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new r.o({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:e.defaultAnchor&&(this.anchor=e.defaultAnchor),this.texture=e,this.allowChildren=!1,this.roundPixels=n??!1,void 0!==a&&(this.width=a),void 0!==o&&(this.height=o)}static from(t,e=!1){return new o(t instanceof s.g?t:s.g.from(t,e))}set texture(t){t||(t=s.g.EMPTY);let e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return!function(t,e,i){let{width:r,height:s}=i.orig,n=i.trim;if(n){let i=n.width,a=n.height;t.minX=n.x-e._x*r,t.maxX=t.minX+i,t.minY=n.y-e._y*s,t.maxY=t.minY+a}else t.minX=-e._x*r,t.maxX=t.minX+r,t.minY=-e._y*s,t.maxY=t.minY+s}(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return(0,n.t6)("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){let t=this._anchor,e=this._texture,i=this._bounds,{width:r,height:s}=e.orig;i.minX=-t._x*r,i.maxX=i.minX+r,i.minY=-t._y*s,i.maxY=i.minY+s}destroy(t=!1){if(super.destroy(t),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._texture.destroy(e)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,e){"object"==typeof t?(e=t.height??t.width,t=t.width):e??(e=t),void 0!==t&&this._setWidth(t,this._texture.orig.width),void 0!==e&&this._setHeight(e,this._texture.orig.height)}}},44929:(t,e,i)=>{"use strict";i.d(e,{X:()=>n});let r=Object.create(null),s=Object.create(null);function n(t,e){let i=s[t];return void 0===i&&(void 0===r[e]&&(r[e]=1),s[t]=i=r[e]++),i}},45317:(t,e,i)=>{"use strict";i.d(e,{o:()=>r});class r{constructor(t,e,i){this._x=e||0,this._y=i||0,this._observer=t}clone(t){return new r(t??this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}},47261:(t,e,i)=>{"use strict";i.d(e,{q:()=>a});var r=i(92122),s=i(90194),n=i(58862);class a extends n.v{constructor(t){t.resource||(t.resource=r.e.get().createCanvas()),!t.width&&(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),!t.height&&(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,e=this.height,i=this._resolution){let r=super.resize(t,e,i);return r&&this.resizeCanvas(),r}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}a.extension=s.Ag.TextureSource},47312:(t,e,i)=>{"use strict";i.d(e,{M:()=>n,d:()=>a});var r=i(90194),s=i(16338);class n{static init(){globalThis.__PIXI_APP_INIT__?.(this,s.xv)}static destroy(){}}n.extension=r.Ag.Application;class a{constructor(t){this._renderer=t}init(){globalThis.__PIXI_RENDERER_INIT__?.(this._renderer,s.xv)}destroy(){this._renderer=null}}a.extension={type:[r.Ag.WebGLSystem,r.Ag.WebGPUSystem],name:"initHook",priority:-10}},48036:(t,e,i)=>{"use strict";i.d(e,{L:()=>s});let r={default:-1};function s(t="default"){return void 0===r[t]&&(r[t]=-1),++r[t]}},49587:(t,e,i)=>{"use strict";i.d(e,{G:()=>a});var r=i(15744),s=i(16269);let n=new r.u;class a{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){let t=this.baseColor,e=t>>16|65280&t|(255&t)<<16,i=this.renderable;return i?(0,s.u)(e,i.groupColor)+(this.alpha*i.groupAlpha*255<<24):e+(255*this.alpha<<24)}get transform(){return this.renderable?.groupTransform||n}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}},50508:(t,e,i)=>{"use strict";i.d(e,{b:()=>r});
49class r{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new r(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return s.x=0,s.y=0,s}}let s=new r},51263:(t,e,i)=>{"use strict";i.d(e,{s:()=>r});class r{constructor(t){this.items=Object.create(null);let{renderer:e,type:i,onUnload:r,priority:s,name:n}=t;this._renderer=e,e.gc.addResourceHash(this,"items",i,s??0),this._onUnload=r,this.name=n}add(t){return!this.items[t.uid]&&(this.items[t.uid]=t,t.once("unload",this.remove,this),t._gcLastUsed=this._renderer.gc.now,!0)}remove(t,...e){if(!this.items[t.uid])return;let i=t._gpuData[this._renderer.uid];i&&(this._onUnload?.(t,...e),i.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(e=>e&&this.remove(e,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}},51557:(t,e,i)=>{"use strict";let r;var s=i(90194),n=i(42059),a=i(5341),o=i(24618);let l=new a.c;function h(t,e,i){t.measurable=!0,(0,o.f)(t,i,l),e.addBoundsMask(l),t.measurable=!1}var u=i(4940),d=i(65129),c=i(59869);function f(t,e,i){let r=d.o.get();t.measurable=!0;let s=d.u.get().identity(),n=function t(e,i,r){return e?e!==i&&(t(e.parent,i,r),e.updateLocalTransform(),r.append(e.localTransform)):(0,c.R)("Mask bounds, renderable is not inside the root container"),r}(t,i,s);(0,u.n)(t,r,n),t.measurable=!1,e.addBoundsMask(r),d.u.return(s),d.o.return(r)}class p{constructor(t){this.priority=0,this.inverse=!1,this.channel="red",this.pipe="alphaMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof n.k),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){null!==this.mask&&(this.mask.measurable=!0,this.mask=null)}addBounds(t,e){this.inverse||h(this.mask,t,e)}addLocalBounds(t,e){f(this.mask,t,e)}containsPoint(t,e){return e(this.mask,t)}destroy(){this.reset()}static test(t){return t instanceof n.k}}p.extension=s.Ag.MaskEffect;class m{constructor(t){this.priority=0,this.pipe="colorMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return"number"==typeof t}}m.extension=s.Ag.MaskEffect;var g=i(32574);class x{constructor(t){this.priority=0,this.pipe="stencilMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){null!==this.mask&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(t,e){h(this.mask,t,e)}addLocalBounds(t,e){f(this.mask,t,e)}containsPoint(t,e){return e(this.mask,t)}destroy(){this.reset()}static test(t){return t instanceof g.mc}}x.extension=s.Ag.MaskEffect;var y=i(11178),_=i(47261),b=i(58380),v=i(20915),w=i(92122);async function S(){return r??(r=(async()=>{let t=w.e.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";let e=await new Promise(t=>{let e=document.createElement("video");e.onloadeddata=()=>t(e),e.onerror=()=>t(null),e.autoplay=!1,e.crossOrigin="anonymous",e.preload="auto",e.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",e.load()});if(!e)return"premultiply-alpha-on-upload";let i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i);let r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e);let s=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,s),t.deleteFramebuffer(r),t.deleteTexture(i),t.getExtension("WEBGL_lose_context")?.loseContext(),s[0]<=s[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),r}var C=i(58862);let T=class t extends C.v{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...t.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=!1!==e.autoPlay,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),this._onLoadedMetadata=this._onLoadedMetadata.bind(this),!1!==e.autoLoad&&this.load()}
49updateFrame(){if(!this.destroyed){if(this._updateFPS){let t=v.R.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let t=this.resource,e=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(e.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.isValid||t.addEventListener("loadedmetadata",this._onLoadedMetadata),this.alphaMode=await S(),this._load=new Promise((i,r)=>{this.isValid?i(this):(this._resolve=i,this._reject=r,void 0!==e.preloadTimeoutMs&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${e.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){let t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onLoadedMetadata(){this.isValid&&this._mediaReady()}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlayThrough),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){let t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&this.isValid&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("loadedmetadata",this._onLoadedMetadata),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(v.R.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),null===this._videoFrameRequestCallbackHandle&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(null!==this._videoFrameRequestCallbackHandle&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(v.R.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(null!==this._videoFrameRequestCallbackHandle&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(v.R.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};T.extension=s.Ag.TextureSource,T.defaultOptions={...C.v.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},T.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},i(8402),s.XO.add(p,m,x,T,b.b,_.q,y.P)},53312:(t,e,i)=>{"use strict";i.d(e,{h:()=>o});var r=i(50508),s=i(4129);function n(t,e,i,r,s,n,a,o){let l,h;a?(l=r,h=-i):(l=-r,h=i);let u=t-i*s+l,d=e-r*s+h,c=t+i*n+l,f=e+r*n+h;return o.push(u,d),o.push(c,f),2}function a(t,e,i,r,s,n,a,o){let l=i-t,h=r-e,u=Math.atan2(l,h),d=Math.atan2(s-t,n-e);o&&u<d?u+=2*Math.PI:!o&&u>d&&(d+=2*Math.PI);let c=u,f=d-u,p=Math.sqrt(l*l+h*h),m=(15*Math.abs(f)*Math.sqrt(p)/Math.PI|0)+1,g=f/m;if(c+=g,o){a.push(t,e),a.push(i,r);for(let i=1,r=c;i<m;
49i++,r+=g)a.push(t,e),a.push(t+Math.sin(r)*p,e+Math.cos(r)*p);a.push(t,e),a.push(s,n)}else{a.push(i,r),a.push(t,e);for(let i=1,r=c;i<m;i++,r+=g)a.push(t+Math.sin(r)*p,e+Math.cos(r)*p),a.push(t,e);a.push(s,n),a.push(t,e)}return 2*m}function o(t,e,i,o,l,h){let u=s.B;if(0===t.length)return;let d=e.alignment;if(.5!==e.alignment){let e=function(t){let e=t.length;if(e<6)return 1;let i=0;for(let r=0,s=t[e-2],n=t[e-1];r<e;r+=2){let e=t[r],a=t[r+1];i+=(e-s)*(a+n),s=e,n=a}return i<0?-1:1}(t);i&&(e*=-1),d=(d-.5)*e+.5}let c=new r.b(t[0],t[1]),f=new r.b(t[t.length-2],t[t.length-1]),p=Math.abs(c.x-f.x)<u&&Math.abs(c.y-f.y)<u;if(o){t=t.slice(),p&&(t.pop(),t.pop(),f.set(t[t.length-2],t[t.length-1]));let e=(c.x+f.x)*.5,i=(f.y+c.y)*.5;t.unshift(e,i),t.push(e,i)}let m=t.length/2,g=t.length,x=l.length/2,y=e.width/2,_=y*y,b=e.miterLimit*e.miterLimit,v=t[0],w=t[1],S=t[2],C=t[3],T=0,A=0,M=-(w-C),P=v-S,k=0,E=0,I=Math.sqrt(M*M+P*P);M/=I,P/=I,M*=y,P*=y;let R=d,O=(1-R)*2,F=2*R;o||("round"===e.cap?g+=a(v-M*(O-F)*.5,w-P*(O-F)*.5,v-M*O,w-P*O,v+M*F,w+P*F,l,!0)+2:"square"===e.cap&&(g+=n(v,w,M,P,O,F,!0,l))),l.push(v-M*O,w-P*O),l.push(v+M*F,w+P*F);for(let i=1;i<m-1;++i){v=t[(i-1)*2],w=t[(i-1)*2+1],S=t[2*i],C=t[2*i+1],T=t[(i+1)*2],A=t[(i+1)*2+1],I=Math.sqrt((M=-(w-C))*M+(P=v-S)*P),M/=I,P/=I,M*=y,P*=y,I=Math.sqrt((k=-(C-A))*k+(E=S-T)*E),k/=I,E/=I,k*=y,E*=y;let r=S-v,s=w-C,n=S-T,o=A-C,h=r*n+s*o,u=s*n-o*r,d=u<0;if(Math.abs(u)<.001*Math.abs(h)){l.push(S-M*O,C-P*O),l.push(S+M*F,C+P*F),h>=0&&("round"===e.join?g+=a(S,C,S-M*O,C-P*O,S-k*O,C-E*O,l,!1)+4:g+=2,l.push(S-k*F,C-E*F),l.push(S+k*O,C+E*O));continue}let c=(-M+v)*(-P+C)-(-M+S)*(-P+w),f=(-k+T)*(-E+C)-(-k+S)*(-E+A),p=(r*f-n*c)/u,m=(o*c-s*f)/u,x=(p-S)*(p-S)+(m-C)*(m-C),R=S+(p-S)*O,z=C+(m-C)*O,B=S-(p-S)*F,G=C-(m-C)*F,D=d?O:F;x<=Math.min(r*r+s*s,n*n+o*o)+D*D*_?"bevel"===e.join||x/_>b?(d?(l.push(R,z),l.push(S+M*F,C+P*F),l.push(R,z),l.push(S+k*F,C+E*F)):(l.push(S-M*O,C-P*O),l.push(B,G),l.push(S-k*O,C-E*O),l.push(B,G)),g+=2):"round"===e.join?d?(l.push(R,z),l.push(S+M*F,C+P*F),g+=a(S,C,S+M*F,C+P*F,S+k*F,C+E*F,l,!0)+4,l.push(R,z),l.push(S+k*F,C+E*F)):(l.push(S-M*O,C-P*O),l.push(B,G),g+=a(S,C,S-M*O,C-P*O,S-k*O,C-E*O,l,!1)+4,l.push(S-k*O,C-E*O),l.push(B,G)):(l.push(R,z),l.push(B,G)):(l.push(S-M*O,C-P*O),l.push(S+M*F,C+P*F),"round"===e.join?d?g+=a(S,C,S+M*F,C+P*F,S+k*F,C+E*F,l,!0)+2:g+=a(S,C,S-M*O,C-P*O,S-k*O,C-E*O,l,!1)+2:"miter"===e.join&&x/_<=b&&(d?(l.push(B,G),l.push(B,G)):(l.push(R,z),l.push(R,z)),g+=2),l.push(S-k*O,C-E*O),l.push(S+k*F,C+E*F),g+=2)}v=t[(m-2)*2],w=t[(m-2)*2+1],S=t[(m-1)*2],I=Math.sqrt((M=-(w-(C=t[(m-1)*2+1])))*M+(P=v-S)*P),M/=I,P/=I,M*=y,P*=y,l.push(S-M*O,C-P*O),l.push(S+M*F,C+P*F),o||("round"===e.cap?g+=a(S-M*(O-F)*.5,C-P*(O-F)*.5,S-M*O,C-P*O,S+M*F,C+P*F,l,!1)+2:"square"===e.cap&&(g+=n(S,C,M,P,O,F,!1,l)));let z=s.I*s.I;for(let t=x;t<g+x-2;++t)v=l[2*t],w=l[2*t+1],S=l[(t+1)*2],C=l[(t+1)*2+1],T=l[(t+2)*2],Math.abs(v*(C-(A=l[(t+2)*2+1]))+S*(A-w)+T*(w-C))<z||h.push(t,t+1,t+2)}},57825:(t,e,i)=>{"use strict";i.d(e,{n:()=>n});var r=i(71252);let s={};function n(t){let e=s[t];if(e)return e;let i=new Int32Array(t);for(let e=0;e<t;e++)i[e]=e;return s[t]=new r.k({uTextures:{value:i,type:"i32",size:t}},{isStatic:!0})}},58380:(t,e,i)=>{"use strict";i.d(e,{b:()=>n});var r=i(90194),s=i(58862);class n extends s.v{constructor(t){super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}n.extension=r.Ag.TextureSource},58862:(t,e,i)=>{"use strict";i.d(e,{v:()=>h});var r=i(5479),s=i(28042),n=i(715),a=i(48036),o=i(76363);let l=class t extends r.A{constructor(e={}){super(),this.options=e,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=(0,a.L)("textureSource"),this._resourceType="textureSource",this._resourceId=(0,a.L)("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this.transient=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...t.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.viewDimension=e.viewDimension??e.dimensions,this.arrayLayerCount=e.arrayLayerCount,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleC
49ount,this.antialias=e.antialias,this.transient=e.transient??!1,this.alphaMode=e.alphaMode,this.style=new o.n((0,n.S)(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){this.style!==t&&(this._style?.off("change",this._onStyleChange,this),this._style=t,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(t){this._style.maxAnisotropy=t}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){let t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){for(let t in this._resourceId=(0,a.L)("resource"),this.emit("change",this),this.emit("unload",this),this._gpuData)this._gpuData[t]?.destroy?.();this._gpuData=Object.create(null)}get resourceWidth(){let{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){let{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,e,i){i||(i=this._resolution),t||(t=this.width),e||(e=this.height);let r=Math.round(t*i),s=Math.round(e*i);return this.width=r/i,this.height=s/i,this._resolution=i,(this.pixelWidth!==r||this.pixelHeight!==s)&&(this._refreshPOT(),this.pixelWidth=r,this.pixelHeight=s,this.emit("resize",this),this._resourceId=(0,a.L)("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=(0,s.f3)(this.pixelWidth)&&(0,s.f3)(this.pixelHeight)}static test(t){throw Error("Unimplemented")}};l.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let h=l},59818:(t,e,i)=>{"use strict";i.d(e,{L:()=>r});let r={_registeredResources:new Set,register(t){this._registeredResources.add(t)},unregister(t){this._registeredResources.delete(t)},release(){this._registeredResources.forEach(t=>t.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(t){return this._registeredResources.has(t)},reset(){this._registeredResources.clear()}}},59869:(t,e,i)=>{"use strict";i.d(e,{R:()=>s});let r=0;function s(...t){500!==r&&(500==++r?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...t))}},60593:(t,e,i)=>{"use strict";function r(t,e){if(0===t)throw Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");let i=e.createShader(e.FRAGMENT_SHADER);try{for(;;){let r="precision mediump float;\nvoid main(void){\nfloat test = 0.1;\n%forloop%\ngl_FragColor = vec4(0.0);\n}".replace(/%forloop%/gi,function(t){let e="";for(let i=0;i<t;++i)i>0&&(e+="\nelse "),i<t-1&&(e+=`if(test == ${i}.0){}`);return e}(t));if(e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS))break;t=t/2|0}}finally{e.deleteShader(i)}return t}i.d(e,{u:()=>r})},62093:(t,e,i)=>{"use strict";i.d(e,{S:()=>r});var r=(t=>(t[t.MAP_READ=1]="MAP_READ",t[t.MAP_WRITE=2]="MAP_WRITE",t[t.COPY_SRC=4]="COPY_SRC",t[t.COPY_DST=8]="COPY_DST",t[t.INDEX=16]="INDEX",t[t.VERTEX=32]="VERTEX",t[t.UNIFORM=64]="UNIFORM",t[t.STORAGE=128]="STORAGE",t[t.INDIRECT=256]="INDIRECT",t[t.QUERY_RESOLVE=512]="QUERY_RESOLVE",t[t.STATIC=1024]="STATIC",t))(r||{})},65129:(t,e,i)=>{"use strict";i.d(e,{o:()=>o,u:()=>a});var r=i(15744),s=i(67961),n=i(5341);let a=s.Z.getPool(r.u),o=s.Z.getPool(n.c)},65982:(t,e,i)=>{"use strict";function r(t,e,i){let r,s=t.length;if(e>=s||0===i)return;i=e+i>s?s-e:i;let n=s-i;for(r=e;r<n;++r)t[r]=t[r+i];t.length=n}i.d(e,{d:()=>r})},67961:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(59818);class s{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e)}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){let e;return this._index>0?e=this._pool[--this._index]:(e=new this._classType,this._count++),e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}class n{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new s(t)),this._poolsByClass.get(t)}stats(){let t={};
49return this._poolsByClass.forEach(e=>{let i=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[i]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}let a=new n;r.L.register(a)},68379:(t,e,i)=>{"use strict";i.d(e,{d:()=>l});var r=i(79041),s=i(85732),n=i(35626),a=i(90586);let o=class t extends n.M{constructor(e){super(e={...t.defaultOptions,...e}),this.enabled=!0,this._state=a.U.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,"boolean"==typeof e.antialias?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(t,e,i,r){t.applyFilter(this,e,i,r)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(e){let i,n,{gpu:a,gl:o,...l}=e;return a&&(i=s.B.from(a)),o&&(n=r.M.from(o)),new t({gpuProgram:i,glProgram:n,...l})}};o.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let l=o},68419:(t,e,i)=>{"use strict";i.d(e,{m:()=>s});let r={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function s(t){return r[t]??r.float32}},71108:(t,e,i)=>{"use strict";i.d(e,{w:()=>a});var r=i(73552),s=i(25687);let n={};function a(t,e,i){let a=0x811c9dc5;for(let i=0;i<e;i++)a^=t[i].uid,a=Math.imul(a,0x1000193)>>>0;return n[a]||function(t,e,i,a){let o={},l=0;for(let i=0;i<a;i++){let r=i<e?t[i]:s.g.EMPTY.source;o[l++]=r.source,o[l++]=r.style}let h=new r.T(o);return n[i]=h,h}(t,e,a,i)}},71252:(t,e,i)=>{"use strict";i.d(e,{k:()=>l});var r=i(48036),s=i(44929);let n=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],a=n.reduce((t,e)=>(t[e]=!0,t),{}),o=class t{constructor(e,i){this._touched=0,this.uid=(0,r.L)("uniform"),this._resourceType="uniformGroup",this._resourceId=(0,r.L)("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,i={...t.defaultOptions,...i},this.uniformStructures=e;let o={};for(let t in e){let i=e[t];if(i.name=t,i.size=i.size??1,!a[i.type]){let t=i.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(t){let[,e,r]=t;throw Error(`Uniform type ${i.type} is not supported. Use type: '${e}', size: ${r} instead.`)}throw Error(`Uniform type ${i.type} is not supported. Supported uniform types are: ${n.join(", ")}`)}i.value??(i.value=function(t,e){switch(t){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*e);case"vec3<f32>":return new Float32Array(3*e);case"vec4<f32>":return new Float32Array(4*e);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}(i.type,i.size)),o[t]=i.value}this.uniforms=o,this._dirtyId=1,this.ubo=i.ubo,this.isStatic=i.isStatic,this._signature=(0,s.X)(Object.keys(o).map(t=>`${t}-${e[t].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};o.defaultOptions={ubo:!1,isStatic:!1};let l=o},73318:(t,e,i)=>{"use strict";i.d(e,{G:()=>c});var r=i(80294),s="in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",n="struct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n };\n\nfn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \n}\n\nfn getSize() -> vec2<f32>\n{\n return gfu.uGlobalFrame.zw;\n}\n \n@vertex\nfn mainVertex(\n @location(0) aPosition : vec2<f32>, \n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}",a=Object.defineProperty,o=(t,e,i)=>(((t,e,i)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),i);let l=class t extends r.dJT{apply(t,e,i,s){let n,a=this.pixelSizeX/e.source.width,o=this.pixelSizeY/e.source.height;if(1===this._quality||0===this._blur)n=this._kernels[0]+.5,this.uniforms.uOffset[0]=n*a,this.uniforms.uOffset[1]=n*o,t.applyFilter(this,e,i,s);
49else{let l,h=r.Wny.getSameSizeTexture(e),u=e,d=h,c=this._quality-1;for(let e=0;e<c;e++)n=this._kernels[e]+.5,this.uniforms.uOffset[0]=n*a,this.uniforms.uOffset[1]=n*o,t.applyFilter(this,u,d,!0),l=u,u=d,d=l;n=this._kernels[c]+.5,this.uniforms.uOffset[0]=n*a,this.uniforms.uOffset[1]=n*o,t.applyFilter(this,u,i,s),r.Wny.returnTexture(h)}}get strength(){return this._blur}set strength(t){this._blur=t,this._generateKernels()}get quality(){return this._quality}set quality(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()}get kernels(){return this._kernels}set kernels(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max(...t)):(this._kernels=[0],this._quality=1)}get pixelSize(){return this._pixelSize}set pixelSize(t){if("number"==typeof t){this.pixelSizeX=this.pixelSizeY=t;return}if(Array.isArray(t)){this.pixelSizeX=t[0],this.pixelSizeY=t[1];return}this._pixelSize=t}get pixelSizeX(){return this.pixelSize.x}set pixelSizeX(t){this.pixelSize.x=t}get pixelSizeY(){return this.pixelSize.y}set pixelSizeY(t){this.pixelSize.y=t}get clamp(){return this._clamp}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((t,e)=>t+e+.5,0))}_generateKernels(){let t=this._blur,e=this._quality,i=[t];if(t>0){let r=t,s=t/e;for(let t=1;t<e;t++)r-=s,i.push(r)}this._kernels=i,this._updatePadding()}constructor(...e){var i,a,l;let h=null!=(i=e[0])?i:{};("number"==typeof h||Array.isArray(h))&&((0,r.t66)("6.0.0","KawaseBlurFilter constructor params are now options object. See params: { strength, quality, clamp, pixelSize }"),h={strength:h},void 0!==e[1]&&(h.quality=e[1]),void 0!==e[2]&&(h.clamp=e[2])),h={...t.DEFAULT_OPTIONS,...h},super({gpuProgram:r.BrD.from({vertex:{source:n,entryPoint:"mainVertex"},fragment:{source:(null==h?void 0:h.clamp)?"struct KawaseBlurUniforms {\n uOffset:vec2<f32>,\n};\n\nstruct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\n@group(0) @binding(1) var uTexture: texture_2d<f32>; \n@group(0) @binding(2) var uSampler: sampler;\n@group(1) @binding(0) var<uniform> kawaseBlurUniforms : KawaseBlurUniforms;\n\n@fragment\nfn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n) -> @location(0) vec4<f32> {\n let uOffset = kawaseBlurUniforms.uOffset;\n var color: vec4<f32> = vec4(0.0);\n\n // Sample top left pixel\n color += textureSample(uTexture, uSampler, clamp(vec2<f32>(uv.x - uOffset.x, uv.y + uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n // Sample top right pixel\n color += textureSample(uTexture, uSampler, clamp(vec2<f32>(uv.x + uOffset.x, uv.y + uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n // Sample bottom right pixel\n color += textureSample(uTexture, uSampler, clamp(vec2<f32>(uv.x + uOffset.x, uv.y - uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n // Sample bottom left pixel\n color += textureSample(uTexture, uSampler, clamp(vec2<f32>(uv.x - uOffset.x, uv.y - uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n // Average\n color *= 0.25;\n \n return color;\n}":"struct KawaseBlurUniforms {\n uOffset:vec2<f32>,\n};\n\n@group(0) @binding(1) var uTexture: texture_2d<f32>; \n@group(0) @binding(2) var uSampler: sampler;\n@group(1) @binding(0) var<uniform> kawaseBlurUniforms : KawaseBlurUniforms;\n\n@fragment\nfn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n) -> @location(0) vec4<f32> {\n let uOffset = kawaseBlurUniforms.uOffset;\n var color: vec4<f32> = vec4<f32>(0.0);\n\n // Sample top left pixel\n color += textureSample(uTexture, uSampler, vec2<f32>(uv.x - uOffset.x, uv.y + uOffset.y));\n // Sample top right pixel\n color += textureSample(uTexture, uSampler, vec2<f32>(uv.x + uOffset.x, uv.y + uOffset.y));\n // Sample bottom right pixel\n color += textureSample(uTexture, uSampler, vec2<f32>(uv.x + uOffset.x, uv.y - uOffset.y));\n // Sample bottom left pixel\n color += textureSample(uTexture, uSampler, vec2<f32>(uv.x - uOffset.x, uv.y - uOffset.y));\n // Average\n color *= 0.25;\n\n return color;\n}",entryPoint:"mainFragment"}}),glProgram:r.M2g.from({vertex:s,fragment:(null==h?void 0:h.clamp)?"\nprecision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\n\nuniform sampler2D uTexture;\nuniform vec2 uOffset;\n\nuniform vec4 uInputClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture(uTexture, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n\n // Sample top right pixel\n color += texture(uTexture, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n\n // Sample bottom right pixel\n color += texture(uTexture, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n\n // Sample bottom left pixel\n color += texture(uTexture, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n\n // Average\n color *= 0.25;\n\n finalColor = color;\n}\n":"\nin vec2 vTextureCoord;\nout vec4 finalColor;\n\nuniform sampler2D uTexture;\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture(uTexture, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture(uTexture, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture(uTexture, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture(uTexture, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n finalColor = color;\n}",name:"kawase-blur-filter"}),resources:{kawaseBlurUniforms:{uOffset:{value:new Float32Array(2),type:"vec2
49<f32>"}}}}),o(this,"uniforms"),o(this,"_pixelSize",{x:0,y:0}),o(this,"_clamp"),o(this,"_kernels",[]),o(this,"_blur"),o(this,"_quality"),this.uniforms=this.resources.kawaseBlurUniforms.uniforms,this.pixelSize=null!=(a=h.pixelSize)?a:{x:1,y:1},Array.isArray(h.strength)?this.kernels=h.strength:"number"==typeof h.strength&&(this._blur=h.strength,this.quality=null!=(l=h.quality)?l:3),this._clamp=!!h.clamp}};o(l,"DEFAULT_OPTIONS",{strength:4,quality:3,clamp:!1,pixelSize:{x:1,y:1}});var h=Object.defineProperty,u=(t,e,i)=>(((t,e,i)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),i);let d=class t extends r.dJT{apply(t,e,i,s){let n=r.Wny.getSameSizeTexture(e);t.applyFilter(this,e,n,!0),this._blurFilter.apply(t,n,i,s),this.shadowOnly||t.applyFilter(this._basePass,e,i,!1),r.Wny.returnTexture(n)}get offset(){return this.uniforms.uOffset}set offset(t){this.uniforms.uOffset=t,this._updatePadding()}get offsetX(){return this.offset.x}set offsetX(t){this.offset.x=t,this._updatePadding()}get offsetY(){return this.offset.y}set offsetY(t){this.offset.y=t,this._updatePadding()}get color(){return this._color.value}set color(t){this._color.setValue(t);let[e,i,r]=this._color.toArray();this.uniforms.uColor[0]=e,this.uniforms.uColor[1]=i,this.uniforms.uColor[2]=r}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get blur(){return this._blurFilter.strength}set blur(t){this._blurFilter.strength=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t,this._updatePadding()}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){"number"==typeof t&&(t={x:t,y:t}),Array.isArray(t)&&(t={x:t[0],y:t[1]}),this._blurFilter.pixelSize=t}get pixelSizeX(){return this._blurFilter.pixelSizeX}set pixelSizeX(t){this._blurFilter.pixelSizeX=t}get pixelSizeY(){return this._blurFilter.pixelSizeY}set pixelSizeY(t){this._blurFilter.pixelSizeY=t}_updatePadding(){let t=Math.max(Math.abs(this.offsetX),Math.abs(this.offsetY));this.padding=t+2*this.blur+4*this.quality}constructor(e){var i,a;e={...t.DEFAULT_OPTIONS,...e},super({gpuProgram:r.BrD.from({vertex:{source:n,entryPoint:"mainVertex"},fragment:{source:"struct DropShadowUniforms {\n uAlpha: f32,\n uColor: vec3<f32>,\n uOffset: vec2<f32>,\n};\n\nstruct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\n@group(0) @binding(1) var uTexture: texture_2d<f32>; \n@group(0) @binding(2) var uSampler: sampler;\n@group(1) @binding(0) var<uniform> dropShadowUniforms : DropShadowUniforms;\n\n@fragment\nfn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n) -> @location(0) vec4<f32> {\n var color: vec4<f32> = textureSample(uTexture, uSampler, uv - dropShadowUniforms.uOffset * gfu.uInputSize.zw);\n\n // Premultiply alpha\n color = vec4<f32>(vec3<f32>(dropShadowUniforms.uColor.rgb * color.a), color.a);\n // alpha user alpha\n color *= dropShadowUniforms.uAlpha;\n\n return color;\n}",entryPoint:"mainFragment"}}),glProgram:r.M2g.from({vertex:s,fragment:"precision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\n\nuniform sampler2D uTexture;\nuniform float uAlpha;\nuniform vec3 uColor;\nuniform vec2 uOffset;\n\nuniform vec4 uInputSize;\n\nvoid main(void){\n vec4 sample = texture(uTexture, vTextureCoord - uOffset * uInputSize.zw);\n\n // Premultiply alpha\n sample.rgb = uColor.rgb * sample.a;\n\n // alpha user alpha\n sample *= uAlpha;\n\n finalColor = sample;\n}",name:"drop-shadow-filter"}),resources:{dropShadowUniforms:{uAlpha:{value:e.alpha,type:"f32"},uColor:{value:new Float32Array(3),type:"vec3<f32>"},uOffset:{value:e.offset,type:"vec2<f32>"}}},resolution:e.resolution}),u(this,"uniforms"),u(this,"shadowOnly",!1),u(this,"_color"),u(this,"_blurFilter"),u(this,"_basePass"),this.uniforms=this.resources.dropShadowUniforms.uniforms,this._color=new r.Q1f,this.color=null!=(i=e.color)?i:0,this._blurFilter=new l({
49strength:null!=(a=e.kernels)?a:e.blur,quality:e.kernels?void 0:e.quality}),this._basePass=new r.dJT({gpuProgram:r.BrD.from({vertex:{source:n,entryPoint:"mainVertex"},fragment:{source:"\n @group(0) @binding(1) var uTexture: texture_2d<f32>; \n @group(0) @binding(2) var uSampler: sampler;\n @fragment\n fn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n ) -> @location(0) vec4<f32> {\n return textureSample(uTexture, uSampler, uv);\n }\n ",entryPoint:"mainFragment"}}),glProgram:r.M2g.from({vertex:s,fragment:"\n in vec2 vTextureCoord;\n out vec4 finalColor;\n uniform sampler2D uTexture;\n\n void main(void){\n finalColor = texture(uTexture, vTextureCoord);\n }\n ",name:"drop-shadow-filter"}),resources:{}}),Object.assign(this,e)}};u(d,"DEFAULT_OPTIONS",{offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:void 0,blur:2,quality:3,pixelSize:{x:1,y:1},resolution:1});let c=d},73552:(t,e,i)=>{"use strict";i.d(e,{T:()=>r});class r{constructor(t){this.resources=Object.create(null),this._dirty=!0;let e=0;for(let i in t){let r=t[i];this.setResource(r,e++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;let t=[],e=0;for(let i in this.resources)t[e++]=this.resources[i]._resourceId;this._key=t.join("|")}setResource(t,e){let i=this.resources[e];t!==i&&(i?.off?.("change",this.onResourceChange,this),t.on?.("change",this.onResourceChange,this),this.resources[e]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,e){let i=this.resources;for(let r in i)i[r]._gcLastUsed=t,i[r]._touched=e}destroy(){let t=this.resources;for(let e in t){let i=t[e];i?.off?.("change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}},74349:(t,e,i)=>{"use strict";i.d(e,{TO:()=>r,Td:()=>n,bO:()=>s});let r=2*Math.PI,s=180/Math.PI,n=Math.PI/180},74983:(t,e,i)=>{"use strict";i.d(e,{Ek:()=>n,lj:()=>s,t6:()=>o});let r=new Set,s="8.0.0",n="8.3.4",a={quiet:!1,noColor:!1},o=(t,e,i=3)=>{if(a.quiet||r.has(e))return;let s=Error().stack,n=`${e} 50Deprecated since v${t}`,o="function"==typeof console.groupCollapsed&&!a.noColor;void 0===s?console.warn("PixiJS Deprecation Warning: ",n):(s=s.split("\n").splice(i).join("\n"),o?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",n),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",n),console.warn(s))),r.add(e)};Object.defineProperties(o,{quiet:{get:()=>a.quiet,set:t=>{a.quiet=t},enumerable:!0,configurable:!1},noColor:{get:()=>a.noColor,set:t=>{a.noColor=t},enumerable:!0,configurable:!1}})},76363:(t,e,i)=>{"use strict";i.d(e,{n:()=>l});var r=i(5479),s=i(48036),n=i(74983);let a=Object.create(null),o=class t extends r.A{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...t.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){(0,n.t6)(n.lj,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}
50update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){let t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=function(t){let e=a[t];return void 0===e&&(a[t]=(0,s.L)("resource")),e}(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};o.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let l=o},77813:(t,e,i)=>{"use strict";i.d(e,{_:()=>f});var r=i(30214),s=i(92122),n=i(15744),a=i(58380),o=i(25687),l=i(48036),h=i(74983),u=i(715);let d=[{offset:0,color:"white"},{offset:1,color:"black"}],c=class t{constructor(...e){this.uid=(0,l.L)("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let i=function(t){let e=t[0]??{};return("number"==typeof e||t[1])&&((0,h.t6)("8.5.2","use options object instead"),e={type:"linear",start:{x:t[0],y:t[1]},end:{x:t[2],y:t[3]},textureSpace:t[4],textureSize:t[5]??f.defaultLinearOptions.textureSize}),e}(e);i={..."radial"===i.type?t.defaultRadialOptions:t.defaultLinearOptions,...(0,u.S)(i)},this._textureSize=i.textureSize,this._wrapMode=i.wrapMode,"radial"===i.type?(this.center=i.center,this.outerCenter=i.outerCenter??this.center,this.innerRadius=i.innerRadius,this.outerRadius=i.outerRadius,this.scale=i.scale,this.rotation=i.rotation):(this.start=i.start,this.end=i.end),this.textureSpace=i.textureSpace,this.type=i.type,i.colorStops.forEach(t=>{this.addColorStop(t.offset,t.color)})}addColorStop(t,e){return this.colorStops.push({offset:t,color:r.Q.shared.setValue(e).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:e}=this.start,{x:i,y:r}=this.end,s=i-t,l=r-e,h=s<0||l<0;if("clamp-to-edge"===this._wrapMode){if(s<0){let e=t;t=i,i=e,s*=-1}if(l<0){let t=e;e=r,r=t,l*=-1}}let u=this.colorStops.length?this.colorStops:d,c=this._textureSize,{canvas:f,context:g}=m(c,1),x=h?g.createLinearGradient(this._textureSize,0,0,0):g.createLinearGradient(0,0,this._textureSize,0);p(x,u),g.fillStyle=x,g.fillRect(0,0,c,1),this.texture=new o.g({source:new a.b({resource:f,addressMode:this._wrapMode})});let y=Math.sqrt(s*s+l*l),_=Math.atan2(l,s),b=new n.u;b.scale(y/c,1),b.rotate(_),b.translate(t,e),"local"===this.textureSpace&&b.scale(c,c),this.transform=b}buildGradient(){!this.texture&&this._tick++,"linear"===this.type?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let t=this.colorStops.length?this.colorStops:d,e=this._textureSize,{canvas:i,context:r}=m(e,e),{x:s,y:l}=this.center,{x:h,y:u}=this.outerCenter,c=this.innerRadius,f=this.outerRadius,g=h-f,x=u-f,y=e/(2*f),_=(s-g)*y,b=(l-x)*y,v=r.createRadialGradient(_,b,c*y,(h-g)*y,(u-x)*y,f*y);p(v,t),r.fillStyle=t[t.length-1].color,r.fillRect(0,0,e,e),r.fillStyle=v,r.translate(_,b),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-_,-b),r.fillRect(0,0,e,e),this.texture=new o.g({source:new a.b({resource:i,addressMode:this._wrapMode})});let w=new n.u;"local"===this.textureSpace?w.scale(2*f,2*f):w.scale(1/y,1/y),w.translate(g,x),this.transform=w}destroy(){this.texture?.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};c.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"},c.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,rotation:0,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let f=c;function p(t,e){for(let i=0;i<e.length;i++){let r=e[i];t.addColorStop(r.offset,r.color)}}function m(t,e){let i=s.e.get().createCanvas(t,e),r=i.getContext("2d");return{canvas:i,context:r}}},77878:(t,e)=>{"use strict";e.ConcurrentRoot=1,e.ContinuousEventPriority=8,e.DefaultEventPriority=32,e.DiscreteEventPriority=2},78514:(t,e,i)=>{"use strict";let r,s;i.d(e,{T:()=>Y});var n=i(5479),a=i(30214),o=i(15744),l=i(50508),h=i(25687),u=i(48036),d=i(74983),c=i(5341),f=i(59869);let p={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},m=/([astvzqmhlc])([^astvzqmhlc]*)/gi,g=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;var x=i(78773);class y{constructor(t=0,e=0,i=0){this.type="circle",this.x=t,this.y=e,this.radius=i}clone(){return new y(this.x,this.y,this.radius)}contains(t,e){if(this.radius<=0)return!1;let i=this.radius*this.radius,r=this.x-t,s=this.y-e;return r*=r,s*=s,r+s<=i}strokeContains(t,e,i,r=.5){if(0===this.radius)return!1;let s=this.x-t,n=this.y-e,a=this.radius,o=(1-r)*i,l=Math.sqrt(s*s+n*n);return l<=a+o&&l>a-(i-o)}getBounds(t){return t||(t=new x.M),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=2*this.radius,t.height=2*this.radius,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class _{constructor(t=0,e=0,i=0,r=0){this.type="ellipse",this.x=t,this.y=e,this.halfWidth=i,this.halfHeight=r}clone(){return new _(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,e){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(t-this.x)/this.halfWidth,r=(e-this.y)/this.halfHeight;return i*=i,r*=r,i+r<=1}strokeContains(t,e,i,r=.5){let{halfWidth:s,halfHeight:n}=this;if(s<=0||n<=0)return!1;let a=i*(1-r),o=i-a,l=s-o,h=n-o,u=s+a,d=n+a,c=t-this.x,f=e-this.y;return c*c/(l*l)+f*f/(h*h)>1&&c*c/(u*u)+f*f/(d*d)<=1}getBounds(t){return t||(t=new x.M),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=2*this.halfWidth,t.height=2*this.halfHeight,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}class b{constructor(...t){this.type="polygon";let e=Array.isArray(t[0])?t[0]:t;if("number"!=typeof e[0]){let t=[];for(let i=0,r=e.length;i<r;i++)t.push(e[i].x,e[i].y);e=t}this.points=e,this.closePath=!0}isClockwise(){let t=0,e=this.points,i=e.length;for(let r=0;r<i;r+=2){let s=e[r],n=e[r+1];t+=(e[(r+2)%i]-s)*(e[(r+3)%i]+n)}return t<0}containsPolygon(t){let e=this.getBounds(r),i=t.getBounds(s);if(!e.containsRect(i))return!1;let n=t.points;for(let t=0;t<n.length;t+=2){let e=n[t],i=n[t+1];if(!this.contains(e,i))return!1}return!0}clone(){let t=new b(this.points.slice());return t.closePath=this.closePath,t}contains(t,e){let i=!1,r=this.points.length/2;for(let s=0,n=r-1;s<r;n=s++){let r=this.points[2*s],a=this.points[2*s+1],o=this.points[2*n],l=this.points[2*n+1];a>e!=l>e&&t<(e-a)/(l-a)*(o-r)+r&&(i=!i)}return i}strokeContains(t,e,i,r=.5){let s=i*i,n=s*(1-r),a=s-n,{points:o}=this,l=o.length-2*!this.closePath;for(let i=0;i<l;i+=2){let r=o[i],s=o[i+1],l=o[(i+2)%o.length],h=o[(i+3)%o.length];
50if(function(t,e,i,r,s,n){let a,o,l=s-i,h=n-r,u=l*l+h*h,d=-1;0!==u&&(d=((t-i)*l+(e-r)*h)/u),d<0?(a=i,o=r):d>1?(a=s,o=n):(a=i+d*l,o=r+d*h);let c=t-a,f=e-o;return c*c+f*f}(t,e,r,s,l,h)<=(0>Math.sign((l-r)*(e-s)-(h-s)*(t-r))?a:n))return!0}return!1}getBounds(t){t||(t=new x.M);let e=this.points,i=1/0,r=-1/0,s=1/0,n=-1/0;for(let t=0,a=e.length;t<a;t+=2){let a=e[t],o=e[t+1];i=a<i?a:i,r=a>r?a:r,s=o<s?o:s,n=o>n?o:n}return t.x=i,t.width=r-i,t.y=s,t.height=n-s,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,e)=>`${t}, ${e}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return(0,d.t6)("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return(0,d.t6)("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}let v=(t,e,i,r,s,n,a)=>{let o=t-i,l=e-r,h=Math.sqrt(o*o+l*l);return h>=s-n&&h<=s+a};class w{constructor(t=0,e=0,i=0,r=0,s=20){this.type="roundedRectangle",this.x=t,this.y=e,this.width=i,this.height=r,this.radius=s}getBounds(t){return t||(t=new x.M),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new w(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){let i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(e>=this.y+i&&e<=this.y+this.height-i||t>=this.x+i&&t<=this.x+this.width-i)return!0;let r=t-(this.x+i),s=e-(this.y+i),n=i*i;if(r*r+s*s<=n||(r=t-(this.x+this.width-i))*r+s*s<=n||r*r+(s=e-(this.y+this.height-i))*s<=n||(r=t-(this.x+i))*r+s*s<=n)return!0}return!1}strokeContains(t,e,i,r=.5){let{x:s,y:n,width:a,height:o,radius:l}=this,h=i*(1-r),u=i-h,d=s+l,c=n+l,f=a-2*l,p=o-2*l,m=s+a,g=n+o;return(t>=s-h&&t<=s+u||t>=m-u&&t<=m+h)&&e>=c&&e<=c+p||(e>=n-h&&e<=n+u||e>=g-u&&e<=g+h)&&t>=d&&t<=d+f||t<d&&e<c&&v(t,e,d,c,l,u,h)||t>m-l&&e<c&&v(t,e,m-l,c,l,u,h)||t>m-l&&e>g-l&&v(t,e,m-l,g-l,l,u,h)||t<d&&e>g-l&&v(t,e,d,g-l,l,u,h)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}var S=i(22027);function C(t,e,i,r,s,n,a,o,l,h){var u,d,c;let f=(1-Math.min(.99,Math.max(0,h??S.GH.defaultOptions.bezierSmoothness)))/1;return f*=f,function t(e,i,r,s,n,a,o,l,h,u,d){if(d>8)return;let c=(e+r)/2,f=(i+s)/2,p=(r+n)/2,m=(s+a)/2,g=(n+o)/2,x=(a+l)/2,y=(c+p)/2,_=(f+m)/2,b=(p+g)/2,v=(m+x)/2,w=(y+b)/2,S=(_+v)/2;if(d>0){let t=o-e,d=l-i,c=Math.abs((r-o)*d-(s-l)*t),f=Math.abs((n-o)*d-(a-l)*t);if(c>11920929e-14&&f>11920929e-14){if((c+f)*(c+f)<=u*(t*t+d*d))return void h.push(w,S)}else if(c>11920929e-14){if(c*c<=u*(t*t+d*d))return void h.push(w,S)}else if(f>11920929e-14){if(f*f<=u*(t*t+d*d))return void h.push(w,S)}else if((t=w-(e+o)/2)*t+(d=S-(i+l)/2)*d<=u)return void h.push(w,S)}t(e,i,c,f,y,_,w,S,h,u,d+1),t(w,S,b,v,g,x,o,l,h,u,d+1)}(e,i,r,s,n,a,u=o,d=l,c=t,f,0),c.push(u,d),t}function T(t,e,i,r,s,n,a,o){let l=Math.abs(s-n);!a&&s>n?l=2*Math.PI-l:a&&n>s&&(l=2*Math.PI-l),o||(o=Math.max(6,Math.floor(6*Math.pow(r,1/3)*(l/Math.PI))));let h=l/(o=Math.max(o,3)),u=s;h*=a?-1:1;for(let s=0;s<o+1;s++){let s=e+Math.cos(u)*r,n=i+Math.sin(u)*r;t.push(s,n),u+=h}}let A=2*Math.PI,M={centerX:0,centerY:0,ang1:0,ang2:0},P=({x:t,y:e},i,r,s,n,a,o,l)=>{let h=s*(t*=i)-n*(e*=r),u=n*t+s*e;return l.x=h+a,l.y=u+o,l},k=(t,e,i,r)=>{let s=t*i+e*r;return s>1&&(s=1),s<-1&&(s=-1),(t*r-e*i<0?-1:1)*Math.acos(s)},E=new x.M;class I{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new c.c,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,e){return this.startPoly(t,e),this}lineTo(t,e){this._ensurePoly();let i=this._currentPoly.points,r=i[i.length-2],s=i[i.length-1];return(r!==t||s!==e)&&i.push(t,e),this}arc(t,e,i,r,s,n){return this._ensurePoly(!1),T(this._currentPoly.points,t,e,i,r,s,n),this}
50arcTo(t,e,i,r,s){return this._ensurePoly(),!function(t,e,i,r,s,n){let a=t[t.length-2],o=t[t.length-1]-i,l=a-e,h=s-i,u=r-e,d=Math.abs(o*u-l*h);if(d<1e-8||0===n){(t[t.length-2]!==e||t[t.length-1]!==i)&&t.push(e,i);return}let c=o*o+l*l,f=h*h+u*u,p=o*h+l*u,m=n*Math.sqrt(c)/d,g=n*Math.sqrt(f)/d,x=m*p/c,y=g*p/f,_=m*u+g*l,b=m*h+g*o,v=Math.atan2(o*(g+x)-b,l*(g+x)-_),w=Math.atan2(h*(m+y)-b,u*(m+y)-_);T(t,_+e,b+i,n,v,w,l*h>u*o)}(this._currentPoly.points,t,e,i,r,s),this}arcToSvg(t,e,i,r,s,n,a){return!function(t,e,i,r,s,n,a,o=0,l=0,h=0){if(0===n||0===a)return;let u=Math.sin(o*A/360),d=Math.cos(o*A/360),c=d*(e-r)/2+u*(i-s)/2,f=-u*(e-r)/2+d*(i-s)/2;if(0===c&&0===f)return;let p=Math.pow(c,2)/Math.pow(n=Math.abs(n),2)+Math.pow(f,2)/Math.pow(a=Math.abs(a),2);p>1&&(n*=Math.sqrt(p),a*=Math.sqrt(p)),((t,e,i,r,s,n,a,o,l,h,u,d,c)=>{let f=Math.pow(s,2),p=Math.pow(n,2),m=Math.pow(u,2),g=Math.pow(d,2),x=f*p-f*g-p*m;x<0&&(x=0),x/=f*g+p*m;let y=(x=Math.sqrt(x)*(a===o?-1:1))*s/n*d,_=-(x*n)/s*u,b=(u-y)/s,v=(d-_)/n,w=k(1,0,b,v),S=k(b,v,(-u-y)/s,(-d-_)/n);0===o&&S>0&&(S-=A),1===o&&S<0&&(S+=A),c.centerX=h*y-l*_+(t+i)/2,c.centerY=l*y+h*_+(e+r)/2,c.ang1=w,c.ang2=S})(e,i,r,s,n,a,l,h,u,d,c,f,M);let{ang1:m,ang2:g}=M,{centerX:x,centerY:y}=M,_=Math.abs(g)/(A/4);1e-7>Math.abs(1-_)&&(_=1);let b=Math.max(Math.ceil(_),1);g/=b;let v=t[t.length-2],w=t[t.length-1],S={x:0,y:0};for(let e=0;e<b;e++){let e=function(t,e){let i=-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),r=1.5707963267948966===e?.551915024494:i,s=Math.cos(t),n=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:s-n*r,y:n+s*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]}(m,g),{x:i,y:r}=P(e[0],n,a,d,u,x,y,S),{x:s,y:o}=P(e[1],n,a,d,u,x,y,S),{x:l,y:h}=P(e[2],n,a,d,u,x,y,S);C(t,v,w,i,r,s,o,l,h),v=l,w=h,m+=g}}(this._currentPoly.points,this._currentPoly.lastX,this._currentPoly.lastY,n,a,t,e,i,r,s),this}bezierCurveTo(t,e,i,r,s,n,a){this._ensurePoly();let o=this._currentPoly;return C(this._currentPoly.points,o.lastX,o.lastY,t,e,i,r,s,n,a),this}quadraticCurveTo(t,e,i,r,s){var n,a,o,l,h,u,d,c,f,p,m;let g;this._ensurePoly();let x=this._currentPoly;return n=this._currentPoly.points,a=x.lastX,o=x.lastY,g=(1-Math.min(.99,Math.max(0,s??S.GH.defaultOptions.bezierSmoothness)))/1,l=a,h=o,u=t,d=e,c=i,f=r,p=n,m=g*=g,function t(e,i,r,s,n,a,o,l,h){if(h>8)return;let u=(i+s)/2,d=(r+n)/2,c=(s+a)/2,f=(n+o)/2,p=(u+c)/2,m=(d+f)/2,g=a-i,x=o-r,y=Math.abs((s-a)*x-(n-o)*g);if(y>11920929e-14){if(y*y<=l*(g*g+x*x))return void e.push(p,m)}else if((g=p-(i+a)/2)*g+(x=m-(r+o)/2)*x<=l)return void e.push(p,m);t(e,i,r,u,d,p,m,l,h+1),t(e,p,m,c,f,a,o,l,h+1)}(p,l,h,u,d,c,f,m,0),p.push(c,f),this}closePath(){return this.endPoly(!0),this}addPath(t,e){this.endPoly(),e&&!e.isIdentity()&&(t=t.clone(!0)).transform(e);let i=this.shapePrimitives,r=i.length;for(let e=0;e<t.instructions.length;e++){let i=t.instructions[e];this[i.action](...i.data)}if(t.checkForHoles&&i.length-r>1){let t=null;for(let e=r;e<i.length;e++){let r=i[e];if("polygon"===r.shape.type){let s=r.shape,n=t?.shape;n&&n.containsPolygon(s)?(t.holes||(t.holes=[]),t.holes.push(r),i.copyWithin(e,e+1),i.length--,e--):t=r}}}return this}finish(t=!1){this.endPoly(t)}rect(t,e,i,r,s){return this.drawShape(new x.M(t,e,i,r),s),this}circle(t,e,i,r){return this.drawShape(new y(t,e,i),r),this}poly(t,e,i){let r=new b(t);return r.closePath=e,this.drawShape(r,i),this}regularPoly(t,e,i,r,s=0,n){let a=-1*Math.PI/2+s,o=2*Math.PI/(r=Math.max(0|r,3)),l=[];for(let s=0;s<r;s++){let r=a-s*o;l.push(t+i*Math.cos(r),e+i*Math.sin(r))}return this.poly(l,!0,n),this}roundPoly(t,e,i,r,s,n=0,a){if(r=Math.max(0|r,3),s<=0)return this.regularPoly(t,e,i,r,n);s=Math.min(s,i*Math.sin(Math.PI/r)-.001);let o=-1*Math.PI/2+n,l=2*Math.PI/r,h=(r-2)*Math.PI/r/2;for(let n=0;n<r;n++){let r=n*l+o,u=t+i*Math.cos(r),d=e+i*Math.sin(r),c=r+Math.PI+h,f=r-Math.PI-h,p=u+s*Math.cos(c),m=d+s*Math.sin(c),g=u+s*Math.cos(f),x=d+s*Math.sin(f);0===n?this.moveTo(p,m):this.lineTo(p,m),this.quadraticCurveTo(u,d,g,x,a)}return this.closePath()}roundShape(t,e,i=!1,r){return t.length<3?this:(i?!function(t,e,i,r){let s=(t,e)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),n=(t,e,i)=>({x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}),a=e.length;for(let o=0;o<a;o++){let l,h,u=e[(o+1)%a],d=u.radius??i;if(d<=0){0===o?t.moveTo(u.x,u.y):t.lineTo(u.x,u.y);continue}let c=e[o],f=e[(o+2)%a],p=s(c,u);l=p<1e-4?u:n(u,c,Math.min(p/2,d)/p);let m=s(f,u);h=m<1e-4?u:n(u,f,Math.min(m/2,d)/m),0===o?t.moveTo(l.x,l.y):t.lineTo(l.x,l.y),t.quadraticCurveTo(u.x,u.y,h.x,h.y,r)}}
50(this,t,e,r):!function(t,e,i){let r=(t,e)=>{let i=e.x-t.x,r=e.y-t.y,s=Math.sqrt(i*i+r*r);return{len:s,nx:i/s,ny:r/s}},s=(e,i)=>{0===e?t.moveTo(i.x,i.y):t.lineTo(i.x,i.y)},n=e[e.length-1];for(let a=0;a<e.length;a++){let o,l=e[a%e.length],h=l.radius??i;if(h<=0){s(a,l),n=l;continue}let u=e[(a+1)%e.length],d=r(l,n),c=r(l,u);if(d.len<1e-4||c.len<1e-4){s(a,l),n=l;continue}let f=Math.asin(d.nx*c.ny-d.ny*c.nx),p=1,m=!1;d.nx*c.nx- -(d.ny*c.ny)<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,m=!0):f>0&&(p=-1,m=!0);let g=f/2,x=Math.abs(Math.cos(g)*h/Math.sin(g));o=x>Math.min(d.len/2,c.len/2)?Math.abs((x=Math.min(d.len/2,c.len/2))*Math.sin(g)/Math.cos(g)):h;let y=l.x+c.nx*x+-c.ny*o*p,_=l.y+c.ny*x+c.nx*o*p,b=Math.atan2(d.ny,d.nx)+Math.PI/2*p,v=Math.atan2(c.ny,c.nx)-Math.PI/2*p;0===a&&t.moveTo(y+Math.cos(b)*o,_+Math.sin(b)*o),t.arc(y,_,o,b,v,m),n=l}}(this,t,e),this.closePath())}filletRect(t,e,i,r,s){if(0===s)return this.rect(t,e,i,r);let n=Math.min(i,r)/2,a=Math.min(n,Math.max(-n,s)),o=t+i,l=e+r,h=a<0?-a:0,u=Math.abs(a);return this.moveTo(t,e+u).arcTo(t+h,e+h,t+u,e,u).lineTo(o-u,e).arcTo(o-h,e+h,o,e+u,u).lineTo(o,l-u).arcTo(o-h,l-h,t+i-u,l,u).lineTo(t+u,l).arcTo(t+h,l-h,t,l-u,u).closePath()}chamferRect(t,e,i,r,s,n){if(s<=0)return this.rect(t,e,i,r);let a=Math.min(s,Math.min(i,r)/2),o=t+i,l=e+r,h=[t+a,e,o-a,e,o,e+a,o,l-a,o-a,l,t+a,l,t,l-a,t,e+a];for(let t=h.length-1;t>=2;t-=2)h[t]===h[t-2]&&h[t-1]===h[t-3]&&h.splice(t-1,2);return this.poly(h,!0,n)}ellipse(t,e,i,r,s){return this.drawShape(new _(t,e,i,r),s),this}roundRect(t,e,i,r,s,n){return this.drawShape(new w(t,e,i,r,s),n),this}drawShape(t,e){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:e}),this}startPoly(t,e){let i=this._currentPoly;return i&&this.endPoly(),(i=new b).points.push(t,e),this._currentPoly=i,this}endPoly(t=!1){let e=this._currentPoly;return e&&e.points.length>2&&(e.closePath=t,this.shapePrimitives.push({shape:e})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new b,t)){let t=this.shapePrimitives[this.shapePrimitives.length-1];if(t){let e=t.shape.x,i=t.shape.y;if(t.transform&&!t.transform.isIdentity()){let r=t.transform,s=e;e=r.a*e+r.c*i+r.tx,i=r.b*s+r.d*i+r.ty}this._currentPoly.points.push(e,i)}else this._currentPoly.points.push(0,0)}}buildPath(){let t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let e=0;e<t.instructions.length;e++){let i=t.instructions[e];this[i.action](...i.data)}this.finish()}get bounds(){let t=this._bounds;t.clear();let e=this.shapePrimitives;for(let i=0;i<e.length;i++){let r=e[i],s=r.shape.getBounds(E);r.transform?t.addRect(s,r.transform):t.addRect(s)}return t}}class R{constructor(t,e=!1){this.instructions=[],this.uid=(0,u.L)("graphicsPath"),this._dirty=!0,this.checkForHoles=e,"string"==typeof t?function(t,e){let i=function(t){let e=[];return t.replace(m,(t,i,r)=>{let s=i.toLowerCase(),n=i,a=function(t){let e=t.match(g);return e?e.map(Number):[]}(r);for("m"===s&&a.length>2&&(e.push([n,...a.splice(0,2)]),s="l",n="m"===n?"l":"L");;){if(a.length===p[s])return e.push([n,...a]),"";if(a.length<p[s])throw Error("malformed path data");e.push([n,...a.splice(0,p[s])])}}),e}(t),r=[],s=null,n=0,a=0;for(let t=0;t<i.length;t++){let o=i[t],l=o[0];switch(l){case"M":n=o[1],a=o[2],e.moveTo(n,a);break;case"m":n+=o[1],a+=o[2],e.moveTo(n,a);break;case"H":n=o[1],e.lineTo(n,a);break;case"h":n+=o[1],e.lineTo(n,a);break;case"V":a=o[1],e.lineTo(n,a);break;case"v":a+=o[1],e.lineTo(n,a);break;case"L":n=o[1],a=o[2],e.lineTo(n,a);break;case"l":n+=o[1],a+=o[2],e.lineTo(n,a);break;case"C":n=o[5],a=o[6],e.bezierCurveTo(o[1],o[2],o[3],o[4],n,a);break;case"c":e.bezierCurveTo(n+o[1],a+o[2],n+o[3],a+o[4],n+o[5],a+o[6]),n+=o[5],a+=o[6];break;case"S":n=o[3],a=o[4],e.bezierCurveToShort(o[1],o[2],n,a);break;case"s":e.bezierCurveToShort(n+o[1],a+o[2],n+o[3],a+o[4]),n+=o[3],a+=o[4];break;case"Q":n=o[3],a=o[4],e.quadraticCurveTo(o[1],o[2],n,a);break;case"q":e.quadraticCurveTo(n+o[1],a+o[2],n+o[3],a+o[4]),n+=o[3],a+=o[4];break;case"T":n=o[1],a=o[2],e.quadraticCurveToShort(n,a);break;case"t":n+=o[1],a+=o[2],e.quadraticCurveToShort(n,a);break;case"A":n=o[6],a=o[7],e.arcToSvg(o[1],o[2],o[3],o[4],o[5],n,a);break;case"a":n+=o[6],a+=o[7],e.arcToSvg(o[1],o[2],o[3],o[4],o[5],n,a);break;case"Z":case"z":e.closePath(),r.length>0&&((s=r.pop())?(n=s.startX,a=s.startY):(n=0,a=0)),s=null;break;default:(0,f.R)(`Unknown SVG path command: ${l}`)}"Z"!==l&&"z"!==l&&null===s&&(s={startX:n,startY:a},r.push(s))}}(t,this):this.instructions=t?.slice()??[]}get shapePath(){return this._shapePath||(this._shapePath=new I(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,e){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,e]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,e,i,r,s){let n=this.instructions[this.instructions.length-1],a=this.getLastPoint(l.b.shared),o=0,h=0;if(n&&"bezierCurveTo"===n.action){o=n.data[2],h=n.data[3];let t=a.x,e=a.y;o=t+(t-o),h=e+(e-h)}else o=a.x,h=a.y;return this.instructions.push({action:"bezierCurveTo",data:[o,h,t,e,i,r,s]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,e,i){let r=this.instructions[this.instructions.length-1],s=this.getLastPoint(l.b.shared),n=0,a=0;if(r&&"quadraticCurveTo"===r.action){n=r.data[0],a=r.data[1];let t=s.x,e=s.y;n=t+(t-n),a=e+(e-a)}else n=s.x,a=s.y;return this.instructions.push({action:"quadraticCurveTo",data:[n,a,t,e,i]}),this._dirty=!0,this}rect(t,e,i,r,s){return this.instructions.push({action:"rect",data:[t,e,i,r,s]}),this._dirty=!0,this}circle(t,e,i,r){return this.instructions.push({action:"circle",data:[t,e,i,r]}),this._dirty=!0,this}
50roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,e,i,r,s,n,a){s||(s=r/2);let o=-1*Math.PI/2+n,l=2*i,h=2*Math.PI/l,u=[];for(let i=0;i<l;i++){let n=i%2?s:r,a=i*h+o;u.push(t+n*Math.cos(a),e+n*Math.sin(a))}return this.poly(u,!0,a),this}clone(t=!1){let e=new R;if(e.checkForHoles=this.checkForHoles,t)for(let t=0;t<this.instructions.length;t++){let i=this.instructions[t];e.instructions.push({action:i.action,data:i.data.slice()})}else e.instructions=this.instructions.slice();return e}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;let e=t.a,i=t.b,r=t.c,s=t.d,n=t.tx,a=t.ty,o=0,l=0,h=0,u=0,d=0,c=0,p=0,m=0;for(let g=0;g<this.instructions.length;g++){let x=this.instructions[g],y=x.data;switch(x.action){case"moveTo":case"lineTo":o=y[0],l=y[1],y[0]=e*o+r*l+n,y[1]=i*o+s*l+a;break;case"bezierCurveTo":h=y[0],u=y[1],d=y[2],c=y[3],o=y[4],l=y[5],y[0]=e*h+r*u+n,y[1]=i*h+s*u+a,y[2]=e*d+r*c+n,y[3]=i*d+s*c+a,y[4]=e*o+r*l+n,y[5]=i*o+s*l+a;break;case"quadraticCurveTo":h=y[0],u=y[1],o=y[2],l=y[3],y[0]=e*h+r*u+n,y[1]=i*h+s*u+a,y[2]=e*o+r*l+n,y[3]=i*o+s*l+a;break;case"arcToSvg":o=y[5],l=y[6],p=y[0],m=y[1],y[0]=e*p+r*m,y[1]=i*p+s*m,y[5]=e*o+r*l+n,y[6]=i*o+s*l+a;break;case"circle":y[4]=O(y[3],t);break;case"rect":y[4]=O(y[4],t);break;case"ellipse":y[8]=O(y[8],t);break;case"roundRect":case"regularPoly":case"chamferRect":y[5]=O(y[5],t);break;case"addPath":y[0].transform(t);break;case"poly":y[2]=O(y[2],t);break;case"closePath":break;default:(0,f.R)("unknown transform action",x.action)}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let e=this.instructions.length-1,i=this.instructions[e];if(!i)return t.x=0,t.y=0,t;for(;"closePath"===i.action;){if(--e<0)return t.x=0,t.y=0,t;i=this.instructions[e]}switch(i.action){case"moveTo":case"lineTo":t.x=i.data[0],t.y=i.data[1];break;case"quadraticCurveTo":t.x=i.data[2],t.y=i.data[3];break;case"bezierCurveTo":t.x=i.data[4],t.y=i.data[5];break;case"arc":case"arcToSvg":t.x=i.data[5],t.y=i.data[6];break;case"addPath":i.data[0].getLastPoint(t)}return t}}function O(t,e){return t?t.prepend(e):e.clone()}var F=i(77813);function z(t,e,i){let r=t.getAttribute(e);return r?Number(r):i}function B(t){let e=t.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return e?e[1]:""}let G={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function D(t,e){let i=t.getAttribute("style"),r={},s={},n={strokeStyle:r,fillStyle:s,useFill:!1,useStroke:!1};for(let i in G){let r=t.getAttribute(i);r&&U(e,n,i,r.trim())}if(i){let t=i.split(";");for(let i=0;i<t.length;i++){let[r,s]=t[i].trim().split(":");G[r]&&U(e,n,r,s.trim())}}return{strokeStyle:n.useStroke?r:null,fillStyle:n.useFill?s:null,useFill:n.useFill,useStroke:n.useStroke}}function U(t,e,i,r){switch(i){case"stroke":if("none"!==r){if(r.startsWith("url(")){let i=B(r);e.strokeStyle.fill=t.defs[i]}else e.strokeStyle.color=a.Q.shared.setValue(r).toNumber();e.useStroke=!0}break;case"stroke-width":e.strokeStyle.width=Number(r);break;case"fill":if("none"!==r){if(r.startsWith("url(")){let i=B(r);e.fillStyle.fill=t.defs[i]}else e.fillStyle.color=a.Q.shared.setValue(r).toNumber();e.useFill=!0}break;case"fill-opacity":e.fillStyle.alpha=Number(r);break;case"stroke-opacity":e.strokeStyle.alpha=Number(r);break;case"opacity":e.fillStyle.alpha=Number(r),e.strokeStyle.alpha=Number(r)}}function L(t,e){for(let i of new R(t,!1).instructions)e.instructions.push(i)}var j=i(88335);let V=new l.b,X=new o.u,N=class t extends n.A{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=(0,u.L)("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new R,this._transform=new o.u,this._fillStyle={...t.defaultFillStyle},this._strokeStyle={...t.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new c.c,this._boundsDirty=!0}clone(){let e=new t;return e.batchMode=this.batchMode,e.instructions=this.instructions.slice(),e._activePath=this._activePath.clone(),e._transform=this._transform.clone(),e._fillStyle={...this._fillStyle},e._strokeStyle={...this._strokeStyle},e._stateStack=this._stateStack.slice(),e._bounds=this._bounds.clone(),e._boundsDirty=!0,e}get fillStyle(){return this._fillStyle}set fillStyle(e){this._fillStyle=(0,j.w)(e,t.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(e){this._strokeStyle=(0,j.T)(e,t.defaultStrokeStyle)}
50setFillStyle(e){return this._fillStyle=(0,j.w)(e,t.defaultFillStyle),this}setStrokeStyle(e){return this._strokeStyle=(0,j.w)(e,t.defaultStrokeStyle),this}texture(t,e,i,r,s,n){return this.instructions.push({action:"texture",data:{image:t,dx:i||0,dy:r||0,dw:s||t.frame.width,dh:n||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:e||0===e?a.Q.shared.setValue(e).toNumber():0xffffff}}),this.onUpdate(),this}beginPath(){return this._activePath=new R,this}fill(e,i){let r,s=this.instructions[this.instructions.length-1];return(r=0===this._tick&&s?.action==="stroke"?s.data.path:this._activePath.clone())&&(null!=e&&(void 0!==i&&"number"==typeof e&&((0,d.t6)(d.lj,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),e={color:e,alpha:i}),this._fillStyle=(0,j.w)(e,t.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0),this}_initNextPathLocation(){let{x:t,y:e}=this._activePath.getLastPoint(l.b.shared);this._activePath.clear(),this._activePath.moveTo(t,e)}stroke(e){let i,r=this.instructions[this.instructions.length-1];return(i=0===this._tick&&r?.action==="fill"?r.data.path:this._activePath.clone())&&(null!=e&&(this._strokeStyle=(0,j.T)(e,t.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:i}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0),this}cut(){for(let t=0;t<2;t++){let e=this.instructions[this.instructions.length-1-t],i=this._activePath.clone();if(e&&("stroke"===e.action||"fill"===e.action))if(e.data.hole)e.data.hole.addPath(i);else{e.data.hole=i;break}}return this._initNextPathLocation(),this}arc(t,e,i,r,s,n){this._tick++;let a=this._transform;return this._activePath.arc(a.a*t+a.c*e+a.tx,a.b*t+a.d*e+a.ty,i,r,s,n),this}arcTo(t,e,i,r,s){this._tick++;let n=this._transform;return this._activePath.arcTo(n.a*t+n.c*e+n.tx,n.b*t+n.d*e+n.ty,n.a*i+n.c*r+n.tx,n.b*i+n.d*r+n.ty,s),this}arcToSvg(t,e,i,r,s,n,a){this._tick++;let o=this._transform;return this._activePath.arcToSvg(t,e,i,r,s,o.a*n+o.c*a+o.tx,o.b*n+o.d*a+o.ty),this}bezierCurveTo(t,e,i,r,s,n,a){this._tick++;let o=this._transform;return this._activePath.bezierCurveTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*i+o.c*r+o.tx,o.b*i+o.d*r+o.ty,o.a*s+o.c*n+o.tx,o.b*s+o.d*n+o.ty,a),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(t,e,i,r){return this._tick++,this._activePath.ellipse(t,e,i,r,this._transform.clone()),this}circle(t,e,i){return this._tick++,this._activePath.circle(t,e,i,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,e){this._tick++;let i=this._transform;return this._activePath.lineTo(i.a*t+i.c*e+i.tx,i.b*t+i.d*e+i.ty),this}moveTo(t,e){this._tick++;let i=this._transform,r=this._activePath.instructions,s=i.a*t+i.c*e+i.tx,n=i.b*t+i.d*e+i.ty;return 1===r.length&&"moveTo"===r[0].action?(r[0].data[0]=s,r[0].data[1]=n):this._activePath.moveTo(s,n),this}quadraticCurveTo(t,e,i,r,s){this._tick++;let n=this._transform;return this._activePath.quadraticCurveTo(n.a*t+n.c*e+n.tx,n.b*t+n.d*e+n.ty,n.a*i+n.c*r+n.tx,n.b*i+n.d*r+n.ty,s),this}rect(t,e,i,r){return this._tick++,this._activePath.rect(t,e,i,r,this._transform.clone()),this}roundRect(t,e,i,r,s){return this._tick++,this._activePath.roundRect(t,e,i,r,s,this._transform.clone()),this}poly(t,e){return this._tick++,this._activePath.poly(t,e,this._transform.clone()),this}regularPoly(t,e,i,r,s=0,n){return this._tick++,this._activePath.regularPoly(t,e,i,r,s,n),this}roundPoly(t,e,i,r,s,n){return this._tick++,this._activePath.roundPoly(t,e,i,r,s,n),this}roundShape(t,e,i,r){return this._tick++,this._activePath.roundShape(t,e,i,r),this}filletRect(t,e,i,r,s){return this._tick++,this._activePath.filletRect(t,e,i,r,s),this}chamferRect(t,e,i,r,s,n){return this._tick++,this._activePath.chamferRect(t,e,i,r,s,n),this}star(t,e,i,r,s=0,n=0){return this._tick++,this._activePath.star(t,e,i,r,s,n,this._transform.clone()),this}svg(t){return this._tick++,!function(t,e){if("string"==typeof t){let e=document.createElement("div");e.innerHTML=t.trim(),t=e.querySelector("svg")}let i={context:e,defs:{},path:new R};!function(t,e){let i=t.querySelectorAll("defs");for(let t=0;t<i.length;t++){let s=i[t];for(let t=0;t<s.children.length;t++){let i=s.children[t];switch(i.nodeName.toLowerCase()){case"lineargradient":e.defs[i.id]=function(t){let e=z(t,"x1",0),i=z(t,"y1",0),r=z(t,"x2",1),s=z(t,"y2",0),n=t.getAttribute("gradientUnits")||"objectBoundingBox",o=new F._(e,i,r,s,"objectBoundingBox"===n?"local":"global");for(let e=0;e<t.children.length;e++){let i=t.children[e],r=z(i,"offset",0),s=a.Q.shared.setValue(i.getAttribute("stop-color")).toNumber();o.addColorStop(r,s)}return o}(i);break;case"radialgradient":var r;e.defs[i.id]=(r=0,(0,f.R)("[SVG Parser] Radial gradients are not yet supported"),new F._(0,0,1,0))}}}}(t,i);let r=t.children,{fillStyle:s,strokeStyle:n}=D(t,i);for(let t=0;t<r.length;t++){let e=r[t];
50"defs"!==e.nodeName.toLowerCase()&&function t(e,i,r,s){let n,a,o,l,h,u,d,c,p,m,g,x,y,_,b,v,w=e.children,{fillStyle:S,strokeStyle:C}=D(e,i);S&&r?r={...r,...S}:S&&(r=S),C&&s?s={...s,...C}:C&&(s=C);let T=!r&&!s;switch(T&&(r={color:0}),e.nodeName.toLowerCase()){case"path":{y=e.getAttribute("d");let t=e.getAttribute("fill-rule"),n=y.split(/(?=[Mm])/).filter(t=>t.trim().length>0),a=n.length>1;if("evenodd"===t&&a){let t=n.map(t=>({path:t,area:function(t){let e=t.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!e||e.length<4)return 0;let i=e.map(Number),r=[],s=[];for(let t=0;t<i.length;t+=2)t+1<i.length&&(r.push(i[t]),s.push(i[t+1]));if(0===r.length||0===s.length)return 0;let n=Math.min(...r),a=Math.min(...s);return(Math.max(...r)-n)*(Math.max(...s)-a)}(t)}));if(t.sort((t,e)=>e.area-t.area),n.length>3||!function(t){if(t.length<=2)return!0;let e=t.map(t=>t.area).sort((t,e)=>e-t),[i,r]=e,s=e[e.length-1];return!(i/r>3)||!(r/s<2)}(t))for(let e=0;e<t.length;e++){let n=t[e],a=0===e;i.context.beginPath();let o=new R(void 0,!0);L(n.path,o),i.context.path(o),a?(r&&i.context.fill(r),s&&i.context.stroke(s)):i.context.cut()}else for(let e=0;e<t.length;e++){let n=t[e],a=e%2==1;i.context.beginPath();let o=new R(void 0,!0);L(n.path,o),i.context.path(o),a?i.context.cut():(r&&i.context.fill(r),s&&i.context.stroke(s))}}else _=new R(y,!t||"evenodd"===t),i.context.path(_),r&&i.context.fill(r),s&&i.context.stroke(s);break}case"circle":d=z(e,"cx",0),c=z(e,"cy",0),p=z(e,"r",0),i.context.ellipse(d,c,p,p),r&&i.context.fill(r),s&&i.context.stroke(s);break;case"rect":n=z(e,"x",0),a=z(e,"y",0),b=z(e,"width",0),v=z(e,"height",0),m=z(e,"rx",0),g=z(e,"ry",0),m||g?i.context.roundRect(n,a,b,v,m||g):i.context.rect(n,a,b,v),r&&i.context.fill(r),s&&i.context.stroke(s);break;case"ellipse":d=z(e,"cx",0),c=z(e,"cy",0),m=z(e,"rx",0),g=z(e,"ry",0),i.context.beginPath(),i.context.ellipse(d,c,m,g),r&&i.context.fill(r),s&&i.context.stroke(s);break;case"line":o=z(e,"x1",0),l=z(e,"y1",0),h=z(e,"x2",0),u=z(e,"y2",0),i.context.beginPath(),i.context.moveTo(o,l),i.context.lineTo(h,u),s&&i.context.stroke(s);break;case"polygon":x=e.getAttribute("points").match(/-?\d+/g).map(t=>parseInt(t,10)),i.context.poly(x,!0),r&&i.context.fill(r),s&&i.context.stroke(s);break;case"polyline":x=e.getAttribute("points").match(/-?\d+/g).map(t=>parseInt(t,10)),i.context.poly(x,!1),s&&i.context.stroke(s);break;case"g":case"svg":break;default:(0,f.R)(`[SVG parser] <${e.nodeName}> elements unsupported`)}T&&(r=null);for(let e=0;e<w.length;e++)t(w[e],i,r,s)}(e,i,s,n)}}(t,this),this}restore(){let t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,e=t){return this._transform.scale(t,e),this}setTransform(t,e,i,r,s,n){return t instanceof o.u?this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty):this._transform.set(t,e,i,r,s,n),this}transform(t,e,i,r,s,n){return t instanceof o.u?this._transform.append(t):(X.set(t,e,i,r,s,n),this._transform.append(X)),this}translate(t,e=t){return this._transform.translate(t,e),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;let t=this._bounds;t.clear();for(let e=0;e<this.instructions.length;e++){let i=this.instructions[e],r=i.action;if("fill"===r){let e=i.data;t.addBounds(e.path.bounds)}else if("texture"===r){let e=i.data;t.addFrame(e.dx,e.dy,e.dx+e.dw,e.dy+e.dh,e.transform)}if("stroke"===r){let e=i.data,r=e.style.alignment,s=e.style.width*(1-r);"miter"===e.style.join&&(s*=function(t,e){let i=1,r=t.shapePath.shapePrimitives;for(let t=0;t<r.length;t++){let s=r[t].shape;if("polygon"!==s.type)continue;let n=s.points,a=n.length;if(a<6)continue;let o=s.closePath;for(let t=0;t<a;t+=2){if(!o&&(0===t||t===a-2))continue;let r=(t-2+a)%a,s=(t+2)%a,l=n[r],h=n[r+1],u=n[t],d=n[t+1],c=n[s],f=n[s+1],p=l-u,m=h-d,g=c-u,x=f-d,y=p*p+m*m,_=g*g+x*x;if(y<1e-12||_<1e-12)continue;let b=(p*g+m*x)/Math.sqrt(y*_);b<-1?b=-1:b>1&&(b=1);let v=Math.sqrt((1-b)*.5);if(v<1e-6)continue;let w=Math.min(1/v,e);w>i&&(i=w)}}return i}(e.path,e.style.miterLimit));let n=e.path.bounds;t.addFrame(n.minX-s,n.minY-s,n.maxX+s,n.maxY+s)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){if(!this.bounds.containsPoint(t.x,t.y))return!1;let e=this.instructions,i=!1;for(let r=0;r<e.length;r++){let s=e[r],n=s.data,a=n.path;if(!s.action||!a)continue;let o=n.style,l=a.shapePath.shapePrimitives;for(let e=0;e<l.length;e++){let r=l[e].shape;if(!o||!r)continue;let a=l[e].transform,h=a?a.applyInverse(t,V):t;i="fill"===s.action?r.contains(h.x,h.y):r.strokeContains(h.x,h.y,o.width,o.alignment);let u=n.hole;if(u){let t=u.shapePath?.shapePrimitives;if(t)for(let e=0;e<t.length;e++)t[e].shape.contains(h.x,h.y)&&(i=!1)}if(i)return!0}}return i}
50unload(){for(let t in this.emit("unload",this),this._gpuData)this._gpuData[t]?.destroy();this._gpuData=Object.create(null)}destroy(t=!1){if(!this.destroyed){if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(e)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(e))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}}};N.defaultFillStyle={color:0xffffff,alpha:1,texture:h.g.WHITE,matrix:null,fill:null,textureSpace:"local"},N.defaultStrokeStyle={width:1,color:0xffffff,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:h.g.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let Y=N},78656:(t,e,i)=>{"use strict";i.d(e,{l:()=>n});var r=i(5341),s=i(32574);class n extends s.mc{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new r.c(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=t.autoGarbageCollect??!0}get bounds(){return this._boundsDirty&&(this.updateBounds(),this._boundsDirty=!1),this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=+!!t}containsPoint(t){let e=this.bounds,{x:i,y:r}=t;return i>=e.minX&&i<=e.maxX&&r>=e.minY&&r<=e.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}unload(){for(let t in this.emit("unload",this),this._gpuData)this._gpuData[t]?.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,e,i){let{renderPipes:r}=e;r.blendMode.pushBlendMode(this,this.groupBlendMode,t);let s=r[this.renderPipeId];s?.addRenderable&&s.addRenderable(this,t),this.didViewUpdate=!1;let n=this.children,a=n.length;for(let r=0;r<a;r++)n[r].collectRenderables(t,e,i);r.blendMode.popBlendMode(t)}}},78773:(t,e,i)=>{"use strict";i.d(e,{M:()=>n});var r=i(50508);let s=[new r.b,new r.b,new r.b,new r.b];class n{constructor(t=0,e=0,i=0,r=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(r)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new n(0,0,0,0)}clone(){return new n(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return!(this.width<=0)&&!(this.height<=0)&&!!(t>=this.x)&&!!(t<this.x+this.width)&&!!(e>=this.y)&&!!(e<this.y+this.height)}strokeContains(t,e,i,r=.5){let{width:s,height:n}=this;if(s<=0||n<=0)return!1;let a=this.x,o=this.y,l=i*(1-r),h=i-l;return t>=a-l&&t<=a+s+l&&e>=o-l&&e<=o+n+l&&!(t>a+h&&t<a+s-h&&e>o+h&&e<o+n-h)}intersects(t,e){if(!e){let e=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=e)return!1;let i=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>i}let i=this.left,r=this.right,n=this.top,a=this.bottom;if(r<=i||a<=n)return!1;let o=s[0].set(t.left,t.top),l=s[1].set(t.left,t.bottom),h=s[2].set(t.right,t.top),u=s[3].set(t.right,t.bottom);if(h.x<=o.x||l.y<=o.y)return!1;let d=Math.sign(e.a*e.d-e.b*e.c);if(0===d||(e.apply(o,o),e.apply(l,l),e.apply(h,h),e.apply(u,u),Math.max(o.x,l.x,h.x,u.x)<=i||Math.min(o.x,l.x,h.x,u.x)>=r||Math.max(o.y,l.y,h.y,u.y)<=n||Math.min(o.y,l.y,h.y,u.y)>=a))return!1;let c=d*(l.y-o.y),f=d*(o.x-l.x),p=c*i+f*n,m=c*r+f*n,g=c*i+f*a,x=c*r+f*a;if(Math.max(p,m,g,x)<=c*o.x+f*o.y||Math.min(p,m,g,x)>=c*u.x+f*u.y)return!1;let y=d*(o.y-h.y),_=d*(h.x-o.x),b=y*i+_*n,v=y*r+_*n,w=y*i+_*a,S=y*r+_*a;return!(Math.max(b,v,w,S)<=y*o.x+_*o.y||Math.min(b,v,w,S)>=y*u.x+_*u.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this}fit(t){let e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),r=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=r,this.height=Math.max(s-r,0),this}ceil(t=1,e=.001){let i=Math.ceil((this.x+this.width-e)*t)/t,r=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=r-this.y,this}scale(t,e=t){return this.x*=t,this.y*=e,this.width*=t,this.height*=e,this}enlarge(t){let e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=r,this.height=s-r,this}getBounds(t){return t||(t=new n),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;let e=t.x,i=t.y,r=t.x+t.width,s=t.y+t.height;return e>=this.x&&e<this.x+this.width&&i>=this.y&&i<this.y+this.height&&r>=this.x&&r<this.x+this.width&&s>=this.y&&s<this.y+this.height}set(t,e,i,r){return this.x=t,this.y=e,this.width=i,this.height=r,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}}
50,79041:(t,e,i)=>{"use strict";let r;i.d(e,{M:()=>d});var s=i(44929),n=i(96437);let a={},o={},l={stripVersion:function(t,e){return e?t.replace("#version 300 es",""):t},ensurePrecision:function(t,e,i){let r=i?e.maxSupportedFragmentPrecision:e.maxSupportedVertexPrecision;if("precision"!==t.substring(0,9)){let s=i?e.requestedFragmentPrecision:e.requestedVertexPrecision;return"highp"===s&&"highp"!==r&&(s="mediump"),`precision ${s} float; 51${t}`}return"highp"!==r&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t},addProgramDefines:function(t,e,i){return e?t:i?(t=t.replace("out vec4 finalColor;",""),` 52 53 #ifdef GL_ES // This checks if it is WebGL1 54 #define in varying 55 #define finalColor gl_FragColor 56 #define texture texture2D 57 #endif 58 ${t} 59 `):` 60 61 #ifdef GL_ES // This checks if it is WebGL1 62 #define in attribute 63 #define out varying 64 #endif 65 ${t} 66 `},setProgramName:function(t,{name:e="pixi-program"},i=!0){e=e.replace(/\s+/g,"-")+(i?"-fragment":"-vertex");let r=i?a:o;if(r[e]?(r[e]++,e+=`-${r[e]}`):r[e]=1,-1!==t.indexOf("#define SHADER_NAME"))return t;let s=`#define SHADER_NAME ${e}`;return`${s} 67${t}`},insertVersion:function(t,e){return e?`#version 300 es 68${t}`:t}},h=Object.create(null),u=class t{constructor(e){let i=-1!==(e={...t.defaultOptions,...e}).fragment.indexOf("#version 300 es"),a={stripVersion:i,ensurePrecision:{requestedFragmentPrecision:e.preferredFragmentPrecision,requestedVertexPrecision:e.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:function(){if(!r){r="mediump";let t=(0,n.W)();t&&t.getShaderPrecisionFormat&&(r=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?"highp":"mediump")}return r}()},setProgramName:{name:e.name},addProgramDefines:i,insertVersion:i},o=e.fragment,h=e.vertex;Object.keys(l).forEach(t=>{let e=a[t];o=l[t](o,e,!0),h=l[t](h,e,!1)}),this.fragment=o,this.vertex=h,this.transformFeedbackVaryings=e.transformFeedbackVaryings,this._key=(0,s.X)(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,h[this._cacheKey]=null}static from(e){let i=`${e.vertex}:${e.fragment}`;return h[i]||(h[i]=new t(e),h[i]._cacheKey=i),h[i]}};u.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let d=u},80294:(t,e,i)=>{"use strict";let r,s;i.d(e,{lgM:()=>v,q2j:()=>E.q,Q1f:()=>w.Q,mcf:()=>f.mc,dJT:()=>S.d,M2g:()=>M.M,BrD:()=>P.B,A1g:()=>O.A,uqu:()=>C.u,bRX:()=>T.b,M_G:()=>A.M,Y7R:()=>k.Y,kxk:()=>F.k,xJt:()=>N,gPd:()=>I.g,Wny:()=>R.W,t66:()=>m.t6,XOh:()=>n.XO});var n=i(90194);let a={extension:{type:n.Ag.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.all([i.e(7392),i.e(5156)]).then(i.bind(i,5156))}},o={extension:{type:n.Ag.Environment,name:"webworker",priority:0},test:()=>"undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,load:async()=>{await Promise.all([i.e(7392),i.e(1459)]).then(i.bind(i,41459))}};i(51557),i(27658);var l=i(92122),h=i(40246);async function u(t={}){return void 0!==s?s:s=await (async()=>{let e=l.e.get().getNavigator().gpu;if(!e)return!1;try{let i=await e.requestAdapter(t);return await i.requestDevice(),!0}catch(t){return!1}})()}let d=["webgl","webgpu","canvas"];async function c(t){let e,s=[];t.preference?Array.isArray(t.preference)?s=t.preference.slice():(s.push(t.preference),d.forEach(e=>{e!==t.preference&&s.push(e)})):s=d.slice();let n={};for(let a=0;a<s.length;a++){let o=s[a];if("webgpu"===o&&await u()){let{WebGPURenderer:r}=await Promise.all([i.e(9070),i.e(1778)]).then(i.bind(i,89397));e=r,n={...t,...t.webgpu};break}if("webgl"===o&&function(t){return void 0!==r?r:r=(()=>{let e={stencil:!0,failIfMajorPerformanceCaveat:t??h.k.defaultOptions.failIfMajorPerformanceCaveat};try{if(!l.e.get().getWebGLRenderingContext())return!1;let t=l.e.get().createCanvas().getContext("webgl",e),i=!!t?.getContextAttributes()?.stencil;if(t){let e=t.getExtension("WEBGL_lose_context");e&&e.loseContext()}return t=null,i}catch(t){return!1}})()}(t.failIfMajorPerformanceCaveat??h.k.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:r}=await Promise.all([i.e(9070),i.e(8356)]).then(i.bind(i,78356));e=r,n={...t,...t.webgl};break}if("canvas"===o){let{CanvasRenderer:r}=await Promise.all([i.e(9070),i.e(5619)]).then(i.bind(i,85619));e=r,n={...t,...t.canvasOptions};break}}if(delete n.webgpu,delete n.webgl,delete n.canvasOptions,!e)throw Error("No available renderer for the current environment");let a=new e;return await a.init(n),a}var f=i(32574),p=i(47312),m=i(74983);class g{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{let t,e;if(this._resizeTo){if(this._cancelResize(),this._resizeTo===globalThis.window)t=globalThis.innerWidth,e=globalThis.innerHeight;else{let{clientWidth:i,clientHeight:r}=this._resizeTo;t=i,e=r}this.renderer.resize(t,e),this.render()}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}g.extension=n.Ag.Application;var x=i(86496),y=i(20915);class _{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,x.d.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?y.R.shared:new y.R,t.autoStart&&this.start()}static destroy(){if(this._ticker){let t=this._ticker;this.ticker=null,t.destroy()}}}_.extension=n.Ag.Application,n.XO.add(g),n.XO.add(_);let b=class t{constructor(...t){this.stage=new f.mc,void 0!==t[0]&&(0,m.t6)(m.lj,"Application constructor options are deprecated, please use Application.init() instead.")}async init(e){e={...e},this.stage||(this.stage=new f.mc),this.renderer=await c(e),t._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return(0,m.t6)(m.lj,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}get domContainerRoot(){return this.renderer.renderPipes.dom?._domElement}destroy(e=!1,i=!1){let r=t._plugins.slice(0);r.reverse(),r.forEach(t=>{t.destroy.call(this)}),this.stage.destroy(i),this.stage=null,this.renderer.destroy(e),this.renderer=null}};b._plugins=[];let v=b;n.XO.handleByList(n.Ag.Application,v._plugins),n.XO.add(p.M);var w=i(30214),S=i(68379),C=i(15744),T=i(50508),A=i(78773),M=i(79041),P=i(85732),k=i(92310),E=i(47261),I=i(25687),R=i(29292);i(8402);var O=i(88247),F=i(42059),z=i(5479),B=i(48036),G=i(59869),D=i(77813),U=i(99999),L=i(78514),j=i(88335);let V=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],X=class t extends z.A{constructor(e={}){super(),this.uid=(0,B.L)("textStyle"),this._tick=0,this._cachedFontString=null,function(t){if("boolean"==typeof t.dropShadow&&t.dropShadow){let e=N.defaultDropShadow;t.dropShadow={alpha:t.dropShadowAlpha??e.alpha,angle:t.dropShadowAngle??e.angle,blur:t.dropShadowBlur??e.blur,color:t.dropShadowColor??e.color,distance:t.dropShadowDistance??e.distance}}if(void 0!==t.strokeThickness){(0,m.t6)(m.lj,"strokeThickness is now a part of stroke");let e=t.stroke,i={};if(w.Q.isColorLike(e))i.color=e;else if(e instanceof D._||e instanceof U.m)i.fill=e;else if(Object.hasOwnProperty.call(e,"color")||Object.hasOwnProperty.call(e,"fill"))i=e;else throw Error("Invalid stroke value.");t.stroke={...i,width:t.strokeThickness}}
68if(Array.isArray(t.fillGradientStops)){if((0,m.t6)(m.lj,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(t.fill)||0===t.fill.length)throw Error("Invalid fill value. Expected an array of colors for gradient fill.");t.fill.length!==t.fillGradientStops.length&&(0,G.R)("The number of fill colors must match the number of fill gradient stops.");let e=new D._({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),i=t.fillGradientStops.slice(),r=t.fill.map(t=>w.Q.shared.setValue(t).toNumber());i.forEach((t,i)=>{e.addColorStop(t,r[i])}),t.fill={fill:e}}}(e);let i=e instanceof t,r=e;i&&(e=r._toObject());let s={...t.defaultTextStyle,...e};for(let t in s)this[t]=s[t];this._tagStyles=e.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.update())}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(null!==e&&"object"==typeof e?this._dropShadow=this._createProxy({...t.defaultDropShadow,...e}):this._dropShadow=e?this._createProxy({...t.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.update())}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&("string"==typeof t?this._fontSize=parseInt(t,10):this._fontSize=t,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.update())}get leading(){return this._leading}set leading(t){this._leading!==t&&(this._leading=t,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.update())}get padding(){return this._padding}set padding(t){this._padding!==t&&(this._padding=t,this.update())}get filters(){return this._filters}set filters(t){this._filters!==t&&(this._filters=Object.freeze(t),this.update())}get trim(){return this._trim}set trim(t){this._trim!==t&&(this._trim=t,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline!==t&&(this._textBaseline=t,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap!==t&&(this._wordWrap=t,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.update())}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...L.T.defaultFillStyle,...t},()=>{this._fill=(0,j.w)({...this._originalFill},L.T.defaultFillStyle)})),this._fill=(0,j.w)(0===t?"black":t,L.T.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...L.T.defaultStrokeStyle,...t},()=>{this._stroke=(0,j.T)({...this._originalStroke},L.T.defaultStrokeStyle)})),this._stroke=(0,j.T)(t,L.T.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(t){this._tagStyles!==t&&(this._tagStyles=t??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){let e=t.defaultTextStyle;for(let t in e)this[t]=e[t]}assign(t){for(let e in t)this[e]=t[e];return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return null===this._cachedFontString&&(this._cachedFontString=function(t){let e="number"==typeof t.fontSize?`${t.fontSize}px`:t.fontSize,i=t.fontFamily;Array.isArray(t.fontFamily)||(i=t.fontFamily.split(","));for(let t=i.length-1;t>=0;t--){let e=i[t].trim();/([\"\'])[^\'\"]+\1/.test(e)||V.includes(e)||(e=`"${e}"`),i[t]=e}return`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${e} ${i.join(",")}`}(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new t(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let e=0;e<this._filters.length;e++)t+=this._filters[e].padding;return Math.max(this._padding,t)}destroy(t=!1){if(this.removeAllListeners(),"boolean"==typeof t?t:t?.texture){let e="boolean"==typeof t?t:t?.textureSource;this._fill?.texture&&this._fill.texture.destroy(e),this._originalFill?.texture&&this._originalFill.texture.destroy(e),this._stroke?.texture&&this._stroke.texture.destroy(e),this._originalStroke?.texture&&this._originalStroke.texture.destroy(e)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,e){return new Proxy(t,{set:(t,i,r)=>t[i]===r||(t[i]=r,e?.(i,r),this.update(),!0)})}_isFillStyle(t){return(t??null)!==null&&!(w.Q.isColorLike(t)||t instanceof D._||t instanceof U.m)}};X.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5},X.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let N=X;n.XO.add(a,o)},81152:(t,e,i)=>{"use strict";i.d(e,{C:()=>r});
68class r{constructor(t){this.items=[],this._name=t}emit(t,e,i,r,s,n,a,o){let{name:l,items:h}=this;for(let u=0,d=h.length;u<d;u++)h[u][l](t,e,i,r,s,n,a,o);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){let e=this.items.indexOf(t);return -1!==e&&this.items.splice(e,1),this}contains(t){return -1!==this.items.indexOf(t)}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return 0===this.items.length}get name(){return this._name}}},83090:(t,e,i)=>{"use strict";i.d(e,{W:()=>r});var r=(t=>(t[t.WEBGL=1]="WEBGL",t[t.WEBGPU=2]="WEBGPU",t[t.CANVAS=4]="CANVAS",t[t.BOTH=3]="BOTH",t))(r||{})},84992:(t,e,i)=>{"use strict";let r;function s(){if("boolean"==typeof r)return r;try{let t=Function("param1","param2","param3","return param1[param2] === param3;");r=!0===t({a:"b"},"a","b")}catch(t){r=!1}return r}i.d(e,{f:()=>s})},85732:(t,e,i)=>{"use strict";i.d(e,{B:()=>d});var r=i(44929),s=i(68419);let n={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},a=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function o(t,e){let i;for(;null!==(i=a.exec(t));){let t=n[i[3]]??"float32";e[i[2]]={location:parseInt(i[1],10),format:t,stride:(0,s.m)(t).stride,offset:0,instance:!1,start:0}}a.lastIndex=0}function l(t){let e=/@group\((\d+)\)/,i=/@binding\((\d+)\)/,r=/var(<[^>]+>)? (\w+)/,s=/:\s*([\w<>]+)/,n=/(\w+)\s*:\s*([\w\<\>]+)/g,a=/struct\s+(\w+)/,o=t.match(/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g)?.map(t=>({group:parseInt(t.match(e)[1],10),binding:parseInt(t.match(i)[1],10),name:t.match(r)[2],isUniform:"<uniform>"===t.match(r)[1],type:t.match(s)[1]}));if(!o)return{groups:[],structs:[]};let l=t.match(/struct\s+(\w+)\s*{([^}]+)}/g)?.map(t=>{let e=t.match(a)[1],i=t.match(n).reduce((t,e)=>{let[i,r]=e.split(":");return t[i.trim()]=r.trim(),t},{});return i?{name:e,members:i}:null}).filter(({name:t})=>o.some(e=>e.type===t||e.type.includes(`<${t}>`)))??[];return{groups:o,structs:l}}var h=(t=>(t[t.VERTEX=1]="VERTEX",t[t.FRAGMENT=2]="FRAGMENT",t[t.COMPUTE=4]="COMPUTE",t))(h||{});let u=Object.create(null);class d{constructor(t){this._layoutKey=0,this._attributeLocationsKey=0;let{fragment:e,vertex:i,layout:r,gpuLayout:s,name:n}=t;if(this.name=n,this.fragment=e,this.vertex=i,e.source===i.source){let t=l(e.source);this.structsAndGroups=t}else{let t=l(i.source),r=l(e.source);this.structsAndGroups=function(t,e){let i=new Set,r=new Set;return{structs:[...t.structs,...e.structs].filter(t=>!i.has(t.name)&&(i.add(t.name),!0)),groups:[...t.groups,...e.groups].filter(t=>{let e=`${t.name}-${t.binding}`;return!r.has(e)&&(r.add(e),!0)})}}(t,r)}this.layout=r??function({groups:t}){let e=[];for(let i=0;i<t.length;i++){let r=t[i];e[r.group]||(e[r.group]={}),e[r.group][r.name]=r.binding}return e}(this.structsAndGroups),this.gpuLayout=s??function({groups:t}){let e=[];for(let i=0;i<t.length;i++){let r=t[i];e[r.group]||(e[r.group]=[]),r.isUniform?e[r.group].push({binding:r.binding,visibility:h.VERTEX|h.FRAGMENT,buffer:{type:"uniform"}}):"sampler"===r.type?e[r.group].push({binding:r.binding,visibility:h.FRAGMENT,sampler:{type:"filtering"}}):"texture_2d"===r.type||r.type.startsWith("texture_2d<")?e[r.group].push({binding:r.binding,visibility:h.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):"texture_2d_array"===r.type||r.type.startsWith("texture_2d_array<")?e[r.group].push({binding:r.binding,visibility:h.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):("texture_cube"===r.type||r.type.startsWith("texture_cube<"))&&e[r.group].push({binding:r.binding,visibility:h.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let t=0;t<e.length;t++)e[t]||(e[t]=[]);return e}(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){let{vertex:t,fragment:e}=this,i=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=(0,r.X)(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=function({source:t,entryPoint:e}){let i={},r=t.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,""),s=r.indexOf(`fn ${e}(`);if(-1===s)return i;let n=r.indexOf("->",s);if(-1===n)return i;let a=r.substring(s,n);if(o(a,i),0===Object.keys(i).length){let t=a.match(/\(\s*\w+\s*:\s*(\w+)/);if(t){let e=t[1],s=RegExp(`struct\\s+${e}\\s*\\{([^}]+)\\}`,"s"),n=r.match(s);n&&o(n[1],i)}}return i}(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,u[this._cacheKey]=null}static from(t){let e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return u[e]||(u[e]=new d(t),u[e]._cacheKey=e),u[e]}}}
68,86496:(t,e,i)=>{"use strict";i.d(e,{d:()=>r});var r=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(r||{})},87946:(t,e,i)=>{"use strict";i.d(e,{F:()=>r,a:()=>s});let r={name:"color-bit",vertex:{header:` 69 @in aColor: vec4<f32>; 70 `,main:` 71 vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a); 72 `}},s={name:"color-bit",vertex:{header:` 73 in vec4 aColor; 74 `,main:` 75 vColor *= vec4(aColor.rgb * aColor.a, aColor.a); 76 `}}},88247:(t,e,i)=>{"use strict";i.d(e,{A:()=>b});var r=i(74983),s=i(78656),n=i(78514),a=i(90194),o=i(98737),l=i(51263);class h{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class u{constructor(){this.instructions=new o.L}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}let d=class t{constructor(t){this._renderer=t,this._managedContexts=new l.s({renderer:t,type:"resource",name:"graphicsContext"})}init(e){t.defaultOptions.bezierSmoothness=e?.bezierSmoothness??t.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){let e=t._gpuData,i=!!e[this._renderer.uid],r=e[this._renderer.uid]||this._initContext(t);return(t.dirty||!i)&&(i&&r.reset(),r.isBatchable=!1,t.dirty=!1),r}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){let e=new u;return this.getGpuContext(t).graphicsData=e,e.init(),e}_initContext(t){let e=new h;return e.context=t,t._gpuData[this._renderer.uid]=e,this._managedContexts.add(t),e}destroy(){this._managedContexts.destroy(),this._renderer=null}};d.extension={type:[a.Ag.CanvasSystem],name:"graphicsContext"},d.defaultOptions={bezierSmoothness:.5};var c=i(90586);class f{constructor(t,e){this.state=c.U.for2d(),this.renderer=t,this._adaptor=e,this.renderer.runners.contextChange.add(this),this._managedGraphics=new l.s({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,e){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(e),e.add(t)}updateRenderable(t){}execute(t){t.isRenderable&&this._adaptor.execute(this,t)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.de
76stroy(),this._adaptor=null}}f.extension={type:[a.Ag.CanvasPipes],name:"graphics"};var p=i(22027),m=i(67961),g=i(32801),x=i(49587);class y{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{m.Z.return(t)}),this.batches.length=0}}class _{constructor(t,e){this.state=c.U.for2d(),this.renderer=t,this._adaptor=e,this.renderer.runners.contextChange.add(this),this._managedGraphics=new l.s({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){let e=t.context,i=!!t._gpuData,r=this.renderer.graphicsContext.updateGpuContext(e);return!!r.isBatchable||i!==r.isBatchable}addRenderable(t,e){let i=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),i.isBatchable?this._addToBatcher(t,e):(this.renderer.renderPipes.batch.break(e),e.add(t))}updateRenderable(t){let e=this._getGpuDataForRenderable(t).batches;for(let t=0;t<e.length;t++){let i=e[t];i._batcher.updateElement(i)}}execute(t){if(!t.isRenderable)return;let e=this.renderer,i=t.context;if(!e.graphicsContext.getGpuContext(i).batches.length)return;let r=i.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;let s=r.resources.localUniforms.uniforms;s.uTransformMatrix=t.groupTransform,s.uRound=e._roundPixels|t._roundPixels,(0,g.V)(t.groupColorAlpha,s.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){let e=this._getGpuDataForRenderable(t),i=this.renderer.graphicsContext.updateGpuContext(t.context);e.destroy(),i.isBatchable&&this._updateBatchesForRenderable(t,e)}_addToBatcher(t,e){let i=this.renderer.renderPipes.batch,r=this._getGpuDataForRenderable(t).batches;for(let t=0;t<r.length;t++){let s=r[t];i.addToBatch(s,e)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){let e=new y;return t._gpuData[this.renderer.uid]=e,this._managedGraphics.add(t),e}_updateBatchesForRenderable(t,e){let i=t.context,r=this.renderer.graphicsContext.getGpuContext(i),s=this.renderer._roundPixels|t._roundPixels;e.batches=r.batches.map(e=>{let i=m.Z.get(x.G);return e.copyTo(i),i.renderable=t,i.roundPixels=s,i})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.de
76stroy(),this._adaptor=null,this.state=null}}_.extension={type:[a.Ag.WebGLPipes,a.Ag.WebGPUPipes],name:"graphics"},a.XO.add(f),a.XO.add(_),a.XO.add(d),a.XO.add(p.GH);class b extends s.l{constructor(t){t instanceof n.T&&(t={context:t});let{context:e,roundPixels:i,...r}=t||{};super({label:"Graphics",...r}),this.renderPipeId="graphics",e?this.context=e:(this.context=this._ownedContext=new n.T,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=i??!1}set context(t){t!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=t,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(!0===t||t?.context===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_onTouch(t){this._gcLastUsed=t,this._context._gcLastUsed=t}_callContextMethod(t,e){return this.context[t](...e),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new b(this._context.clone()):(this._ownedContext=null,new b(this._context))}lineStyle(t,e,i){(0,r.t6)(r.lj,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");let s={};return t&&(s.width=t),e&&(s.color=e),i&&(s.alpha=i),this.context.strokeStyle=s,this}beginFill(t,e){(0,r.t6)(r.lj,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");let i={};return void 0!==t&&(i.color=t),void 0!==e&&(i.alpha=e),this.context.fillStyle=i,this}endFill(){(0,r.t6)(r.lj,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();let t=this.context.strokeStyle;return(t.width!==n.T.defaultStrokeStyle.width||t.color!==n.T.defaultStrokeStyle.color||t.alpha!==n.T.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return(0,r.t6)(r.lj,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return(0,r.t6)(r.lj,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return(0,r.t6)(r.lj,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return(0,r.t6)(r.lj,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return(0,r.t6)(r.lj,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return(0,r.t6)(r.lj,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}},88335:(t,e,i)=>{"use strict";i.d(e,{T:()=>c,w:()=>d});var r=i(30214),s=i(25687),n=i(77813),a=i(99999);function o(t){return t instanceof a.m}function l(t){return t instanceof n._}
76function h(t,e,i){return t.fill=e,t.color=0xffffff,t.texture=e.texture,t.matrix=e.transform,t.textureSpace=e.textureSpace,{...i,...t}}function u(t,e,i){return e.buildGradient(),t.fill=e,t.color=0xffffff,t.texture=e.texture,t.matrix=e.transform,t.textureSpace=e.textureSpace,{...i,...t}}function d(t,e){if(null==t)return null;let i={};if(r.Q.isColorLike(t)){let n=r.Q.shared.setValue(t??0);return i.color=n.toNumber(),i.alpha=1===n.alpha?e.alpha:n.alpha,i.texture=s.g.WHITE,{...e,...i}}if(t instanceof s.g)return i.texture=t,{...e,...i};if(o(t))return h(i,t,e);if(l(t))return u(i,t,e);else if(t.fill&&o(t.fill))return h(t,t.fill,e);else if(t.fill&&l(t.fill))return u(t,t.fill,e);let n={...e,...t},a=r.Q.shared.setValue(n.color);return n.alpha*=a.alpha,n.color=a.toNumber(),n}function c(t,e){let{width:i,alignment:r,miterLimit:s,cap:n,join:a,pixelLine:o,...l}=e,h=d(t,l);return h?{width:i,alignment:r,miterLimit:s,cap:n,join:a,pixelLine:o,...h}:null}},90194:(t,e,i)=>{"use strict";i.d(e,{Ag:()=>r,XO:()=>a});var r=(t=>(t.Application="application",t.WebGLPipes="webgl-pipes",t.WebGLPipesAdaptor="webgl-pipes-adaptor",t.WebGLSystem="webgl-system",t.WebGPUPipes="webgpu-pipes",t.WebGPUPipesAdaptor="webgpu-pipes-adaptor",t.WebGPUSystem="webgpu-system",t.CanvasSystem="canvas-system",t.CanvasPipesAdaptor="canvas-pipes-adaptor",t.CanvasPipes="canvas-pipes",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t.MaskEffect="mask-effect",t.BlendM
76ode="blend-mode",t.TextureSource="texture-source",t.TextureUploaderWebGL="texture-uploader-webgl",t.TextureUploaderWebGPU="texture-uploader-webgpu",t.Environment="environment",t.ShapeBuilder="shape-builder",t.Batcher="batcher",t))(r||{});let s=t=>{if("function"==typeof t||"object"==typeof t&&t.extension){if(!t.extension)throw Error("Extension class must have an extension object");t={..."object"!=typeof t.extension?{type:t.extension}:t.extension,ref:t}}if("object"==typeof t)t={...t};else throw Error("Invalid extension type");return"string"==typeof t.type&&(t.type=[t.type]),t},n=(t,e)=>s(t).priority??e,a={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(s).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t))}),this},add(...t){return t.map(s).forEach(t=>{t.type.forEach(e=>{let i=this._addHandlers,r=this._queue;i[e]?i[e]?.(t):(r[e]=r[e]||[],r[e]?.push(t))})}),this},handle(t,e,i){let r=this._addHandlers,s=this._removeHandlers;if(r[t]||s[t])throw Error(`Extension type ${t} already has a handler`);r[t]=e,s[t]=i;let n=this._queue;return n[t]&&(n[t]?.forEach(t=>e(t)),delete n[t]),this},handleByMap(t,e){return this.handle(t,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(t,e,i=-1){return this.handle(t,t=>{e.findIndex(e=>e.name===t.name)>=0||(e.push({name:t.name,value:t.ref}),e.sort((t,e)=>n(e.value,i)-n(t.value,i)))},t=>{let i=e.findIndex(e=>e.name===t.name);-1!==i&&e.splice(i,1)})},handleByList(t,e,i=-1){return this.handle(t,t=>{e.includes(t.ref)||(e.push(t.ref),e.sort((t,e)=>n(e,i)-n(t,i)))},t=>{let i=e.indexOf(t.ref);-1!==i&&e.splice(i,1)})},mixin(t,...e){for(let i of e)Object.defineProperties(t.prototype,Object.getOwnPropertyDescriptors(i))}}},90586:(t,e,i)=>{"use strict";i.d(e,{U:()=>n});let r={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},s=class t{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(1&this.data)}set blend(t){!!(1&this.data)!==t&&(this.data^=1)}get offsets(){return!!(2&this.data)}set offsets(t){!!(2&this.data)!==t&&(this.data^=2)}set cullMode(t){if("none"===t){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace="front"===t}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(4&this.data)}set culling(t){!!(4&this.data)!==t&&(this.data^=4)}get depthTest(){return!!(8&this.data)}set depthTest(t){!!(8&this.data)!==t&&(this.data^=8)}get depthMask(){return!!(32&this.data)}set depthMask(t){!!(32&this.data)!==t&&(this.data^=32)}get clockwiseFrontFace(){return!!(16&this.data)}set clockwiseFrontFace(t){!!(16&this.data)!==t&&(this.data^=16)}get blendMode(){return this._blendMode}set blendMode(t){this.blend="none"!==t,this._blendMode=t,this._blendModeId=r[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let e=new t;return e.depthTest=!1,e.blend=!0,e}};s.default2d=s.for2d();let n=s},92069:(t,e,i)=>{t=i.nmd(t);var r,s,n="__lodash_hash_undefined__",a="[object Arguments]",o="[object Array]",l="[object Boolean]",h="[object Date]",u="[object Error]",d="[object Function]",c="[object Map]",f="[object Number]",p="[object Object]",m="[object Promise]",g="[object RegExp]",x="[object Set]",y="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",v="[object DataView]",w=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[a]=C[o]=C[b]=C[l]=C[v]=C[h]=C[u]=C[d]=C[c]=C[f]=C[p]=C[g]=C[x]=C[y]=C[_]=!1;var T="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,A="object"==typeof self&&self&&self.Object===Object&&self,M=T||A||Function("return this")(),P=e&&!e.nodeType&&e,k=P&&t&&!t.nodeType&&t,E=k&&k.exports===P,I=E&&T.process,R=function(){try{return I&&I.binding&&I.binding("util")}catch(t){}}(),O=R&&R.isTypedArray;function F(t){var e=-1,i=Array(t.size);return t.forEach(function(t,r){i[++e]=[r,t]}),i}function z(t){var e=-1,i=Array(t.size);return t.forEach(function(t){i[++e]=t}),i}var B=Array.prototype,G=Function.prototype,D=Object.prototype,U=M["__core-js_shared__"],L=G.toString,j=D.hasOwnProperty,V=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");
76return t?"Symbol(src)_1."+t:""}(),X=D.toString,N=RegExp("^"+L.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=E?M.Buffer:void 0,W=M.Symbol,$=M.Uint8Array,H=D.propertyIsEnumerable,q=B.splice,Q=W?W.toStringTag:void 0,Z=Object.getOwnPropertySymbols,K=Y?Y.isBuffer:void 0,J=(r=Object.keys,s=Object,function(t){return r(s(t))}),tt=tC(M,"DataView"),te=tC(M,"Map"),ti=tC(M,"Promise"),tr=tC(M,"Set"),ts=tC(M,"WeakMap"),tn=tC(Object,"create"),ta=tM(tt),to=tM(te),tl=tM(ti),th=tM(tr),tu=tM(ts),td=W?W.prototype:void 0,tc=td?td.valueOf:void 0;function tf(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function tp(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function tm(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function tg(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new tm;++e<i;)this.add(t[e])}function tx(t){var e=this.__data__=new tp(t);this.size=e.size}function ty(t,e){for(var i=t.length;i--;)if(tP(t[i][0],e))return i;return -1}function t_(t){var e;return null==t?void 0===t?"[object Undefined]":"[object Null]":Q&&Q in Object(t)?function(t){var e=j.call(t,Q),i=t[Q];try{t[Q]=void 0;var r=!0}catch(t){}var s=X.call(t);return r&&(e?t[Q]=i:delete t[Q]),s}(t):(e=t,X.call(e))}function tb(t){return tz(t)&&t_(t)==a}function tv(t,e,i,r,s,n){var a=1&i,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var h=n.get(t);if(h&&n.get(e))return h==e;var u=-1,d=!0,c=2&i?new tg:void 0;for(n.set(t,e),n.set(e,t);++u<o;){var f=t[u],p=e[u];if(r)var m=a?r(p,f,u,e,t,n):r(f,p,u,t,e,n);if(void 0!==m){if(m)continue;d=!1;break}if(c){if(!function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(t[i],i,t))return!0;return!1}(e,function(t,e){if(!c.has(e)&&(f===t||s(f,t,i,r,n)))return c.push(e)})){d=!1;break}}else if(!(f===p||s(f,p,i,r,n))){d=!1;break}}return n.delete(t),n.delete(e),d}function tw(t){var e;return e=tG(t),tE(t)?e:function(t,e){for(var i=-1,r=e.length,s=t.length;++i<r;)t[s+i]=e[i];return t}(e,tT(t))}function tS(t,e){var i,r,s=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?s["string"==typeof e?"string":"hash"]:s.map}function tC(t,e){var i,r=null==t?void 0:t[e];return!(!tF(r)||(i=r,V&&V in i))&&(tR(r)?N:w).test(tM(r))?r:void 0}tf.prototype.clear=function(){this.__data__=tn?tn(null):{},this.size=0},tf.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e},tf.prototype.get=function(t){var e=this.__data__;if(tn){var i=e[t];return i===n?void 0:i}return j.call(e,t)?e[t]:void 0},tf.prototype.has=function(t){var e=this.__data__;return tn?void 0!==e[t]:j.call(e,t)},tf.prototype.set=function(t,e){var i=this.__data__;return this.size+=+!this.has(t),i[t]=tn&&void 0===e?n:e,this},tp.prototype.clear=function(){this.__data__=[],this.size=0},tp.prototype.delete=function(t){var e=this.__data__,i=ty(e,t);return!(i<0)&&(i==e.length-1?e.pop():q.call(e,i,1),--this.size,!0)},tp.prototype.get=function(t){var e=this.__data__,i=ty(e,t);return i<0?void 0:e[i][1]},tp.prototype.has=function(t){return ty(this.__data__,t)>-1},tp.prototype.set=function(t,e){var i=this.__data__,r=ty(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this},tm.prototype.clear=function(){this.size=0,this.__data__={hash:new tf,map:new(te||tp),string:new tf}},tm.prototype.delete=function(t){var e=tS(this,t).delete(t);return this.size-=!!e,e},tm.prototype.get=function(t){return tS(this,t).get(t)},tm.prototype.has=function(t){return tS(this,t).has(t)},tm.prototype.set=function(t,e){var i=tS(this,t),r=i.size;return i.set(t,e),this.size+=+(i.size!=r),this},tg.prototype.add=tg.prototype.push=function(t){return this.__data__.set(t,n),this},tg.prototype.has=function(t){return this.__data__.has(t)},tx.prototype.clear=function(){this.__data__=new tp,this.size=0},tx.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},tx.prototype.get=function(t){return this.__data__.get(t)},tx.prototype.has=function(t){return this.__data__.has(t)},tx.prototype.set=function(t,e){var i=this.__data__;if(i instanceof tp){var r=i.__data__;if(!te||r.length<199)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new tm(r)}return i.set(t,e),this.size=i.size,this};var tT=Z?function(t){return null==t?[]:function(t,e){for(var i=-1,r=null==t?0:t.length,s=0,n=[];++i<r;){var a=t[i];e(a,i,t)&&(n[s++]=a)}return n}(Z(t=Object(t)),function(e){return H.call(t,e)})}:function(){return[]},tA=t_;function tM(t){if(null!=t){try{return L.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function tP(t,e){return t===e||t!=t&&e!=e}(tt&&tA(new tt(new ArrayBuffer(1)))!=v||te&&tA(new te)!=c||ti&&tA
76(ti.resolve())!=m||tr&&tA(new tr)!=x||ts&&tA(new ts)!=_)&&(tA=function(t){var e=t_(t),i=e==p?t.constructor:void 0,r=i?tM(i):"";if(r)switch(r){case ta:return v;case to:return c;case tl:return m;case th:return x;case tu:return _}return e});var tk=tb(function(){return arguments}())?tb:function(t){return tz(t)&&j.call(t,"callee")&&!H.call(t,"callee")},tE=Array.isArray,tI=K||function(){return!1};function tR(t){if(!tF(t))return!1;var e=t_(t);return e==d||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function tO(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}function tF(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function tz(t){return null!=t&&"object"==typeof t}var tB=O?function(t){return O(t)}:function(t){return tz(t)&&tO(t.length)&&!!C[t_(t)]};function tG(t){return null!=t&&tO(t.length)&&!tR(t)?function(t,e){var i,r,s=tE(t),n=!s&&tk(t),a=!s&&!n&&tI(t),o=!s&&!n&&!a&&tB(t),l=s||n||a||o,h=l?function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}(t.length,String):[],u=h.length;for(var d in t){j.call(t,d)&&!(l&&("length"==d||a&&("offset"==d||"parent"==d)||o&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(i=d,(r=null==(r=u)?0x1fffffffffffff:r)&&("number"==typeof i||S.test(i))&&i>-1&&i%1==0&&i<r)))&&h.push(d)}return h}(t):function(t){if(i=(e=t)&&e.constructor,e!==("function"==typeof i&&i.prototype||D))return J(t);var e,i,r=[];for(var s in Object(t))j.call(t,s)&&"constructor"!=s&&r.push(s);return r}(t)}t.exports=function(t,e){return function t(e,i,r,s,n){return e===i||(null!=e&&null!=i&&(tz(e)||tz(i))?function(t,e,i,r,s,n){var d=tE(t),m=tE(e),_=d?o:tA(t),w=m?o:tA(e);_=_==a?p:_,w=w==a?p:w;var S=_==p,C=w==p,T=_==w;
76if(T&&tI(t)){if(!tI(e))return!1;d=!0,S=!1}if(T&&!S)return n||(n=new tx),d||tB(t)?tv(t,e,i,r,s,n):function(t,e,i,r,s,n,a){switch(i){case v:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case b:if(t.byteLength!=e.byteLength||!n(new $(t),new $(e)))break;return!0;case l:case h:case f:return tP(+t,+e);case u:return t.name==e.name&&t.message==e.message;case g:case y:return t==e+"";case c:var o=F;case x:var d=1&r;if(o||(o=z),t.size!=e.size&&!d)break;var p=a.get(t);if(p)return p==e;r|=2,a.set(t,e);var m=tv(o(t),o(e),r,s,n,a);return a.delete(t),m;case"[object Symbol]":if(tc)return tc.call(t)==tc.call(e)}return!1}(t,e,_,i,r,s,n);if(!(1&i)){var A=S&&j.call(t,"__wrapped__"),M=C&&j.call(e,"__wrapped__");if(A||M){var P=A?t.value():t,k=M?e.value():e;return n||(n=new tx),s(P,k,i,r,n)}}return!!T&&(n||(n=new tx),function(t,e,i,r,s,n){var a=1&i,o=tw(t),l=o.length;if(l!=tw(e).length&&!a)return!1;for(var h=l;h--;){var u=o[h];if(!(a?u in e:j.call(e,u)))return!1}var d=n.get(t);if(d&&n.get(e))return d==e;var c=!0;n.set(t,e),n.set(e,t);for(var f=a;++h<l;){var p=t[u=o[h]],m=e[u];if(r)var g=a?r(m,p,u,e,t,n):r(p,m,u,t,e,n);if(!(void 0===g?p===m||s(p,m,i,r,n):g)){c=!1;break}f||(f="constructor"==u)}if(c&&!f){var x=t.constructor,y=e.constructor;x!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof x&&x instanceof x&&"function"==typeof y&&y instanceof y)&&(c=!1)}return n.delete(t),n.delete(e),c}(t,e,i,r,s,n))}(e,i,r,s,t,n):e!=e&&i!=i)}(t,e)}},92122:(t,e,i)=>{"use strict";i.d(e,{e:()=>s});let r={createCanvas:(t,e)=>{let i=document.createElement("canvas");return i.width=t,i.height=e,i},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},s={get:()=>r,set(t){r=t}}},92310:(t,e,i)=>{"use strict";i.d(e,{Y:()=>n});var r=i(58862),s=i(25687);class n extends s.g{static create(t){let{dynamic:e,textureOptions:i,...s}=t;return new n({...i,source:new r.v(s),dynamic:e??!1})}resize(t,e,i){return this.source.resize(t,e,i),this}}},95792:(t,e,i)=>{"use strict";i.d(e,{a:()=>r});class r{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}},96112:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function r(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,r,n,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var o=new s(r,n||t,a),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(i=!1)),o.prototype.eventNames=function(){var t,r,s=[];if(0===this._eventsCount)return s;for(r in t=this._events)e.call(t,r)&&s.push(i?r.slice(1):r);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},o.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,n=r.length,a=Array(n);s<n;s++)a[s]=r[s].fn;return a},o.prototype.listenerCount=function(t){var e=i?i+t:t,r=this._events[e];return r?r.fn?1:r.length:0},o.prototype.emit=function(t,e,r,s,n,a){var o=i?i+t:t;if(!this._events[o])return!1;var l,h,u=this._events[o],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,s),!0;case 5:return u.fn.call(u.context,e,r,s,n),!0;case 6:return u.fn.call(u.context,e,r,s,n,a),!0}for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u.fn.apply(u.context,l)}else{var c,f=u.length;for(h=0;h<f;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),d){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,r);break;case 4:u[h].fn.call(u[h].context,e,r,s);break;default:if(!l)for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u[h].fn.apply(u[h].context,l)}}return!0}
76,o.prototype.on=function(t,e,i){return n(this,t,e,i,!1)},o.prototype.once=function(t,e,i){return n(this,t,e,i,!0)},o.prototype.removeListener=function(t,e,r,s){var n=i?i+t:t;if(!this._events[n])return this;if(!e)return a(this,n),this;var o=this._events[n];if(o.fn)o.fn!==e||s&&!o.once||r&&o.context!==r||a(this,n);else{for(var l=0,h=[],u=o.length;l<u;l++)(o[l].fn!==e||s&&!o[l].once||r&&o[l].context!==r)&&h.push(o[l]);h.length?this._events[n]=1===h.length?h[0]:h:a(this,n)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,t.exports=o},96437:(t,e,i)=>{"use strict";let r;i.d(e,{W:()=>n});var s=i(92122);function n(){return(!r||r?.isContextLost())&&(r=s.e.get().createCanvas().getContext("webgl",{})),r}},98644:(t,e,i)=>{"use strict";i.d(e,{I:()=>T,v:()=>C});var r=i(79041),s=i(85732),n=i(59869);function a(t,e,i){if(t)for(let r in t){let s=e[r.toLocaleLowerCase()];if(s){let e=t[r];"header"===r&&(e=e.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),i&&s.push(`//----${i}----//`),s.push(e)}else(0,n.R)(`${r} placement hook does not exist in shader`)}}let o=/\{\{(.*?)\}\}/g;function l(t){let e={};return(t.match(o)?.map(t=>t.replace(/[{()}]/g,""))??[]).forEach(t=>{e[t]=[]}),e}function h(t,e){let i,r=/@in\s+([^;]+);/g;for(;null!==(i=r.exec(t));)e.push(i[1])}function u(t,e,i=!1){let r=[];h(e,r),t.forEach(t=>{t.header&&h(t.header,r)}),i&&r.sort();let s=r.map((t,e)=>` @location(${e}) ${t},`).join("\n"),n=e.replace(/@in\s+[^;]+;\s*/g,"");return n.replace("{{in}}",` 77${s} 78`)}function d(t,e){let i,r=/@out\s+([^;]+);/g;for(;null!==(i=r.exec(t));)e.push(i[1])}function c(t,e){let i=t;for(let t in e){let r=e[t];i=r.join("\n").length?i.replace(`{{${t}}}`,`//-----${t} START-----// 79${r.join("\n")} 80//----${t} FINISH----//`):i.replace(`{{${t}}}`,"")}return i}let f=Object.create(null),p=new Map,m=0;function g(t,e){return e.map(t=>(p.has(t)||p.set(t,m++),p.get(t))).sort((t,e)=>t-e).join("-")+t.vertex+t.fragment}function x(t,e,i){let r=l(t),s=l(e);return i.forEach(t=>{a(t.vertex,r,t.name),a(t.fragment,s,t.name)}),{vertex:c(t,r),fragment:c(e,s)}}let y=` 81 @in aPosition: vec2<f32>; 82 @in aUV: vec2<f32>; 83 84 @out @builtin(position) vPosition: vec4<f32>; 85 @out vUV : vec2<f32>; 86 @out vColor : vec4<f32>; 87 88 {{header}} 89 90 struct VSOutput { 91 {{struct}} 92 }; 93 94 @vertex 95 fn main( {{in}} ) -> VSOutput { 96 97 var worldTransformMatrix = globalUniforms.uWorldTransformMatrix; 98 var modelMatrix = mat3x3<f32>( 99 1.0, 0.0, 0.0, 100 0.0, 1.0, 0.0, 101 0.0, 0.0, 1.0 102 ); 103 var position = aPosition; 104 var uv = aUV; 105 106 {{start}} 107 108 vColor = vec4<f32>(1., 1., 1., 1.); 109 110 {{main}} 111 112 vUV = uv; 113 114 var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix; 115 116 vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0); 117 118 vColor *= globalUniforms.uWorldColorAlpha; 119 120 {{end}} 121 122 {{return}} 123 }; 124`,_=` 125 @in vUV : vec2<f32>; 126 @in vColor : vec4<f32>; 127 128 {{header}} 129 130 @fragment 131 fn main( 132 {{in}} 133 ) -> @location(0) vec4<f32> { 134 135 {{start}} 136 137 var outColor:vec4<f32>; 138 139 {{main}} 140 141 var finalColor:vec4<f32> = outColor * vColor; 142 143 {{end}} 144 145 return finalColor; 146 }; 147`,b=` 148 in vec2 aPosition; 149 in vec2 aUV; 150 151 out vec4 vColor; 152 out vec2 vUV; 153 154 {{header}} 155 156 void main(void){ 157 158 mat3 worldTransformMatrix = uWorldTransformMatrix; 159 mat3 modelMatrix = mat3( 160 1.0, 0.0, 0.0, 161 0.0, 1.0, 0.0, 162 0.0, 0.0, 1.0 163 ); 164 vec2 position = aPosition; 165 vec2 uv = aUV; 166 167 {{start}} 168 169 vColor = vec4(1.); 170 171 {{main}} 172 173 vUV = uv; 174 175 mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix; 176 177 gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0
177)).xy, 0.0, 1.0); 178 179 vColor *= uWorldColorAlpha; 180 181 {{end}} 182 } 183`,v=` 184 185 in vec4 vColor; 186 in vec2 vUV; 187 188 out vec4 finalColor; 189 190 {{header}} 191 192 void main(void) { 193 194 {{start}} 195 196 vec4 outColor; 197 198 {{main}} 199 200 finalColor = outColor * vColor; 201 202 {{end}} 203 } 204`,w={name:"global-uniforms-bit",vertex:{header:` 205 struct GlobalUniforms { 206 uProjectionMatrix:mat3x3<f32>, 207 uWorldTransformMatrix:mat3x3<f32>, 208 uWorldColorAlpha: vec4<f32>, 209 uResolution: vec2<f32>, 210 } 211 212 @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms; 213 `}},S={name:"global-uniforms-bit",vertex:{header:` 214 uniform mat3 uProjectionMatrix; 215 uniform mat3 uWorldTransformMatrix; 216 uniform vec4 uWorldColorAlpha; 217 uniform vec2 uResolution; 218 `}};function C({bits:t,name:e}){let i=function({template:t,bits:e}){let i=g(t,e);if(f[i])return f[i];let{vertex:r,fragment:s}=function(t,e){let i=e.map(t=>t.vertex).filter(t=>!!t),r=e.map(t=>t.fragment).filter(t=>!!t),s=u(i,t.vertex,!0);return{vertex:s=function(t,e){let i=[];d(e,i),t.forEach(t=>{t.header&&d(t.header,i)});let r=0,s=i.sort().map(t=>t.indexOf("builtin")>-1?t:`@location(${r++}) ${t}`).join(",\n"),n=i.sort().map(t=>` var ${t.replace(/@.*?\s+/g,"")};`).join("\n"),a=`return VSOutput( 219 ${i.sort().map(t=>` ${function(t){let e=/\b(\w+)\s*:/g.exec(t);return e?e[1]:""}(t)}`).join(",\n")});`,o=e.replace(/@out\s+[^;]+;\s*/g,"");return(o=(o=o.replace("{{struct}}",` 220${s} 221`)).replace("{{start}}",` 222${n} 223`)).replace("{{return}}",` 224${a} 225`)}(i,s),fragment:u(r,t.fragment,!0)}}(t,e);return f[i]=x(r,s,e),f[i]}({template:{fragment:_,vertex:y},bits:[w,...t]});return s.B.from({name:e,vertex:{source:i.vertex,entryPoint:"main"},fragment:{source:i.fragment,entryPoint:"main"}})}function T({bits:t,name:e}){return new r.M({name:e,...function({template:t,bits:e}){let i=g(t,e);return f[i]||(f[i]=x(t.vertex,t.fragment,e)),f[i]}({template:{vertex:b,fragment:v},bits:[S,...t]})})}},98737:(t,e,i)=>{"use strict";i.d(e,{L:()=>s});var r=i(48036);class s{constructor(){this.uid=(0,r.L)("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}},98974:(t,e,i)=>{"use strict";i.d(e,{M:()=>ti,y:()=>J});var r=i(90194),s=i(15744),n=i(78773);function a(t,e,i,r,s){let n=e.a,a=e.b,o=e.c,l=e.d,h=e.tx,u=e.ty;i||(i=0),r||(r=2),s||(s=t.length/r-i);let d=i*r;for(let e=0;e<s;e++){let e=t[d],i=t[d+1];t[d]=n*e+o*i+h,t[d+1]=a*e+l*i+u,d+=r}}var o=i(25687),l=i(67961),h=i(49587);let u={extension:{type:r.Ag.ShapeBuilder,name:"circle"},build(t,e){let i,r,s,n,a,o;if("circle"===t.type){if((a=o=t.radius)<=0)return!1;i=t.x,r=t.y,s=n=0}else if("ellipse"===t.type){if(a=t.halfWidth,o=t.halfHeight,a<=0||o<=0)return!1;i=t.x,r=t.y,s=n=0}else{let e=t.width/2,l=t.height/2;i=t.x+e,r=t.y+l,a=o=Math.max(0,Math.min(t.radius,Math.min(e,l))),s=e-a,n=l-o}if(s<0||n<0)return!1;let l=Math.ceil(2.3*Math.sqrt(a+o)),h=8*l+4*!!s+4*!!n;if(0===h)return!1;if(0===l)return e[0]=e[6]=i+s,e[1]=e[3]=r+n,e[2]=e[4]=i-s,e[5]=e[7]=r-n,!0;let u=0,d=4*l+2*!!s+2,c=d,f=h,p=s+a,m=n,g=i+p,x=i-p,y=r+m;if(e[u++]=g,e[u++]=y,e[--d]=y,e[--d]=x,n){let t=r-m;e[c++]=x,e[c++]=t,e[--f]=t,e[--f]=g}for(let t=1;t<l;t++){let h=Math.PI/2*(t/l),p=s+Math.cos(h)*a,m=n+Math.sin(h)*o,g=i+p,x=i-p,y=r+m,_=r-m;e[u++]=g,e[u++]=y,e[--d]=y,e[--d]=x,e[c++]=x,e[c++]=_,e[--f]=_,e[--f]=g}p=s,m=n+o,g=i+p,x=i-p,y=r+m;let _=r-m;return e[u++]=g,e[u++]=y,e[--f]=_,e[--f]=g,s&&(e[u++]=x,e[u++]=y,e[--f]=_,e[--f]=x),!0},triangulate(t,e,i,r,s,n){if(0===t.length)return;let a=0,o=0;for(let e=0;e<t.length;e+=2)a+=t[e],o+=t[e+1];a/=t.length/2,o/=t.length/2;let l=r;e[l*i]=a,e[l*i+1]=o;let h=l++;for(let r=0;r<t.length;r+=2)e[l*i]=t[r],e[l*i+1]=t[r+1],r>0&&(s[n++]=l,s[n++]=h,s[n++]=l-1),l++;s[n++]=h+1,s[n++]=h,s[n++]=l-1}},d={...u,extension:{...u.extension,name:"ellipse"}},c={...u,extension:{...u.extension,name:"roundedRectangle"}};var f=i(53312),p=i(4129);let m=new Set,g=!1;function x(t,e,i=2){let r=e&&e.length,s=r?e[0]*i:t.length;m.size&&m.clear();let n=y(t,0,s,i,!0),a=[];if(!n||n.next===n.prev)return a;let o=0,l=0,h=0;
225if(r&&(n=function(t,e,i,r){let s=[];for(let i=0,n=e.length;i<n;i++){let a=e[i]*r,o=i<n-1?e[i+1]*r:t.length,l=y(t,a,o,r,!1);l===l.next&&m.add(l),s.push(function(t){let e=t,i=t;do(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next;while(e!==t);return i}(l))}s.sort(v),function(t,e){let i=Math.ceil((t+2*e)/16)+e+2;w.length<4*i&&(w=new Float64Array(4*i)),S=0}(t.length/r,e.length),A(i,i),b=!0;for(let t=0;t<s.length;t++)i=function(t,e){let i=function(t,e){let i,r=e,s=t.x,n=t.y,a=-1/0;if(D(t,r))return r;for(let e=0,o=0;e<S;e++,o+=4){if(n<w[o+1]||n>w[o+3]||w[o]>s||w[o+2]<=a)continue;let l=M(e);r=P(e);do{if(r.prev.next===r){if(D(t,r.next))return r.next;else if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let t=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(t<=s&&t>a&&(a=t,i=r.x<r.next.x?r:r.next,t===s))return i}}r=r.next}while(r!==l)}if(!i)return null;let o=i.x,l=i.y,h=Math.min(n,l),u=Math.max(n,l),d=1/0;for(let e=0,p=0;e<S;e++,p+=4){if(w[p+2]<o||w[p]>s||w[p+3]<h||w[p+1]>u)continue;let m=M(e);r=P(e);do{if(r.prev.next===r&&s>=r.x&&r.x>=o&&s!==r.x&&B(n<l?s:a,n,o,l,n<l?a:s,n,r.x,r.y)){var c,f;let e=Math.abs(n-r.y)/(s-r.x);(j(r,t)||r.y===n&&r.next.y===n&&r.next.x>s)&&(e<d||e===d&&(r.x>i.x||r.x===i.x&&(c=i,f=r,0>G(c.prev,c,f.prev)&&0>G(f.next,c,c.next))))&&(i=r,d=e)}r=r.next}while(r!==m)}return i}(t,e);if(!i)return e;let r=V(i,t);return A(i,r.next.next),_(r,r.next),_(i,i.next)}(s[t],i);return b=!1,_(i)}(t,e,n,i)),t.length>80*i){o=t[0],l=t[1];let e=o,r=l;for(let n=i;n<s;n+=i){let i=t[n],s=t[n+1];i<o&&(o=i),s<l&&(l=s),i>e&&(e=i),s>r&&(r=s)}h=0!==(h=Math.max(e-o,r-l))?32767/h:0}return function t(e,i,r,s,n){n&&function(t,e,i,r){let s=t,n=0;do s.z=z(s.x,s.y,e,i,r),k[n++]=s,s=s.next;while(s!==t);!function(t){if(t<=32){for(let e=1;e<t;e++){let t=k[e],i=t.z,r=e-1;for(;r>=0&&k[r].z>i;)k[r+1]=k[r],r--;k[r+1]=t}return}I.length<t&&(I=new Uint32Array(t),R=new Uint32Array(t),E=Array(t));for(let e=0;e<t;e++)I[e]=k[e].z;F(t,k,I,E,R,0),F(t,E,R,k,I,8),F(t,k,I,E,R,16),F(t,E,R,k,I,24)}(n);let a=null;for(let t=0;t<n;t++){let e=k[t];e.prevZ=a,a&&(a.nextZ=e),a=e}a.nextZ=null}(e,r,s,n);let a=e,o=!1;for(;e.prev!==e.next;){let l=e.prev,h=e.next;if(0>G(l,e,h)&&(n?function(t,e,i,r){let s=t.prev,n=t.next,a=s.x,o=t.x,l=n.x,h=s.y,u=t.y,d=n.y,c=Math.min(a,o,l),f=Math.min(h,u,d),p=Math.max(a,o,l),m=Math.max(h,u,d),g=z(c,f,e,i,r),x=z(p,m,e,i,r),y=t.prevZ;for(;y&&y.z>=g;){if(y.x>=c&&y.x<=p&&y.y>=f&&y.y<=m&&y!==n&&(a!==y.x||h!==y.y)&&B(a,h,o,u,l,d,y.x,y.y)&&G(y.prev,y,y.next)>=0)return!1;y=y.prevZ}let _=t.nextZ;for(;_&&_.z<=x;){if(_.x>=c&&_.x<=p&&_.y>=f&&_.y<=m&&_!==n&&(a!==_.x||h!==_.y)&&B(a,h,o,u,l,d,_.x,_.y)&&G(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}(e,r,s,n):function(t){let e=t.prev,i=t.next,r=e.x,s=t.x,n=i.x,a=e.y,o=t.y,l=i.y,h=Math.min(r,s,n),u=Math.min(a,o,l),d=Math.max(r,s,n),c=Math.max(a,o,l),f=i.next;for(;f!==e;){if(f.x>=h&&f.x<=d&&f.y>=u&&f.y<=c&&(r!==f.x||a!==f.y)&&B(r,a,s,o,n,l,f.x,f.y)&&G(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(e))){i.push(l.i,e.i,h.i),N(e),e=h,a=h;continue}if((e=h)===a){if(g=!1,e=_(e),g){a=e;continue}if(!o){a=e=function(t,e){let i=t,r=!1;do{let s=i.prev,n=i.next.next;U(s,i,i.next,n,!1)&&j(s,n)&&j(n,s)&&(e.push(s.i,i.i,n.i),N(i),N(i.next),i=t=n,r=!0),i=i.next}while(i!==t);return r?_(i):i}(e,i),o=!0;continue}!function(e,i,r,s,n){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&function(t,e){let i=D(t,e)&&G(t.prev,t,t.next)>0&&G(e.prev,e,e.next)>0;return t.next.i!==e.i&&(i||j(t,e)&&j(e,t)&&(0!==G(t.prev,t,e.prev)||0!==G(t,e.prev,e)))&&!function(t,e){let i=Math.min(t.x,e.x),r=Math.max(t.x,e.x),s=Math.min(t.y,e.y),n=Math.max(t.y,e.y),a=t;do{let o=a.next;if(a.x>r&&o.x>r||a.x<i&&o.x<i||a.y>n&&o.y>n||a.y<s&&o.y<s){a=o;continue}if(a.i!==t.i&&o.i!==t.i&&a.i!==e.i&&o.i!==e.i&&U(a,o,t,e))return!0;a=o}while(a!==t);return!1}(t,e)&&(i||function(t,e){let i=t,r=!1,s=(t.x+e.x)/2,n=(t.y+e.y)/2;do{let t=i.next;i.y>n!=t.y>n&&s<(t.x-i.x)*(n-i.y)/(t.y-i.y)+i.x&&(r=!r),i=t}while(i!==t);return r}(t,e))}(a,e)){let o=V(a,e);a=_(a,a.next),o=_(o,o.next),t(a,i,r,s,n),t(o,i,r,s,n);return}e=e.next}a=a.next}while(a!==e)}(e,i,r,s,n);break}}}(n,a,o,l,h),a}function y(t,e,i,r,s){let n=null;
225if(s===function(t,e,i,r){let s=0;for(let n=e,a=i-r;n<i;n+=r)s+=(t[a]-t[n])*(t[n+1]+t[a+1]),a=n;return s}(t,e,i,r)>0)for(let s=e;s<i;s+=r)n=X(s/r|0,t[s],t[s+1],n);else for(let s=i-r;s>=e;s-=r)n=X(s/r|0,t[s],t[s+1],n);return n&&D(n,n.next)&&(N(n),n=n.next),n}function _(t,e=t){let i=e===t,r=t,s;do s=!1,r!==r.next&&(0===m.size||!m.has(r))&&(D(r,r.next)||0===G(r.prev,r,r.next))?((i||r===e)&&(e=r.prev),g=!0,N(r),r=r.prev,s=!0):(i||r!==e)&&(r=r.next,s=!i);while(s||r!==e);return e}let b=!1;function v(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}let w=new Float64Array(0),S=0,C=[],T=[];function A(t,e){let i=t;do{let t=S++;C[t]=i;let r=1/0,s=1/0,n=-1/0,a=-1/0,o=0;do{let e=i.next;i.z=t,i.x<r&&(r=i.x),i.x>n&&(n=i.x),i.y<s&&(s=i.y),i.y>a&&(a=i.y),e.x<r&&(r=e.x),e.x>n&&(n=e.x),e.y<s&&(s=e.y),e.y>a&&(a=e.y),i=e}while(++o<16&&i!==e);T[t]=i;let l=4*t;w[l]=r,w[l+1]=s,w[l+2]=n,w[l+3]=a}while(i!==e)}function M(t){let e=T[t];for(;e.prev.next!==e;)e=e.next;return T[t]=e,e}function P(t){let e=C[t];for(;e.prev.next!==e;)e=e.next;return C[t]=e,e}let k=[],E=[],I=new Uint32Array(0),R=new Uint32Array(0),O=new Uint32Array(256);function F(t,e,i,r,s,n){O.fill(0);for(let e=0;e<t;e++)O[i[e]>>>n&255]++;let a=0;for(let t=0;t<256;t++){let e=O[t];O[t]=a,a+=e}for(let a=0;a<t;a++){let t=i[a],o=O[t>>>n&255]++;r[o]=e[a],s[o]=t}}function z(t,e,i,r,s){return(t=((t=((t=((t=((t=(t-i)*s|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)|(e=((e=((e=((e=((e=(e-r)*s|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)<<1}function B(t,e,i,r,s,n,a,o){return(s-a)*(e-o)>=(t-a)*(n-o)&&(t-a)*(r-o)>=(i-a)*(e-o)&&(i-a)*(n-o)>=(s-a)*(r-o)}function G(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function D(t,e){return t.x===e.x&&t.y===e.y}function U(t,e,i,r,s=!0){let n=G(t,e,i),a=G(t,e,r),o=G(i,r,t),l=G(i,r,e);return(n>0&&a<0||n<0&&a>0)&&(o>0&&l<0||o<0&&l>0)||!!s&&!!(0===n&&L(t,i,e)||0===a&&L(t,r,e)||0===o&&L(i,t,r)||0===l&&L(i,e,r))}function L(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function j(t,e){return 0>G(t.prev,t,t.next)?G(t,e,t.next)>=0&&G(t,t.prev,e)>=0:0>G(t,e,t.prev)||0>G(t,t.next,e)}function V(t,e){let i=Y(t.i,t.x,t.y),r=Y(e.i,e.x,e.y),s=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,r.next=i,i.prev=r,n.next=r,r.prev=n,r}function X(t,e,i,r){let s=Y(t,e,i);return r?(s.next=r.next,s.prev=r,r.next.prev=s,r.next=s):(s.prev=s,s.next=s),s}function N(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),b&&function(t,e){let i=4*t.z;e.x<w[i]&&(w[i]=e.x),e.y<w[i+1]&&(w[i+1]=e.y),e.x>w[i+2]&&(w[i+2]=e.x),e.y>w[i+3]&&(w[i+3]=e.y)}(t.prev,t.next)}function Y(t,e,i){return{i:t,x:e,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null}}i(5479);let W=x.default||x;function $(t,e,i,r,s,n,a){let o=W(t,e,2);if(!o)return;for(let t=0;t<o.length;t+=3)n[a++]=o[t]+s,n[a++]=o[t+1]+s,n[a++]=o[t+2]+s;let l=s*r;for(let e=0;e<t.length;e+=2)i[l]=t[e],i[l+1]=t[e+1],l+=r}let H=[],q={extension:{type:r.Ag.ShapeBuilder,name:"polygon"},build(t,e){for(let i=0;i<t.points.length;i++)e[i]=t.points[i];return!0},triangulate(t,e,i,r,s,n){$(t,H,e,i,r,s,n)}},Q={extension:{type:r.Ag.ShapeBuilder,name:"rectangle"},build(t,e){let i=t.x,r=t.y,s=t.width,n=t.height;return!!(s>0&&n>0)&&(e[0]=i,e[1]=r,e[2]=i+s,e[3]=r,e[4]=i+s,e[5]=r+n,e[6]=i,e[7]=r+n,!0)},triangulate(t,e,i,r,s,n){let a=0;e[(r*=i)+a]=t[0],e[r+a+1]=t[1],a+=i,e[r+a]=t[2],e[r+a+1]=t[3],a+=i,e[r+a]=t[6],e[r+a+1]=t[7],a+=i,e[r+a]=t[4],e[r+a+1]=t[5],a+=i;let o=r/i;s[n++]=o,s[n++]=o+1,s[n++]=o+2,s[n++]=o+1,s[n++]=o+3,s[n++]=o+2}},Z={extension:{type:r.Ag.ShapeBuilder,name:"triangle"},build:(t,e)=>(e[0]=t.x,e[1]=t.y,e[2]=t.x2,e[3]=t.y2,e[4]=t.x3,e[5]=t.y3,!0),triangulate(t,e,i,r,s,n){let a=0;e[(r*=i)+a]=t[0],e[r+a+1]=t[1],a+=i,e[r+a]=t[2],e[r+a+1]=t[3],a+=i,e[r+a]=t[4],e[r+a+1]=t[5];let o=r/i;s[n++]=o,s[n++]=o+1,s[n++]=o+2}};var K=i(24996);let J={};r.XO.handleByMap(r.Ag.ShapeBuilder,J),r.XO.add(Q,q,Z,u,d,c);let tt=new n.M,te=new s.u;function ti(t,e){let{geometryData:i,batches:r}=e;r.length=0,i.indices.length=0,i.vertices.length=0,i.uvs.length=0;for(let e=0;e<t.instructions.length;e++){let s=t.instructions[e];
225if("texture"===s.action)!function(t,e,i){let r=[],s=J.rectangle;tt.x=t.dx,tt.y=t.dy,tt.width=t.dw,tt.height=t.dh;let n=t.transform;if(!s.build(tt,r))return;let{vertices:o,uvs:u,indices:d}=i,c=d.length,f=o.length/2;n&&a(r,n),s.triangulate(r,o,2,f,d,c);let p=t.image,m=p.uvs;u.push(m.x0,m.y0,m.x1,m.y1,m.x3,m.y3,m.x2,m.y2);let g=l.Z.get(h.G);g.indexOffset=c,g.indexSize=d.length-c,g.attributeOffset=f,g.attributeSize=o.length/2-f,g.baseColor=t.style,g.alpha=t.alpha,g.texture=p,g.geometryData=i,e.push(g)}(s.data,r,i);else if("fill"===s.action||"stroke"===s.action){let t="stroke"===s.action,e=s.data.path.shapePath,n=s.data.style,a=s.data.hole;t&&a&&tr(a.shapePath,n,!0,r,i),a&&(e.shapePrimitives[e.shapePrimitives.length-1].holes=a.shapePath.shapePrimitives),tr(e,n,t,r,i)}}}function tr(t,e,i,r,s){let{vertices:n,uvs:u,indices:d}=s;t.shapePrimitives.forEach(({shape:t,transform:c,holes:m})=>{let g=[],x=J[t.type];if(!x.build(t,g))return;let y=d.length,_=n.length/2,b="triangle-list";if(c&&a(g,c),i){let i=t.closePath??!0;e.pixelLine?(!function(t,e,i,r){let s=p.B;if(0===t.length)return;let n=t[0],a=t[1],o=t[t.length-2],l=t[t.length-1],h=e||Math.abs(n-o)<s&&Math.abs(a-l)<s,u=t.length/2,d=i.length/2;for(let e=0;e<u;e++)i.push(t[2*e]),i.push(t[2*e+1]);for(let t=0;t<u-1;t++)r.push(d+t,d+t+1);h&&r.push(d+u-1,d)}(g,i,n,d),b="line-list"):(0,f.h)(g,e,!1,i,n,d)}else if(m){let t=[],e=g.slice();(function(t){let e=[];for(let i=0;i<t.length;i++){let r=t[i].shape,s=[];J[r.type].build(r,s)&&e.push(s)}return e})(m).forEach(i=>{t.push(e.length/2),e.push(...i)}),$(e,t,n,2,_,d,y)}else x.triangulate(g,n,2,_,d,y);let v=u.length/2,w=e.texture;if(w!==o.g.WHITE){let i=(0,K.Y)(te,e,t,c);!function(t,e,i,r,s,n,a,o=null){let l=0;i*=2,s*=2;let h=o.a,u=o.b,d=o.c,c=o.d,f=o.tx,p=o.ty;for(;l<a;){let e=t[i],n=t[i+1];r[s]=h*e+d*n+f,r[s+1]=u*e+c*n+p,s+=2,i+=2,l++}}(n,2,_,u,v,2,n.length/2-_,i)}else{var S=v,C=n.length/2-_;let t=0;for(S*=2;t<C;)u[S]=0,u[S+1]=0,S+=2,t++}let T=l.Z.get(h.G);T.indexOffset=y,T.indexSize=d.length-y,T.attributeOffset=_,T.attributeSize=n.length/2-_,T.baseColor=e.color,T.alpha=e.alpha,T.texture=w,T.geometryData=s,T.topology=b,r.push(T)})}},99999:(t,e,i)=>{"use strict";i.d(e,{m:()=>a});var r=i(15744),s=i(48036);let n={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class a{constructor(t,e){this.uid=(0,s.L)("fillPattern"),this._tick=0,this.transform=new r.u;let i=void 0!==t.texture?t:{texture:t,repetition:e};this.texture=i.texture,this.textureSpace=i.textureSpace??"global";let a=i.repetition;a&&(this.texture.source.style.addressModeU=n[a].addressModeU,this.texture.source.style.addressModeV=n[a].addressModeV)}setTransform(t){if(t){if(this.transform.equals(t))return;this.transform.copyFrom(t)}else{if(this.transform.isIdentity())return;this.transform.identity()}this._tick++}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture=t,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.