@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
6 lines • 378 kB
JavaScript
var qm=Object.create;var Io=Object.defineProperty;var Zm=Object.getOwnPropertyDescriptor;var Qm=Object.getOwnPropertyNames;var Jm=Object.getPrototypeOf,tx=Object.prototype.hasOwnProperty;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Go=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),ex=(r,t)=>{for(var e in t)Io(r,e,{get:t[e],enumerable:true});},rx=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Qm(t))!tx.call(r,s)&&s!==e&&Io(r,s,{get:()=>t[s],enumerable:!(i=Zm(t,s))||i.enumerable});return r};var Ii=(r,t,e)=>(e=r!=null?qm(Jm(r)):{},rx(Io(e,"default",{value:r,enumerable:true}),r));var T,Uo,Rr,G,F=p(()=>{T=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(T||{}),Uo=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r};}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},Rr=(r,t)=>Uo(r).priority??t,G={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Uo).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t));}),this},add(...r){return r.map(Uo).forEach(t=>{t.type.forEach(e=>{let i=this._addHandlers,s=this._queue;i[e]?i[e]?.(t):(s[e]=s[e]||[],s[e]?.push(t));});}),this},handle(r,t,e){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=t,s[r]=e;let o=this._queue;return o[r]&&(o[r]?.forEach(n=>t(n)),delete o[r]),this},handleByMap(r,t){return this.handle(r,e=>{e.name&&(t[e.name]=e.ref);},e=>{e.name&&delete t[e.name];})},handleByNamedList(r,t,e=-1){return this.handle(r,i=>{t.findIndex(o=>o.name===i.name)>=0||(t.push({name:i.name,value:i.ref}),t.sort((o,n)=>Rr(n.value,e)-Rr(o.value,e)));},i=>{let s=t.findIndex(o=>o.name===i.name);s!==-1&&t.splice(s,1);})},handleByList(r,t,e=-1){return this.handle(r,i=>{t.includes(i.ref)||(t.push(i.ref),t.sort((s,o)=>Rr(o,e)-Rr(s,e)));},i=>{let s=t.indexOf(i.ref);s!==-1&&t.splice(s,1);})},mixin(r,...t){for(let e of t)Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(e));}};});var kh=Go((C_,Do)=>{var ix=Object.prototype.hasOwnProperty,bt="~";function Ir(){}Object.create&&(Ir.prototype=Object.create(null),new Ir().__proto__||(bt=false));function sx(r,t,e){this.fn=r,this.context=t,this.once=e||false;}function Bh(r,t,e,i,s){if(typeof e!="function")throw new TypeError("The listener must be a function");var o=new sx(e,i||r,s),n=bt?bt+t:t;return r._events[n]?r._events[n].fn?r._events[n]=[r._events[n],o]:r._events[n].push(o):(r._events[n]=o,r._eventsCount++),r}function Gi(r,t){--r._eventsCount===0?r._events=new Ir:delete r._events[t];}function gt(){this._events=new Ir,this._eventsCount=0;}gt.prototype.eventNames=function(){var t=[],e,i;if(this._eventsCount===0)return t;for(i in e=this._events)ix.call(e,i)&&t.push(bt?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};gt.prototype.listeners=function(t){var e=bt?bt+t:t,i=this._events[e];if(!i)return [];if(i.fn)return [i.fn];for(var s=0,o=i.length,n=new Array(o);s<o;s++)n[s]=i[s].fn;return n};gt.prototype.listenerCount=function(t){var e=bt?bt+t:t,i=this._events[e];return i?i.fn?1:i.length:0};gt.prototype.emit=function(t,e,i,s,o,n){var a=bt?bt+t:t;if(!this._events[a])return false;var h=this._events[a],l=arguments.length,u,c;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,true),l){case 1:return h.fn.call(h.context),true;case 2:return h.fn.call(h.context,e),true;case 3:return h.fn.call(h.context,e,i),true;case 4:return h.fn.call(h.context,e,i,s),true;case 5:return h.fn.call(h.context,e,i,s,o),true;case 6:return h.fn.call(h.context,e,i,s,o,n),true}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];h.fn.apply(h.context,u);}else {var f=h.length,d;for(c=0;c<f;c++)switch(h[c].once&&this.removeListener(t,h[c].fn,void 0,true),l){case 1:h[c].fn.call(h[c].context);break;case 2:h[c].fn.call(h[c].context,e);break;case 3:h[c].fn.call(h[c].context,e,i);break;case 4:h[c].fn.call(h[c].context,e,i,s);break;default:if(!u)for(d=1,u=new Array(l-1);d<l;d++)u[d-1]=arguments[d];h[c].fn.apply(h[c].context,u);}}return true};gt.prototype.on=function(t,e,i){return Bh(this,t,e,i,false)};gt.prototype.once=function(t,e,i){return Bh(this,t,e,i,true)};gt.prototype.removeListener=function(t,e,i,s){var o=bt?bt+t:t;if(!this._events[o])return this;if(!e)return Gi(this,o),this;var n=this._events[o];if(n.fn)n.fn===e&&(!s||n.once)&&(!i||n.context===i)&&Gi(this,o);else {for(var a=0,h=[],l=n.length;a<l;a++)(n[a].fn!==e||s&&!n[a].once||i&&n[a].context!==i)&&h.push(n[a]);h.length?this._events[o]=h.length===1?h[0]:h:Gi(this,o);}return this};gt.prototype.removeAllListeners=function(t){var e;return t?(e=bt?bt+t:t,this._events[e]&&Gi(this,e)):(this._events=new Ir,this._eventsCount=0),this};gt.prototype.off=gt.prototype.removeListener;gt.prototype.addListener=gt.prototype.on;gt.prefixed=bt;gt.EventEmitter=gt;typeof Do<"u"&&(Do.exports=gt);});var Fh,Y,At=p(()=>{Fh=Ii(kh()),Y=Fh.default;});var ox,ee,ut,Rt,Hh,Rh,Lo,nx,Ui,zh,Wh,Ih,Gh,Uh,Gr,ax,hx,lx,ux,zo,Dh,cx,Oo,Ho,Lh,Wo,Ot,Oh,Vh,Nh=p(()=>{ox={grad:.9,turn:360,rad:360/(2*Math.PI)},ee=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},ut=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},Rt=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},Hh=function(r){return (r=isFinite(r)?r%360:0)>0?r:r+360},Rh=function(r){return {r:Rt(r.r,0,255),g:Rt(r.g,0,255),b:Rt(r.b,0,255),a:Rt(r.a)}},Lo=function(r){return {r:ut(r.r),g:ut(r.g),b:ut(r.b),a:ut(r.a,3)}},nx=/^#([0-9a-f]{3,8})$/i,Ui=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},zh=function(r){var t=r.r,e=r.g,i=r.b,s=r.a,o=Math.max(t,e,i),n=o-Math.min(t,e,i),a=n?o===t?(e-i)/n:o===e?2+(i-t)/n:4+(t-e)/n:0;return {h:60*(a<0?a+6:a),s:o?n/o*100:0,v:o/255*100,a:s}},Wh=function(r){var t=r.h,e=r.s,i=r.v,s=r.a;t=t/360*6,e/=100,i/=100;var o=Math.floor(t),n=i*(1-e),a=i*(1-(t-o)*e),h=i*(1-(1-t+o)*e),l=o%6;return {r:255*[i,a,n,n,h,i][l],g:255*[h,i,i,a,n,n][l],b:255*[n,n,h,i,i,a][l],a:s}},Ih=function(r){return {h:Hh(r.h),s:Rt(r.s,0,100),l:Rt(r.l,0,100),a:Rt(r.a)}},Gh=function(r){return {h:ut(r.h),s:ut(r.s),l:ut(r.l),a:ut(r.a,3)}},Uh=function(r){return Wh((e=(t=r).s,{h:t.h,s:(e*=((i=t.l)<50?i:100-i)/100)>0?2*e/(i+e)*100:0,v:i+e,a:t.a}));var t,e,i;},Gr=function(r){return {h:(t=zh(r)).h,s:(s=(200-(e=t.s))*(i=t.v)/100)>0&&s<200?e*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,e,i,s;},ax=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ux=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zo={string:[[function(r){var t=nx.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?ut(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?ut(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=lx.exec(r)||ux.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:Rh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=ax.exec(r)||hx.exec(r);if(!t)return null;var e,i,s=Ih({h:(e=t[1],i=t[2],i===void 0&&(i="deg"),Number(e)*(ox[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Uh(s)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,i=r.b,s=r.a,o=s===void 0?1:s;return ee(t)&&ee(e)&&ee(i)?Rh({r:Number(t),g:Number(e),b:Number(i),a:Number(o)}):null},"rgb"],[function(r){var t=r.h,e=r.s,i=r.l,s=r.a,o=s===void 0?1:s;if(!ee(t)||!ee(e)||!ee(i))return null;var n=Ih({h:Number(t),s:Number(e),l:Number(i),a:Number(o)});return Uh(n)},"hsl"],[function(r){var t=r.h,e=r.s,i=r.v,s=r.a,o=s===void 0?1:s;if(!ee(t)||!ee(e)||!ee(i))return null;var n=function(a){return {h:Hh(a.h),s:Rt(a.s,0,100),v:Rt(a.v,0,100),a:Rt(a.a)}}({h:Number(t),s:Number(e),v:Number(i),a:Number(o)});return Wh(n)},"hsv"]]},Dh=function(r,t){for(var e=0;e<t.length;e++){var i=t[e][0](r);if(i)return [i,t[e][1]]}return [null,void 0]},cx=function(r){return typeof r=="string"?Dh(r.trim(),zo.string):typeof r=="object"&&r!==null?Dh(r,zo.object):[null,void 0]},Oo=function(r,t){var e=Gr(r);return {h:e.h,s:Rt(e.s+100*t,0,100),l:e.l,a:e.a}},Ho=function(r){return (299*r.r+587*r.g+114*r.b)/1e3/255},Lh=function(r,t){var e=Gr(r);return {h:e.h,s:e.s,l:Rt(e.l+100*t,0,100),a:e.a}},Wo=function(){function r(t){this.parsed=cx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1};}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return ut(Ho(this.rgba),2)},r.prototype.isDark=function(){return Ho(this.rgba)<.5},r.prototype.isLight=function(){return Ho(this.rgba)>=.5},r.prototype.toHex=function(){return t=Lo(this.rgba),e=t.r,i=t.g,s=t.b,n=(o=t.a)<1?Ui(ut(255*o)):"","#"+Ui(e)+Ui(i)+Ui(s)+n;var t,e,i,s,o,n;},r.prototype.toRgb=function(){return Lo(this.rgba)},r.prototype.toRgbString=function(){return t=Lo(this.rgba),e=t.r,i=t.g,s=t.b,(o=t.a)<1?"rgba("+e+", "+i+", "+s+", "+o+")":"rgb("+e+", "+i+", "+s+")";var t,e,i,s,o;},r.prototype.toHsl=function(){return Gh(Gr(this.rgba))},r.prototype.toHslString=function(){return t=Gh(Gr(this.rgba)),e=t.h,i=t.s,s=t.l,(o=t.a)<1?"hsla("+e+", "+i+"%, "+s+"%, "+o+")":"hsl("+e+", "+i+"%, "+s+"%)";var t,e,i,s,o;},r.prototype.toHsv=function(){return t=zh(this.rgba),{h:ut(t.h),s:ut(t.s),v:ut(t.v),a:ut(t.a,3)};var t;},r.prototype.invert=function(){return Ot({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t;},r.prototype.saturate=function(t){return t===void 0&&(t=.1),Ot(Oo(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ot(Oo(this.rgba,-t))},r.prototype.grayscale=function(){return Ot(Oo(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),Ot(Lh(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),Ot(Lh(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?Ot({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):ut(this.rgba.a,3);var e;},r.prototype.hue=function(t){var e=Gr(this.rgba);return typeof t=="number"?Ot({h:t,s:e.s,l:e.l,a:e.a}):ut(e.h)},r.prototype.isEqual=function(t){return this.toHex()===Ot(t).toHex()},r}(),Ot=function(r){return r instanceof Wo?r:new Wo(r)},Oh=[],Vh=function(r){r.forEach(function(t){Oh.indexOf(t)<0&&(t(Wo,zo),Oh.push(t));});};});function Yh(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in e)i[e[s]]=s;var o={};r.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return "transparent";var a,h,l=i[this.toHex()];if(l)return l;if(n?.closest){var u=this.toRgb(),c=1/0,f="black";if(!o.length)for(var d in e)o[d]=new r(e[d]).toRgb();for(var m in e){var g=(a=u,h=o[m],Math.pow(a.r-h.r,2)+Math.pow(a.g-h.g,2)+Math.pow(a.b-h.b,2));g<c&&(c=g,f=m);}return f}},t.string.push([function(n){var a=n.toLowerCase(),h=a==="transparent"?"#0000":e[a];return h?new r(h).toRgb():null},"name"]);}var $h=p(()=>{});var Ye,W,wt=p(()=>{Nh();$h();Vh([Yh]);Ye=class Ur{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t;}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Ur)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else {if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value));}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,e){let i=typeof t;if(i!==typeof e)return false;if(i==="number"||i==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?false:t.every((o,n)=>o===e[n]);if(t!==null&&e!==null){let o=Object.keys(t),n=Object.keys(e);return o.length!==n.length?false:o.every(a=>t[a]===e[a])}return t===e}toRgba(){let[t,e,i,s]=this._components;return {r:t,g:e,b:i,a:s}}toRgb(){let[t,e,i]=this._components;return {r:t,g:e,b:i}}toRgbaString(){let[t,e,i]=this.toUint8RgbArray();return `rgba(${t},${e},${i},${this.alpha})`}toUint8RgbArray(t){let[e,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(e*255),t[1]=Math.round(i*255),t[2]=Math.round(s*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,i,s,o]=this._components;return t[0]=e,t[1]=i,t[2]=s,t[3]=o,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,i,s]=this._components;return t[0]=e,t[1]=i,t[2]=s,t}toNumber(){return this._int}toBgrNumber(){let[t,e,i]=this.toUint8RgbArray();return (i<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return (t>>16)+(t&65280)+((t&255)<<16)}multiply(t){let[e,i,s,o]=Ur._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=i,this._components[2]*=s,this._components[3]*=o,this._refreshInt(),this._value=null,this}premultiply(t,e=true){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=true){if(t===1)return (255<<24)+this._int;if(t===0)return e?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,o=this._int&255;return e&&(i=i*t+.5|0,s=s*t+.5|0,o=o*t+.5|0),(t*255<<24)+(i<<16)+(s<<8)+o}toHex(){let t=this._int.toString(16);return `#${"000000".substring(0,6-t.length)+t}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(t){let e,i,s,o;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){let n=t;e=(n>>16&255)/255,i=(n>>8&255)/255,s=(n&255)/255,o=1;}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,i,s,o=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,i,s,o=255]=t,e/=255,i/=255,s/=255,o/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){let a=Ur.HEX_PATTERN.exec(t);a&&(t=`#${a[2]}`);}let n=Ot(t);n.isValid()&&({r:e,g:i,b:s,a:o}=n.rgba,e/=255,i/=255,s/=255);}if(e!==void 0)this._components[0]=e,this._components[1]=i,this._components[2]=s,this._components[3]=o,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);let[t,e,i]=this._components;this._int=(t*255<<16)+(e*255<<8)+(i*255|0);}_clamp(t,e=0,i=1){return typeof t=="number"?Math.min(Math.max(t,e),i):(t.forEach((s,o)=>{t[o]=Math.min(Math.max(s,e),i);}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Ur||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};Ye.shared=new Ye;Ye._temp=new Ye;Ye.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;W=Ye;});var Xh,jh=p(()=>{Xh={cullArea:null,cullable:false,cullableChildren:true};});var Kh,qh,Zh,Vo=p(()=>{Kh=Math.PI*2,qh=180/Math.PI,Zh=Math.PI/180;});var V,No,Ht=p(()=>{V=class r{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e;}clone(){return new r(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return `[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return No.x=0,No.y=0,No}},No=new V;});var C,dx,fx,Q=p(()=>{Vo();Ht();C=class r{constructor(t=1,e=0,i=0,s=1,o=0,n=0){this.array=null,this.a=t,this.b=e,this.c=i,this.d=s,this.tx=o,this.ty=n;}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5];}set(t,e,i,s,o,n){return this.a=t,this.b=e,this.c=i,this.d=s,this.tx=o,this.ty=n,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(t,e){e=e||new V;let i=t.x,s=t.y;return e.x=this.a*i+this.c*s+this.tx,e.y=this.b*i+this.d*s+this.ty,e}applyInverse(t,e){e=e||new V;let i=this.a,s=this.b,o=this.c,n=this.d,a=this.tx,h=this.ty,l=1/(i*n+o*-s),u=t.x,c=t.y;return e.x=n*l*u+-o*l*c+(h*o-a*n)*l,e.y=i*l*c+-s*l*u+(-h*i+a*s)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),s=this.a,o=this.c,n=this.tx;return this.a=s*e-this.b*i,this.b=s*i+this.b*e,this.c=o*e-this.d*i,this.d=o*i+this.d*e,this.tx=n*e-this.ty*i,this.ty=n*i+this.ty*e,this}append(t){let e=this.a,i=this.b,s=this.c,o=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*o,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*o,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*o+this.ty,this}appendFrom(t,e){let i=t.a,s=t.b,o=t.c,n=t.d,a=t.tx,h=t.ty,l=e.a,u=e.b,c=e.c,f=e.d;return this.a=i*l+s*c,this.b=i*u+s*f,this.c=o*l+n*c,this.d=o*u+n*f,this.tx=a*l+h*c+e.tx,this.ty=a*u+h*f+e.ty,this}setTransform(t,e,i,s,o,n,a,h,l){return this.a=Math.cos(a+l)*o,this.b=Math.sin(a+l)*o,this.c=-Math.sin(a-h)*n,this.d=Math.cos(a-h)*n,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d),this}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d;}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,i=this.b,s=this.c,o=this.d,n=t.pivot,a=-Math.atan2(-s,o),h=Math.atan2(i,e),l=Math.abs(a+h);return l<1e-5||Math.abs(Kh-l)<1e-5?(t.rotation=h,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=h),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(s*s+o*o),t.position.x=this.tx+(n.x*e+n.y*s),t.position.y=this.ty+(n.x*i+n.y*o),t}invert(){let t=this.a,e=this.b,i=this.c,s=this.d,o=this.tx,n=t*s-e*i;return this.a=s/n,this.b=-e/n,this.c=-i/n,this.d=t/n,this.tx=(i*this.ty-s*o)/n,this.ty=-(t*this.ty-e*o)/n,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return fx.identity()}static get shared(){return dx.identity()}},dx=new C,fx=new C;});var ft,Di=p(()=>{ft=class r{constructor(t,e,i){this._x=e||0,this._y=i||0,this._observer=t;}clone(t){return new r(t??this._observer,this._x,this._y)}set(t=0,e=t){return (this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return (this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return `[pixi.js/math:ObservablePoint x=0 y=0 scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this));}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this));}};});function N(r="default"){return Yo[r]===void 0&&(Yo[r]=-1),++Yo[r]}var Yo,vt=p(()=>{Yo={default:-1};});function R(r,t,e=3){if(Qh[t])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
Deprecated since v${r}`):(i=i.split(`
`).splice(e).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
Deprecated since v${r}`),console.warn(i))),Qh[t]=true;}var Qh,L,Jh,st=p(()=>{Qh={},L="8.0.0",Jh="8.3.4";});var Ce,$o=p(()=>{Ce=class{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e);}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t;}get(t){let e;return this._index>0?e=this._pool[--this._index]:e=new this._classType,e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t;}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0;}};});var Xo,z,It=p(()=>{$o();Xo=class{constructor(){this._poolsByClass=new Map;}prepopulate(t,e){this.getPool(t).prepopulate(e);}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t);}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new Ce(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let i=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[i]={free:e.totalFree,used:e.totalUsed,size:e.totalSize};}),t}},z=new Xo;});var tl,el=p(()=>{st();tl={get isCachedAsTexture(){return !!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===false?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===true?{}:r));},updateCacheTexture(){this.renderGroup?.updateCacheTexture();},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){R("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r);}};});function Li(r,t,e){let i=r.length,s;if(t>=i||e===0)return;e=t+e>i?i-t:e;let o=i-e;for(s=t;s<o;++s)r[s]=r[s+e];r.length=o;}var jo=p(()=>{});var rl,il=p(()=>{jo();st();rl={allowChildren:true,removeChildren(r=0,t){let e=t??this.children.length,i=e-r,s=[];if(i>0&&i<=e){for(let n=e-1;n>=r;n--){let a=this.children[n];a&&(s.push(a),a.parent=null);}Li(this.children,r,e);let o=this.renderGroup||this.parentRenderGroup;o&&o.removeChildren(s);for(let n=0;n<s.length;++n)this.emit("childRemoved",s[n],this,n),s[n].emit("removed",this);return s.length>0&&this._didViewChangeTick++,s}else if(i===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(r){let t=this.getChildAt(r);return this.removeChild(t)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,t);},getChildIndex(r){let t=this.children.indexOf(r);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(r,t){this.allowChildren||R(L,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:e}=this;if(t<0||t>e.length)throw new Error(`${r}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);if(r.parent){let s=r.parent.children.indexOf(r);if(r.parent===this&&s===t)return r;s!==-1&&r.parent.children.splice(s,1);}t===e.length?e.push(r):e.splice(t,0,r),r.parent=this,r.didChange=true,r._updateFlags=15;let i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(r),this.sortableChildren&&(this.sortDirty=true),this.emit("childAdded",r,this,t),r.emit("added",this),r},swapChildren(r,t){if(r===t)return;let e=this.getChildIndex(r),i=this.getChildIndex(t);this.children[e]=t,this.children[i]=r;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=true),this._didContainerChangeTick++;},removeFromParent(){this.parent?.removeChild(this);},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(t=>this.reparentChildAt(t,this.children.length)),r[0])},reparentChildAt(r,t){if(r.parent===this)return this.setChildIndex(r,t),r;let e=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,t);let i=this.worldTransform.clone();return i.invert(),e.prepend(i),r.setFromMatrix(e),r}};});var sl,ol=p(()=>{sl={collectRenderables(r,t,e){this.parentRenderLayer&&this.parentRenderLayer!==e||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(r,t,e):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,r):this.collectRenderablesWithEffects(r,t,e));},collectRenderablesSimple(r,t,e){let i=this.children,s=i.length;for(let o=0;o<s;o++)i[o].collectRenderables(r,t,e);},collectRenderablesWithEffects(r,t,e){let{renderPipes:i}=t;for(let s=0;s<this.effects.length;s++){let o=this.effects[s];i[o.pipe].push(o,this,r);}this.collectRenderablesSimple(r,t,e);for(let s=this.effects.length-1;s>=0;s--){let o=this.effects[s];i[o.pipe].pop(o,this,r);}}};});var Dr,nl=p(()=>{Dr=class{constructor(){this.pipe="filter",this.priority=1;}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null;}};});var Ko,Oi,al=p(()=>{F();It();Ko=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=false;}init(){this._initialized||(this._initialized=true,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t});}));}add(t){this._tests.push(t);}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let i=this._tests[e];if(i.test(t))return z.get(i.maskClass,t)}return t}returnMaskEffect(t){z.return(t);}},Oi=new Ko;G.handleByList(T.MaskEffect,Oi._effectClasses);});var hl,ll=p(()=>{nl();al();hl={_maskEffect:null,_maskOptions:{inverse:false},_filterEffect:null,effects:[],_markStructureAsChanged(){let r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=true);},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((e,i)=>e.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple());},removeEffect(r){let t=this.effects.indexOf(r);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple());},set mask(r){let t=this._maskEffect;t?.mask!==r&&(t&&(this.removeEffect(t),Oi.returnMaskEffect(t),this._maskEffect=null),r!=null&&(this._maskEffect=Oi.getMaskEffect(r),this.addEffect(this._maskEffect)));},setMask(r){this._maskOptions={...this._maskOptions,...r},r.mask&&(this.mask=r.mask),this._markStructureAsChanged();},get mask(){return this._maskEffect?.mask},set filters(r){!Array.isArray(r)&&r&&(r=[r]);let t=this._filterEffect||(this._filterEffect=new Dr);r=r;let e=r?.length>0,i=t.filters?.length>0,s=e!==i;r=Array.isArray(r)?r.slice(0):r,t.filters=Object.freeze(r),s&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=r??null));},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new Dr),this._filterEffect.filterArea=r;},get filterArea(){return this._filterEffect?.filterArea}};});var ul,cl=p(()=>{st();ul={label:null,get name(){return R(L,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){R(L,"Container.name property has been removed, use Container.label instead"),this.label=r;},getChildByName(r,t=false){return this.getChildByLabel(r,t)},getChildByLabel(r,t=false){let e=this.children;for(let i=0;i<e.length;i++){let s=e[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(t)for(let i=0;i<e.length;i++){let o=e[i].getChildByLabel(r,true);if(o)return o}return null},getChildrenByLabel(r,t=false,e=[]){let i=this.children;for(let s=0;s<i.length;s++){let o=i[s];(o.label===r||r instanceof RegExp&&r.test(o.label))&&e.push(o);}if(t)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,true,e);return e}};});var Hi,$,Et=p(()=>{Ht();Hi=[new V,new V,new V,new V],$=class r{constructor(t=0,e=0,i=0,s=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(s);}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return this.width<=0||this.height<=0?false:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height}strokeContains(t,e,i,s=.5){let{width:o,height:n}=this;if(o<=0||n<=0)return false;let a=this.x,h=this.y,l=i*(1-s),u=i-l,c=a-l,f=a+o+l,d=h-l,m=h+n+l,g=a+u,x=a+o-u,_=h+u,y=h+n-u;return t>=c&&t<=f&&e>=d&&e<=m&&!(t>g&&t<x&&e>_&&e<y)}intersects(t,e){if(!e){let E=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=E)return false;let A=this.y<t.y?t.y:this.y;return (this.bottom>t.bottom?t.bottom:this.bottom)>A}let i=this.left,s=this.right,o=this.top,n=this.bottom;if(s<=i||n<=o)return false;let a=Hi[0].set(t.left,t.top),h=Hi[1].set(t.left,t.bottom),l=Hi[2].set(t.right,t.top),u=Hi[3].set(t.right,t.bottom);if(l.x<=a.x||h.y<=a.y)return false;let c=Math.sign(e.a*e.d-e.b*e.c);if(c===0||(e.apply(a,a),e.apply(h,h),e.apply(l,l),e.apply(u,u),Math.max(a.x,h.x,l.x,u.x)<=i||Math.min(a.x,h.x,l.x,u.x)>=s||Math.max(a.y,h.y,l.y,u.y)<=o||Math.min(a.y,h.y,l.y,u.y)>=n))return false;let f=c*(h.y-a.y),d=c*(a.x-h.x),m=f*i+d*o,g=f*s+d*o,x=f*i+d*n,_=f*s+d*n;if(Math.max(m,g,x,_)<=f*a.x+d*a.y||Math.min(m,g,x,_)>=f*u.x+d*u.y)return false;let y=c*(a.y-l.y),b=c*(l.x-a.x),v=y*i+b*o,P=y*s+b*o,S=y*i+b*n,w=y*s+b*n;return !(Math.max(v,P,S,w)<=y*a.x+b*a.y||Math.min(v,P,S,w)>=y*u.x+b*u.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){let e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=s,this.height=Math.max(o-s,0),this}ceil(t=1,e=.001){let i=Math.ceil((this.x+this.width-e)*t)/t,s=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=s-this.y,this}enlarge(t){let e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=s,this.height=o-s,this}getBounds(t){return t||(t=new r),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return false;let e=t.x,i=t.y,s=t.x+t.width,o=t.y+t.height;return e>=this.x&&e<this.x+this.width&&i>=this.y&&i<this.y+this.height&&s>=this.x&&s<this.x+this.width&&o>=this.y&&o<this.y+this.height}toString(){return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};});var dl,et,zt=p(()=>{Q();Et();dl=new C,et=class r{constructor(t=1/0,e=1/0,i=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=dl,this.minX=t,this.minY=e,this.maxX=i,this.maxY=s;}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new $);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=dl,this}set(t,e,i,s){this.minX=t,this.minY=e,this.maxX=i,this.maxY=s;}addFrame(t,e,i,s,o){o||(o=this.matrix);let n=o.a,a=o.b,h=o.c,l=o.d,u=o.tx,c=o.ty,f=this.minX,d=this.minY,m=this.maxX,g=this.maxY,x=n*t+h*e+u,_=a*t+l*e+c;x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=n*i+h*e+u,_=a*i+l*e+c,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=n*t+h*s+u,_=a*t+l*s+c,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),x=n*i+h*s+u,_=a*i+l*s+c,x<f&&(f=x),_<d&&(d=_),x>m&&(m=x),_>g&&(g=_),this.minX=f,this.minY=d,this.maxX=m,this.maxY=g;}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e);}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e);}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY;}applyMatrix(t){let e=this.minX,i=this.minY,s=this.maxX,o=this.maxY,{a:n,b:a,c:h,d:l,tx:u,ty:c}=t,f=n*e+h*i+u,d=a*e+l*i+c;this.minX=f,this.minY=d,this.maxX=f,this.maxY=d,f=n*s+h*i+u,d=a*s+l*i+c,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=n*e+h*o+u,d=a*e+l*o+c,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=n*s+h*o+u,d=a*s+l*o+c,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY;}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,i,s){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new r(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e;}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e;}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t;}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t;}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,e,i,s){let o=this.minX,n=this.minY,a=this.maxX,h=this.maxY;s||(s=this.matrix);let l=s.a,u=s.b,c=s.c,f=s.d,d=s.tx,m=s.ty;for(let g=e;g<i;g+=2){let x=t[g],_=t[g+1],y=l*x+c*_+d,b=u*x+f*_+m;o=y<o?y:o,n=b<n?b:n,a=y>a?y:a,h=b>h?b:h;}this.minX=o,this.minY=n,this.maxX=a,this.maxY=h;}containsPoint(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}};});var ot,Bt,Me=p(()=>{Q();$o();zt();ot=new Ce(C),Bt=new Ce(et);});var px,fl,pl=p(()=>{Q();zt();Me();px=new C,fl={getFastGlobalBounds(r,t){t||(t=new et),t.clear(),this._getGlobalBoundsRecursive(!!r,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let e=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(e.worldTransform),t},_getGlobalBoundsRecursive(r,t,e){let i=t;if(r&&this.parentRenderLayer&&this.parentRenderLayer!==e||this.localDisplayStatus!==7||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(i=Bt.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else {if(this.renderPipeId){let n=this.bounds;i.addFrame(n.minX,n.minY,n.maxX,n.maxY,this.groupTransform);}let o=this.children;for(let n=0;n<o.length;n++)o[n]._getGlobalBoundsRecursive(r,i,e);}if(s){let o=false,n=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(o||(o=true,i.applyMatrix(n.worldTransform)),this.effects[a].addBounds(i,true));o&&(i.applyMatrix(n.worldTransform.copyTo(px).invert()),t.addBounds(i,this.relativeGroupTransform)),t.addBounds(i),Bt.return(i);}else this.renderGroup&&(t.addBounds(i,this.relativeGroupTransform),Bt.return(i));}};});function zi(r,t,e){e.clear();let i,s;return r.parent?t?i=r.parent.worldTransform:(s=ot.get().identity(),i=Wi(r,s)):i=C.IDENTITY,ml(r,e,i,t),s&&ot.return(s),e.isValid||e.set(0,0,0,0),e}function ml(r,t,e,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=ot.get(),s.appendFrom(r.localTransform,e));let o=t,n=!!r.effects.length;if(n&&(t=Bt.get().clear()),r.boundsArea)t.addRect(r.boundsArea,s);else {r.bounds&&(t.matrix=s,t.addBounds(r.bounds));for(let a=0;a<r.children.length;a++)ml(r.children[a],t,s,i);}if(n){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(t);o.addBounds(t,C.IDENTITY),Bt.return(t);}i||ot.return(s);}function Wi(r,t){let e=r.parent;return e&&(Wi(e,t),e.updateLocalTransform(),t.append(e.localTransform)),t}var Vi=p(()=>{Q();Me();});function Ni(r,t){if(r===16777215||!t)return t;if(t===16777215||!r)return r;let e=r>>16&255,i=r>>8&255,s=r&255,o=t>>16&255,n=t>>8&255,a=t&255,h=e*o/255|0,l=i*n/255|0,u=s*a/255|0;return (h<<16)+(l<<8)+u}var qo=p(()=>{});function Zo(r,t){return r===xl?t:t===xl?r:Ni(r,t)}var xl,gl=p(()=>{qo();xl=16777215;});function Lr(r){return ((r&255)<<16)+(r&65280)+(r>>16&255)}var _l,yl=p(()=>{Vi();Me();gl();_l={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,e=this.parent;for(;e;)t*=e.alpha,e=e.parent;return t},getGlobalTransform(r,t){if(t)return r.copyFrom(this.worldTransform);this.updateLocalTransform();let e=Wi(this,ot.get().identity());return r.appendFrom(this.localTransform,e),ot.return(e),r},getGlobalTint(r){if(r)return this.renderGroup?Lr(this.renderGroup.worldColor):this.parentRenderGroup?Lr(Zo(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,e=this.parent;for(;e;)t=Zo(t,e.localColor),e=e.parent;return Lr(t)}};});function O(...r){Qo!==bl&&(Qo++,Qo===bl?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r));}var Qo,bl,_t=p(()=>{Qo=0,bl=500;});function Yi(r,t,e){return t.clear(),e||(e=C.IDENTITY),vl(r,t,e,r,true),t.isValid||t.set(0,0,0,0),t}function vl(r,t,e,i,s){let o;if(s)o=ot.get(),o=e.copyTo(o);else {if(!r.visible||!r.measurable)return;r.updateLocalTransform();let h=r.localTransform;o=ot.get(),o.appendFrom(h,e);}let n=t,a=!!r.effects.length;if(a&&(t=Bt.get().clear()),r.boundsArea)t.addRect(r.boundsArea,o);else {r.renderPipeId&&(t.matrix=o,t.addBounds(r.bounds));let h=r.children;for(let l=0;l<h.length;l++)vl(h[l],t,o,i,false);}if(a){for(let h=0;h<r.effects.length;h++)r.effects[h].addLocalBounds?.(t,i);n.addBounds(t,C.IDENTITY),Bt.return(t);}ot.return(o);}var Jo=p(()=>{Q();Me();});function tn(r,t){let e=r.children;for(let i=0;i<e.length;i++){let s=e[i],o=s.uid,n=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=t.index;(t.data[a]!==o||t.data[a+1]!==n)&&(t.data[t.index]=o,t.data[t.index+1]=n,t.didChange=true),t.index=a+2,s.children.length&&tn(s,t);}return t.didChange}var Tl=p(()=>{});var mx,Sl,wl=p(()=>{Q();zt();Vi();Jo();Tl();mx=new C,Sl={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,t){let e=Math.sign(this.scale.x)||1;t!==0?this.scale.x=r/t*e:this.scale.x=e;},_setHeight(r,t){let e=Math.sign(this.scale.y)||1;t!==0?this.scale.y=r/t*e:this.scale.y=e;},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:false,localBounds:new et});let r=this._localBoundsCacheData;return r.index=1,r.didChange=false,r.data[0]!==this._didViewChangeTick&&(r.didChange=true,r.data[0]=this._didViewChangeTick),tn(this,r),r.didChange&&Yi(this,r.localBounds,mx),r.localBounds},getBounds(r,t){return zi(this,r,t||new et)}};});var Pl,Cl=p(()=>{Pl={_onRender:null,set onRender(r){let t=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=r;},get onRender(){return this._onRender}};});function xx(r,t){return r._zIndex-t._zIndex}var Ml,Al=p(()=>{Ml={_zIndex:0,sortDirty:false,sortableChildren:false,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified());},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=true,this.parent.sortDirty=true),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=true);},sortChildren(){this.sortDirty&&(this.sortDirty=false,this.children.sort(xx));}};});var El,Bl=p(()=>{Ht();Me();El={getGlobalPosition(r=new V,t=false){return this.parent?this.parent.toGlobal(this._position,r,t):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,t,e=false){let i=this.getGlobalTransform(ot.get(),e);return t=i.apply(r,t),ot.return(i),t},toLocal(r,t,e,i){t&&(r=t.toGlobal(r,e,i));let s=this.getGlobalTransform(ot.get(),i);return e=s.applyInverse(r,e),ot.return(s),e}};});var $e,en=p(()=>{vt();$e=class{constructor(){this.uid=N("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0;}reset(){this.instructionSize=0;}add(t){this.instructions[this.instructionSize++]=t;}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"]);}};});function re(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function rn(r){return !(r&r-1)&&!!r}var Or=p(()=>{});function $i(r){let t={};for(let e in r)r[e]!==void 0&&(t[e]=r[e]);return t}var sn=p(()=>{});function gx(r){let t=kl[r];return t===void 0&&(kl[r]=N("resource")),t}var kl,Fl,Xi,on=p(()=>{At();vt();st();kl=Object.create(null);Fl=class Rl extends Y{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=false,t={...Rl.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1;}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t;}get addressMode(){return this.addressModeU}set wrapMode(t){R(L,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t;}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t;}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear");}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null;}_generateResourceId(){let t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=gx(t),this._resourceId}destroy(){this.destroyed=true,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners();}};Fl.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};Xi=Fl;});var Il,pt,le=p(()=>{At();Or();sn();vt();on();Il=class Gl extends Y{constructor(t={}){super(),this.options=t,this.uid=N("textureSource"),this._resourceType="textureSource",this._resourceId=N("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=false,this.format="rgba8unorm",this.dimension="2d",this.antialias=false,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...Gl.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new Xi($i(t)),this.destroyed=false,this._refreshPOT();}get source(){return this}get style(){return this._style}set style(t){this.style!==t&&(this._style?.off("change",this._onStyleChan