显示优化

This commit is contained in:
tianmo committed 2026-09-05 22:00:03 +08:00
1 parent 0a0ab592a4
commit 26371ac7b4
6 files changed
+153 -98

No files matched your search

@@ -1,2 +1,2 @@
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-BgZ-wFxF.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-BgZ-wFxF.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-yJqyT1FD.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-yJqyT1FD.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
${n}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof ht){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,n,s){const i=new ht(t);i.dispose=()=>{var o;if(!(this.cache.assetsRefCount[n]<=0)){this.disposeAssetInternal(n);for(const r of i.pages)(o=r.texture)==null||o.dispose()}};for(const o of i.pages){const r=this.texturePath(e,o.name,s);this.texturePmaInfo[this.pathPrefix+r]=o.pma}return i}createTexture(t,e,n){const s=this.textureLoader(n,e),i=s.dispose.bind(s);return s.dispose=()=>{this.disposeAssetInternal(t)&&i()},s}texturePath(t,e,n){return n?n[e]:t+e}}const nt=class nt{constructor(){T(this,"assets",{});T(this,"assetsRefCount",{});T(this,"assetsLoaded",{})}static getCache(t){const e=nt.AVAILABLE_CACHES.get(t);if(e)return e;const n=new nt;return nt.AVAILABLE_CACHES.set(t,n),n}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};T(nt,"AVAILABLE_CACHES",new Map);let lt=nt;class bt{constructor(){T(this,"callbacks",{});T(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),n=e.length,s=new Uint8Array(n);for(let i=0;i<n;i++)s[i]=e.charCodeAt(i);return s}dataUriToUint8Array(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");if(e===-1)throw new Error("Not a binary data URI.");return e+=7,this.base64ToUint8Array(t.substr(e))}downloadText(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToString(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.overrideMimeType("text/html"),i.open("GET",s||t,!0);const o=()=>{this.finish(t,i.status,i.responseText)};i.onload=o,i.onerror=o,i.send()}downloadJson(t,e,n){this.downloadText(t,s=>{e(JSON.parse(s))},n)}downloadBinary(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.open("GET",s||t,!0),i.responseType="arraybuffer";const o=()=>{this.finish(t,i.status,i.response)};i.onload=()=>{i.status===200||i.status===0?this.finish(t,200,new Uint8Array(i.response)):o()},i.onerror=o,i.send()}start(t,e,n){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,n)}}finish(t,e,n){const s=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let i=0,o=s.length;i<o;i+=2)s[i](n);else for(let i=1,o=s.length;i<o;i+=2)s[i](e,n)}}class Vt{constructor(t,e=!1){T(this,"atlas");T(this,"allowMissingRegions");this.atlas=t,this.allowMissingRegions=e}findRegions(t,e,n){const s=n.regions;for(let i=0,o=s.length;i<o;i++)s[i]=this.findRegion(t,n.getPath(e,i))}findRegion(t,e){const n=this.atlas.findRegion(e);if(!n&&!this.allowMissingRegions)throw new Error(`Region not found in atlas: ${e} (attachment: ${t})`);return n}newRegionAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new pt(n,i)}newMeshAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new dt(n,i)}newBoundingBoxAttachment(t,e,n){return new ut(n)}newPathAttachment(t,e,n){return new mt(n)}newPointAttachment(t,e,n){return new yt(n)}newClippingAttachment(t,e,n){return new rt(n)}}class Lt{constructor(){T(this,"minX",0);T(this,"minY",0);T(this,"maxX",0);T(this,"maxY",0);T(this,"boundingBoxes",[]);T(this,"polygons",[]);T(this,"polygonPool",new at(()=>D.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");const n=this.boundingBoxes,s=this.polygons,i=this.polygonPool,o=t.slots,r=o.length;n.length=0,i.freeAll(s),s.length=0;for(let l=0;l<r;l++){const c=o[l];if(!c.bone.active)continue;const a=c.appliedPose.attachment;if(a instanceof ut){n.push(a);let h=i.obtain();h.length!==a.worldVerticesLength&&(h=D.newFloatArray(a.worldVerticesLength)),s.push(h),a.computeWorldVertices(t,c,0,a.worldVerticesLength,h,0,2)}}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)}aabbCompute(){let t=Number.POSITIVE_INFLine truncated
@@ -1,4 +1,4 @@
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-BgZ-wFxF.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-BgZ-wFxF.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-D076Onjg.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-D076Onjg.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-yJqyT1FD.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-yJqyT1FD.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-BrVMjrya.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-BrVMjrya.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1 +1 @@
.stage-wrap[data-v-aa9fab85]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-aa9fab85]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-aa9fab85]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-aa9fab85]:active{cursor:grabbing}.topbar[data-v-aa9fab85]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-aa9fab85]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-aa9fab85]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-aa9fab85]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-aa9fab85]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-aa9fab85]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-aa9fab85]{position:relative;flex:0 0 auto}.background-btn[data-v-aa9fab85]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-aa9fab85]:hover,.background-btn.on[data-v-aa9fab85]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-aa9fab85]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-aa9fab85]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-aa9fab85]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-aa9fab85]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-aa9fab85]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-aa9fab85]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-aa9fab85]{display:none}.background-file-name[data-v-aa9fab85]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-aa9fab85]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-aa9fab85]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-aa9fab85]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-aa9fab85]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-aa9fab85]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-aa9fab85]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-aa9fab85]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-aa9fab85]:hover,.help-btn.on[data-v-aa9fab85]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-aa9fab85]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-aa9fab85]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-aa9fab85]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-aa9fab85]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-aa9fab85]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-aa9fab85]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-aa9fab85]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-aa9fab85]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-aa9fab85]{min-height:0;overflowLine truncated
.stage-wrap[data-v-94c32e62]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-94c32e62]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-94c32e62]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-94c32e62]:active{cursor:grabbing}.topbar[data-v-94c32e62]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-94c32e62]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-94c32e62]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-94c32e62]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-94c32e62]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-94c32e62]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-94c32e62]{position:relative;flex:0 0 auto}.background-btn[data-v-94c32e62]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-94c32e62]:hover,.background-btn.on[data-v-94c32e62]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-94c32e62]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-94c32e62]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-94c32e62]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-94c32e62]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-94c32e62]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-94c32e62]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-94c32e62]{display:none}.background-file-name[data-v-94c32e62]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-94c32e62]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-94c32e62]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-94c32e62]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-94c32e62]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-94c32e62]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-94c32e62]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-94c32e62]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-94c32e62]:hover,.help-btn.on[data-v-94c32e62]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-94c32e62]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-94c32e62]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-94c32e62]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-94c32e62]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-94c32e62]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-94c32e62]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-94c32e62]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-94c32e62]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-94c32e62]{min-height:0;overflowLine truncated
@@ -1,43 +1,43 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BYi7_8I0.js","assets/index-D076Onjg.js"])))=>i.map(i=>d[i]);
var TS=Object.defineProperty;var AS=(s,e,t)=>e in s?TS(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var x=(s,e,t)=>AS(s,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/**
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C_0QkTeX.js","assets/index-BrVMjrya.js"])))=>i.map(i=>d[i]);
var CS=Object.defineProperty;var IS=(s,e,t)=>e in s?CS(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var x=(s,e,t)=>IS(s,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Wm(s){const e=Object.create(null);for(const t of s.split(","))e[t]=1;return t=>t in e}const Qt={},ho=[],kn=()=>{},vy=()=>!1,qh=s=>s.charCodeAt(0)===111&&s.charCodeAt(1)===110&&(s.charCodeAt(2)>122||s.charCodeAt(2)<97),Kh=s=>s.startsWith("onUpdate:"),ki=Object.assign,zm=(s,e)=>{const t=s.indexOf(e);t>-1&&s.splice(t,1)},ES=Object.prototype.hasOwnProperty,Wt=(s,e)=>ES.call(s,e),dt=Array.isArray,uo=s=>Ul(s)==="[object Map]",ko=s=>Ul(s)==="[object Set]",Xp=s=>Ul(s)==="[object Date]",Mt=s=>typeof s=="function",pi=s=>typeof s=="string",Ms=s=>typeof s=="symbol",zt=s=>s!==null&&typeof s=="object",yy=s=>(zt(s)||Mt(s))&&Mt(s.then)&&Mt(s.catch),xy=Object.prototype.toString,Ul=s=>xy.call(s),CS=s=>Ul(s).slice(8,-1),by=s=>Ul(s)==="[object Object]",Zh=s=>pi(s)&&s!=="NaN"&&s[0]!=="-"&&""+parseInt(s,10)===s,ol=Wm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jh=s=>{const e=Object.create(null);return(t=>e[t]||(e[t]=s(t)))},IS=/-\w/g,Zs=Jh(s=>s.replace(IS,e=>e.slice(1).toUpperCase())),RS=/\B([A-Z])/g,zr=Jh(s=>s.replace(RS,"-$1").toLowerCase()),wy=Jh(s=>s.charAt(0).toUpperCase()+s.slice(1)),Pu=Jh(s=>s?`on${wy(s)}`:""),En=(s,e)=>!Object.is(s,e),Lc=(s,...e)=>{for(let t=0;t<s.length;t++)s[t](...e)},Sy=(s,e,t,i=!1)=>{Object.defineProperty(s,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Qh=s=>{const e=parseFloat(s);return isNaN(e)?s:e},PS=s=>{const e=pi(s)?Number(s):NaN;return isNaN(e)?s:e};let Vp;const eu=()=>Vp||(Vp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Li(s){if(dt(s)){const e={};for(let t=0;t<s.length;t++){const i=s[t],n=pi(i)?BS(i):Li(i);if(n)for(const r in n)e[r]=n[r]}return e}else if(pi(s)||zt(s))return s}const kS=/;(?![^(]*\))/g,FS=/:([^]+)/,OS=/\/\*[^]*?\*\//g;function BS(s){const e={};return s.replace(OS,"").split(kS).forEach(t=>{if(t){const i=t.split(FS);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function rt(s){let e="";if(pi(s))e=s;else if(dt(s))for(let t=0;t<s.length;t++){const i=rt(s[t]);i&&(e+=i+" ")}else if(zt(s))for(const t in s)s[t]&&(e+=t+" ");return e.trim()}const LS="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",DS=Wm(LS);function _y(s){return!!s||s===""}function NS(s,e){if(s.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<s.length;i++)t=Fo(s[i],e[i]);return t}function Fo(s,e){if(s===e)return!0;let t=Xp(s),i=Xp(e);if(t||i)return t&&i?s.getTime()===e.getTime():!1;if(t=Ms(s),i=Ms(e),t||i)return s===e;if(t=dt(s),i=dt(e),t||i)return t&&i?NS(s,e):!1;if(t=zt(s),i=zt(e),t||i){if(!t||!i)return!1;const n=Object.keys(s).length,r=Object.keys(e).length;if(n!==r)return!1;for(const a in s){const o=s.hasOwnProperty(a),h=e.hasOwnProperty(a);if(o&&!h||!o&&h||!Fo(s[a],e[a]))return!1}}return String(s)===String(e)}function qm(s,e){return s.findIndex(t=>Fo(t,e))}const My=s=>!!(s&&s.__v_isRef===!0),je=s=>pi(s)?s:s==null?"":dt(s)||zt(s)&&(s.toString===xy||!Mt(s.toString))?My(s)?je(s.value):JSON.stringify(s,Ty,2):String(s),Ty=(s,e)=>My(e)?Ty(s,e.value):uo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],r)=>(t[ku(i,r)+" =>"]=n,t),{})}:ko(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>ku(t))}:Ms(e)?ku(e):zt(e)&&!dt(e)&&!by(e)?String(e):e,ku=(s,e="")=>{var t;return Ms(s)?`Symbol(${(t=s.description)!=null?t:e})`:s};/**
**/function Km(s){const e=Object.create(null);for(const t of s.split(","))e[t]=1;return t=>t in e}const ii={},fo=[],Pn=()=>{},by=()=>!1,Jh=s=>s.charCodeAt(0)===111&&s.charCodeAt(1)===110&&(s.charCodeAt(2)>122||s.charCodeAt(2)<97),Qh=s=>s.startsWith("onUpdate:"),Oi=Object.assign,Zm=(s,e)=>{const t=s.indexOf(e);t>-1&&s.splice(t,1)},RS=Object.prototype.hasOwnProperty,zt=(s,e)=>RS.call(s,e),dt=Array.isArray,mo=s=>Yl(s)==="[object Map]",Oo=s=>Yl(s)==="[object Set]",$p=s=>Yl(s)==="[object Date]",_t=s=>typeof s=="function",gi=s=>typeof s=="string",Ss=s=>typeof s=="symbol",qt=s=>s!==null&&typeof s=="object",wy=s=>(qt(s)||_t(s))&&_t(s.then)&&_t(s.catch),Sy=Object.prototype.toString,Yl=s=>Sy.call(s),PS=s=>Yl(s).slice(8,-1),_y=s=>Yl(s)==="[object Object]",eu=s=>gi(s)&&s!=="NaN"&&s[0]!=="-"&&""+parseInt(s,10)===s,hl=Km(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tu=s=>{const e=Object.create(null);return(t=>e[t]||(e[t]=s(t)))},kS=/-\w/g,qs=tu(s=>s.replace(kS,e=>e.slice(1).toUpperCase())),FS=/\B([A-Z])/g,jr=tu(s=>s.replace(FS,"-$1").toLowerCase()),My=tu(s=>s.charAt(0).toUpperCase()+s.slice(1)),Ou=tu(s=>s?`on${My(s)}`:""),An=(s,e)=>!Object.is(s,e),Uc=(s,...e)=>{for(let t=0;t<s.length;t++)s[t](...e)},Ty=(s,e,t,i=!1)=>{Object.defineProperty(s,e,{configurable:!0,enumerable:!1,writable:i,value:t})},iu=s=>{const e=parseFloat(s);return isNaN(e)?s:e},OS=s=>{const e=gi(s)?Number(s):NaN;return isNaN(e)?s:e};let Gp;const su=()=>Gp||(Gp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ni(s){if(dt(s)){const e={};for(let t=0;t<s.length;t++){const i=s[t],n=gi(i)?NS(i):Ni(i);if(n)for(const r in n)e[r]=n[r]}return e}else if(gi(s)||qt(s))return s}const BS=/;(?![^(]*\))/g,LS=/:([^]+)/,DS=/\/\*[^]*?\*\//g;function NS(s){const e={};return s.replace(DS,"").split(BS).forEach(t=>{if(t){const i=t.split(LS);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ot(s){let e="";if(gi(s))e=s;else if(dt(s))for(let t=0;t<s.length;t++){const i=ot(s[t]);i&&(e+=i+" ")}else if(qt(s))for(const t in s)s[t]&&(e+=t+" ");return e.trim()}const US="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",XS=Km(US);function Ay(s){return!!s||s===""}function VS(s,e){if(s.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<s.length;i++)t=Bo(s[i],e[i]);return t}function Bo(s,e){if(s===e)return!0;let t=$p(s),i=$p(e);if(t||i)return t&&i?s.getTime()===e.getTime():!1;if(t=Ss(s),i=Ss(e),t||i)return s===e;if(t=dt(s),i=dt(e),t||i)return t&&i?VS(s,e):!1;if(t=qt(s),i=qt(e),t||i){if(!t||!i)return!1;const n=Object.keys(s).length,r=Object.keys(e).length;if(n!==r)return!1;for(const a in s){const o=s.hasOwnProperty(a),h=e.hasOwnProperty(a);if(o&&!h||!o&&h||!Bo(s[a],e[a]))return!1}}return String(s)===String(e)}function Jm(s,e){return s.findIndex(t=>Bo(t,e))}const Ey=s=>!!(s&&s.__v_isRef===!0),je=s=>gi(s)?s:s==null?"":dt(s)||qt(s)&&(s.toString===Sy||!_t(s.toString))?Ey(s)?je(s.value):JSON.stringify(s,Cy,2):String(s),Cy=(s,e)=>Ey(e)?Cy(s,e.value):mo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],r)=>(t[Bu(i,r)+" =>"]=n,t),{})}:Oo(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Bu(t))}:Ss(e)?Bu(e):qt(e)&&!dt(e)&&!_y(e)?String(e):e,Bu=(s,e="")=>{var t;return Ss(s)?`Symbol(${(t=s.description)!=null?t:e})`:s};/**
* @vue/reactivity v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ii;class Ay{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Ii&&(Ii.active?(this.parent=Ii,this.index=(Ii.scopes||(Ii.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=Ii;try{return Ii=this,e()}finally{Ii=t}}}on(){++this._on===1&&(this.prevScope=Ii,Ii=this)}off(){if(this._on>0&&--this._on===0){if(Ii===this)Ii=this.prevScope;else{let e=Ii;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function Ey(s){return new Ay(s)}function Cy(){return Ii}function US(s,e=!1){Ii&&Ii.cleanups.push(s)}let si;const Fu=new WeakSet;class Iy{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ii&&(Ii.active?Ii.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fu.has(this)&&(Fu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Py(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yp(this),ky(this);const e=si,t=Js;si=this,Js=!0;try{return this.fn()}finally{Fy(this),si=e,Js=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Jm(e);this.deps=this.depsTail=void 0,Yp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Af(this)&&this.run()}get dirty(){return Af(this)}}let Ry=0,ll,cl;function Py(s,e=!1){if(s.flags|=8,e){s.next=cl,cl=s;return}s.next=ll,ll=s}function Km(){Ry++}function Zm(){if(--Ry>0)return;if(cl){let e=cl;for(cl=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;ll;){let e=ll;for(ll=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function ky(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Fy(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),Jm(i),XS(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function Af(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Oy(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function Oy(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===Sl)||(s.globalVersion=Sl,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!Af(s))))return;s.flags|=2;const e=s.dep,t=si,i=Js;si=s,Js=!0;try{ky(s);const n=s.fn(s._value);(e.version===0||En(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{si=t,Js=i,Fy(s),s.flags&=-3}}function Jm(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)Jm(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function XS(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let Js=!0;const By=[];function cr(){By.push(Js),Js=!1}function hr(){const s=By.pop();Js=s===void 0?!0:s}function Yp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=si;si=void 0;try{e()}finally{si=t}}}let Sl=0;class VS{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Qm{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!si||!Js||si===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==si)t=this.activeLink=new VS(si,this),si.deps?(t.prevDep=si.depsTail,si.depsTail.nextDep=t,si.depsTail=t):si.deps=si.depsTail=t,Ly(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=si.depsTailLine truncated
**/let Pi;class Iy{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Pi&&(Pi.active?(this.parent=Pi,this.index=(Pi.scopes||(Pi.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=Pi;try{return Pi=this,e()}finally{Pi=t}}}on(){++this._on===1&&(this.prevScope=Pi,Pi=this)}off(){if(this._on>0&&--this._on===0){if(Pi===this)Pi=this.prevScope;else{let e=Pi;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function Ry(s){return new Iy(s)}function Py(){return Pi}function YS(s,e=!1){Pi&&Pi.cleanups.push(s)}let ri;const Lu=new WeakSet;class ky{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Pi&&(Pi.active?Pi.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Lu.has(this)&&(Lu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Oy(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hp(this),By(this);const e=ri,t=Ks;ri=this,Ks=!0;try{return this.fn()}finally{Ly(this),ri=e,Ks=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)tp(e);this.deps=this.depsTail=void 0,Hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Lu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){If(this)&&this.run()}get dirty(){return If(this)}}let Fy=0,ul,dl;function Oy(s,e=!1){if(s.flags|=8,e){s.next=dl,dl=s;return}s.next=ul,ul=s}function Qm(){Fy++}function ep(){if(--Fy>0)return;if(dl){let e=dl;for(dl=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;ul;){let e=ul;for(ul=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function By(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ly(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),tp(i),$S(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function If(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Dy(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function Dy(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===Tl)||(s.globalVersion=Tl,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!If(s))))return;s.flags|=2;const e=s.dep,t=ri,i=Ks;ri=s,Ks=!0;try{By(s);const n=s.fn(s._value);(e.version===0||An(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{ri=t,Ks=i,Ly(s),s.flags&=-3}}function tp(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)tp(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function $S(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let Ks=!0;const Ny=[];function cr(){Ny.push(Ks),Ks=!1}function hr(){const s=Ny.pop();Ks=s===void 0?!0:s}function Hp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=ri;ri=void 0;try{e()}finally{ri=t}}}let Tl=0;class GS{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ip{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ri||!Ks||ri===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ri)t=this.activeLink=new GS(ri,this),ri.deps?(t.prevDep=ri.depsTail,ri.depsTail.nextDep=t,ri.depsTail=t):ri.deps=ri.depsTail=t,Uy(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=ri.depsTailLine truncated
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Xl(s,e,t,i){try{return i?s(...i):s()}catch(n){su(n,e,t)}}function Ls(s,e,t,i){if(Mt(s)){const n=Xl(s,e,t,i);return n&&yy(n)&&n.catch(r=>{su(r,e,t)}),n}if(dt(s)){const n=[];for(let r=0;r<s.length;r++)n.push(Ls(s[r],e,t,i));return n}}function su(s,e,t,i=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||Qt;if(e){let o=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](s,h,l)===!1)return}o=o.parent}if(r){cr(),Xl(r,null,10,[s,h,l]),hr();return}}p_(s,t,n,i,a)}function p_(s,e,t,i=!0,n=!1){if(n)throw s;console.error(s)}const ns=[];let yn=-1;const fo=[];let Ar=null,Ja=0;const Gy=Promise.resolve();let th=null;function nu(s){const e=th||Gy;return s?e.then(this?s.bind(this):s):e}function g_(s){let e=yn+1,t=ns.length;for(;e<t;){const i=e+t>>>1,n=ns[i],r=Ml(n);r<s||r===s&&n.flags&2?e=i+1:t=i}return e}function ip(s){if(!(s.flags&1)){const e=Ml(s),t=ns[ns.length-1];!t||!(s.flags&2)&&e>=Ml(t)?ns.push(s):ns.splice(g_(e),0,s),s.flags|=1,Hy()}}function Hy(){th||(th=Gy.then(Wy))}function v_(s){if(!dt(s))Ar&&s.id===-1?Ar.splice(Ja+1,0,s):s.flags&1||(fo.push(s),s.flags|=1);else for(let e=0;e<s.length;e++)fo.push(s[e]);Hy()}function Gp(s,e,t=yn+1){for(;t<ns.length;t++){const i=ns[t];if(i&&i.flags&2){if(s&&i.id!==s.uid)continue;ns.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function jy(s){if(fo.length){const e=[...new Set(fo)].sort((t,i)=>Ml(t)-Ml(i));if(fo.length=0,Ar){for(let t=0;t<e.length;t++)Ar.push(e[t]);return}for(Ar=e,Ja=0;Ja<Ar.length;Ja++){const t=Ar[Ja];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}Ar=null,Ja=0}}const Ml=s=>s.id==null?s.flags&2?-1:1/0:s.id;function Wy(s){try{for(yn=0;yn<ns.length;yn++){const e=ns[yn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Xl(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;yn<ns.length;yn++){const e=ns[yn];e&&(e.flags&=-2)}yn=-1,ns.length=0,jy(),th=null,(ns.length||fo.length)&&Wy()}}let Ji=null,zy=null;function ih(s){const e=Ji;return Ji=s,zy=s&&s.type.__scopeId||null,e}function sh(s,e=Ji,t){if(!e||s._n)return s;const i=(...n)=>{i._d&&oh(-1);const r=ih(e),a=or.length;let o;try{o=s(...n)}finally{for(let h=or.length;h>a;h--)ap();ih(r),i._d&&oh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function we(s,e){if(Ji===null)return s;const t=uu(Ji),i=s.dirs||(s.dirs=[]);for(let n=0;n<e.length;n++){let[r,a,o,h=Qt]=e[n];r&&(Mt(r)&&(r={mounted:r,updated:r}),r.deep&&Zn(a),i.push({dir:r,instance:t,value:a,oldValue:void 0,arg:o,modifiers:h}))}return s}function ta(s,e,t,i){const n=s.dirs,r=e&&e.dirs;for(let a=0;a<n.length;a++){const o=n[a];r&&(o.oldValue=r[a].value);let h=o.dir[i];h&&(cr(),Ls(h,t,8,[s.el,o,s,e]),hr())}}function y_(s,e){if(rs){let t=rs.provides;const i=rs.parent&&rs.parent.provides;i===t&&(t=rs.provides=Object.create(i)),t[s]=e}}function hl(s,e,t=!1){const i=op();if(i||Ta){let n=Ta?Ta._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(n&&s in n)return n[s];if(arguments.length>1)return t&&Mt(e)?e.call(i&&i.proxy):e}}function x_(){return!!(op()||Ta)}const b_=Symbol.for("v-scx"),w_=()=>hl(b_);function Ko(s,e){return sp(s,null,e)}function cs(s,e,t){return sp(s,e,t)}function sp(s,e,t=Qt){const{immediate:i,deep:n,flush:r,once:a}=t,o=ki({},t),h=e&&i||!e&&r!=="post";let l;if(Il){if(r==="sync"){const f=w_();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=kn,f.resume=kn,f.pause=kn,f}}const c=rs;o.call=(f,p,m)=>Ls(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{hs(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():ip(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=m_(s,e,o);return Il&&(l?l.push(d):h&&d()),d}function S_(s,e,t){const i=this.proxy,n=pi(s)?s.includes(".")?qy(i,s):()=>i[s]:s.bind(i,i);let r;Mt(e)?r=e:(r=e.handler,t=e);const a=Yl(this),o=sp(n,r.bind(i),t);return a(),o}function qy(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;n<t.length&&i;n++)i=i[t[n]];return i}}const __=Symbol("_vte"),ru=s=>s.__isTeleport,ks=Symbol("_leaveCb"),Vo=Symbol("_enterCb");function M_(){const s={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Da(()=>{s.isMounted=!0}),lu(()=>{s.isUnmounting=!0}),s}const Cs=[Function,Array],Ky={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Cs,onEnter:Cs,onAfterEnter:Cs,onEnterCancelled:Cs,onBeforeLeave:Cs,onLeave:Cs,onAfterLeave:Cs,onLeaveCancelled:Cs,onBeforeAppear:Cs,onAppear:Cs,onAfterAppear:Cs,onAppearCancelled:Cs},Zy=s=>{const e=s.subTree;return e.component?Zy(e.component):e},T_={name:"BaseTransition",props:Ky,setup(s,{slots:e}){const t=op(),i=M_();return()=>{const n=e.default&&ex(e.default(),!0),r=n&&n.length?Jy(n):t.subTree?Ue():void 0;if(!r)return;const a=$t(s),{mode:o}=a;if(i.isLeaving)return Lu(r);const h=nh(r);if(!h)return Lu(r);let l=Rf(h,a,i,t,u=>l=u);h.type!==Zi&&Tl(h,l);let Line truncated
**/function $l(s,e,t,i){try{return i?s(...i):s()}catch(n){au(n,e,t)}}function Os(s,e,t,i){if(_t(s)){const n=$l(s,e,t,i);return n&&wy(n)&&n.catch(r=>{au(r,e,t)}),n}if(dt(s)){const n=[];for(let r=0;r<s.length;r++)n.push(Os(s[r],e,t,i));return n}}function au(s,e,t,i=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||ii;if(e){let o=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](s,h,l)===!1)return}o=o.parent}if(r){cr(),$l(r,null,10,[s,h,l]),hr();return}}y_(s,t,n,i,a)}function y_(s,e,t,i=!0,n=!1){if(n)throw s;console.error(s)}const ns=[];let vn=-1;const po=[];let Mr=null,eo=0;const Wy=Promise.resolve();let nh=null;function ou(s){const e=nh||Wy;return s?e.then(this?s.bind(this):s):e}function x_(s){let e=vn+1,t=ns.length;for(;e<t;){const i=e+t>>>1,n=ns[i],r=El(n);r<s||r===s&&n.flags&2?e=i+1:t=i}return e}function rp(s){if(!(s.flags&1)){const e=El(s),t=ns[ns.length-1];!t||!(s.flags&2)&&e>=El(t)?ns.push(s):ns.splice(x_(e),0,s),s.flags|=1,zy()}}function zy(){nh||(nh=Wy.then(Ky))}function b_(s){if(!dt(s))Mr&&s.id===-1?Mr.splice(eo+1,0,s):s.flags&1||(po.push(s),s.flags|=1);else for(let e=0;e<s.length;e++)po.push(s[e]);zy()}function Wp(s,e,t=vn+1){for(;t<ns.length;t++){const i=ns[t];if(i&&i.flags&2){if(s&&i.id!==s.uid)continue;ns.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function qy(s){if(po.length){const e=[...new Set(po)].sort((t,i)=>El(t)-El(i));if(po.length=0,Mr){for(let t=0;t<e.length;t++)Mr.push(e[t]);return}for(Mr=e,eo=0;eo<Mr.length;eo++){const t=Mr[eo];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}Mr=null,eo=0}}const El=s=>s.id==null?s.flags&2?-1:1/0:s.id;function Ky(s){try{for(vn=0;vn<ns.length;vn++){const e=ns[vn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),$l(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;vn<ns.length;vn++){const e=ns[vn];e&&(e.flags&=-2)}vn=-1,ns.length=0,qy(),nh=null,(ns.length||po.length)&&Ky()}}let ts=null,Zy=null;function rh(s){const e=ts;return ts=s,Zy=s&&s.type.__scopeId||null,e}function ah(s,e=ts,t){if(!e||s._n)return s;const i=(...n)=>{i._d&&hh(-1);const r=rh(e),a=or.length;let o;try{o=s(...n)}finally{for(let h=or.length;h>a;h--)cp();rh(r),i._d&&hh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function xe(s,e){if(ts===null)return s;const t=mu(ts),i=s.dirs||(s.dirs=[]);for(let n=0;n<e.length;n++){let[r,a,o,h=ii]=e[n];r&&(_t(r)&&(r={mounted:r,updated:r}),r.deep&&Zn(a),i.push({dir:r,instance:t,value:a,oldValue:void 0,arg:o,modifiers:h}))}return s}function ta(s,e,t,i){const n=s.dirs,r=e&&e.dirs;for(let a=0;a<n.length;a++){const o=n[a];r&&(o.oldValue=r[a].value);let h=o.dir[i];h&&(cr(),Os(h,t,8,[s.el,o,s,e]),hr())}}function w_(s,e){if(rs){let t=rs.provides;const i=rs.parent&&rs.parent.provides;i===t&&(t=rs.provides=Object.create(i)),t[s]=e}}function fl(s,e,t=!1){const i=hp();if(i||Ta){let n=Ta?Ta._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(n&&s in n)return n[s];if(arguments.length>1)return t&&_t(e)?e.call(i&&i.proxy):e}}function S_(){return!!(hp()||Ta)}const __=Symbol.for("v-scx"),M_=()=>fl(__);function Qo(s,e){return ap(s,null,e)}function cs(s,e,t){return ap(s,e,t)}function ap(s,e,t=ii){const{immediate:i,deep:n,flush:r,once:a}=t,o=Oi({},t),h=e&&i||!e&&r!=="post";let l;if(kl){if(r==="sync"){const f=M_();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=Pn,f.resume=Pn,f.pause=Pn,f}}const c=rs;o.call=(f,p,m)=>Os(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{hs(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():rp(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=v_(s,e,o);return kl&&(l?l.push(d):h&&d()),d}function T_(s,e,t){const i=this.proxy,n=gi(s)?s.includes(".")?Jy(i,s):()=>i[s]:s.bind(i,i);let r;_t(e)?r=e:(r=e.handler,t=e);const a=Hl(this),o=ap(n,r.bind(i),t);return a(),o}function Jy(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;n<t.length&&i;n++)i=i[t[n]];return i}}const A_=Symbol("_vte"),lu=s=>s.__isTeleport,Rs=Symbol("_leaveCb"),Go=Symbol("_enterCb");function E_(){const s={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Da(()=>{s.isMounted=!0}),uu(()=>{s.isUnmounting=!0}),s}const As=[Function,Array],Qy={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:As,onEnter:As,onAfterEnter:As,onEnterCancelled:As,onBeforeLeave:As,onLeave:As,onAfterLeave:As,onLeaveCancelled:As,onBeforeAppear:As,onAppear:As,onAfterAppear:As,onAppearCancelled:As},ex=s=>{const e=s.subTree;return e.component?ex(e.component):e},C_={name:"BaseTransition",props:Qy,setup(s,{slots:e}){const t=hp(),i=E_();return()=>{const n=e.default&&sx(e.default(),!0),r=n&&n.length?tx(n):t.subTree?Ue():void 0;if(!r)return;const a=Yt(s),{mode:o}=a;if(i.isLeaving)return Uu(r);const h=oh(r);if(!h)return Uu(r);let l=Ff(h,a,i,t,u=>l=u);h.type!==es&&Cl(h,l);let Line truncated
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Bf;const sg=typeof window<"u"&&window.trustedTypes;if(sg)try{Bf=sg.createPolicy("vue",{createHTML:s=>s})}catch{}const Tx=Bf?s=>Bf.createHTML(s):s=>s,MM="http://www.w3.org/2000/svg",TM="http://www.w3.org/1998/Math/MathML",Gn=typeof document<"u"?document:null,ng=Gn&&Gn.createElement("template"),AM={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Gn.createElementNS(MM,s):e==="mathml"?Gn.createElementNS(TM,s):t?Gn.createElement(s,{is:t}):Gn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Gn.createTextNode(s),createComment:s=>Gn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Gn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const a=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{ng.innerHTML=Tx(i==="svg"?`<svg>${s}</svg>`:i==="mathml"?`<math>${s}</math>`:s);const o=ng.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},xr="transition",Yo="animation",Rl=Symbol("_vtc"),Ax={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},EM=ki({},Ky,Ax),CM=s=>(s.displayName="Transition",s.props=EM,s),IM=CM((s,{slots:e})=>SM(A_,RM(s),e)),sa=(s,e=[])=>{dt(s)?s.forEach(t=>t(...e)):s&&s(...e)},rg=s=>s?dt(s)?s.some(e=>e.length>1):s.length>1:!1;function RM(s){const e={};for(const k in s)k in Ax||(e[k]=s[k]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:o=`${t}-enter-to`,appearFromClass:h=r,appearActiveClass:l=a,appearToClass:c=o,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,p=PM(n),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:A,onBeforeAppear:T=v,onAppear:M=b,onAppearCancelled:R=y}=e,P=(k,O,L,U)=>{k._enterCancelled=U,na(k,O?c:o),na(k,O?l:a),L&&L()},F=(k,O)=>{k._isLeaving=!1,na(k,u),na(k,f),na(k,d),O&&O()},I=k=>(O,L)=>{const U=k?M:b,B=()=>P(O,k,L);sa(U,[O,B]),ag(()=>{na(O,k?h:r),Xn(O,k?c:o),rg(U)||og(O,i,m,B)})};return ki(e,{onBeforeEnter(k){sa(v,[k]),Xn(k,r),Xn(k,a)},onBeforeAppear(k){sa(T,[k]),Xn(k,h),Xn(k,l)},onEnter:I(!1),onAppear:I(!0),onLeave(k,O){k._isLeaving=!0;const L=()=>F(k,O);Xn(k,u),k._enterCancelled?(Xn(k,d),hg(k)):(hg(k),Xn(k,d)),ag(()=>{k._isLeaving&&(na(k,u),Xn(k,f),rg(w)||og(k,i,g,L))}),sa(w,[k,L])},onEnterCancelled(k){P(k,!1,void 0,!0),sa(y,[k])},onAppearCancelled(k){P(k,!0,void 0,!0),sa(R,[k])},onLeaveCancelled(k){F(k),sa(A,[k])}})}function PM(s){if(s==null)return null;if(zt(s))return[Uu(s.enter),Uu(s.leave)];{const e=Uu(s);return[e,e]}}function Uu(s){return PS(s)}function Xn(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[Rl]||(s[Rl]=new Set)).add(e)}function na(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[Rl];t&&(t.delete(e),t.size||(s[Rl]=void 0))}function ag(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let kM=0;function og(s,e,t,i){const n=s._endId=++kM,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:a,timeout:o,propCount:h}=FM(s,e);if(!a)return i();const l=a+"end";let c=0;const u=()=>{s.removeEventListener(l,d),r()},d=f=>{f.target===s&&++c>=h&&u()};setTimeout(()=>{c<h&&u()},o+1),s.addEventListener(l,d)}function FM(s,e){const t=window.getComputedStyle(s),i=p=>(t[p]||"").split(", "),n=i(`${xr}Delay`),r=i(`${xr}Duration`),a=lg(n,r),o=i(`${Yo}Delay`),h=i(`${Yo}Duration`),l=lg(o,h);let c=null,u=0,d=0;e===xr?a>0&&(c=xr,u=a,d=r.length):e===Yo?l>0&&(c=Yo,u=l,d=h.length):(u=Math.max(a,l),c=u>0?a>l?xr:Yo:null,d=c?c===xr?r.length:h.length:0);const f=c===xr&&/\b(?:transform|all)(?:,|$)/.test(i(`${xr}Property`).toString());return{type:c,timeout:u,propCount:d,hasTransform:f}}function lg(s,e){for(;s.length<e.length;)s=s.concat(s);return Math.max(...e.map((t,i)=>cg(t)+cg(s[i])))}function cg(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function hg(s){return(s?s.ownerDocument:document).body.offsetHeight}function OM(s,e,t){const i=s[Rl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const hh=Symbol("_vod"),Ex=Symbol("_vsh"),br={name:"show",beforeMount(s,{value:e},{transition:t}){s[hh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):$o(s,e)},mounted(s,{value:e},{tra Line truncated
`))),s[Cn]=To(n);const r=i||n.props&&n.props.type==="number";kr(s,e?"change":"input",a=>{a.target.composing||s[Cn](Yu(s.value,t,r))}),(t||r)&&kr(s,"change",()=>{s.value=Yu(s.value,t,r)}),e||(kr(s,"compositionstart",ZM),kr(s,"compositionend",yg),kr(s,"change",yg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[ic];delete s[ic],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[Cn](Yu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},a){if(s[Cn]=To(a),s.composing)return;const o=(r||s.type==="number")&&!/^0\d/.test(s.value)?Qh(s.value):s.value,h=e??"";if(o===h)return;const l=s.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===h)||(s.value=h)}},Jt={deep:!0,created(s,e,t){s[Cn]=To(t),kr(s,"change",()=>{const i=s._modelValue,n=Pl(s),r=s.checked,a=s[Cn];if(dt(i)){const o=qm(i,n),h=o!==-1;if(r&&!h)a(i.concat(n));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(ko(i)){const o=new Set(i);r?o.add(n):o.delete(n),a(o)}else a(Cx(s,r))})},mounted:xg,beforeUpdate(s,e,t){s[Cn]=To(t),xg(s,e,t)}};function xg(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(dt(e))n=qm(e,i.props.value)>-1;else if(ko(e))n=e.has(i.props.value);else{if(e===t)return;n=Fo(e,Cx(s,!0))}s.checked!==n&&(s.checked=n)}const Ht={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,kr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?Qh(Pl(r)):Pl(r));s[Cn](s.multiple?ko(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,nu(()=>{s._assigning=!1})}),s[Cn]=To(i)},mounted(s,{value:e}){bg(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[Cn]=To(t)},updated(s,{value:e}){s._assigning||bg(s,e)}};function bg(s,e){const t=s.multiple,i=dt(e);if(!(t&&!i&&!ko(e))){for(let n=0,r=s.options.length;n<r;n++){const a=s.options[n],o=Pl(a);if(t)if(i){const h=typeof o;h==="string"||h==="number"?a.selected=e.some(l=>String(l)===String(o)):a.selected=qm(e,o)>-1}else a.selected=e.has(o);else if(Fo(Pl(a),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function Pl(s){return"_value"in s?s._value:s.value}function Cx(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const JM=["ctrl","shift","alt","meta"],QM={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>JM.some(t=>s[`${t}Key`]&&!e.includes(t))},yt=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let a=0;a<e.length;a++){const o=QM[e[a]];if(o&&o(n,e))return}return s(n,...r)}))},eT={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Aa=(s,e)=>{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=zr(n.key);if(e.some(a=>a===r||eT[a]===r))return s(n)}))},tT=ki({patchProp:zM},AM);let wg;function iT(){return wg||(wg=aM(tT))}const sT=((...s)=>{const e=iT().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=rT(i);if(!n)return;const r=e._component;!Mt(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,nT(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},e});function nT(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function rT(s){return pi(s)?document.querySelector(s):s}/*!
**/let Nf;const ag=typeof window<"u"&&window.trustedTypes;if(ag)try{Nf=ag.createPolicy("vue",{createHTML:s=>s})}catch{}const Cx=Nf?s=>Nf.createHTML(s):s=>s,EM="http://www.w3.org/2000/svg",CM="http://www.w3.org/1998/Math/MathML",Gn=typeof document<"u"?document:null,og=Gn&&Gn.createElement("template"),IM={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Gn.createElementNS(EM,s):e==="mathml"?Gn.createElementNS(CM,s):t?Gn.createElement(s,{is:t}):Gn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Gn.createTextNode(s),createComment:s=>Gn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Gn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const a=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{og.innerHTML=Cx(i==="svg"?`<svg>${s}</svg>`:i==="mathml"?`<math>${s}</math>`:s);const o=og.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},vr="transition",Ho="animation",Fl=Symbol("_vtc"),Ix={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},RM=Oi({},Qy,Ix),PM=s=>(s.displayName="Transition",s.props=RM,s),kM=PM((s,{slots:e})=>TM(I_,FM(s),e)),sa=(s,e=[])=>{dt(s)?s.forEach(t=>t(...e)):s&&s(...e)},lg=s=>s?dt(s)?s.some(e=>e.length>1):s.length>1:!1;function FM(s){const e={};for(const k in s)k in Ix||(e[k]=s[k]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:o=`${t}-enter-to`,appearFromClass:h=r,appearActiveClass:l=a,appearToClass:c=o,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,p=OM(n),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:A,onBeforeAppear:T=v,onAppear:M=b,onAppearCancelled:R=y}=e,P=(k,O,L,U)=>{k._enterCancelled=U,na(k,O?c:o),na(k,O?l:a),L&&L()},F=(k,O)=>{k._isLeaving=!1,na(k,u),na(k,f),na(k,d),O&&O()},I=k=>(O,L)=>{const U=k?M:b,B=()=>P(O,k,L);sa(U,[O,B]),cg(()=>{na(O,k?h:r),Xn(O,k?c:o),lg(U)||hg(O,i,m,B)})};return Oi(e,{onBeforeEnter(k){sa(v,[k]),Xn(k,r),Xn(k,a)},onBeforeAppear(k){sa(T,[k]),Xn(k,h),Xn(k,l)},onEnter:I(!1),onAppear:I(!0),onLeave(k,O){k._isLeaving=!0;const L=()=>F(k,O);Xn(k,u),k._enterCancelled?(Xn(k,d),fg(k)):(fg(k),Xn(k,d)),cg(()=>{k._isLeaving&&(na(k,u),Xn(k,f),lg(w)||hg(k,i,g,L))}),sa(w,[k,L])},onEnterCancelled(k){P(k,!1,void 0,!0),sa(y,[k])},onAppearCancelled(k){P(k,!0,void 0,!0),sa(R,[k])},onLeaveCancelled(k){F(k),sa(A,[k])}})}function OM(s){if(s==null)return null;if(qt(s))return[Yu(s.enter),Yu(s.leave)];{const e=Yu(s);return[e,e]}}function Yu(s){return OS(s)}function Xn(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[Fl]||(s[Fl]=new Set)).add(e)}function na(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[Fl];t&&(t.delete(e),t.size||(s[Fl]=void 0))}function cg(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let BM=0;function hg(s,e,t,i){const n=s._endId=++BM,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:a,timeout:o,propCount:h}=LM(s,e);if(!a)return i();const l=a+"end";let c=0;const u=()=>{s.removeEventListener(l,d),r()},d=f=>{f.target===s&&++c>=h&&u()};setTimeout(()=>{c<h&&u()},o+1),s.addEventListener(l,d)}function LM(s,e){const t=window.getComputedStyle(s),i=p=>(t[p]||"").split(", "),n=i(`${vr}Delay`),r=i(`${vr}Duration`),a=ug(n,r),o=i(`${Ho}Delay`),h=i(`${Ho}Duration`),l=ug(o,h);let c=null,u=0,d=0;e===vr?a>0&&(c=vr,u=a,d=r.length):e===Ho?l>0&&(c=Ho,u=l,d=h.length):(u=Math.max(a,l),c=u>0?a>l?vr:Ho:null,d=c?c===vr?r.length:h.length:0);const f=c===vr&&/\b(?:transform|all)(?:,|$)/.test(i(`${vr}Property`).toString());return{type:c,timeout:u,propCount:d,hasTransform:f}}function ug(s,e){for(;s.length<e.length;)s=s.concat(s);return Math.max(...e.map((t,i)=>dg(t)+dg(s[i])))}function dg(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function fg(s){return(s?s.ownerDocument:document).body.offsetHeight}function DM(s,e,t){const i=s[Fl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const fh=Symbol("_vod"),Rx=Symbol("_vsh"),yr={name:"show",beforeMount(s,{value:e},{transition:t}){s[fh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):jo(s,e)},mounted(s,{value:e},{tra Line truncated
`))),s[En]=Eo(n);const r=i||n.props&&n.props.type==="number";Rr(s,e?"change":"input",a=>{a.target.composing||s[En](Hu(s.value,t,r))}),(t||r)&&Rr(s,"change",()=>{s.value=Hu(s.value,t,r)}),e||(Rr(s,"compositionstart",eT),Rr(s,"compositionend",wg),Rr(s,"change",wg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[rc];delete s[rc],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[En](Hu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},a){if(s[En]=Eo(a),s.composing)return;const o=(r||s.type==="number")&&!/^0\d/.test(s.value)?iu(s.value):s.value,h=e??"";if(o===h)return;const l=s.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===h)||(s.value=h)}},ti={deep:!0,created(s,e,t){s[En]=Eo(t),Rr(s,"change",()=>{const i=s._modelValue,n=Ol(s),r=s.checked,a=s[En];if(dt(i)){const o=Jm(i,n),h=o!==-1;if(r&&!h)a(i.concat(n));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(Oo(i)){const o=new Set(i);r?o.add(n):o.delete(n),a(o)}else a(Px(s,r))})},mounted:Sg,beforeUpdate(s,e,t){s[En]=Eo(t),Sg(s,e,t)}};function Sg(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(dt(e))n=Jm(e,i.props.value)>-1;else if(Oo(e))n=e.has(i.props.value);else{if(e===t)return;n=Bo(e,Px(s,!0))}s.checked!==n&&(s.checked=n)}const jt={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,Rr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?iu(Ol(r)):Ol(r));s[En](s.multiple?Oo(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,ou(()=>{s._assigning=!1})}),s[En]=Eo(i)},mounted(s,{value:e}){_g(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[En]=Eo(t)},updated(s,{value:e}){s._assigning||_g(s,e)}};function _g(s,e){const t=s.multiple,i=dt(e);if(!(t&&!i&&!Oo(e))){for(let n=0,r=s.options.length;n<r;n++){const a=s.options[n],o=Ol(a);if(t)if(i){const h=typeof o;h==="string"||h==="number"?a.selected=e.some(l=>String(l)===String(o)):a.selected=Jm(e,o)>-1}else a.selected=e.has(o);else if(Bo(Ol(a),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function Ol(s){return"_value"in s?s._value:s.value}function Px(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const tT=["ctrl","shift","alt","meta"],iT={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>tT.some(t=>s[`${t}Key`]&&!e.includes(t))},yt=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let a=0;a<e.length;a++){const o=iT[e[a]];if(o&&o(n,e))return}return s(n,...r)}))},sT={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Aa=(s,e)=>{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=jr(n.key);if(e.some(a=>a===r||sT[a]===r))return s(n)}))},nT=Oi({patchProp:ZM},IM);let Mg;function rT(){return Mg||(Mg=cM(nT))}const aT=((...s)=>{const e=rT().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=lT(i);if(!n)return;const r=e._component;!_t(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,oT(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},e});function oT(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function lT(s){return gi(s)?document.querySelector(s):s}/*!
* pinia v4.0.3
* (c) 2026 Eduardo San Martin Morote
* @license MIT
*/let Ix;const du=s=>Ix=s,Rx=Symbol();function Sg(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function aT(){const s=Ey(!0),e=s.run(()=>lt({}));let t=[],i=[];const n=Lr({install(r){du(n),n._a=r,r.provide(Rx,n),r.config.globalProperties.$pinia=n,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Lf=()=>{};function _g(s,e,t,i=Lf){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Cy()&&US(n),n}function Ga(s,...e){s.forEach(t=>{t(...e)})}const oT=s=>s(),Mg=Symbol(),$u=Symbol();function Df(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];Sg(n)&&Sg(i)&&Object.hasOwn(s,t)&&!Si(i)&&!ar(i)?s[t]=Df(n,i):s[t]=i}return s}const lT=Symbol();function cT(s){return!s||typeof s!="object"||!Object.hasOwn(s,lT)}const{assign:_r}=Object;function hT(s){return!!(Si(s)&&s.effect)}function uT(s,e,t,i){const{state:n,actions:r,getters:a}=e,o=t.state.value[s];let h;function l(){o||(t.state.value[s]=n?n():{});const c=l_(t.state.value[s]);return _r(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Lr(pt(()=>{du(t);const f=t._s.get(s);return a[d].call(f,f)})),u),{}))}return h=Px(s,l,e,t,i,!0),h}function Px(s,e,t={},i,n,r){let a;const o=_r({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[s];!r&&!p&&(i.state.value[s]={});let m;function g(M){let R;l=c=!1,typeof M=="function"?(M(i.state.value[s]),R={type:"patch function",storeId:s,events:f}):(Df(i.state.value[s],M),R={type:"patch object",payload:M,storeId:s,events:f});const P=m=Symbol();nu().then(()=>{m===P&&(l=!0)}),c=!0,Ga(u,R,i.state.value[s])}const v=r?function(){const{state:R}=t,P=R?R():{};this.$patch(F=>{_r(F,P)})}:Lf;function b(){a.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(M,R="")=>{if(Mg in M)return M[$u]=R,M;const P=function(){du(i);const F=Array.from(arguments),I=new Set,k=new Set;function O(B){I.add(B)}function L(B){k.add(B)}Ga(d,{args:F,name:P[$u],store:A,after:O,onError:L});let U;try{U=M.apply(this&&this.$id===s?this:A,F)}catch(B){throw Ga(k,B),B}return U instanceof Promise?U.then(B=>(Ga(I,B),B)).catch(B=>(Ga(k,B),Promise.reject(B))):(Ga(I,U),U)};return P[Mg]=!0,P[$u]=R,P},w={_p:i,$id:s,$onAction:_g.bind(null,d),$patch:g,$reset:v,$subscribe(M,R={}){if(u.has(M))return Lf;const P=_g(u,M,R.detached,()=>F()),F=a.run(()=>cs(()=>i.state.value[s],I=>{(R.flush==="sync"?c:l)&&M({storeId:s,type:"direct",events:f},I)},_r({},h,R)));return P},$dispose:b},A=La(w);i._s.set(s,A);const T=(i._a&&i._a.runWithContext||oT)(()=>i._e.run(()=>(a=Ey()).run(()=>e({action:y}))));for(const M in T){const R=T[M];Si(R)&&!hT(R)||ar(R)?r||(p&&cT(R)&&(Si(R)?R.value=p[M]:((R instanceof Set||R instanceof Map)&&R.clear(),Df(R,p[M]))),i.state.value[s][M]=R):typeof R=="function"&&(T[M]=y(R,M),o.actions[M]=R)}return _r(A,T),_r($t(A),T),Object.defineProperty(A,"$state",{get:()=>i.state.value[s],set:M=>{g(R=>{_r(R,M)})}}),i._p.forEach(M=>{const R=a.run(()=>M({store:A,app:i._a,pinia:i,options:o}));_r(A,R)}),p&&r&&t.hydrate&&t.hydrate(A.$state,p),l=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function dT(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(a,o){const h=x_();return a=a||(h?hl(Rx,null):null),a&&du(a),a=Ix,a._s.has(s)||(n?Px(s,e,i,a):uT(s,i,a)),a._s.get(s)}return r.$id=s,r}var Na=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Na||{}),kx=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(kx||{}),Nf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Nf||{}),ut=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(ut||{}),In=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(In||{}),Be=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTELine truncated
`)>=0)return!1;return!0}function Ns(ce,fe){var Pt;if(ce.indent===" ")Pt=" ";else if(typeof ce.indent=="number"&&ce.indent>0)Pt=R.call(Array(ce.indent+1)," ");else return null;return{base:Pt,prev:R.call(Array(fe+1),Pt)}}function ln(ce,fe){if(ce.length===0)return"";var Pt=`
`+fe.prev+fe.base;return Pt+R.call(ce,","+Pt)+`
`+fe.prev}function yi(ce,fe){var Pt=me(ce),kt=[];if(Pt){kt.length=ce.length;for(var Kt=0;Kt<ce.length;Kt++)kt[Kt]=le(ce,Kt)?fe(ce[Kt],ce):""}var St=typeof k=="function"?k(ce):[],As;if(L){As={};for(var Us=0;Us<St.length;Us++)As["$"+St[Us]]=St[Us]}for(var Oi in ce)le(ce,Oi)&&(Pt&&String(Number(Oi))===Oi&&Oi<ce.length||L&&As["$"+Oi]instanceof Symbol||(T.call(/[^\w$]/,Oi)?kt.push(fe(Oi,ce)+": "+fe(ce[Oi],ce)):kt.push(Oi+": "+fe(ce[Oi],ce))));if(typeof k=="function")for(var Es=0;Es<St.length;Es++)B.call(ce,St[Es])&&kt.push("["+fe(St[Es])+"]: "+fe(ce[St[Es]],ce));return kt}return zu}var qu,Yg;function ET(){if(Yg)return qu;Yg=1;var s=fu(),e=Oo(),t=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},i=function(o,h){if(o){var l=t(o,h);return l&&l.value}},n=function(o,h,l){var c=t(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},r=function(o,h){return o?!!t(o,h):!1},a=function(o,h){if(o)return t(o,h,!0)};return qu=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+s(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return i(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),n(h,c,u)}};return l},qu}var Ku,$g;function Ox(){return $g||($g=1,Ku=Object),Ku}var Zu,Gg;function CT(){return Gg||(Gg=1,Zu=Error),Zu}var Ju,Hg;function IT(){return Hg||(Hg=1,Ju=EvalError),Ju}var Qu,jg;function RT(){return jg||(jg=1,Qu=RangeError),Qu}var ed,Wg;function PT(){return Wg||(Wg=1,ed=ReferenceError),ed}var td,zg;function kT(){return zg||(zg=1,td=SyntaxError),td}var id,qg;function FT(){return qg||(qg=1,id=URIError),id}var sd,Kg;function OT(){return Kg||(Kg=1,sd=Math.abs),sd}var nd,Zg;function BT(){return Zg||(Zg=1,nd=Math.floor),nd}var rd,Jg;function LT(){return Jg||(Jg=1,rd=Math.max),rd}var ad,Qg;function DT(){return Qg||(Qg=1,ad=Math.min),ad}var od,e0;function NT(){return e0||(e0=1,od=Math.pow),od}var ld,t0;function UT(){return t0||(t0=1,ld=Math.round),ld}var cd,i0;function XT(){return i0||(i0=1,cd=Number.isNaN||function(e){return e!==e}),cd}var hd,s0;function VT(){if(s0)return hd;s0=1;var s=XT();return hd=function(t){return s(t)||t===0?t:t<0?-1:1},hd}var ud,n0;function YT(){return n0||(n0=1,ud=Object.getOwnPropertyDescriptor),ud}var dd,r0;function Bx(){if(r0)return dd;r0=1;var s=YT();if(s)try{s([],"length")}catch{s=null}return dd=s,dd}var fd,a0;function Lx(){if(a0)return fd;a0=1;var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}return fd=s,fd}var md,o0;function $T(){return o0||(o0=1,md=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}),md}var pd,l0;function GT(){if(l0)return pd;l0=1;var s=typeof Symbol<"u"&&Symbol,e=$T();return pd=function(){return typeof s!="function"||typeof Symbol!="function"||typeof s("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},pd}var gd,c0;function Dx(){return c0||(c0=1,gd=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),gd}var vd,h0;function Nx(){if(h0)return vd;h0=1;var s=Ox();return vd=s.getPrototypeOf||null,vd}var yd,u0;function HT(){if(u0)return yd;u0=1;var s="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},r=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return yd=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==i)throw new TypeError(s+l);for(var c=r(arguments,1),u,d=function(){if(this instanceof u){var v=l.apply(this,n(c,arguments));return Object(v)===v?v:this}return l.apply(h,n(c,arguments))},f=t(0,l.length-c.length),p=[],m=0;m<f;m++)p[m]="$"+m;if(u=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},yd}var xd,d0;function mu(){if(d0)return xd;d0=1;var s=HT();return xd=Function.prototype.bind||s,xd}var bd,f0;function cp(){return f0||(f0=1,bd=Function.prototype.call),bd}var wd,m0;function Ux(){return m0||(m0=1,wd=Function.p Line truncated
`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=eA();function v(A,T,M){if(A&&typeof A=="object"&&A instanceof e)return A;var R=new e;return R.parse(A,T,M),R}e.prototype.parse=function(A,T,M){if(typeof A!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var R=A.indexOf("?"),P=R!==-1&&R<A.indexOf("#")?"?":"#",F=A.split(P),I=/\\/g;F[0]=F[0].replace(I,"/"),A=F.join(P);var k=A;if(k=k.trim(),!M&&A.split("#").length===1){var O=n.exec(k);if(O)return this.path=k,this.href=k,this.pathname=O[1],O[2]?(this.search=O[2],T?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):T&&(this.search="",this.query={}),this}var L=t.exec(k);if(L){L=L[0];var U=L.toLowerCase();this.protocol=U,k=k.substr(L.length)}if(M||L||k.match(/^\/\/[^@/]+@[^@/]+/)){var B=k.substr(0,2)==="//";B&&!(L&&p[L])&&(k=k.substr(2),this.slashes=!0)}if(!p[L]&&(B||L&&!m[L])){for(var D=-1,_=0;_<l.length;_++){var X=k.indexOf(l[_]);X!==-1&&(D===-1||X<D)&&(D=X)}var N,V;D===-1?V=k.lastIndexOf("@"):V=k.lastIndexOf("@",D),V!==-1&&(N=k.slice(0,V),k=k.slice(V+1),this.auth=decodeURIComponent(N)),D=-1;for(var _=0;_<h.length;_++){var X=k.indexOf(h[_]);X!==-1&&(D===-1||X<D)&&(D=X)}D===-1&&(D=k.length),this.host=k.slice(0,D),k=k.slice(D),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var j=this.hostname.split(/\./),_=0,ne=j.length;_<ne;_++){var J=j[_];if(J&&!J.match(u)){for(var de="",me=0,Se=J.length;me<Se;me++)J.charCodeAt(me)>127?de+="x":de+=J[me];if(!de.match(u)){var Re=j.slice(0,_),pe=j.slice(_+1),Me=J.match(d);Me&&(Re.push(Me[1]),pe.unshift(Me[2])),pe.length&&(k="/"+pe.join(".")+k),this.hostname=Re.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=s.toASCII(this.hostname));var H=this.port?":"+this.port:"",K=this.hostname||"";this.host=K+H,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!f[U])for(var _=0,ne=o.length;_<ne;_++){var q=o[_];if(k.indexOf(q)!==-1){var W=encodeURIComponent(q);W===q&&(W=escape(q)),k=k.split(q).join(W)}}var ee=k.indexOf("#");ee!==-1&&(this.hash=k.substr(ee),k=k.slice(0,ee));var le=k.indexOf("?");if(le!==-1?(this.search=k.substr(le),this.query=k.substr(le+1),T&&(this.query=g.parse(this.query)),k=k.slice(0,le)):T&&(this.search="",this.query={}),k&&(this.pathname=k),m[U]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",ye=this.search||"";this.path=H+ye}return this.href=this.format(),this};function b(A){return typeof A=="string"&&(A=v(A)),A instanceof e?A.format():e.prototype.format.call(A)}e.prototype.format=function(){var A=this.auth||"";A&&(A=encodeURIComponent(A),A=A.replace(/%3A/i,":"),A+="@");var T=this.protocol||"",M=this.pathname||"",R=this.hash||"",P=!1,F="";this.host?P=A+this.host:this.hostname&&(P=A+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(P+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(F=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var I=this.search||F&&"?"+F||"";return T&&T.substr(-1)!==":"&&(T+=":"),this.slashes||(!T||m[T])&&P!==!1?(P="//"+(P||""),M&&M.charAt(0)!=="/"&&(M="/"+M)):P||(P=""),R&&R.charAt(0)!=="#"&&(R="#"+R),I&&I.charAt(0)!=="?"&&(I="?"+I),M=M.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),I=I.replace("#","%23"),T+P+M+I+R};function y(A,T){return v(A,!1,!0).resolve(T)}e.prototype.resolve=function(A){return this.resolveObject(v(A,!1,!0)).format()};function w(A,T){return A?v(A,!1,!0).resolveObject(T):T}return e.prototype.resolveObject=function(A){if(typeof A=="string"){var T=new e;T.parse(A,!1,!0),A=T}for(var M=new e,R=Object.keys(this),P=0;P<R.length;P++){var F=R[P];M[F]=this[F]}if(M.hash=A.hash,A.href==="")return M.href=M.format(),M;if(A.slashes&&!A.protocol){for(var I=Object.keys(A),k=0;k<I.length;k++){var O=I[k];O!=="protocol"&&(M[O]=A[O])}return m[M.protocol]&&M.hostname&&!M.pathname&&(M.pathname="/",M.path=M.pathname),M.href=M.format(),M}if(A.protocol&&A.protocol!==M.protocol){if(!m[A.protocol]){for(var L=Object.keys(A),U=0;U<L.length;U++){var B=L[U];M[B]=A[B]}return M.href=M.format(),M}if(M.protocol=A.protocol,!A.host&&!p[A.protocol]){for(var ne=(A.pathname||"").split("/");ne.length&&!(A.host=ne.shift()););A.host||(A.host=""),A.hostname||(A.hostname=""),ne[0]!==""&&ne.unshift(""),ne.length<2&&ne.unshift(""),M.pathname=ne.join("/")}else M.pathname=A.pathname;if(M.search=A.search,M.query=A.query,M.host=A.host||"",M.auth=A.auth,M.hostname=A.hostname||A.host,M.port=A.port,M.pathname|| Line truncated
*/let kx;const pu=s=>kx=s,Fx=Symbol();function Tg(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function cT(){const s=Ry(!0),e=s.run(()=>ht({}));let t=[],i=[];const n=Or({install(r){pu(n),n._a=r,r.provide(Fx,n),r.config.globalProperties.$pinia=n,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Uf=()=>{};function Ag(s,e,t,i=Uf){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Py()&&YS(n),n}function ja(s,...e){s.forEach(t=>{t(...e)})}const hT=s=>s(),Eg=Symbol(),ju=Symbol();function Xf(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];Tg(n)&&Tg(i)&&Object.hasOwn(s,t)&&!_i(i)&&!ar(i)?s[t]=Xf(n,i):s[t]=i}return s}const uT=Symbol();function dT(s){return!s||typeof s!="object"||!Object.hasOwn(s,uT)}const{assign:wr}=Object;function fT(s){return!!(_i(s)&&s.effect)}function mT(s,e,t,i){const{state:n,actions:r,getters:a}=e,o=t.state.value[s];let h;function l(){o||(t.state.value[s]=n?n():{});const c=u_(t.state.value[s]);return wr(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Or(pt(()=>{pu(t);const f=t._s.get(s);return a[d].call(f,f)})),u),{}))}return h=Ox(s,l,e,t,i,!0),h}function Ox(s,e,t={},i,n,r){let a;const o=wr({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[s];!r&&!p&&(i.state.value[s]={});let m;function g(M){let R;l=c=!1,typeof M=="function"?(M(i.state.value[s]),R={type:"patch function",storeId:s,events:f}):(Xf(i.state.value[s],M),R={type:"patch object",payload:M,storeId:s,events:f});const P=m=Symbol();ou().then(()=>{m===P&&(l=!0)}),c=!0,ja(u,R,i.state.value[s])}const v=r?function(){const{state:R}=t,P=R?R():{};this.$patch(F=>{wr(F,P)})}:Uf;function b(){a.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(M,R="")=>{if(Eg in M)return M[ju]=R,M;const P=function(){pu(i);const F=Array.from(arguments),I=new Set,k=new Set;function O(B){I.add(B)}function L(B){k.add(B)}ja(d,{args:F,name:P[ju],store:A,after:O,onError:L});let U;try{U=M.apply(this&&this.$id===s?this:A,F)}catch(B){throw ja(k,B),B}return U instanceof Promise?U.then(B=>(ja(I,B),B)).catch(B=>(ja(k,B),Promise.reject(B))):(ja(I,U),U)};return P[Eg]=!0,P[ju]=R,P},w={_p:i,$id:s,$onAction:Ag.bind(null,d),$patch:g,$reset:v,$subscribe(M,R={}){if(u.has(M))return Uf;const P=Ag(u,M,R.detached,()=>F()),F=a.run(()=>cs(()=>i.state.value[s],I=>{(R.flush==="sync"?c:l)&&M({storeId:s,type:"direct",events:f},I)},wr({},h,R)));return P},$dispose:b},A=La(w);i._s.set(s,A);const T=(i._a&&i._a.runWithContext||hT)(()=>i._e.run(()=>(a=Ry()).run(()=>e({action:y}))));for(const M in T){const R=T[M];_i(R)&&!fT(R)||ar(R)?r||(p&&dT(R)&&(_i(R)?R.value=p[M]:((R instanceof Set||R instanceof Map)&&R.clear(),Xf(R,p[M]))),i.state.value[s][M]=R):typeof R=="function"&&(T[M]=y(R,M),o.actions[M]=R)}return wr(A,T),wr(Yt(A),T),Object.defineProperty(A,"$state",{get:()=>i.state.value[s],set:M=>{g(R=>{wr(R,M)})}}),i._p.forEach(M=>{const R=a.run(()=>M({store:A,app:i._a,pinia:i,options:o}));wr(A,R)}),p&&r&&t.hydrate&&t.hydrate(A.$state,p),l=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function pT(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(a,o){const h=S_();return a=a||(h?fl(Fx,null):null),a&&pu(a),a=kx,a._s.has(s)||(n?Ox(s,e,i,a):mT(s,i,a)),a._s.get(s)}return r.$id=s,r}var Na=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Na||{}),Bx=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(Bx||{}),Vf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Vf||{}),ut=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(ut||{}),Cn=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(Cn||{}),De=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTELine truncated
`)>=0)return!1;return!0}function Ls(ce,fe){var It;if(ce.indent===" ")It=" ";else if(typeof ce.indent=="number"&&ce.indent>0)It=R.call(Array(ce.indent+1)," ");else return null;return{base:It,prev:R.call(Array(fe+1),It)}}function an(ce,fe){if(ce.length===0)return"";var It=`
`+fe.prev+fe.base;return It+R.call(ce,","+It)+`
`+fe.prev}function xi(ce,fe){var It=me(ce),Rt=[];if(It){Rt.length=ce.length;for(var Zt=0;Zt<ce.length;Zt++)Rt[Zt]=le(ce,Zt)?fe(ce[Zt],ce):""}var St=typeof k=="function"?k(ce):[],Ms;if(L){Ms={};for(var Ds=0;Ds<St.length;Ds++)Ms["$"+St[Ds]]=St[Ds]}for(var Li in ce)le(ce,Li)&&(It&&String(Number(Li))===Li&&Li<ce.length||L&&Ms["$"+Li]instanceof Symbol||(T.call(/[^\w$]/,Li)?Rt.push(fe(Li,ce)+": "+fe(ce[Li],ce)):Rt.push(Li+": "+fe(ce[Li],ce))));if(typeof k=="function")for(var Ts=0;Ts<St.length;Ts++)B.call(ce,St[Ts])&&Rt.push("["+fe(St[Ts])+"]: "+fe(ce[St[Ts]],ce));return Rt}return Zu}var Ju,Hg;function RT(){if(Hg)return Ju;Hg=1;var s=gu(),e=Lo(),t=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},i=function(o,h){if(o){var l=t(o,h);return l&&l.value}},n=function(o,h,l){var c=t(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},r=function(o,h){return o?!!t(o,h):!1},a=function(o,h){if(o)return t(o,h,!0)};return Ju=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+s(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return i(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),n(h,c,u)}};return l},Ju}var Qu,jg;function Dx(){return jg||(jg=1,Qu=Object),Qu}var ed,Wg;function PT(){return Wg||(Wg=1,ed=Error),ed}var td,zg;function kT(){return zg||(zg=1,td=EvalError),td}var id,qg;function FT(){return qg||(qg=1,id=RangeError),id}var sd,Kg;function OT(){return Kg||(Kg=1,sd=ReferenceError),sd}var nd,Zg;function BT(){return Zg||(Zg=1,nd=SyntaxError),nd}var rd,Jg;function LT(){return Jg||(Jg=1,rd=URIError),rd}var ad,Qg;function DT(){return Qg||(Qg=1,ad=Math.abs),ad}var od,e0;function NT(){return e0||(e0=1,od=Math.floor),od}var ld,t0;function UT(){return t0||(t0=1,ld=Math.max),ld}var cd,i0;function XT(){return i0||(i0=1,cd=Math.min),cd}var hd,s0;function VT(){return s0||(s0=1,hd=Math.pow),hd}var ud,n0;function YT(){return n0||(n0=1,ud=Math.round),ud}var dd,r0;function $T(){return r0||(r0=1,dd=Number.isNaN||function(e){return e!==e}),dd}var fd,a0;function GT(){if(a0)return fd;a0=1;var s=$T();return fd=function(t){return s(t)||t===0?t:t<0?-1:1},fd}var md,o0;function HT(){return o0||(o0=1,md=Object.getOwnPropertyDescriptor),md}var pd,l0;function Nx(){if(l0)return pd;l0=1;var s=HT();if(s)try{s([],"length")}catch{s=null}return pd=s,pd}var gd,c0;function Ux(){if(c0)return gd;c0=1;var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}return gd=s,gd}var vd,h0;function jT(){return h0||(h0=1,vd=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}),vd}var yd,u0;function WT(){if(u0)return yd;u0=1;var s=typeof Symbol<"u"&&Symbol,e=jT();return yd=function(){return typeof s!="function"||typeof Symbol!="function"||typeof s("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},yd}var xd,d0;function Xx(){return d0||(d0=1,xd=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),xd}var bd,f0;function Vx(){if(f0)return bd;f0=1;var s=Dx();return bd=s.getPrototypeOf||null,bd}var wd,m0;function zT(){if(m0)return wd;m0=1;var s="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},r=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return wd=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==i)throw new TypeError(s+l);for(var c=r(arguments,1),u,d=function(){if(this instanceof u){var v=l.apply(this,n(c,arguments));return Object(v)===v?v:this}return l.apply(h,n(c,arguments))},f=t(0,l.length-c.length),p=[],m=0;m<f;m++)p[m]="$"+m;if(u=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},wd}var Sd,p0;function vu(){if(p0)return Sd;p0=1;var s=zT();return Sd=Function.prototype.bind||s,Sd}var _d,g0;function dp(){return g0||(g0=1,_d=Function.prototype.call),_d}var Md,v0;function Yx(){return v0||(v0=1,Md=Function.p Line truncated
`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=s2();function v(A,T,M){if(A&&typeof A=="object"&&A instanceof e)return A;var R=new e;return R.parse(A,T,M),R}e.prototype.parse=function(A,T,M){if(typeof A!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var R=A.indexOf("?"),P=R!==-1&&R<A.indexOf("#")?"?":"#",F=A.split(P),I=/\\/g;F[0]=F[0].replace(I,"/"),A=F.join(P);var k=A;if(k=k.trim(),!M&&A.split("#").length===1){var O=n.exec(k);if(O)return this.path=k,this.href=k,this.pathname=O[1],O[2]?(this.search=O[2],T?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):T&&(this.search="",this.query={}),this}var L=t.exec(k);if(L){L=L[0];var U=L.toLowerCase();this.protocol=U,k=k.substr(L.length)}if(M||L||k.match(/^\/\/[^@/]+@[^@/]+/)){var B=k.substr(0,2)==="//";B&&!(L&&p[L])&&(k=k.substr(2),this.slashes=!0)}if(!p[L]&&(B||L&&!m[L])){for(var D=-1,_=0;_<l.length;_++){var X=k.indexOf(l[_]);X!==-1&&(D===-1||X<D)&&(D=X)}var N,V;D===-1?V=k.lastIndexOf("@"):V=k.lastIndexOf("@",D),V!==-1&&(N=k.slice(0,V),k=k.slice(V+1),this.auth=decodeURIComponent(N)),D=-1;for(var _=0;_<h.length;_++){var X=k.indexOf(h[_]);X!==-1&&(D===-1||X<D)&&(D=X)}D===-1&&(D=k.length),this.host=k.slice(0,D),k=k.slice(D),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var j=this.hostname.split(/\./),_=0,ne=j.length;_<ne;_++){var Q=j[_];if(Q&&!Q.match(u)){for(var de="",me=0,we=Q.length;me<we;me++)Q.charCodeAt(me)>127?de+="x":de+=Q[me];if(!de.match(u)){var Re=j.slice(0,_),ge=j.slice(_+1),Ae=Q.match(d);Ae&&(Re.push(Ae[1]),ge.unshift(Ae[2])),ge.length&&(k="/"+ge.join(".")+k),this.hostname=Re.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=s.toASCII(this.hostname));var H=this.port?":"+this.port:"",K=this.hostname||"";this.host=K+H,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!f[U])for(var _=0,ne=o.length;_<ne;_++){var q=o[_];if(k.indexOf(q)!==-1){var z=encodeURIComponent(q);z===q&&(z=escape(q)),k=k.split(q).join(z)}}var ee=k.indexOf("#");ee!==-1&&(this.hash=k.substr(ee),k=k.slice(0,ee));var le=k.indexOf("?");if(le!==-1?(this.search=k.substr(le),this.query=k.substr(le+1),T&&(this.query=g.parse(this.query)),k=k.slice(0,le)):T&&(this.search="",this.query={}),k&&(this.pathname=k),m[U]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",ve=this.search||"";this.path=H+ve}return this.href=this.format(),this};function b(A){return typeof A=="string"&&(A=v(A)),A instanceof e?A.format():e.prototype.format.call(A)}e.prototype.format=function(){var A=this.auth||"";A&&(A=encodeURIComponent(A),A=A.replace(/%3A/i,":"),A+="@");var T=this.protocol||"",M=this.pathname||"",R=this.hash||"",P=!1,F="";this.host?P=A+this.host:this.hostname&&(P=A+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(P+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(F=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var I=this.search||F&&"?"+F||"";return T&&T.substr(-1)!==":"&&(T+=":"),this.slashes||(!T||m[T])&&P!==!1?(P="//"+(P||""),M&&M.charAt(0)!=="/"&&(M="/"+M)):P||(P=""),R&&R.charAt(0)!=="#"&&(R="#"+R),I&&I.charAt(0)!=="?"&&(I="?"+I),M=M.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),I=I.replace("#","%23"),T+P+M+I+R};function y(A,T){return v(A,!1,!0).resolve(T)}e.prototype.resolve=function(A){return this.resolveObject(v(A,!1,!0)).format()};function w(A,T){return A?v(A,!1,!0).resolveObject(T):T}return e.prototype.resolveObject=function(A){if(typeof A=="string"){var T=new e;T.parse(A,!1,!0),A=T}for(var M=new e,R=Object.keys(this),P=0;P<R.length;P++){var F=R[P];M[F]=this[F]}if(M.hash=A.hash,A.href==="")return M.href=M.format(),M;if(A.slashes&&!A.protocol){for(var I=Object.keys(A),k=0;k<I.length;k++){var O=I[k];O!=="protocol"&&(M[O]=A[O])}return m[M.protocol]&&M.hostname&&!M.pathname&&(M.pathname="/",M.path=M.pathname),M.href=M.format(),M}if(A.protocol&&A.protocol!==M.protocol){if(!m[A.protocol]){for(var L=Object.keys(A),U=0;U<L.length;U++){var B=L[U];M[B]=A[B]}return M.href=M.format(),M}if(M.protocol=A.protocol,!A.host&&!p[A.protocol]){for(var ne=(A.pathname||"").split("/");ne.length&&!(A.host=ne.shift()););A.host||(A.host=""),A.hostname||(A.hostname=""),ne[0]!==""&&ne.unshift(""),ne.length<2&&ne.unshift(""),M.pathname=ne.join("/")}else M.pathname=A.pathname;if(M.search=A.search,M.query=A.query,M.host=A.host||"",M.auth=A.auth,M.hostname=A.hostname||A.host,M.port=A.port,M.pathname|| Line truncated
Deprecated since v${s}`):(i=i.split(`
`).splice(t).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
Deprecated since v${s}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
Deprecated since v${s}`),console.warn(i))),k0[e]=!0}function Ys(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function Go(s){return s.split("?")[0].split("#")[0]}function iA(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sA(s,e,t){return s.replace(new RegExp(iA(e),"g"),t)}function nA(s,e){let t="",i=0,n=-1,r=0,a=-1;for(let o=0;o<=s.length;++o){if(o<s.length)a=s.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(n===o-1||r===1))if(n!==o-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),n=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=o,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,o)}`:t=s.slice(n+1,o),i=o-n-1;n=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const wi={toPosix(s){return sA(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){Ys(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(Ys(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=Go(this.toPosix(e??ze.ADAPTER.getBaseUrl())),n=Go(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?wi.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(Ys(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=nA(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return Ys(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t<s.length;++t){const i=s[t];if(Ys(i),i.length>0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(Ys(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),a=s;s=s.slice(r.length);for(let o=s.length-1;o>=1;--o)if(e=s.charCodeAt(o),e===47){if(!n){i=o;break}}else n=!1;return i===-1?t?"/":this.isUrl(a)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){Ys(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){Ys(s),e&&Ys(e),s=Go(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let a=e.length-1,o=-1;for(r=s.length-1;r>=0;--r){const h=s.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else o===-1&&(n=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){Ys(s),s=Go(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let a=s.length-1;a>=0;--a){const o=s.charCodeAt(a);if(o===47){if(!n){t=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){Ys(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=Go(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,a=0,o=-1,h=!0,l=s.length-1,c=0;for(;l>=n;--l){if(t=s.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=s.slice(1,o):e.base=e.name=s.slice(a,o)):(a===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,o)):(e.name=s.slice(a,r),e.base=s.slice(a,o)),e.ext=s.slice(r,o)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Nd;async function rA(){return Nd??(Nd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return Ni.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
`);function AA(s){let e="";for(let t=0;t<s;++t)t>0&&(e+=`
else `),t<s-1&&(e+=`if(test == ${t}.0){}`);return e}function EA(s,e){if(s===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=TA.replace(/%forloop%/gi,AA(s));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))s=s/2|0;else break}return s}const $d=0,Gd=1,Hd=2,jd=3,Wd=4,zd=5;class Dn{constructor(){this.data=0,this.blendMode=ut.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<$d)}set blend(e){!!(this.data&1<<$d)!==e&&(this.data^=1<<$d)}get offsets(){return!!(this.data&1<<Gd)}set offsets(e){!!(this.data&1<<Gd)!==e&&(this.data^=1<<Gd)}get culling(){return!!(this.data&1<<Hd)}set culling(e){!!(this.data&1<<Hd)!==e&&(this.data^=1<<Hd)}get depthTest(){return!!(this.data&1<<jd)}set depthTest(e){!!(this.data&1<<jd)!==e&&(this.data^=1<<jd)}get depthMask(){return!!(this.data&1<<zd)}set depthMask(e){!!(this.data&1<<zd)!==e&&(this.data^=1<<zd)}get clockwiseFrontFace(){return!!(this.data&1<<Wd)}set clockwiseFrontFace(e){!!(this.data&1<<Wd)!==e&&(this.data^=1<<Wd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==ut.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Dn;return e.depthTest=!1,e.blend=!0,e}}Dn.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Gf=[];function Zx(s,e){if(!s)return null;let t="";if(typeof s=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(s);i&&(t=i[1].toLowerCase())}for(let i=Gf.length-1;i>=0;--i){const n=Gf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class en{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](e,t,i,n,r,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(en.prototype,{dispatch:{value:en.prototype.emit},run:{value:en.prototype.emit}});class kl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new en("setRealSize"),this.onUpdate=new en("update"),this.onError=new en("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class pu extends kl{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Ni.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?n.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,n.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const CA={scaleMode:Ks.NEAREST,alphaMode:Ni.NPM},Hf=class to extends $l{constructor(e=null,t=null){super(),t=Object.assign({},to.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution: Line truncated
Deprecated since v${s}`),console.warn(i))),B0[e]=!0}function Xs(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function Wo(s){return s.split("?")[0].split("#")[0]}function r2(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a2(s,e,t){return s.replace(new RegExp(r2(e),"g"),t)}function o2(s,e){let t="",i=0,n=-1,r=0,a=-1;for(let o=0;o<=s.length;++o){if(o<s.length)a=s.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(n===o-1||r===1))if(n!==o-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),n=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=o,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,o)}`:t=s.slice(n+1,o),i=o-n-1;n=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const Si={toPosix(s){return a2(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){Xs(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(Xs(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=Wo(this.toPosix(e??We.ADAPTER.getBaseUrl())),n=Wo(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?Si.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(Xs(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=o2(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return Xs(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t<s.length;++t){const i=s[t];if(Xs(i),i.length>0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(Xs(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),a=s;s=s.slice(r.length);for(let o=s.length-1;o>=1;--o)if(e=s.charCodeAt(o),e===47){if(!n){i=o;break}}else n=!1;return i===-1?t?"/":this.isUrl(a)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){Xs(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){Xs(s),e&&Xs(e),s=Wo(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let a=e.length-1,o=-1;for(r=s.length-1;r>=0;--r){const h=s.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else o===-1&&(n=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){Xs(s),s=Wo(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let a=s.length-1;a>=0;--a){const o=s.charCodeAt(a);if(o===47){if(!n){t=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){Xs(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=Wo(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,a=0,o=-1,h=!0,l=s.length-1,c=0;for(;l>=n;--l){if(t=s.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=s.slice(1,o):e.base=e.name=s.slice(a,o)):(a===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,o)):(e.name=s.slice(a,r),e.base=s.slice(a,o)),e.ext=s.slice(r,o)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Vd;async function l2(){return Vd??(Vd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return Xi.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Line truncated
`);function I2(s){let e="";for(let t=0;t<s;++t)t>0&&(e+=`
else `),t<s-1&&(e+=`if(test == ${t}.0){}`);return e}function R2(s,e){if(s===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=C2.replace(/%forloop%/gi,I2(s));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))s=s/2|0;else break}return s}const jd=0,Wd=1,zd=2,qd=3,Kd=4,Zd=5;class Ln{constructor(){this.data=0,this.blendMode=ut.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<jd)}set blend(e){!!(this.data&1<<jd)!==e&&(this.data^=1<<jd)}get offsets(){return!!(this.data&1<<Wd)}set offsets(e){!!(this.data&1<<Wd)!==e&&(this.data^=1<<Wd)}get culling(){return!!(this.data&1<<zd)}set culling(e){!!(this.data&1<<zd)!==e&&(this.data^=1<<zd)}get depthTest(){return!!(this.data&1<<qd)}set depthTest(e){!!(this.data&1<<qd)!==e&&(this.data^=1<<qd)}get depthMask(){return!!(this.data&1<<Zd)}set depthMask(e){!!(this.data&1<<Zd)!==e&&(this.data^=1<<Zd)}get clockwiseFrontFace(){return!!(this.data&1<<Kd)}set clockwiseFrontFace(e){!!(this.data&1<<Kd)!==e&&(this.data^=1<<Kd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==ut.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Ln;return e.depthTest=!1,e.blend=!0,e}}Ln.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Wf=[];function eb(s,e){if(!s)return null;let t="";if(typeof s=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(s);i&&(t=i[1].toLowerCase())}for(let i=Wf.length-1;i>=0;--i){const n=Wf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Js{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](e,t,i,n,r,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Js.prototype,{dispatch:{value:Js.prototype.emit},run:{value:Js.prototype.emit}});class Bl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Js("setRealSize"),this.onUpdate=new Js("update"),this.onError=new Js("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class yu extends Bl{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Xi.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?n.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,n.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const P2={scaleMode:zs.NEAREST,alphaMode:Xi.NPM},zf=class so extends jl{constructor(e=null,t=null){super(),t=Object.assign({},so.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution: Line truncated
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`,NA=`attribute vec2 aVertexPosition;
}`,V2=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -48,7 +48,7 @@ void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`;function z0(s,e,t){const i=s.createShader(e);return s.shaderSource(i,t),s.compileShader(i),i}function qd(s){const e=new Array(s);for(let t=0;t<e.length;t++)e[t]=!1;return e}function eb(s,e){switch(s){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return qd(2*e);case"bvec3":return qd(3*e);case"bvec4":return qd(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const vo=[{test:s=>s.type==="float"&&s.size===1&&!s.isArray,code:s=>`
`;function Z0(s,e,t){const i=s.createShader(e);return s.shaderSource(i,t),s.compileShader(i),i}function Jd(s){const e=new Array(s);for(let t=0;t<e.length;t++)e[t]=!1;return e}function sb(s,e){switch(s){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Jd(2*e);case"bvec3":return Jd(3*e);case"bvec4":return Jd(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const xo=[{test:s=>s.type==="float"&&s.size===1&&!s.isArray,code:s=>`
if(uv["${s}"] !== ud["${s}"].value)
{
ud["${s}"].value = uv["${s}"]
@@ -168,7 +168,7 @@ void main(void){
cv[3] = v[3];
gl.uniform4f(ud["${s}"].location, v[0], v[1], v[2], v[3])
}`}],UA={float:`
}`}],Y2={float:`
if (cv !== v)
{
cu.value = v;
@@ -304,7 +304,7 @@ void main(void){
cu.value = v;
gl.uniform1i(location, v);
}`},XA={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function VA(s,e){var i;const t=[`
}`},$2={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function G2(s,e){var i;const t=[`
var v = null;
var cv = null;
var cu = null;
@@ -314,18 +314,18 @@ void main(void){
renderer.shader.syncUniformBufferGroup(uv.${n}, '${n}');
`):t.push(`
renderer.shader.syncUniformGroup(uv.${n}, syncData);
`));continue}const a=s.uniforms[n];let o=!1;for(let h=0;h<vo.length;h++)if(vo[h].test(r,a)){t.push(vo[h].code(n,a)),o=!0;break}if(!o){const h=(r.size===1&&!r.isArray?UA:XA)[r.type].replace("location",`ud["${n}"].location`);t.push(`
`));continue}const a=s.uniforms[n];let o=!1;for(let h=0;h<xo.length;h++)if(xo[h].test(r,a)){t.push(xo[h].code(n,a)),o=!0;break}if(!o){const h=(r.size===1&&!r.isArray?Y2:$2)[r.type].replace("location",`ud["${n}"].location`);t.push(`
cu = ud["${n}"];
cv = cu.value;
v = uv["${n}"];
${h};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
`))}const tb={};let ja=tb;function YA(){if(ja===tb||ja!=null&&ja.isContextLost()){const s=ze.ADAPTER.createCanvas();let e;ze.PREFER_ENV>=Na.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),ja=e}return ja}let lc;function $A(){if(!lc){lc=Os.MEDIUM;const s=YA();if(s&&s.getShaderPrecisionFormat){const e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);e&&(lc=e.precision?Os.HIGH:Os.MEDIUM)}}return lc}function q0(s,e){const t=s.getShaderSource(e).split(`
`))}const nb={};let za=nb;function H2(){if(za===nb||za!=null&&za.isContextLost()){const s=We.ADAPTER.createCanvas();let e;We.PREFER_ENV>=Na.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),za=e}return za}let uc;function j2(){if(!uc){uc=ks.MEDIUM;const s=H2();if(s&&s.getShaderPrecisionFormat){const e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);e&&(uc=e.precision?ks.HIGH:ks.MEDIUM)}}return uc}function J0(s,e){const t=s.getShaderSource(e).split(`
`).map((l,c)=>`${c}: ${l}`),i=s.getShaderInfoLog(e),n=i.split(`
`),r={},a=n.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!r[l]?(r[l]=!0,!0):!1),o=[""];a.forEach(l=>{t[l-1]=`%c${t[l-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=t.join(`
`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function GA(s,e,t,i){s.getProgramParameter(e,s.LINK_STATUS)||(s.getShaderParameter(t,s.COMPILE_STATUS)||q0(s,t),s.getShaderParameter(i,s.COMPILE_STATUS)||q0(s,i),console.error("PixiJS Error: Could not initialize shader."),s.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",s.getProgramInfoLog(e)))}const HA={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ib(s){return HA[s]}let cc=null;const K0={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function sb(s,e){if(!cc){const t=Object.keys(K0);cc={};for(let i=0;i<t.length;++i){const n=t[i];cc[s[n]]=K0[n]}}return cc[e]}function Z0(s,e,t){if(s.substring(0,9)!=="precision"){let i=e;return e===Os.HIGH&&t!==Os.HIGH&&(i=Os.MEDIUM),`precision ${i} float;
${s}`}else if(t!==Os.HIGH&&s.substring(0,15)==="precision highp")return s.replace("precision highp","precision mediump");return s}let Ho;function jA(){if(typeof Ho=="boolean")return Ho;try{Ho=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Ho=!1}return Ho}let WA=0;const hc={},qf=class io{constructor(e,t,i="pixi-shader",n={}){this.extra={},this.id=WA++,this.vertexSrc=e||io.defaultVertexSrc,this.fragmentSrc=t||io.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),hc[i]?(hc[i]++,i+=`-${hc[i]}`):hc[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function W2(s,e,t,i){s.getProgramParameter(e,s.LINK_STATUS)||(s.getShaderParameter(t,s.COMPILE_STATUS)||J0(s,t),s.getShaderParameter(i,s.COMPILE_STATUS)||J0(s,i),console.error("PixiJS Error: Could not initialize shader."),s.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",s.getProgramInfoLog(e)))}const z2={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function rb(s){return z2[s]}let dc=null;const Q0={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function ab(s,e){if(!dc){const t=Object.keys(Q0);dc={};for(let i=0;i<t.length;++i){const n=t[i];dc[s[n]]=Q0[n]}}return dc[e]}function ev(s,e,t){if(s.substring(0,9)!=="precision"){let i=e;return e===ks.HIGH&&t!==ks.HIGH&&(i=ks.MEDIUM),`precision ${i} float;
${s}`}else if(t!==ks.HIGH&&s.substring(0,15)==="precision highp")return s.replace("precision highp","precision mediump");return s}let zo;function q2(){if(typeof zo=="boolean")return zo;try{zo=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{zo=!1}return zo}let K2=0;const fc={},Jf=class no{constructor(e,t,i="pixi-shader",n={}){this.extra={},this.id=K2++,this.vertexSrc=e||no.defaultVertexSrc,this.fragmentSrc=t||no.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),fc[i]?(fc[i]++,i+=`-${fc[i]}`):fc[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${i}
${this.fragmentSrc}`,this.vertexSrc=Z0(this.vertexSrc,io.defaultVertexPrecision,Os.HIGH),this.fragmentSrc=Z0(this.fragmentSrc,io.defaultFragmentPrecision,$A())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return NA}static get defaultFragmentSrc(){return DA}static from(e,t,i){const n=e+t;let r=$0[n];return r||($0[n]=r=new io(e,t,i)),r}};qf.defaultVertexPrecision=Os.HIGH,qf.defaultFragmentPrecision=Qn.apple.device?Os.HIGH:Os.MEDIUM;let Rn=qf,zA=0;class tn{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=zA++,this.static=!!t,this.ubo=!!i,e instanceof ri?(this.buffer=e,this.buffer.type=Fn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new ri(new Float32Array(1)),this.buffer.type=Fn.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new tn(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new tn(e,t,i)}static uboFrom(e,t){return new tn(e,t??!0,!0)}}class sn{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof tn?this.uniformGroup=t:this.uniformGroup=new tn(t):this.uniformGroup=new tn({}),this.disposeRunner=new en("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const i in t.uniforms){const n=t.uniforms[i];if(n.group===!0&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){const n=Rn.from(e,t);return new sn(n,i)}}class nb{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let r=0;r<e;r++)i[r]=r;this.defaultGroupCache[e]=tn.from({uSamplers:i},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Rn(this.vertexSrc,n)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new ai,default:this.defaultGroupCache[e]};return new sn(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
${this.fragmentSrc}`,this.vertexSrc=ev(this.vertexSrc,no.defaultVertexPrecision,ks.HIGH),this.fragmentSrc=ev(this.fragmentSrc,no.defaultFragmentPrecision,j2())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return V2}static get defaultFragmentSrc(){return X2}static from(e,t,i){const n=e+t;let r=j0[n];return r||(j0[n]=r=new no(e,t,i)),r}};Jf.defaultVertexPrecision=ks.HIGH,Jf.defaultFragmentPrecision=Qn.apple.device?ks.HIGH:ks.MEDIUM;let In=Jf,Z2=0;class Qs{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Z2++,this.static=!!t,this.ubo=!!i,e instanceof oi?(this.buffer=e,this.buffer.type=kn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new oi(new Float32Array(1)),this.buffer.type=kn.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new Qs(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new Qs(e,t,i)}static uboFrom(e,t){return new Qs(e,t??!0,!0)}}class en{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof Qs?this.uniformGroup=t:this.uniformGroup=new Qs(t):this.uniformGroup=new Qs({}),this.disposeRunner=new Js("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const i in t.uniforms){const n=t.uniforms[i];if(n.group===!0&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){const n=In.from(e,t);return new en(n,i)}}class ob{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let r=0;r<e;r++)i[r]=r;this.defaultGroupCache[e]=Qs.from({uSamplers:i},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new In(this.vertexSrc,n)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new li,default:this.defaultGroupCache[e]};return new en(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
`,t+=`
`;for(let i=0;i<e;i++)i>0&&(t+=`
else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
@@ -333,7 +333,7 @@ else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
color = texture2D(uSamplers[${i}], vTextureCoord);`,t+=`
}`;return t+=`
`,t+=`
`,t}}class Kf{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function qA(){return!Qn.apple.device}function KA(s){let e=!0;const t=ze.ADAPTER.getNavigator();if(Qn.tablet||Qn.phone){if(Qn.apple.device){const i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(Qn.android.device){const i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?s:4}class xu{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var ZA=`varying vec2 vTextureCoord;
`,t}}class Qf{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function J2(){return!Qn.apple.device}function Q2(s){let e=!0;const t=We.ADAPTER.getNavigator();if(Qn.tablet||Qn.phone){if(Qn.apple.device){const i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(Qn.android.device){const i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?s:4}class Su{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var eA=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
@@ -343,7 +343,7 @@ void main(void){
%forloop%
gl_FragColor = color * vColor;
}
`,JA=`precision highp float;
`,tA=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
@@ -364,14 +364,14 @@ void main(void){
vTextureId = aTextureId;
vColor = aColor * tint;
}
`;const el=class Hs extends xu{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Jx,this.vertexSize=6,this.state=Dn.for2d(),this.size=Hs.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??KA(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??qA(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Ot("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return JA}static get defaultFragmentTemplate(){return ZA}setShaderGenerator({vertex:e=Hs.defaultVertexSrc,fragment:t=Hs.defaultFragmentTemplate}={}){this.shaderGenerator=new nb(e,t)}contextChange(){const e=this.renderer.gl;ze.PREFER_ENV===Na.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Hs.defaultMaxTextures),this.maxTextures=EA(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=Hs,i=this.size/4,n=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new jf);for(;t.length<n;)t.push(new Kf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Hs._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++gt._globalBatch,h=0,l=i[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==o&&(l.count>=t&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<r.length;u++)r[u]=null;gt._globalBatch=o}buildDrawCalls(e,t,i){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:a,vertexSize:o}=this,h=Hs._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const p=n[f],m=p._texture.baseTexture,g=zx[m.alphaMode?1:0][p.blendMode];n[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=h[++l],d.texArray=e,d.start=u),this.packInterleavedGeometry(p,r,a,c,u),c+=p.vertexData.length/2*o,u+=p.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;Hs.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,n=Hs._drawCallPool;let r=null;for(let a=0;a<e;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=n[a];r!==o&&(r=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,i.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),Hs.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
`;const sl=class $s extends Su{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=tb,this.vertexSize=6,this.state=Ln.for2d(),this.size=$s.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??Q2(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??J2(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return kt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return tA}static get defaultFragmentTemplate(){return eA}setShaderGenerator({vertex:e=$s.defaultVertexSrc,fragment:t=$s.defaultFragmentTemplate}={}){this.shaderGenerator=new ob(e,t)}contextChange(){const e=this.renderer.gl;We.PREFER_ENV===Na.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),$s.defaultMaxTextures),this.maxTextures=R2(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=$s,i=this.size/4,n=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new qf);for(;t.length<n;)t.push(new Qf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=$s._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++gt._globalBatch,h=0,l=i[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==o&&(l.count>=t&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<r.length;u++)r[u]=null;gt._globalBatch=o}buildDrawCalls(e,t,i){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:a,vertexSize:o}=this,h=$s._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const p=n[f],m=p._texture.baseTexture,g=Zx[m.alphaMode?1:0][p.blendMode];n[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=h[++l],d.texArray=e,d.start=u),this.packInterleavedGeometry(p,r,a,c,u),c+=p.vertexData.length/2*o,u+=p.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;$s.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,n=$s._drawCallPool;let r=null;for(let a=0;a<e;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=n[a];r!==o&&(r=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,i.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),$s.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f Line truncated
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`,eE=`attribute vec2 aVertexPosition;
`,sA=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -397,7 +397,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const Zf=class tl extends sn{constructor(e,t,i){const n=Rn.from(e||tl.defaultVertexSrc,t||tl.defaultFragmentSrc);super(n,i),this.padding=0,this.resolution=tl.defaultResolution,this.multisample=tl.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Dn}apply(e,t,i,n,r){e.applyFilter(this,t,i,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return eE}static get defaultFragmentSrc(){return QA}};Zf.defaultResolution=1,Zf.defaultMultisample=Ai.NONE;let os=Zf;class ph{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new jt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:n}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}ph.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ph.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"background"};et.add(ph);class rb{constructor(e){this.renderer=e,this.emptyRenderer=new xu(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l<o;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<n&&t[u]===c){a[l]=u;continue}for(;h<n;){const d=t[h];if(d&&d._batchEnabled===i&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}rb.extension={type:He.RendererSystem,name:"batch"};et.add(rb);let J0=0;class gh{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=J0++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=J0++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(ze.PREFER_ENV>=Na.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha Line truncated
`;const em=class nl extends en{constructor(e,t,i){const n=In.from(e||nl.defaultVertexSrc,t||nl.defaultFragmentSrc);super(n,i),this.padding=0,this.resolution=nl.defaultResolution,this.multisample=nl.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Ln}apply(e,t,i,n,r){e.applyFilter(this,t,i,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return sA}static get defaultFragmentSrc(){return iA}};em.defaultResolution=1,em.defaultMultisample=Ci.NONE;let os=em;class yh{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Wt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:n}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}yh.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},yh.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"background"};tt.add(yh);class lb{constructor(e){this.renderer=e,this.emptyRenderer=new Su(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l<o;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<n&&t[u]===c){a[l]=u;continue}for(;h<n;){const d=t[h];if(d&&d._batchEnabled===i&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}lb.extension={type:He.RendererSystem,name:"batch"};tt.add(lb);let tv=0;class xh{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=tv++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=tv++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(We.PREFER_ENV>=Na.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha Line truncated
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
@@ -422,7 +422,7 @@ void main(void)
gl_FragColor = original;
}
`,aE=`attribute vec2 aVertexPosition;
`,cA=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -438,7 +438,7 @@ void main(void)
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`;class oE extends os{constructor(e,t,i){let n=null;typeof e!="string"&&t===void 0&&i===void 0&&(n=e,e=void 0,t=void 0,i=void 0),super(e||aE,t||rE,i),this.maskSprite=n,this.maskMatrix=new ai}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,n){const r=this._maskSprite,a=r._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new mp(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,e.applyFilter(this,t,i,n))}}class lE{constructor(e=null){this.type=Ci.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=os.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ci.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class fb{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new lE;r.pooled=!0,r.maskObject=t,i=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(n),i._colorMask=n?n._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==Ci.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case Ci.SCISSOR:this.renderer.scissor.push(i);break;case Ci.STENCIL:this.renderer.stencil.push(i);break;case Ci.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case Ci.COLOR:this.pushColorMask(i);break}i.type===Ci.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case Ci.SCISSOR:this.renderer.scissor.pop(t);break;case Ci.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case Ci.SPRITE:this.popSpriteMask(t);break;case Ci.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===Ci.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=Ci.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Ci.SCISSOR:e.type=Ci.STENCIL:e.type=Ci.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new oE])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,n),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}fb.extension={type:He.RendererSystem,name:"mask"};et.add(fb);class mb{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const tv=new ai,iv=[],pb=class Xc extends mb{constructor(e){super(e),this.glConst=ze.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,a=i.getBounds(!0,iv.pop()??new Et);this.roundFrameToPixels(a,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static Line truncated
`;class hA extends os{constructor(e,t,i){let n=null;typeof e!="string"&&t===void 0&&i===void 0&&(n=e,e=void 0,t=void 0,i=void 0),super(e||cA,t||lA,i),this.maskSprite=n,this.maskMatrix=new li}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,n){const r=this._maskSprite,a=r._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new vp(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,e.applyFilter(this,t,i,n))}}class uA{constructor(e=null){this.type=Ri.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=os.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ri.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class gb{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new uA;r.pooled=!0,r.maskObject=t,i=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(n),i._colorMask=n?n._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==Ri.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case Ri.SCISSOR:this.renderer.scissor.push(i);break;case Ri.STENCIL:this.renderer.stencil.push(i);break;case Ri.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case Ri.COLOR:this.pushColorMask(i);break}i.type===Ri.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case Ri.SCISSOR:this.renderer.scissor.pop(t);break;case Ri.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case Ri.SPRITE:this.popSpriteMask(t);break;case Ri.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===Ri.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=Ri.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Ri.SCISSOR:e.type=Ri.STENCIL:e.type=Ri.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new hA])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,n),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}gb.extension={type:He.RendererSystem,name:"mask"};tt.add(gb);class vb{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const nv=new li,rv=[],yb=class $c extends vb{constructor(e){super(e),this.glConst=We.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,a=i.getBounds(!0,rv.pop()??new Tt);this.roundFrameToPixels(a,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static Line truncated
data[offset] = v;
`,vec2:`
data[offset] = v[0];
@@ -476,7 +476,7 @@ void main(void)
{
data[offset + i] = v[i];
}
`},wb={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function vE(s){const e=s.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,i=0,n=0;for(let r=0;r<e.length;r++){const a=e[r];if(t=wb[a.data.type],a.data.size>1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,n+=o}i+t>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=t,i=t):(a.offset=n,i+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function yE(s,e){const t=[];for(const i in s)e[i]&&t.push(e[i]);return t.sort((i,n)=>i.index-n.index),t}function xE(s,e){if(!s.autoManage)return{size:0,syncFunc:pE};const t=yE(s.uniforms,e),{uboElements:i,size:n}=vE(t),r=[`
`},Mb={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function bA(s){const e=s.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,i=0,n=0;for(let r=0;r<e.length;r++){const a=e[r];if(t=Mb[a.data.type],a.data.size>1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,n+=o}i+t>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=t,i=t):(a.offset=n,i+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function wA(s,e){const t=[];for(const i in s)e[i]&&t.push(e[i]);return t.sort((i,n)=>i.index-n.index),t}function SA(s,e){if(!s.autoManage)return{size:0,syncFunc:yA};const t=wA(s.uniforms,e),{uboElements:i,size:n}=bA(t),r=[`
var v = null;
var v2 = null;
var cv = null;
@@ -484,7 +484,7 @@ void main(void)
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`];for(let a=0;a<i.length;a++){const o=i[a],h=s.uniforms[o.data.name],l=o.data.name;let c=!1;for(let u=0;u<vo.length;u++){const d=vo[u];if(d.codeUbo&&d.test(o.data,h)){r.push(`offset = ${o.offset/4};`,vo[u].codeUbo(o.data.name,h)),c=!0;break}}if(!c)if(o.data.size>1){const u=ib(o.data.type),d=Math.max(wb[o.data.type]/16,1),f=u/d,p=(4-f%4)%4;r.push(`
`];for(let a=0;a<i.length;a++){const o=i[a],h=s.uniforms[o.data.name],l=o.data.name;let c=!1;for(let u=0;u<xo.length;u++){const d=xo[u];if(d.codeUbo&&d.test(o.data,h)){r.push(`offset = ${o.offset/4};`,xo[u].codeUbo(o.data.name,h)),c=!0;break}}if(!c)if(o.data.size>1){const u=rb(o.data.type),d=Math.max(Mb[o.data.type]/16,1),f=u/d,p=(4-f%4)%4;r.push(`
cv = ud.${l}.value;
v = uv.${l};
offset = ${o.offset/4};
@@ -500,7 +500,7 @@ void main(void)
offset += ${p};
}
`)}else{const u=gE[o.data.type];r.push(`
`)}else{const u=xA[o.data.type];r.push(`
cv = ud.${l}.value;
v = uv.${l};
offset = ${o.offset/4};
@@ -508,7 +508,7 @@ void main(void)
`)}}return r.push(`
renderer.buffer.update(buffer);
`),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(`
`))}}let bE=0;const fc={textureCount:0,uboCount:0};class Sb{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=bE++}systemCheck(){if(!jA())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(fc.textureCount=0,fc.uboCount=0,this.syncUniformGroup(e.uniformGroup,fc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=VA(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,fc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=xE(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const a in n)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=mE(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Sb.extension={type:He.RendererSystem,name:"shader"};et.add(Sb);class vh{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}vh.defaultOptions={hello:!1},vh.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"startup"};et.add(vh);function wE(s,e=[]){return e[ut.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.ADD]=[s.ONE,s.ONE],e[ut.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR_DODGE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR_BURN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.HARD_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SOFT_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.DIFFERENCE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.EXCLUSION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.HUE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SATURATION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.LUMINOSITY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.NONE]=[0,0],e[ut.NORMAL_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.ADD_NPM]=[s.SRC_ALPHA,s.ONE,s.ONE,s.ONE],e[ut.SCREEN_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SRC_IN]=[s.DST_ALPHA,s.ZERO],e[ut.SRC_OUT]=[s.ONE_MINUS_DST_ALPHA,s.ZERO],e[ut.SRC_ATOP]=[s.DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[ut.DST_OVER]=[s.ONE_MINUS_DST_ALPHA,s.ONE],e[ut.DST_IN]=[s.ZERO,s.SRC_ALPHA],e[ut.DST_OUT]=[s.ZERO,s.ONE_MINUS_SRC_ALPHA],e[ut.DST_ATOP]=[s.ONE_MINUS_DST_ALPHA,s.SRC_ALPHA],e[ut.XOR]=[s.ONE_MINUS_DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[ut.SUBTRACT]=[s.ONE,s.ONE,s.ONE,s.ONE,s.FUNC_REVERSE_SUBTRACT,s.FUNC_ADD],e}const SE=0,_E=1,ME=2,TE=3,AE=4,EE=5,_b=class Qf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ut.NONE,this._blendEq=!1,this.map=[],this.map[SE]=this.setBlend,this.map[_E]=this.setOffset,this.map[ME]=this.setCullFace,this.map[TE]=this.setDepthTest,this.ma Line truncated
`))}}let _A=0;const gc={textureCount:0,uboCount:0};class Tb{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=_A++}systemCheck(){if(!q2())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(gc.textureCount=0,gc.uboCount=0,this.syncUniformGroup(e.uniformGroup,gc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=G2(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,gc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=SA(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const a in n)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=vA(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Tb.extension={type:He.RendererSystem,name:"shader"};tt.add(Tb);class bh{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}bh.defaultOptions={hello:!1},bh.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"startup"};tt.add(bh);function MA(s,e=[]){return e[ut.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.ADD]=[s.ONE,s.ONE],e[ut.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR_DODGE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR_BURN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.HARD_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SOFT_LIGHT]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.DIFFERENCE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.EXCLUSION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.HUE]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SATURATION]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.COLOR]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.LUMINOSITY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.NONE]=[0,0],e[ut.NORMAL_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.ADD_NPM]=[s.SRC_ALPHA,s.ONE,s.ONE,s.ONE],e[ut.SCREEN_NPM]=[s.SRC_ALPHA,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[ut.SRC_IN]=[s.DST_ALPHA,s.ZERO],e[ut.SRC_OUT]=[s.ONE_MINUS_DST_ALPHA,s.ZERO],e[ut.SRC_ATOP]=[s.DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[ut.DST_OVER]=[s.ONE_MINUS_DST_ALPHA,s.ONE],e[ut.DST_IN]=[s.ZERO,s.SRC_ALPHA],e[ut.DST_OUT]=[s.ZERO,s.ONE_MINUS_SRC_ALPHA],e[ut.DST_ATOP]=[s.ONE_MINUS_DST_ALPHA,s.SRC_ALPHA],e[ut.XOR]=[s.ONE_MINUS_DST_ALPHA,s.ONE_MINUS_SRC_ALPHA],e[ut.SUBTRACT]=[s.ONE,s.ONE,s.ONE,s.ONE,s.FUNC_REVERSE_SUBTRACT,s.FUNC_ADD],e}const TA=0,AA=1,EA=2,CA=3,IA=4,RA=5,Ab=class im{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ut.NONE,this._blendEq=!1,this.map=[],this.map[TA]=this.setBlend,this.map[AA]=this.setOffset,this.map[EA]=this.setCullFace,this.map[CA]=this.setDepthTest,this.ma Line truncated
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -519,7 +519,7 @@ void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,OE=`attribute vec2 aVertexPosition;
}`,DA=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -545,7 +545,7 @@ void main(void)
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`;const BE=FE,Ib=OE;class Rb{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=Ai.HIGH?this.multisample=Ai.HIGH:t>=Ai.MEDIUM?this.multisample=Ai.MEDIUM:t>=Ai.LOW?this.multisample=Ai.LOW:this.multisample=Ai.NONE}destroy(){}}Rb.extension={type:He.RendererSystem,name:"_multisample"};et.add(Rb);class LE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Pb{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new LE(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Pb.extension={type:He.RendererSystem,name:"buffer"};et.add(Pb);class kb{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let n,r,a,o;if(t&&(n=t.renderTexture,r=t.clear,a=t.transform,o=t.skipUpdateTransform),this.renderingToScreen=!n,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=a,!i.context.isLost){if(n||(this.lastObjectRendered=e),!o){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}i.renderTexture.bind(n),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),n&&(t.blit&&i.framebuffer.blit(),n.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}kb.extension={type:He.RendererSystem,name:"objectRenderer"};et.add(kb);const Yc=class em extends IE{constructor(e){super(),this.type=kx.WEBGL,e=Object.assign({},ze.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new tn({projectionMatrix:new ai},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:em.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Ot("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=em.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:aA()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
`;const NA=LA,kb=DA;class Fb{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=Ci.HIGH?this.multisample=Ci.HIGH:t>=Ci.MEDIUM?this.multisample=Ci.MEDIUM:t>=Ci.LOW?this.multisample=Ci.LOW:this.multisample=Ci.NONE}destroy(){}}Fb.extension={type:He.RendererSystem,name:"_multisample"};tt.add(Fb);class UA{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Ob{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new UA(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Ob.extension={type:He.RendererSystem,name:"buffer"};tt.add(Ob);class Bb{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let n,r,a,o;if(t&&(n=t.renderTexture,r=t.clear,a=t.transform,o=t.skipUpdateTransform),this.renderingToScreen=!n,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=a,!i.context.isLost){if(n||(this.lastObjectRendered=e),!o){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}i.renderTexture.bind(n),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),n&&(t.blit&&i.framebuffer.blit(),n.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Bb.extension={type:He.RendererSystem,name:"objectRenderer"};tt.add(Bb);const Hc=class sm extends kA{constructor(e){super(),this.type=Bx.WEBGL,e=Object.assign({},We.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Qs({projectionMatrix:new li},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:sm.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(kt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=sm.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:c2()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return Line truncated
uniform sampler2D uSampler;
uniform float uAlpha;
@@ -554,9 +554,9 @@ void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;class WE extends os{constructor(e=1){super(BE,jE,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const zE={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},qE=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function KE(s){const e=zE[s],t=e.length;let i=qE,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let a;for(let o=0;o<s;o++){let h=r.replace("%index%",o.toString());a=o,o>=t&&(a=s-o-1),h=h.replace("%value%",e[a].toString()),n+=h,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}const ZE=`
`;class KA extends os{constructor(e=1){super(NA,qA,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const ZA={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},JA=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function QA(s){const e=ZA[s],t=e.length;let i=JA,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let a;for(let o=0;o<s;o++){let h=r.replace("%index%",o.toString());a=o,o>=t&&(a=s-o-1),h=h.replace("%value%",e[a].toString()),n+=h,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}const eE=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -586,8 +586,8 @@ void main(void)
vec2 textureCoord = filterTextureCoord();
%blur%
}`;function JE(s,e){const t=Math.ceil(s/2);let i=ZE,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a<s;a++){let o=r.replace("%index%",a.toString());o=o.replace("%sampleIndex%",`${a-(t-1)}.0`),n+=o,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}class am extends os{constructor(e,t=8,i=4,n=os.defaultResolution,r=5){const a=JE(r,e),o=KE(r);super(a,o),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,n){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,n);else{const r=e.getFilterTexture(),a=e.renderer;let o=t,h=r;this.state.blend=!1,e.applyFilter(this,o,h,An.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(o,An.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,i,n),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class QE extends os{constructor(e=8,t=4,i=os.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new am(!0,e,t,i,n),this.blurYFilter=new am(!1,e,t,i,n),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,n){const r=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(r&&a){const o=e.getFilterTexture();this.blurXFilter.apply(e,t,o,An.CLEAR),this.blurYFilter.apply(e,o,i,n),e.returnFilterTexture(o)}else a?this.blurYFilter.apply(e,t,i,n):this.blurXFilter.apply(e,t,i,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var eC=`varying vec2 vTextureCoord;
}`;function tE(s,e){const t=Math.ceil(s/2);let i=eE,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a<s;a++){let o=r.replace("%index%",a.toString());o=o.replace("%sampleIndex%",`${a-(t-1)}.0`),n+=o,n+=`
`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}class cm extends os{constructor(e,t=8,i=4,n=os.defaultResolution,r=5){const a=tE(r,e),o=QA(r);super(a,o),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,n){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,n);else{const r=e.getFilterTexture(),a=e.renderer;let o=t,h=r;this.state.blend=!1,e.applyFilter(this,o,h,Tn.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(o,Tn.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,i,n),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class iE extends os{constructor(e=8,t=4,i=os.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new cm(!0,e,t,i,n),this.blurYFilter=new cm(!1,e,t,i,n),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,n){const r=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(r&&a){const o=e.getFilterTexture();this.blurXFilter.apply(e,t,o,Tn.CLEAR),this.blurYFilter.apply(e,o,i,n),e.returnFilterTexture(o)}else a?this.blurYFilter.apply(e,t,i,n):this.blurXFilter.apply(e,t,i,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var sE=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
@@ -639,7 +639,7 @@ void main(void)
gl_FragColor = vec4(rgb, result.a);
}
`;class om extends os{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Ib,eC,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,n,r]=jt.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),n=Math.sin(e),r=Math.sqrt,a=1/3,o=r(a),h=i+(1-i)*a,l=a*(1-i)-o*n,c=a*(1-i)+o*n,u=a*(1-i)+o*n,d=i+a*(1-i),f=a*(1-i)-o*n,p=a*(1-i)-o*n,m=a*(1-i)+o*n,g=i+a*(1-i),v=[h,l,c,0,0,u,d,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(v,t)}contrast(e,t){const i=(e||0)+1,n=-.5*(i-1),r=[i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,n=(i-1)*-.5,r=[i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,n,r){e=e||.2,t=t||.15,i=i||16770432,n=n||3375104;const a=jt.shared,[o,h,l]=a.setValue(i).toArray(),[c,u,d]=a.setValue(n).toArray(),f=[.3,.59,.11,0,0,o,h,l,e,0,c,u,d,t,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}om.prototype.grayscale=om.prototype.greyscale;var tC=`varying vec2 vFilterCoord;
`;class hm extends os{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(kb,sE,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,n,r]=Wt.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),n=Math.sin(e),r=Math.sqrt,a=1/3,o=r(a),h=i+(1-i)*a,l=a*(1-i)-o*n,c=a*(1-i)+o*n,u=a*(1-i)+o*n,d=i+a*(1-i),f=a*(1-i)-o*n,p=a*(1-i)-o*n,m=a*(1-i)+o*n,g=i+a*(1-i),v=[h,l,c,0,0,u,d,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(v,t)}contrast(e,t){const i=(e||0)+1,n=-.5*(i-1),r=[i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,n=(i-1)*-.5,r=[i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,n,r){e=e||.2,t=t||.15,i=i||16770432,n=n||3375104;const a=Wt.shared,[o,h,l]=a.setValue(i).toArray(),[c,u,d]=a.setValue(n).toArray(),f=[.3,.59,.11,0,0,o,h,l,e,0,c,u,d,t,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}hm.prototype.grayscale=hm.prototype.greyscale;var nE=`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
@@ -659,7 +659,7 @@ void main(void)
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
}
`,iC=`attribute vec2 aVertexPosition;
`,rE=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform mat3 filterMatrix;
@@ -688,7 +688,7 @@ void main(void)
vTextureCoord = filterTextureCoord();
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
}
`;class sC extends os{constructor(e,t){const i=new ai;e.renderable=!1,super(iC,tC,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new Xt(t,t)}apply(e,t,i,n){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const r=this.maskSprite.worldTransform,a=Math.sqrt(r.a*r.a+r.b*r.b),o=Math.sqrt(r.c*r.c+r.d*r.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=r.a/a,this.uniforms.rotation[1]=r.b/a,this.uniforms.rotation[2]=r.c/o,this.uniforms.rotation[3]=r.d/o),e.applyFilter(this,t,i,n)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var nC=`varying vec2 v_rgbNW;
`;class aE extends os{constructor(e,t){const i=new li;e.renderable=!1,super(rE,nE,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new Xt(t,t)}apply(e,t,i,n){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const r=this.maskSprite.worldTransform,a=Math.sqrt(r.a*r.a+r.b*r.b),o=Math.sqrt(r.c*r.c+r.d*r.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=r.a/a,this.uniforms.rotation[1]=r.b/a,this.uniforms.rotation[2]=r.c/o,this.uniforms.rotation[3]=r.d/o),e.applyFilter(this,t,i,n)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var oE=`varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
@@ -809,7 +809,7 @@ void main() {
gl_FragColor = color;
}
`,rC=`
`,lE=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
@@ -851,7 +851,7 @@ void main(void) {
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
}
`;class aC extends os{constructor(){super(rC,nC)}}var oC=`precision highp float;
`;class cE extends os{constructor(){super(lE,oE)}}var hE=`precision highp float;
varying vec2 vTextureCoord;
varying vec4 vColor;
@@ -885,8 +885,8 @@ void main()
gl_FragColor = color;
}
`;class lC extends os{constructor(e=.5,t=Math.random()){super(Ib,oC,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const nv={AlphaFilter:WE,BlurFilter:QE,BlurFilterPass:am,ColorMatrixFilter:om,DisplacementFilter:sC,FXAAFilter:aC,NoiseFilter:lC};Object.entries(nv).forEach(([s,e])=>{Object.defineProperty(nv,s,{get(){return Ot("7.1.0",`filters.${s} has moved to ${s}`),e}})});class cC{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(ls.system.add(this.tickerUpdate,this,Fa.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ls.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Fr=new cC;class Gl{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Gl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Xt,this.page=new Xt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class xh extends Gl{constructor(){super(...arguments),this.client=new Xt,this.movement=new Xt,this.offset=new Xt,this.global=new Xt,this.screen=new Xt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,r,a,o,h,l,c,u,d,f,p,m){throw new Error("Method not implemented.")}}class js extends xh{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class yo extends xh{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}yo.DOM_DELTA_PIXEL=0,yo.DOM_DELTA_LINE=1,yo.DOM_DELTA_PAGE=2;const hC=2048,uC=new Xt,ef=new Xt;class dC{constructor(e){this.dispatch=new $l,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=zs(e,i=>({alias:[i],src:i})).map(async i=>{var a,o;const n=wi.toAbsolute(i.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(o=(a=r.parser)==null?void 0:a.unload)==null||o.call(a,h,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Ts=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(Ts||{});const EC=".json",CC="application/json",IC={extension:{type:He.LoadParser,priority:Ts.Low},name:"loadJson",test(s){return Bo(s,CC)||gs(s,EC)},async load(s){return await(await ze.ADAPTER.fetch(s)).json()}};et.add(IC);const RC=".txt",PC="text/plain",kC={name:"loadTxt",extension:{type:He.LoadParser,priority:Ts.Low},test(s){return Bo(s,PC)||gs(s,RC)},async load(s){return await(await ze.ADAPTER.fetch(s)).text()}};et.add(kC);const FC=["normal","bold","100","200","300","400","500","600","700","800","900"],OC=[".ttf",".otf",".woff",".woff2"],BC=["font/ttf","font/otf","font/woff","font/woff2"],LC=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function DC(s){const e=wi.extname(s),t=wi.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(LC)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const NC=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function UC(s){return NC.test(s)?s:encodeURI(s)}const XC={extension:{type:He.LoadParser,priority:Ts.Low},name:"loadWebFont",test(s){return Bo(s,BC)||gs(s,OC)},async load(s,e){var i,n,r;const t=ze.ADAPTER.getFontFaceSet();if(t){const a=[],o=((i=e.data)==null?void 0:i.family)??DC(s),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>FC.includes(c)))??["normal"],l=e.data??{};for(let c=0;c<h.length;c++){const u=h[c],d=new FontFace(o,`url(${UC(s)})`,{...l,weight:u});await d.load(),t.add(d),a.push(d)}return a.length===1?a[0]:a}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(s){(Array.isArray(s)?s:[s]).forEach(e=>ze.ADAPTER.getFontFaceSet().delete(e))}};et.add(XC);const VC=`(function() {
`;class uE extends os{constructor(e=.5,t=Math.random()){super(kb,hE,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const ov={AlphaFilter:KA,BlurFilter:iE,BlurFilterPass:cm,ColorMatrixFilter:hm,DisplacementFilter:aE,FXAAFilter:cE,NoiseFilter:uE};Object.entries(ov).forEach(([s,e])=>{Object.defineProperty(ov,s,{get(){return kt("7.1.0",`filters.${s} has moved to ${s}`),e}})});class dE{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(ls.system.add(this.tickerUpdate,this,Fa.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ls.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Pr=new dE;class Wl{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Wl.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Xt,this.page=new Xt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class Sh extends Wl{constructor(){super(...arguments),this.client=new Xt,this.movement=new Xt,this.offset=new Xt,this.global=new Xt,this.screen=new Xt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,r,a,o,h,l,c,u,d,f,p,m){throw new Error("Method not implemented.")}}class Gs extends Sh{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class bo extends Sh{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}bo.DOM_DELTA_PIXEL=0,bo.DOM_DELTA_LINE=1,bo.DOM_DELTA_PAGE=2;const fE=2048,mE=new Xt,nf=new Xt;class pE{constructor(e){this.dispatch=new jl,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle Line truncated
${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=js(e,i=>({alias:[i],src:i})).map(async i=>{var a,o;const n=Si.toAbsolute(i.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(o=(a=r.parser)==null?void 0:a.unload)==null||o.call(a,h,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var _s=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(_s||{});const RE=".json",PE="application/json",kE={extension:{type:He.LoadParser,priority:_s.Low},name:"loadJson",test(s){return Do(s,PE)||gs(s,RE)},async load(s){return await(await We.ADAPTER.fetch(s)).json()}};tt.add(kE);const FE=".txt",OE="text/plain",BE={name:"loadTxt",extension:{type:He.LoadParser,priority:_s.Low},test(s){return Do(s,OE)||gs(s,FE)},async load(s){return await(await We.ADAPTER.fetch(s)).text()}};tt.add(BE);const LE=["normal","bold","100","200","300","400","500","600","700","800","900"],DE=[".ttf",".otf",".woff",".woff2"],NE=["font/ttf","font/otf","font/woff","font/woff2"],UE=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function XE(s){const e=Si.extname(s),t=Si.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(UE)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const VE=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function YE(s){return VE.test(s)?s:encodeURI(s)}const $E={extension:{type:He.LoadParser,priority:_s.Low},name:"loadWebFont",test(s){return Do(s,NE)||gs(s,DE)},async load(s,e){var i,n,r;const t=We.ADAPTER.getFontFaceSet();if(t){const a=[],o=((i=e.data)==null?void 0:i.family)??XE(s),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>LE.includes(c)))??["normal"],l=e.data??{};for(let c=0;c<h.length;c++){const u=h[c],d=new FontFace(o,`url(${YE(s)})`,{...l,weight:u});await d.load(),t.add(d),a.push(d)}return a.length===1?a[0]:a}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(s){(Array.isArray(s)?s:[s]).forEach(e=>We.ADAPTER.getFontFaceSet().delete(e))}};tt.add($E);const GE=`(function() {
"use strict";
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
async function checkImageBitmap() {
@@ -903,7 +903,7 @@ ${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=zs
self.postMessage(result);
});
})();
`;let xo=null,dm=class{constructor(){xo||(xo=URL.createObjectURL(new Blob([VC],{type:"application/javascript"}))),this.worker=new Worker(xo)}};dm.revokeObjectURL=function(){xo&&(URL.revokeObjectURL(xo),xo=null)};const YC=`(function() {
`;let wo=null,pm=class{constructor(){wo||(wo=URL.createObjectURL(new Blob([GE],{type:"application/javascript"}))),this.worker=new Worker(wo)}};pm.revokeObjectURL=function(){wo&&(URL.revokeObjectURL(wo),wo=null)};const HE=`(function() {
"use strict";
async function loadImageBitmap(url) {
const response = await fetch(url);
@@ -929,8 +929,8 @@ ${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=zs
}
};
})();
`;let bo=null;class $b{constructor(){bo||(bo=URL.createObjectURL(new Blob([YC],{type:"application/javascript"}))),this.worker=new Worker(bo)}}$b.revokeObjectURL=function(){bo&&(URL.revokeObjectURL(bo),bo=null)};let cv=0,tf;class $C{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new dm;t.addEventListener("message",i=>{t.terminate(),dm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){tf===void 0&&(tf=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<tf&&(this._createdWorkers++,e=new $b().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[cv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:cv++,id:i})}}const hv=new $C;function Hl(s,e,t){s.resource.internal=!0;const i=new mt(s),n=()=>{delete e.promiseCache[t],ga.has(t)&&ga.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const GC=[".jpeg",".jpg",".png",".webp",".avif"],HC=["image/jpeg","image/png","image/webp","image/avif"];async function jC(s){const e=await ze.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const bu={name:"loadTextures",extension:{type:He.LoadParser,priority:Ts.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return Bo(s,HC)||gs(s,GC)},async load(s,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await hv.isImageBitmapSupported()?n=await hv.loadImageBitmap(s):n=await jC(s):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=s,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=dr(s)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new gt(n,r);return a.resource.src=s,Hl(a,t,s)},unload(s){s.destroy(!0)}};et.add(bu);const WC=".svg",zC="image/svg+xml",qC={extension:{type:He.LoadParser,priority:Ts.High},name:"loadSVG",test(s){return Bo(s,zC)||gs(s,WC)},async testParse(s){return im.test(s)},async parse(s,e,t){var r;const i=new im(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new gt(i,{resolution:dr(s),...e==null?void 0:e.data});return n.resource.src=e.src,Hl(n,t,e.src)},async load(s,e){return(await ze.ADAPTER.fetch(s)).text()},unload:bu.unload};et.add(qC);const KC=[".mp4",".m4v",".webm",".ogv"],ZC=["video/mp4","video/webm","video/ogg"],JC={name:"loadVideo",extension:{type:He.LoadParser,priority:Ts.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return Bo(s,ZC)||gs(s,KC)},async load(s,e,t){var a;let i;const n=await(await ze.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new Bb(r,o);await h.load();const l=new gt(h,{alphaMode:await rA(),resolution:dr(s),...e==null?void 0:e.data});l.resource.src=s,i=Hl(l,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(s){s.destroy(!0)}};et.add(JC);class QC{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},zs(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=zs(l||c).map(v=>typeof v=="string"?MC(v):Array.isArray(v)?v:[v]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(v=>{v.forEach(b=>{let y={};if(typeof b!="object"){y.src=b;for(let w=0;w<this._parsers.length;w++){const A=this._parsers[w];if(A.test(b)){y=A.parse(b);break}}}else u=b.data??u,d=b.format??d,f=b.loadParser??f,y={...y,...b};if(!m)throw new Error(`[Resolver] alias is undefined for this asset: ${y.src}`);y=this.buildResolvedAsset(y,{aliases:m,data:u,format:d,loadParser:f}),g.push(y)})}),m.forEach(v=>{this._assetMap[v]=g})})}resolveBundle(e){const t=wh(e);e=zs(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(n,h)]=l}i[n]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=wh(e);e=zs(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??a}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=wi.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??wi.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class e2{constructor(){this._detections=[],this._initialized=!1,this.resolver=new QC,this.loader=new AC,this.cache=ga,this._backgroundLoader=new _C(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=wh(e),n=zs(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(n),a=await this._mapLoadToResolve(r,t);return i?a[n[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},a=Object.keys(n);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=n[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return ga.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=ga.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co Line truncated
`;let So=null;class jb{constructor(){So||(So=URL.createObjectURL(new Blob([HE],{type:"application/javascript"}))),this.worker=new Worker(So)}}jb.revokeObjectURL=function(){So&&(URL.revokeObjectURL(So),So=null)};let dv=0,rf;class jE{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new pm;t.addEventListener("message",i=>{t.terminate(),pm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){rf===void 0&&(rf=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<rf&&(this._createdWorkers++,e=new jb().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[dv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:dv++,id:i})}}const fv=new jE;function zl(s,e,t){s.resource.internal=!0;const i=new mt(s),n=()=>{delete e.promiseCache[t],ga.has(t)&&ga.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const WE=[".jpeg",".jpg",".png",".webp",".avif"],zE=["image/jpeg","image/png","image/webp","image/avif"];async function qE(s){const e=await We.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const _u={name:"loadTextures",extension:{type:He.LoadParser,priority:_s.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return Do(s,zE)||gs(s,WE)},async load(s,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await fv.isImageBitmapSupported()?n=await fv.loadImageBitmap(s):n=await qE(s):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=s,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=dr(s)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new gt(n,r);return a.resource.src=s,zl(a,t,s)},unload(s){s.destroy(!0)}};tt.add(_u);const KE=".svg",ZE="image/svg+xml",JE={extension:{type:He.LoadParser,priority:_s.High},name:"loadSVG",test(s){return Do(s,ZE)||gs(s,KE)},async testParse(s){return rm.test(s)},async parse(s,e,t){var r;const i=new rm(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new gt(i,{resolution:dr(s),...e==null?void 0:e.data});return n.resource.src=e.src,zl(n,t,e.src)},async load(s,e){return(await We.ADAPTER.fetch(s)).text()},unload:_u.unload};tt.add(JE);const QE=[".mp4",".m4v",".webm",".ogv"],eC=["video/mp4","video/webm","video/ogg"],tC={name:"loadVideo",extension:{type:He.LoadParser,priority:_s.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return Do(s,eC)||gs(s,QE)},async load(s,e,t){var a;let i;const n=await(await We.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new Nb(r,o);await h.load();const l=new gt(h,{alphaMode:await l2(),resolution:dr(s),...e==null?void 0:e.data});l.resource.src=s,i=zl(l,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(s){s.destroy(!0)}};tt.add(tC);class iC{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId= Line truncated
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},js(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=js(l||c).map(v=>typeof v=="string"?EE(v):Array.isArray(v)?v:[v]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(v=>{v.forEach(b=>{let y={};if(typeof b!="object"){y.src=b;for(let w=0;w<this._parsers.length;w++){const A=this._parsers[w];if(A.test(b)){y=A.parse(b);break}}}else u=b.data??u,d=b.format??d,f=b.loadParser??f,y={...y,...b};if(!m)throw new Error(`[Resolver] alias is undefined for this asset: ${y.src}`);y=this.buildResolvedAsset(y,{aliases:m,data:u,format:d,loadParser:f}),g.push(y)})}),m.forEach(v=>{this._assetMap[v]=g})})}resolveBundle(e){const t=Mh(e);e=js(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(n,h)]=l}i[n]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=Mh(e);e=js(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??a}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=Si.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??Si.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class sC{constructor(){this._detections=[],this._initialized=!1,this.resolver=new iC,this.loader=new IE,this.cache=ga,this._backgroundLoader=new AE(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=Mh(e),n=js(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(n),a=await this._mapLoadToResolve(r,t);return i?a[n[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},a=Object.keys(n);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=n[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return ga.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=ga.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co Line truncated
uniform vec4 uColor;
uniform sampler2D uSampler;
@@ -939,7 +939,7 @@ void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
}
`,K2=`attribute vec2 aVertexPosition;
`,QC=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
@@ -954,7 +954,7 @@ void main(void)
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`;class Th extends sn{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:ai.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||Rn.from(K2,q2),i),this._colorDirty=!1,this.uvMatrix=new mp(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new jt(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;jt.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class Z2 extends Ol{constructor(e=mt.EMPTY,t,i,n,r){const a=new bp(t,i,n);a.getBuffer("aVertexPosition").static=!1;const o=new Th(e);super(a,o,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Sv{constructor(e,t,i){this.geometry=new Ln,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||Qe.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new ri(xA(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=t,t+=o.size,this.dynamicStride+=o.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new ri(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=n,n+=o.size,this.staticStride+=o.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new ri(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];e.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===Qe.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];e.addAttribute(o.attributeName,this.staticBuffer,0,o.type===Qe.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(e,t,i){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,i,r.type===Qe.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,i,r.type===Qe.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var J2=`varying vec2 vTextureCoord;
`;class Ch extends en{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:li.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||In.from(QC,JC),i),this._colorDirty=!1,this.uvMatrix=new vp(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Wt(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;Wt.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class eI extends Dl{constructor(e=mt.EMPTY,t,i,n,r){const a=new _p(t,i,n);a.getBuffer("aVertexPosition").static=!1;const o=new Ch(e);super(a,o,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Tv{constructor(e,t,i){this.geometry=new Bn,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||et.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new oi(S2(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=t,t+=o.size,this.dynamicStride+=o.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new oi(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=n,n+=o.size,this.staticStride+=o.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new oi(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];e.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===et.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];e.addAttribute(o.attributeName,this.staticBuffer,0,o.type===et.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(e,t,i){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,i,r.type===et.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,i,r.type===et.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var tI=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
@@ -962,7 +962,7 @@ uniform sampler2D uSampler;
void main(void){
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
gl_FragColor = color;
}`,Q2=`attribute vec2 aVertexPosition;
}`,iI=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
@@ -987,8 +987,8 @@ void main(void){
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`;class Zb extends xu{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new ai,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Qe.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=sn.from(Q2,J2,{}),this.state=Dn.for2d()}render(e){const t=e.children,i=e._maxSize,n=e._batchSize,r=this.renderer;let a=t.length;if(a===0)return;a>i&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=qx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=jt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;f<a;f+=n,p+=1){let m=a-f;m>n&&(m=n),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const v=e._bufferUpdateIDs[p]||0;d=d||g._updateID<v,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,m)),r.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,m*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,n=e._batchSize,r=e._properties;for(let a=0;a<i;a+=n)t.push(new Sv(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new Sv(this.properties,i,t)}uploadVertices(e,t,i,n,r,a){let o=0,h=0,l=0,c=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,p=d.scale.x,m=d.scale.y,g=f.trim,v=f.orig;g?(h=g.x-d.anchor.x*v.width,o=h+g.width,c=g.y-d.anchor.y*v.height,l=c+g.height):(o=v.width*(1-d.anchor.x),h=v.width*-d.anchor.x,l=v.height*(1-d.anchor.y),c=v.height*-d.anchor.y),n[a]=h*p,n[a+1]=c*m,n[a+r]=o*p,n[a+r+1]=c*m,n[a+r*2]=o*p,n[a+r*2+1]=l*m,n[a+r*3]=h*p,n[a+r*3+1]=l*m,a+=r*4}}uploadPosition(e,t,i,n,r,a){for(let o=0;o<i;o++){const h=e[t+o].position;n[a]=h.x,n[a+1]=h.y,n[a+r]=h.x,n[a+r+1]=h.y,n[a+r*2]=h.x,n[a+r*2+1]=h.y,n[a+r*3]=h.x,n[a+r*3+1]=h.y,a+=r*4}}uploadRotation(e,t,i,n,r,a){for(let o=0;o<i;o++){const h=e[t+o].rotation;n[a]=h,n[a+r]=h,n[a+r*2]=h,n[a+r*3]=h,a+=r*4}}uploadUvs(e,t,i,n,r,a){for(let o=0;o<i;++o){const h=e[t+o]._texture._uvs;h?(n[a]=h.x0,n[a+1]=h.y0,n[a+r]=h.x1,n[a+r+1]=h.y1,n[a+r*2]=h.x2,n[a+r*2+1]=h.y2,n[a+r*3]=h.x3,n[a+r*3+1]=h.y3,a+=r*4):(n[a]=0,n[a+1]=0,n[a+r]=0,n[a+r+1]=0,n[a+r*2]=0,n[a+r*2+1]=0,n[a+r*3]=0,n[a+r*3+1]=0,a+=r*4)}}uploadTint(e,t,i,n,r,a){for(let o=0;o<i;++o){const h=e[t+o],l=jt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);n[a]=l,n[a+r]=l,n[a+r*2]=l,n[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Zb.extension={name:"particle",type:He.RendererPlugin};et.add(Zb);var Su=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(Su||{});const bc={willReadFrequently:!0},pn=class nt{static get experimentalLetterSpacingSupported(){let e=nt._experimentalLetterSpacingSupported;if(e!==void 0){const t=ze.ADAPTER.getCanvasRenderingContext2D().prototype;e=nt._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,n=nt._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=nt.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=n.getContext("2d",bc);o.font=r;const h=(i?nt.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p<h.length;p++){const m=nt._measureText(h[p],t.letterSpacing,o);l[p]=m,c=Math.max(c,m)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||a.fontSize+t.strokeThickness;let f=Math.max(d,a.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new nt(e,t,u,f,h,l,d+t.leading,c,a)}static _measureText(e,t,i){let n=!1;nt.experimentalLetterSpacingSupported&&(nt.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,n=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(n?r-=t:r+=(nt.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=nt._canvas){const n=i.getContext("2d",bc);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=nt.collapseSpaces(c),d=nt.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l, Line truncated
`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=nt._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!nt.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:nt._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:nt._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],a=e[n+1];if(nt.isBreakingSpace(r,a)||nt.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,n,r){return!0}static wordWrapSplit(e){return nt.graphemeSegmenter(e)}static measureFont(e){if(nt._fonts[e])return nt._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=nt._canvas,n=nt._context;n.font=e;const r=nt.METRICS_STRING+nt.BASELINE_SYMBOL,a=Math.ceil(n.measureText(r).width);let o=Math.ceil(n.measureText(nt.BASELINE_SYMBOL).width);const h=Math.ceil(nt.HEIGHT_MULTIPLIER*o);if(o=o*nt.BASELINE_MULTIPLIER|0,a===0||h===0)return nt._fonts[e]=t,t;i.width=a,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,a,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,o);const l=n.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,p=!1;for(d=0;d<o;++d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f+=u;else break}for(t.ascent=o-d,f=c-u,p=!1,d=h;d>o;--d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f-=u;else break}return t.descent=d-o,t.fontSize=t.ascent+t.descent,nt._fonts[e]=t,t}static clearMetrics(e=""){e?delete nt._fonts[e]:nt._fonts={}}static get _canvas(){var e;if(!nt.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",bc))!=null&&e.measureText)return nt.__canvas=i,i;t=ze.ADAPTER.createCanvas()}catch{t=ze.ADAPTER.createCanvas()}t.width=t.height=10,nt.__canvas=t}return nt.__canvas}static get _context(){return nt.__context||(nt.__context=nt._canvas.getContext("2d",bc)),nt.__context}};pn.METRICS_STRING="|ÉqÅ",pn.BASELINE_SYMBOL="M",pn.BASELINE_MULTIPLIER=1.4,pn.HEIGHT_MULTIPLIER=2,pn.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),pn.experimentalLetterSpacing=!1,pn._fonts={},pn._newlines=[10,13],pn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Cr=pn;const eI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Jb=class rl{constructor(e){this.styleID=0,this.reset(),lf(this,e,e)}clone(){const e={};return lf(e,this,rl.defaultStyle),new rl(e)}reset(){lf(this,rl.defaultStyle,rl.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=of(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=of(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){tI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett Line truncated
`;class e1 extends Su{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new li,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:et.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=en.from(iI,tI,{}),this.state=Ln.for2d()}render(e){const t=e.children,i=e._maxSize,n=e._batchSize,r=this.renderer;let a=t.length;if(a===0)return;a>i&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=Jx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=Wt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;f<a;f+=n,p+=1){let m=a-f;m>n&&(m=n),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const v=e._bufferUpdateIDs[p]||0;d=d||g._updateID<v,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,m)),r.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,m*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,n=e._batchSize,r=e._properties;for(let a=0;a<i;a+=n)t.push(new Tv(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new Tv(this.properties,i,t)}uploadVertices(e,t,i,n,r,a){let o=0,h=0,l=0,c=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,p=d.scale.x,m=d.scale.y,g=f.trim,v=f.orig;g?(h=g.x-d.anchor.x*v.width,o=h+g.width,c=g.y-d.anchor.y*v.height,l=c+g.height):(o=v.width*(1-d.anchor.x),h=v.width*-d.anchor.x,l=v.height*(1-d.anchor.y),c=v.height*-d.anchor.y),n[a]=h*p,n[a+1]=c*m,n[a+r]=o*p,n[a+r+1]=c*m,n[a+r*2]=o*p,n[a+r*2+1]=l*m,n[a+r*3]=h*p,n[a+r*3+1]=l*m,a+=r*4}}uploadPosition(e,t,i,n,r,a){for(let o=0;o<i;o++){const h=e[t+o].position;n[a]=h.x,n[a+1]=h.y,n[a+r]=h.x,n[a+r+1]=h.y,n[a+r*2]=h.x,n[a+r*2+1]=h.y,n[a+r*3]=h.x,n[a+r*3+1]=h.y,a+=r*4}}uploadRotation(e,t,i,n,r,a){for(let o=0;o<i;o++){const h=e[t+o].rotation;n[a]=h,n[a+r]=h,n[a+r*2]=h,n[a+r*3]=h,a+=r*4}}uploadUvs(e,t,i,n,r,a){for(let o=0;o<i;++o){const h=e[t+o]._texture._uvs;h?(n[a]=h.x0,n[a+1]=h.y0,n[a+r]=h.x1,n[a+r+1]=h.y1,n[a+r*2]=h.x2,n[a+r*2+1]=h.y2,n[a+r*3]=h.x3,n[a+r*3+1]=h.y3,a+=r*4):(n[a]=0,n[a+1]=0,n[a+r]=0,n[a+r+1]=0,n[a+r*2]=0,n[a+r*2+1]=0,n[a+r*3]=0,n[a+r*3+1]=0,a+=r*4)}}uploadTint(e,t,i,n,r,a){for(let o=0;o<i;++o){const h=e[t+o],l=Wt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);n[a]=l,n[a+r]=l,n[a+r*2]=l,n[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}e1.extension={name:"particle",type:He.RendererPlugin};tt.add(e1);var Tu=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(Tu||{});const _c={willReadFrequently:!0},mn=class at{static get experimentalLetterSpacingSupported(){let e=at._experimentalLetterSpacingSupported;if(e!==void 0){const t=We.ADAPTER.getCanvasRenderingContext2D().prototype;e=at._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,n=at._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=at.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=n.getContext("2d",_c);o.font=r;const h=(i?at.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p<h.length;p++){const m=at._measureText(h[p],t.letterSpacing,o);l[p]=m,c=Math.max(c,m)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||a.fontSize+t.strokeThickness;let f=Math.max(d,a.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new at(e,t,u,f,h,l,d+t.leading,c,a)}static _measureText(e,t,i){let n=!1;at.experimentalLetterSpacingSupported&&(at.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,n=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(n?r-=t:r+=(at.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=at._canvas){const n=i.getContext("2d",_c);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=at.collapseSpaces(c),d=at.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l, Line truncated
`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=at._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!at.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:at._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:at._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],a=e[n+1];if(at.isBreakingSpace(r,a)||at.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,n,r){return!0}static wordWrapSplit(e){return at.graphemeSegmenter(e)}static measureFont(e){if(at._fonts[e])return at._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=at._canvas,n=at._context;n.font=e;const r=at.METRICS_STRING+at.BASELINE_SYMBOL,a=Math.ceil(n.measureText(r).width);let o=Math.ceil(n.measureText(at.BASELINE_SYMBOL).width);const h=Math.ceil(at.HEIGHT_MULTIPLIER*o);if(o=o*at.BASELINE_MULTIPLIER|0,a===0||h===0)return at._fonts[e]=t,t;i.width=a,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,a,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,o);const l=n.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,p=!1;for(d=0;d<o;++d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f+=u;else break}for(t.ascent=o-d,f=c-u,p=!1,d=h;d>o;--d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f-=u;else break}return t.descent=d-o,t.fontSize=t.ascent+t.descent,at._fonts[e]=t,t}static clearMetrics(e=""){e?delete at._fonts[e]:at._fonts={}}static get _canvas(){var e;if(!at.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",_c))!=null&&e.measureText)return at.__canvas=i,i;t=We.ADAPTER.createCanvas()}catch{t=We.ADAPTER.createCanvas()}t.width=t.height=10,at.__canvas=t}return at.__canvas}static get _context(){return at.__context||(at.__context=at._canvas.getContext("2d",_c)),at.__context}};mn.METRICS_STRING="|ÉqÅ",mn.BASELINE_SYMBOL="M",mn.BASELINE_MULTIPLIER=1.4,mn.HEIGHT_MULTIPLIER=2,mn.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),mn.experimentalLetterSpacing=!1,mn._fonts={},mn._newlines=[10,13],mn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Ar=mn;const sI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],t1=class ll{constructor(e){this.styleID=0,this.reset(),uf(this,e,e)}clone(){const e={};return uf(e,this,ll.defaultStyle),new ll(e)}reset(){uf(this,ll.defaultStyle,ll.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=hf(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=hf(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){nI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett Line truncated
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
@@ -1014,7 +1014,7 @@ void main(void)
fragmentColor = texSample * uColor;
}
`,mI=`#version 300 es
`,vI=`#version 300 es
#define SHADER_NAME Tiling-Sprite-300
precision lowp float;
@@ -1034,7 +1034,7 @@ void main(void)
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,pI=`#version 100
`,yI=`#version 100
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
@@ -1067,7 +1067,7 @@ void main(void)
gl_FragColor = texSample * uColor;
}
`,_v=`#version 100
`,Av=`#version 100
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
@@ -1087,7 +1087,7 @@ void main(void)
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,gI=`#version 100
`,xI=`#version 100
#define SHADER_NAME Tiling-Sprite-Simple-100
precision lowp float;
@@ -1102,7 +1102,7 @@ void main(void)
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`;const wc=new ai;class n1 extends xu{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new cb,this.state=Dn.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=sn.from(_v,gI,t),this.shader=e.context.webGLVersion>1?sn.from(mI,fI,t):sn.from(_v,pI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-a,n[2]=n[4]=1-r,n[5]=n[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==Qs.CLAMP:h.wrapMode===Qs.CLAMP&&(h.wrapMode=Qs.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,v=e._height;wc.set(c.a*p/g,c.b*p/v,c.c*m/g,c.d*m/v,c.tx/g,c.ty/v),wc.invert(),d?wc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=wc.toArray(!0),f.uniforms.uColor=jt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=qx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}n1.extension={name:"tilingSprite",type:He.RendererPlugin};et.add(n1);const r1=class al{constructor(e,t,i){this.linkedSheets=[],(e instanceof gt||e instanceof mt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=n instanceof mt?n:null,this.baseTexture=n instanceof gt?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=dr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=al.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=al.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],a=r.frame;if(a){let o=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new Et(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?o=new Et(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new Et(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new Et(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[n]=new mt(this.baseTexture,o,c,h,r.rotated?2:0,r.anchor,r.borders),mt.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const n=e[t][i];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*al.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*al.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};r1.BATCH_SIZE=1e3;let Mv=r1;const vI=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function a1(s,e,t){const i={};if(s.forEach(n=>{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=wi.dirname(s[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,a1([`${n}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const yI={extension:He.Asset,cache:{test:s=>s instanceof Mv,getCacheableAssets:(s,e)=>a1(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&vI.includes(i)},parse:s=>{var t;const Line truncated
`;const Mc=new li;class o1 extends Su{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new db,this.state=Ln.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=en.from(Av,xI,t),this.shader=e.context.webGLVersion>1?en.from(vI,gI,t):en.from(Av,yI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-a,n[2]=n[4]=1-r,n[5]=n[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==Zs.CLAMP:h.wrapMode===Zs.CLAMP&&(h.wrapMode=Zs.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,v=e._height;Mc.set(c.a*p/g,c.b*p/v,c.c*m/g,c.d*m/v,c.tx/g,c.ty/v),Mc.invert(),d?Mc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=Mc.toArray(!0),f.uniforms.uColor=Wt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=Jx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}o1.extension={name:"tilingSprite",type:He.RendererPlugin};tt.add(o1);const l1=class cl{constructor(e,t,i){this.linkedSheets=[],(e instanceof gt||e instanceof mt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=n instanceof mt?n:null,this.baseTexture=n instanceof gt?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=dr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=cl.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=cl.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],a=r.frame;if(a){let o=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new Tt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?o=new Tt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new Tt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new Tt(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[n]=new mt(this.baseTexture,o,c,h,r.rotated?2:0,r.anchor,r.borders),mt.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const n=e[t][i];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*cl.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*cl.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};l1.BATCH_SIZE=1e3;let Ev=l1;const bI=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function c1(s,e,t){const i={};if(s.forEach(n=>{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=Si.dirname(s[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,c1([`${n}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const wI={extension:He.Asset,cache:{test:s=>s instanceof Ev,getCacheableAssets:(s,e)=>c1(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&bI.includes(i)},parse:s=>{var t;const Line truncated
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
@@ -1140,7 +1140,7 @@ void main(void) {\r
// NPM Textures, NPM outputs\r
gl_FragColor = vec4(uColor.rgb, coverage);\r
}\r
`,MI=`// Mesh material default fragment\r
`,EI=`// Mesh material default fragment\r
attribute vec2 aVertexPosition;\r
attribute vec2 aTextureCoord;\r
\r
@@ -1156,17 +1156,17 @@ void main(void)\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`;const Tv=[],Av=[],Ev=[],TI=class l1 extends Gi{constructor(e,t={}){super();const{align:i,tint:n,maxWidth:r,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},l1.styleDefaults,t);if(!Tr.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new jt(n),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new er(()=>{this.dirty=!0},this,0,0),this._roundPixels=ze.ROUND_PIXELS,this.dirty=!0,this._resolution=ze.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const e=Tr.available[this._fontName],t=this.fontSize,i=t/e.size,n=new Xt,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=o1(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Tv:Av;let d=null,f=0,p=0,m=0,g=-1,v=0,b=0,y=0,w=0;for(let k=0;k<l.length;k++){const O=l[k],L=jc(O);if(/(?:\s)/.test(O)&&(g=k,v=f,w++),O==="\r"||O===`
`){a.push(f),o.push(-1),p=Math.max(p,f),++m,++b,n.x=0,n.y+=e.lineHeight,d=null,w=0;continue}const U=e.chars[L];if(!U)continue;d&&U.kerning[d]&&(n.x+=U.kerning[d]);const B=Ev.pop()||{texture:mt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Xt};B.texture=U.texture,B.line=m,B.charCode=L,B.position.x=Math.round(n.x+U.xOffset+this._letterSpacing/2),B.position.y=Math.round(n.y+U.yOffset),B.prevSpaces=w,r.push(B),f=B.position.x+Math.max(U.xAdvance-U.xOffset,U.texture.orig.width),n.x+=U.xAdvance+this._letterSpacing,y=Math.max(y,U.yOffset+U.texture.height),d=L,g!==-1&&c>0&&n.x>c&&(++b,go(r,1+g-b,1+k-g),k=g,g=-1,a.push(v),o.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,v),m++,n.x=0,n.y+=e.lineHeight,d=null,w=0)}const A=l[l.length-1];A!=="\r"&&A!==`
`&&(/(?:\s)/.test(A)&&(f=v),a.push(f),p=Math.max(p,f),o.push(-1));const T=[];for(let k=0;k<=m;k++){let O=0;this._align==="right"?O=p-a[k]:this._align==="center"?O=(p-a[k])/2:this._align==="justify"&&(O=o[k]<0?0:(p-a[k])/o[k]),T.push(O)}const M=r.length,R={},P=[],F=this._activePagesMeshData;u.push(...F);for(let k=0;k<M;k++){const O=r[k].texture,L=O.baseTexture.uid;if(!R[L]){let U=u.pop();if(!U){const D=new bp;let _,X;e.distanceFieldType==="none"?(_=new Th(mt.EMPTY),X=ut.NORMAL):(_=new Th(mt.EMPTY,{program:Rn.from(MI,_I),uniforms:{uFWidth:0}}),X=ut.NORMAL_NPM);const N=new Ol(D,_);N.blendMode=X,U={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}U.index=0,U.indexCount=0,U.vertexCount=0,U.uvsCount=0,U.total=0;const{_textureCache:B}=this;B[L]=B[L]||new mt(O.baseTexture),U.mesh.texture=B[L],U.mesh.tint=this._tintColor.value,P.push(U),R[L]=U}R[L].total++}for(let k=0;k<F.length;k++)P.includes(F[k])||this.removeChild(F[k].mesh);for(let k=0;k<P.length;k++)P[k].mesh.parent!==this&&this.addChild(P[k].mesh);this._activePagesMeshData=P;for(const k in R){const O=R[k],L=O.total;if(!(((I=O.indices)==null?void 0:I.length)>6*L)||O.vertices.length<Ol.BATCHABLE_SIZE*2)O.vertices=new Float32Array(8*L),O.uvs=new Float32Array(8*L),O.indices=new Uint16Array(6*L);else{const U=O.total,B=O.vertices;for(let D=U*4*2;D<B.length;D++)B[D]=0}O.mesh.size=6*L}for(let k=0;k<M;k++){const O=r[k];let L=O.position.x+T[O.line]*(this._align==="justify"?O.prevSpaces:1);this._roundPixels&&(L=Math.round(L));const U=L*i,B=O.position.y*i,D=O.texture,_=R[D.baseTexture.uid],X=D.frame,N=D._uvs,V=_.index++;_.indices[V*6+0]=0+V*4,_.indices[V*6+1]=1+V*4,_.indices[V*6+2]=2+V*4,_.indices[V*6+3]=0+V*4,_.indices[V*6+4]=2+V*4,_.indices[V*6+5]=3+V*4,_.vertices[V*8+0]=U,_.vertices[V*8+1]=B,_.vertices[V*8+2]=U+X.width*i,_.vertices[V*8+3]=B,_.vertices[V*8+4]=U+X.width*i,_.vertices[V*8+5]=B+X.height*i,_.vertices[V*8+6]=U,_.vertices[V*8+7]=B+X.height*i,_.uvs[V*8+0]=N.x0,_.uvs[V*8+1]=N.y0,_.uvs[V*8+2]=N.x1,_.uvs[V*8+3]=N.y1,_.uvs[V*8+4]=N.x2,_.uvs[V*8+5]=N.y2,_.uvs[V*8+6]=N.x3,_.uvs[V*8+7]=N.y3}this._textWidth=p*i,this._textHeight=(n.y+e.lineHeight)*i;for(const k in R){const O=R[k];if(this.anchor.x!==0||this.anchor.y!==0){let D=0;const _=this._textWidth*this.anchor.x,X=this._textHeight*this.anchor.y;for(let N=0;N<O.total;N++)O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X}this._maxLineHeight=y*i;const L=O.mesh.geometry.getBuffer("aVertexPosition"),U=O.mesh.geometry.getBuffer("aTextureCoord"),B=O.mesh.geometry.getIndex();L.data=O.vertices,U.data=O.uvs,B.data=O.indices,L.update(),U.update(),B.update()}for(let k=0;k<r.length;k++)Ev.push(r[k]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:n}=Tr.available[this._fontName];if(i!=="none"){const{a:r,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(r*r+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/n,f=e._view.resolution;for(const p of this._activePagesMeshData)p.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Tr.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!Tr.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Tr.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res Line truncated
`;const Cv=[],Iv=[],Rv=[],CI=class u1 extends ji{constructor(e,t={}){super();const{align:i,tint:n,maxWidth:r,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},u1.styleDefaults,t);if(!_r.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new Wt(n),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new er(()=>{this.dirty=!0},this,0,0),this._roundPixels=We.ROUND_PIXELS,this.dirty=!0,this._resolution=We.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const e=_r.available[this._fontName],t=this.fontSize,i=t/e.size,n=new Xt,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",l=h1(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Cv:Iv;let d=null,f=0,p=0,m=0,g=-1,v=0,b=0,y=0,w=0;for(let k=0;k<l.length;k++){const O=l[k],L=qc(O);if(/(?:\s)/.test(O)&&(g=k,v=f,w++),O==="\r"||O===`
`){a.push(f),o.push(-1),p=Math.max(p,f),++m,++b,n.x=0,n.y+=e.lineHeight,d=null,w=0;continue}const U=e.chars[L];if(!U)continue;d&&U.kerning[d]&&(n.x+=U.kerning[d]);const B=Rv.pop()||{texture:mt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Xt};B.texture=U.texture,B.line=m,B.charCode=L,B.position.x=Math.round(n.x+U.xOffset+this._letterSpacing/2),B.position.y=Math.round(n.y+U.yOffset),B.prevSpaces=w,r.push(B),f=B.position.x+Math.max(U.xAdvance-U.xOffset,U.texture.orig.width),n.x+=U.xAdvance+this._letterSpacing,y=Math.max(y,U.yOffset+U.texture.height),d=L,g!==-1&&c>0&&n.x>c&&(++b,yo(r,1+g-b,1+k-g),k=g,g=-1,a.push(v),o.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,v),m++,n.x=0,n.y+=e.lineHeight,d=null,w=0)}const A=l[l.length-1];A!=="\r"&&A!==`
`&&(/(?:\s)/.test(A)&&(f=v),a.push(f),p=Math.max(p,f),o.push(-1));const T=[];for(let k=0;k<=m;k++){let O=0;this._align==="right"?O=p-a[k]:this._align==="center"?O=(p-a[k])/2:this._align==="justify"&&(O=o[k]<0?0:(p-a[k])/o[k]),T.push(O)}const M=r.length,R={},P=[],F=this._activePagesMeshData;u.push(...F);for(let k=0;k<M;k++){const O=r[k].texture,L=O.baseTexture.uid;if(!R[L]){let U=u.pop();if(!U){const D=new _p;let _,X;e.distanceFieldType==="none"?(_=new Ch(mt.EMPTY),X=ut.NORMAL):(_=new Ch(mt.EMPTY,{program:In.from(EI,AI),uniforms:{uFWidth:0}}),X=ut.NORMAL_NPM);const N=new Dl(D,_);N.blendMode=X,U={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}U.index=0,U.indexCount=0,U.vertexCount=0,U.uvsCount=0,U.total=0;const{_textureCache:B}=this;B[L]=B[L]||new mt(O.baseTexture),U.mesh.texture=B[L],U.mesh.tint=this._tintColor.value,P.push(U),R[L]=U}R[L].total++}for(let k=0;k<F.length;k++)P.includes(F[k])||this.removeChild(F[k].mesh);for(let k=0;k<P.length;k++)P[k].mesh.parent!==this&&this.addChild(P[k].mesh);this._activePagesMeshData=P;for(const k in R){const O=R[k],L=O.total;if(!(((I=O.indices)==null?void 0:I.length)>6*L)||O.vertices.length<Dl.BATCHABLE_SIZE*2)O.vertices=new Float32Array(8*L),O.uvs=new Float32Array(8*L),O.indices=new Uint16Array(6*L);else{const U=O.total,B=O.vertices;for(let D=U*4*2;D<B.length;D++)B[D]=0}O.mesh.size=6*L}for(let k=0;k<M;k++){const O=r[k];let L=O.position.x+T[O.line]*(this._align==="justify"?O.prevSpaces:1);this._roundPixels&&(L=Math.round(L));const U=L*i,B=O.position.y*i,D=O.texture,_=R[D.baseTexture.uid],X=D.frame,N=D._uvs,V=_.index++;_.indices[V*6+0]=0+V*4,_.indices[V*6+1]=1+V*4,_.indices[V*6+2]=2+V*4,_.indices[V*6+3]=0+V*4,_.indices[V*6+4]=2+V*4,_.indices[V*6+5]=3+V*4,_.vertices[V*8+0]=U,_.vertices[V*8+1]=B,_.vertices[V*8+2]=U+X.width*i,_.vertices[V*8+3]=B,_.vertices[V*8+4]=U+X.width*i,_.vertices[V*8+5]=B+X.height*i,_.vertices[V*8+6]=U,_.vertices[V*8+7]=B+X.height*i,_.uvs[V*8+0]=N.x0,_.uvs[V*8+1]=N.y0,_.uvs[V*8+2]=N.x1,_.uvs[V*8+3]=N.y1,_.uvs[V*8+4]=N.x2,_.uvs[V*8+5]=N.y2,_.uvs[V*8+6]=N.x3,_.uvs[V*8+7]=N.y3}this._textWidth=p*i,this._textHeight=(n.y+e.lineHeight)*i;for(const k in R){const O=R[k];if(this.anchor.x!==0||this.anchor.y!==0){let D=0;const _=this._textWidth*this.anchor.x,X=this._textHeight*this.anchor.y;for(let N=0;N<O.total;N++)O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X,O.vertices[D++]-=_,O.vertices[D++]-=X}this._maxLineHeight=y*i;const L=O.mesh.geometry.getBuffer("aVertexPosition"),U=O.mesh.geometry.getBuffer("aTextureCoord"),B=O.mesh.geometry.getIndex();L.data=O.vertices,U.data=O.uvs,B.data=O.indices,L.update(),U.update(),B.update()}for(let k=0;k<r.length;k++)Rv.push(r[k]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:n}=_r.available[this._fontName];if(i!=="none"){const{a:r,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(r*r+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/n,f=e._view.resolution;for(const p of this._activePagesMeshData)p.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=_r.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!_r.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??_r.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res Line truncated
@font-face {
font-family: "${t.family}";
src: url('${t.dataSrc}');
font-weight: ${t.weight};
font-style: ${t.style};
font-display: ${t.display};
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=vA(e)),typeof e=="number"?gA(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,no.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=ze.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};xm.availableFonts={},xm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let hf=xm;const Sc=class ro extends qr{constructor(e="",t={}){super(mt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=mt.from(i,{scaleMode:ze.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new Et,n.trim=new Et,this.texture=n;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=ro.defaultMaxWidth,this.maxHeight=ro.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=ro.defaultAutoResolution,this._resolution=ro.defaultResolution??ze.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{n.onload=async()=>{if(o<this._updateID){h();return}await t.onBeforeDraw(),i.src=n.src,n.onload=null,n.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret Line truncated
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=b2(e)),typeof e=="number"?x2(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,ao.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=We.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Sm.availableFonts={},Sm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ff=Sm;const Tc=class oo extends Wr{constructor(e="",t={}){super(mt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=mt.from(i,{scaleMode:We.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new Tt,n.trim=new Tt,this.texture=n;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=oo.defaultMaxWidth,this.maxHeight=oo.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=oo.defaultAutoResolution,this._resolution=oo.defaultResolution??We.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{n.onload=async()=>{if(o<this._updateID){h();return}await t.onBeforeDraw(),i.src=n.src,n.onload=null,n.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret Line truncated
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1182,7 +1182,7 @@ void main(void)
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`,eP=`
`,sP=`
varying vec2 vTextureCoord;
uniform vec4 uColor;
uniform vec4 uDarkColor;
@@ -1195,7 +1195,7 @@ void main(void)
gl_FragColor.a = texColor.a * uColor.a;
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
}
`;class tP extends sn{constructor(t){const i={uSampler:t??mt.EMPTY,alpha:1,uTextureMatrix:ai.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(Rn.from(QR,eP),i);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new mp(i.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new jt(n.tint),this._darkTintColor=new jt(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,jt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),jt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class iP extends Ol{constructor(t){super(new JR,new tP(t),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const Ei=class Ei extends iP{constructor(){super();x(this,"name","")}updateFromSpineData(t,i,n,r,a,o,h,l){var v,b;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((b=d.data)==null?void 0:b.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let y=0;y<a;y+=l?12:8){let w=y;m[f]=r[w++],m[f+1]=r[w++],w+=4,p[f]=r[w++],p[f+1]=r[w++],f+=2}l?(Ei.auxColor[0]=r[8],Ei.auxColor[1]=r[9],Ei.auxColor[2]=r[10],Ei.auxColor[3]=r[11],this.darkTint=Ei.auxColor,Ei.auxColor[0]=r[2],Ei.auxColor[1]=r[3],Ei.auxColor[2]=r[4],Ei.auxColor[3]=r[5],this.tint=Ei.auxColor):(Ei.auxColor[0]=r[2],Ei.auxColor[1]=r[3],Ei.auxColor[2]=r[4],Ei.auxColor[3]=r[5],this.tint=Ei.auxColor),this.blendMode=Ba.toPixiBlending(i),this.alpha=Ei.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const y=g.data;for(let w=0;w<h;w++)y[w]=o[w]}this.name=n,u.update(),d.update(),g.update()}};x(Ei,"auxColor",[0,0,0,0]);let pl=Ei;const Yt=class Yt extends Gi{constructor(t,i){if(t instanceof kh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();x(this,"skeleton");x(this,"state");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new Am);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ls.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new At);x(this,"darkColor",new At);x(this,"_boundsProvider");x(this,"_boundsPoint",new Xt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",Ge.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});x(this,"currentClippingSlot");const n=t instanceof kh?t:t.skeletonData;this.skeleton=new Ap(n);const r=new lR(n);this.state=new sR(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new pl)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide Line truncated
`;class nP extends en{constructor(t){const i={uSampler:t??mt.EMPTY,alpha:1,uTextureMatrix:li.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(In.from(iP,sP),i);x(this,"uvMatrix");x(this,"batchable");x(this,"pluginName");x(this,"_tintRGB");x(this,"_darkTintRGB");x(this,"_colorDirty");x(this,"_alpha");x(this,"_tintColor");x(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new vp(i.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new Wt(n.tint),this._darkTintColor=new Wt(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Wt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Wt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class rP extends Dl{constructor(t){super(new tP,new nP(t),void 0,void 0);x(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const Ii=class Ii extends rP{constructor(){super();x(this,"name","")}updateFromSpineData(t,i,n,r,a,o,h,l){var v,b;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((b=d.data)==null?void 0:b.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let y=0;y<a;y+=l?12:8){let w=y;m[f]=r[w++],m[f+1]=r[w++],w+=4,p[f]=r[w++],p[f+1]=r[w++],f+=2}l?(Ii.auxColor[0]=r[8],Ii.auxColor[1]=r[9],Ii.auxColor[2]=r[10],Ii.auxColor[3]=r[11],this.darkTint=Ii.auxColor,Ii.auxColor[0]=r[2],Ii.auxColor[1]=r[3],Ii.auxColor[2]=r[4],Ii.auxColor[3]=r[5],this.tint=Ii.auxColor):(Ii.auxColor[0]=r[2],Ii.auxColor[1]=r[3],Ii.auxColor[2]=r[4],Ii.auxColor[3]=r[5],this.tint=Ii.auxColor),this.blendMode=Ba.toPixiBlending(i),this.alpha=Ii.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const y=g.data;for(let w=0;w<h;w++)y[w]=o[w]}this.name=n,u.update(),d.update(),g.update()}};x(Ii,"auxColor",[0,0,0,0]);let yl=Ii;const Vt=class Vt extends ji{constructor(t,i){if(t instanceof Bh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();x(this,"skeleton");x(this,"state");x(this,"darkTint",!1);x(this,"hasNeverUpdated",!0);x(this,"_debug");x(this,"slotMeshFactory",()=>new Im);x(this,"beforeUpdateWorldTransforms",()=>{});x(this,"afterUpdateWorldTransforms",()=>{});x(this,"_autoUpdate",!1);x(this,"_ticker",ls.shared);x(this,"meshesCache",new Map);x(this,"lightColor",new Mt);x(this,"darkColor",new Mt);x(this,"_boundsProvider");x(this,"_boundsPoint",new Xt);x(this,"_boundsSpineID",-1);x(this,"_boundsSpineDirty",!0);x(this,"slotsObject",new Map);x(this,"verticesCache",Ge.newFloatArray(1024));x(this,"clippingSlotToPixiMasks",{});x(this,"currentClippingSlot");const n=t instanceof Bh?t:t.skeletonData;this.skeleton=new Ip(n);const r=new uR(n);this.state=new aR(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new yl)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide Line truncated
precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
@@ -1221,7 +1221,7 @@ void main(void){
vDarkColor = aDarkColor * tint;
}
`,cP=`
`,dP=`
varying vec2 vTextureCoord;
varying vec4 vColor;
varying vec4 vDarkColor;
@@ -1236,4 +1236,4 @@ void main(void){
gl_FragColor.a = color.a * vColor.a;
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
}
`;class fw extends Er{constructor(e){super(e),this.shaderGenerator=new nb(lP,cP),this.geometryClass=oP,this.vertexSize=7}packInterleavedGeometry(e,t,i,n,r){const{uint32View:a,float32View:o}=t,h=n/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=jt.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=jt.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[n++]=u[g],o[n++]=u[g+1],o[n++]=l[g],o[n++]=l[g+1],a[n++]=p,a[n++]=m,o[n++]=d;for(let g=0;g<c.length;g++)i[r++]=h+c[g]}}x(fw,"extension",{name:"darkTintBatch",type:He.RendererPlugin});et.add(fw);function hP(s){return s.replace(/\\/g,"/").split("/").pop()||s}function Ep(s,e,t){for(const i of s.pages){const n=e.get(hP(i.name).toLowerCase());if(!n)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);n.baseTexture.alphaMode=i.pma?Ni.PMA:Ni.UNPACK,i.setTexture(t.from(n.baseTexture))}}function mw(s,e){const t=new ew(s);return Ep(t,e,Ba),new _m(t)}function uP(s,e,t){return{skeletonData:new Oh(mw(e,t)).readSkeletonData(s),SpineClass:Bh}}function dP(s,e,t){return{skeletonData:new Tm(mw(e,t)).readSkeletonData(s),SpineClass:Bh}}const fP="modulepreload",mP=function(s){return"/"+s},Yv={},$v=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=a(t.map(l=>{if(l=mP(l),l in Yv)return;Yv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":fP,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return n.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function pw(){const[s,e]=await Promise.all([$v(()=>import("./index-D076Onjg.js"),[]),$v(()=>import("./index-BYi7_8I0.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function pP(s,e,t){const{core:i,pixi:n}=await pw(),r=new i.TextureAtlas(e);return Ep(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function gP(s,e,t){const{core:i,pixi:n}=await pw(),r=new i.TextureAtlas(e);return Ep(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function Br(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function ps(s,e,t,i){s[e]==null&&(s[e]=Br(s,t,i))}function Cp(s,e,t){if(typeof s.curve!="number")return;const i=Br(s,"time",0),r=Br(e,"time",0)-i,a=s.curve,o=Br(s,"c2",0),h=Br(s,"c3",1),l=Br(s,"c4",1);s.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete s.c2,delete s.c3,delete s.c4}function Vr(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1];Cp(i,n,e.map(({key:r,fallback:a})=>[Br(i,r,a),Br(n,r,a)]))}}function vP(s){if(Array.isArray(s))for(let e=0;e<s.length-1;e++)Cp(s[e],s[e+1],[[0,1]])}function Ka(s,e){const t=typeof s=="string"?s.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),n=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function Gv(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1],r=e?[...Ka(i.light,!0),...Ka(i.dark,!1)]:Ka(i.color,!0),a=e?[...Ka(n.light,!0),...Ka(n.dark,!1)]:Ka(n.color,!0);Cp(i,n,r.map((o,h)=>[o,a[h]]))}}function yP(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])ps(e,"mixRotate","rotateMix",1),ps(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),ps(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),ps(e,"mixShearY","shearMix",1);for(const e of s.path||[])ps(e,"mixRotate","rotateMix",1),ps(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function xP(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function bP(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),Gv(e.rgba,!1),Gv(e.rgba2,!0)}function wP(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])ps(t,"value","angle",0);Vr(e.rotate,[{key:"value",fallback:0}]),Vr(e.tra Line truncated
`;class gw extends Tr{constructor(e){super(e),this.shaderGenerator=new ob(uP,dP),this.geometryClass=hP,this.vertexSize=7}packInterleavedGeometry(e,t,i,n,r){const{uint32View:a,float32View:o}=t,h=n/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=Wt.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=Wt.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[n++]=u[g],o[n++]=u[g+1],o[n++]=l[g],o[n++]=l[g+1],a[n++]=p,a[n++]=m,o[n++]=d;for(let g=0;g<c.length;g++)i[r++]=h+c[g]}}x(gw,"extension",{name:"darkTintBatch",type:He.RendererPlugin});tt.add(gw);function fP(s){return s.replace(/\\/g,"/").split("/").pop()||s}function Rp(s,e,t){for(const i of s.pages){const n=e.get(fP(i.name).toLowerCase());if(!n)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);n.baseTexture.alphaMode=i.pma?Xi.PMA:Xi.UNPACK,i.setTexture(t.from(n.baseTexture))}}function vw(s,e){const t=new sw(s);return Rp(t,e,Ba),new Am(t)}function mP(s,e,t){return{skeletonData:new Dh(vw(e,t)).readSkeletonData(s),SpineClass:Nh}}function pP(s,e,t){return{skeletonData:new Cm(vw(e,t)).readSkeletonData(s),SpineClass:Nh}}const gP="modulepreload",vP=function(s){return"/"+s},Hv={},jv=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=a(t.map(l=>{if(l=vP(l),l in Hv)return;Hv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":gP,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return n.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function yw(){const[s,e]=await Promise.all([jv(()=>import("./index-BrVMjrya.js"),[]),jv(()=>import("./index-C_0QkTeX.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function yP(s,e,t){const{core:i,pixi:n}=await yw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function xP(s,e,t){const{core:i,pixi:n}=await yw(),r=new i.TextureAtlas(e);return Rp(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function Fr(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function ps(s,e,t,i){s[e]==null&&(s[e]=Fr(s,t,i))}function Pp(s,e,t){if(typeof s.curve!="number")return;const i=Fr(s,"time",0),r=Fr(e,"time",0)-i,a=s.curve,o=Fr(s,"c2",0),h=Fr(s,"c3",1),l=Fr(s,"c4",1);s.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete s.c2,delete s.c3,delete s.c4}function Ur(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1];Pp(i,n,e.map(({key:r,fallback:a})=>[Fr(i,r,a),Fr(n,r,a)]))}}function bP(s){if(Array.isArray(s))for(let e=0;e<s.length-1;e++)Pp(s[e],s[e+1],[[0,1]])}function Ja(s,e){const t=typeof s=="string"?s.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),n=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function Wv(s,e){if(Array.isArray(s))for(let t=0;t<s.length-1;t++){const i=s[t],n=s[t+1],r=e?[...Ja(i.light,!0),...Ja(i.dark,!1)]:Ja(i.color,!0),a=e?[...Ja(n.light,!0),...Ja(n.dark,!1)]:Ja(n.color,!0);Pp(i,n,r.map((o,h)=>[o,a[h]]))}}function wP(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])ps(e,"mixRotate","rotateMix",1),ps(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),ps(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),ps(e,"mixShearY","shearMix",1);for(const e of s.path||[])ps(e,"mixRotate","rotateMix",1),ps(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function SP(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function _P(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),Wv(e.rgba,!1),Wv(e.rgba2,!0)}function MP(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])ps(t,"value","angle",0);Ur(e.rotate,[{key:"value",fallback:0}]),Ur(e.tra Line truncated
+2 -2
View File
@@ -8,8 +8,8 @@
html, body { margin: 0; padding: 0; background: #111; color: #eee; font-family: system-ui, -apple-system, sans-serif; }
#app { display: flex; flex-direction: column; height: 100vh; }
</style>
<script type="module" crossorigin src="/assets/index-BgZ-wFxF.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CfwLx2WX.css">
<script type="module" crossorigin src="/assets/index-yJqyT1FD.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-RonkRpMh.css">
</head>
<body>
<div id="app"></div>