Profectus-Demo/assets/index.2bb81304.js

1620 lines
922 KiB
JavaScript

const gx=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}};gx();const yx="modulepreload",Xp={},bx="/",xu=function(e,r){return!r||r.length===0?e():Promise.all(r.map(n=>{if(n=`${bx}${n}`,n in Xp)return;Xp[n]=!0;const i=n.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${o}`))return;const a=document.createElement("link");if(a.rel=i?"stylesheet":yx,i||(a.as="script",a.crossOrigin=""),a.href=n,document.head.appendChild(a),i)return new Promise((s,l)=>{a.addEventListener("load",s),a.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e())};function Zu(t,e){const r=Object.create(null),n=t.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return e?i=>!!r[i.toLowerCase()]:i=>!!r[i]}const _x="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",xx=Zu(_x),Tx="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wx=Zu(Tx);function py(t){return!!t||t===""}function ce(t){if(Ct(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],i=Ke(n)?Cx(n):ce(n);if(i)for(const o in i)e[o]=i[o]}return e}else{if(Ke(t))return t;if(rr(t))return t}}const Ex=/;(?![^(]*\))/g,Ix=/:(.+)/;function Cx(t){const e={};return t.split(Ex).forEach(r=>{if(r){const n=r.split(Ix);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Qt(t){let e="";if(Ke(t))e=t;else if(Ct(t))for(let r=0;r<t.length;r++){const n=Qt(t[r]);n&&(e+=n+" ")}else if(rr(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}function vy(t){if(!t)return null;let{class:e,style:r}=t;return e&&!Ke(e)&&(t.class=Qt(e)),r&&(t.style=ce(r)),t}function Rx(t,e){if(t.length!==e.length)return!1;let r=!0;for(let n=0;r&&n<t.length;n++)r=Hi(t[n],e[n]);return r}function Hi(t,e){if(t===e)return!0;let r=zp(t),n=zp(e);if(r||n)return r&&n?t.getTime()===e.getTime():!1;if(r=Es(t),n=Es(e),r||n)return t===e;if(r=Ct(t),n=Ct(e),r||n)return r&&n?Rx(t,e):!1;if(r=rr(t),n=rr(e),r||n){if(!r||!n)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const a in t){const s=t.hasOwnProperty(a),l=e.hasOwnProperty(a);if(s&&!l||!s&&l||!Hi(t[a],e[a]))return!1}}return String(t)===String(e)}function qu(t,e){return t.findIndex(r=>Hi(r,e))}const re=t=>Ke(t)?t:t==null?"":Ct(t)||rr(t)&&(t.toString===gy||!zt(t.toString))?JSON.stringify(t,my,2):String(t),my=(t,e)=>e&&e.__v_isRef?my(t,e.value):ha(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i])=>(r[`${n} =>`]=i,r),{})}:Fo(e)?{[`Set(${e.size})`]:[...e.values()]}:rr(e)&&!Ct(e)&&!yy(e)?String(e):e,Ee={},fa=[],xn=()=>{},Nx=()=>!1,Px=/^on[^a-z]/,qs=t=>Px.test(t),Td=t=>t.startsWith("onUpdate:"),er=Object.assign,wd=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Sx=Object.prototype.hasOwnProperty,me=(t,e)=>Sx.call(t,e),Ct=Array.isArray,ha=t=>Js(t)==="[object Map]",Fo=t=>Js(t)==="[object Set]",zp=t=>Js(t)==="[object Date]",zt=t=>typeof t=="function",Ke=t=>typeof t=="string",Es=t=>typeof t=="symbol",rr=t=>t!==null&&typeof t=="object",Ed=t=>rr(t)&&zt(t.then)&&zt(t.catch),gy=Object.prototype.toString,Js=t=>gy.call(t),Ax=t=>Js(t).slice(8,-1),yy=t=>Js(t)==="[object Object]",Id=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,as=Zu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ju=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Ox=/-(\w)/g,Kr=Ju(t=>t.replace(Ox,(e,r)=>r?r.toUpperCase():"")),Ux=/\B([A-Z])/g,Mn=Ju(t=>t.replace(Ux,"-$1").toLowerCase()),Qs=Ju(t=>t.charAt(0).toUpperCase()+t.slice(1)),ss=Ju(t=>t?`on${Qs(t)}`:""),ba=(t,e)=>!Object.is(t,e),da=(t,e)=>{for(let r=0;r<t.length;r++)t[r](e)},Tu=(t,e,r)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},Vi=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Wp;const Fx=()=>Wp||(Wp=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Vr;class Cd{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&Vr&&(this.parent=Vr,this.index=(Vr.scopes||(Vr.scopes=[])).push(this)-1)}run(e){if(this.active){const r=Vr;try{return Vr=this,e()}finally{Vr=r}}}on(){Vr=this}off(){Vr=this.parent}stop(e){if(this.active){let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.scopes)for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);if(this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.active=!1}}}function Lx(t){return new Cd(t)}function by(t,e=Vr){e&&e.active&&e.effects.push(t)}function Mx(){return Vr}function Bx(t){Vr&&Vr.cleanups.push(t)}const Rd=t=>{const e=new Set(t);return e.w=0,e.n=0,e},_y=t=>(t.w&$i)>0,xy=t=>(t.n&$i)>0,kx=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=$i},Gx=t=>{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n<e.length;n++){const i=e[n];_y(i)&&!xy(i)?i.delete(t):e[r++]=i,i.w&=~$i,i.n&=~$i}e.length=r}},Vf=new WeakMap;let Ja=0,$i=1;const $f=30;let yn;const Eo=Symbol(""),jf=Symbol("");class tl{constructor(e,r=null,n){this.fn=e,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,by(this,n)}run(){if(!this.active)return this.fn();let e=yn,r=Bi;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=yn,yn=this,Bi=!0,$i=1<<++Ja,Ja<=$f?kx(this):Yp(this),this.fn()}finally{Ja<=$f&&Gx(this),$i=1<<--Ja,yn=this.parent,Bi=r,this.parent=void 0,this.deferStop&&this.stop()}}stop(){yn===this?this.deferStop=!0:this.active&&(Yp(this),this.onStop&&this.onStop(),this.active=!1)}}function Yp(t){const{deps:e}=t;if(e.length){for(let r=0;r<e.length;r++)e[r].delete(t);e.length=0}}function Dx(t,e){t.effect&&(t=t.effect.fn);const r=new tl(t);e&&(er(r,e),e.scope&&by(r,e.scope)),(!e||!e.lazy)&&r.run();const n=r.run.bind(r);return n.effect=r,n}function Hx(t){t.effect.stop()}let Bi=!0;const Ty=[];function Lo(){Ty.push(Bi),Bi=!1}function Mo(){const t=Ty.pop();Bi=t===void 0?!0:t}function Zr(t,e,r){if(Bi&&yn){let n=Vf.get(t);n||Vf.set(t,n=new Map);let i=n.get(r);i||n.set(r,i=Rd()),wy(i)}}function wy(t,e){let r=!1;Ja<=$f?xy(t)||(t.n|=$i,r=!_y(t)):r=!t.has(yn),r&&(t.add(yn),yn.deps.push(t))}function fi(t,e,r,n,i,o){const a=Vf.get(t);if(!a)return;let s=[];if(e==="clear")s=[...a.values()];else if(r==="length"&&Ct(t))a.forEach((l,u)=>{(u==="length"||u>=n)&&s.push(l)});else switch(r!==void 0&&s.push(a.get(r)),e){case"add":Ct(t)?Id(r)&&s.push(a.get("length")):(s.push(a.get(Eo)),ha(t)&&s.push(a.get(jf)));break;case"delete":Ct(t)||(s.push(a.get(Eo)),ha(t)&&s.push(a.get(jf)));break;case"set":ha(t)&&s.push(a.get(Eo));break}if(s.length===1)s[0]&&Xf(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);Xf(Rd(l))}}function Xf(t,e){const r=Ct(t)?t:[...t];for(const n of r)n.computed&&Kp(n);for(const n of r)n.computed||Kp(n)}function Kp(t,e){(t!==yn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const Vx=Zu("__proto__,__v_isRef,__isVue"),Ey=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Es)),$x=Qu(),jx=Qu(!1,!0),Xx=Qu(!0),zx=Qu(!0,!0),Zp=Wx();function Wx(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=ue(this);for(let o=0,a=this.length;o<a;o++)Zr(n,"get",o+"");const i=n[e](...r);return i===-1||i===!1?n[e](...r.map(ue)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...r){Lo();const n=ue(this)[e].apply(this,r);return Mo(),n}}),t}function Qu(t=!1,e=!1){return function(n,i,o){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&o===(t?e?Ay:Sy:e?Py:Ny).get(n))return n;const a=Ct(n);if(!t&&a&&me(Zp,i))return Reflect.get(Zp,i,o);const s=Reflect.get(n,i,o);return(Es(i)?Ey.has(i):Vx(i))||(t||Zr(n,"get",i),e)?s:oe(s)?a&&Id(i)?s:s.value:rr(s)?t?Pd(s):zn(s):s}}const Yx=Iy(),Kx=Iy(!0);function Iy(t=!1){return function(r,n,i,o){let a=r[n];if(_a(a)&&oe(a)&&!oe(i))return!1;if(!t&&!_a(i)&&(wu(i)||(i=ue(i),a=ue(a)),!Ct(r)&&oe(a)&&!oe(i)))return a.value=i,!0;const s=Ct(r)&&Id(n)?Number(n)<r.length:me(r,n),l=Reflect.set(r,n,i,o);return r===ue(o)&&(s?ba(i,a)&&fi(r,"set",n,i):fi(r,"add",n,i)),l}}function Zx(t,e){const r=me(t,e);t[e];const n=Reflect.deleteProperty(t,e);return n&&r&&fi(t,"delete",e,void 0),n}function qx(t,e){const r=Reflect.has(t,e);return(!Es(e)||!Ey.has(e))&&Zr(t,"has",e),r}function Jx(t){return Zr(t,"iterate",Ct(t)?"length":Eo),Reflect.ownKeys(t)}const Cy={get:$x,set:Yx,deleteProperty:Zx,has:qx,ownKeys:Jx},Ry={get:Xx,set(t,e){return!0},deleteProperty(t,e){return!0}},Qx=er({},Cy,{get:jx,set:Kx}),tT=er({},Ry,{get:zx}),Nd=t=>t,tc=t=>Reflect.getPrototypeOf(t);function vl(t,e,r=!1,n=!1){t=t.__v_raw;const i=ue(t),o=ue(e);r||(e!==o&&Zr(i,"get",e),Zr(i,"get",o));const{has:a}=tc(i),s=n?Nd:r?Od:Is;if(a.call(i,e))return s(t.get(e));if(a.call(i,o))return s(t.get(o));t!==i&&t.get(e)}function ml(t,e=!1){const r=this.__v_raw,n=ue(r),i=ue(t);return e||(t!==i&&Zr(n,"has",t),Zr(n,"has",i)),t===i?r.has(t):r.has(t)||r.has(i)}function gl(t,e=!1){return t=t.__v_raw,!e&&Zr(ue(t),"iterate",Eo),Reflect.get(t,"size",t)}function qp(t){t=ue(t);const e=ue(this);return tc(e).has.call(e,t)||(e.add(t),fi(e,"add",t,t)),this}function Jp(t,e){e=ue(e);const r=ue(this),{has:n,get:i}=tc(r);let o=n.call(r,t);o||(t=ue(t),o=n.call(r,t));const a=i.call(r,t);return r.set(t,e),o?ba(e,a)&&fi(r,"set",t,e):fi(r,"add",t,e),this}function Qp(t){const e=ue(this),{has:r,get:n}=tc(e);let i=r.call(e,t);i||(t=ue(t),i=r.call(e,t)),n&&n.call(e,t);const o=e.delete(t);return i&&fi(e,"delete",t,void 0),o}function tv(){const t=ue(this),e=t.size!==0,r=t.clear();return e&&fi(t,"clear",void 0,void 0),r}function yl(t,e){return function(n,i){const o=this,a=o.__v_raw,s=ue(a),l=e?Nd:t?Od:Is;return!t&&Zr(s,"iterate",Eo),a.forEach((u,c)=>n.call(i,l(u),l(c),o))}}function bl(t,e,r){return function(...n){const i=this.__v_raw,o=ue(i),a=ha(o),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,u=i[t](...n),c=r?Nd:e?Od:Is;return!e&&Zr(o,"iterate",l?jf:Eo),{next(){const{value:f,done:h}=u.next();return h?{value:f,done:h}:{value:s?[c(f[0]),c(f[1])]:c(f),done:h}},[Symbol.iterator](){return this}}}}function xi(t){return function(...e){return t==="delete"?!1:this}}function eT(){const t={get(o){return vl(this,o)},get size(){return gl(this)},has:ml,add:qp,set:Jp,delete:Qp,clear:tv,forEach:yl(!1,!1)},e={get(o){return vl(this,o,!1,!0)},get size(){return gl(this)},has:ml,add:qp,set:Jp,delete:Qp,clear:tv,forEach:yl(!1,!0)},r={get(o){return vl(this,o,!0)},get size(){return gl(this,!0)},has(o){return ml.call(this,o,!0)},add:xi("add"),set:xi("set"),delete:xi("delete"),clear:xi("clear"),forEach:yl(!0,!1)},n={get(o){return vl(this,o,!0,!0)},get size(){return gl(this,!0)},has(o){return ml.call(this,o,!0)},add:xi("add"),set:xi("set"),delete:xi("delete"),clear:xi("clear"),forEach:yl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=bl(o,!1,!1),r[o]=bl(o,!0,!1),e[o]=bl(o,!1,!0),n[o]=bl(o,!0,!0)}),[t,r,e,n]}const[rT,nT,iT,oT]=eT();function ec(t,e){const r=e?t?oT:iT:t?nT:rT;return(n,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(me(r,i)&&i in n?r:n,i,o)}const aT={get:ec(!1,!1)},sT={get:ec(!1,!0)},lT={get:ec(!0,!1)},uT={get:ec(!0,!0)},Ny=new WeakMap,Py=new WeakMap,Sy=new WeakMap,Ay=new WeakMap;function cT(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fT(t){return t.__v_skip||!Object.isExtensible(t)?0:cT(Ax(t))}function zn(t){return _a(t)?t:rc(t,!1,Cy,aT,Ny)}function Sa(t){return rc(t,!1,Qx,sT,Py)}function Pd(t){return rc(t,!0,Ry,lT,Sy)}function hT(t){return rc(t,!0,tT,uT,Ay)}function rc(t,e,r,n,i){if(!rr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const a=fT(t);if(a===0)return t;const s=new Proxy(t,a===2?n:r);return i.set(t,s),s}function ki(t){return _a(t)?ki(t.__v_raw):!!(t&&t.__v_isReactive)}function _a(t){return!!(t&&t.__v_isReadonly)}function wu(t){return!!(t&&t.__v_isShallow)}function Sd(t){return ki(t)||_a(t)}function ue(t){const e=t&&t.__v_raw;return e?ue(e):t}function Ad(t){return Tu(t,"__v_skip",!0),t}const Is=t=>rr(t)?zn(t):t,Od=t=>rr(t)?Pd(t):t;function Ud(t){Bi&&yn&&(t=ue(t),wy(t.dep||(t.dep=Rd())))}function nc(t,e){t=ue(t),t.dep&&Xf(t.dep)}function oe(t){return!!(t&&t.__v_isRef===!0)}function It(t){return Oy(t,!1)}function Gr(t){return Oy(t,!0)}function Oy(t,e){return oe(t)?t:new dT(t,e)}class dT{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:ue(e),this._value=r?e:Is(e)}get value(){return Ud(this),this._value}set value(e){e=this.__v_isShallow?e:ue(e),ba(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:Is(e),nc(this))}}function pT(t){nc(t)}function E(t){return oe(t)?t.value:t}const vT={get:(t,e,r)=>E(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return oe(i)&&!oe(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function Fd(t){return ki(t)?t:new Proxy(t,vT)}class mT{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:r,set:n}=e(()=>Ud(this),()=>nc(this));this._get=r,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function gT(t){return new mT(t)}function Ae(t){const e=Ct(t)?new Array(t.length):{};for(const r in t)e[r]=Mr(t,r);return e}class yT{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Mr(t,e,r){const n=t[e];return oe(n)?n:new yT(t,e,r)}class bT{constructor(e,r,n,i){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new tl(e,()=>{this._dirty||(this._dirty=!0,nc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=ue(this);return Ud(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function _T(t,e,r=!1){let n,i;const o=zt(t);return o?(n=t,i=xn):(n=t.get,i=t.set),new bT(n,i,o||!i,r)}const ls=[];function Uy(t,...e){Lo();const r=ls.length?ls[ls.length-1].component:null,n=r&&r.appContext.config.warnHandler,i=xT();if(n)Bn(n,r,11,[t+e.join(""),r&&r.proxy,i.map(({vnode:o})=>`at <${Ib(r,o.type)}>`).join(`
`),i]);else{const o=[`[Vue warn]: ${t}`,...e];i.length&&o.push(`
`,...TT(i)),console.warn(...o)}Mo()}function xT(){let t=ls[ls.length-1];if(!t)return[];const e=[];for(;t;){const r=e[0];r&&r.vnode===t?r.recurseCount++:e.push({vnode:t,recurseCount:0});const n=t.component&&t.component.parent;t=n&&n.vnode}return e}function TT(t){const e=[];return t.forEach((r,n)=>{e.push(...n===0?[]:[`
`],...wT(r))}),e}function wT({vnode:t,recurseCount:e}){const r=e>0?`... (${e} recursive calls)`:"",n=t.component?t.component.parent==null:!1,i=` at <${Ib(t.component,t.type,n)}`,o=">"+r;return t.props?[i,...ET(t.props),o]:[i+o]}function ET(t){const e=[],r=Object.keys(t);return r.slice(0,3).forEach(n=>{e.push(...Fy(n,t[n]))}),r.length>3&&e.push(" ..."),e}function Fy(t,e,r){return Ke(e)?(e=JSON.stringify(e),r?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?r?e:[`${t}=${e}`]:oe(e)?(e=Fy(t,ue(e.value),!0),r?e:[`${t}=Ref<`,e,">"]):zt(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=ue(e),r?e:[`${t}=`,e])}function Bn(t,e,r,n){let i;try{i=n?t(...n):t()}catch(o){Bo(o,e,r)}return i}function Yr(t,e,r,n){if(zt(t)){const o=Bn(t,e,r,n);return o&&Ed(o)&&o.catch(a=>{Bo(a,e,r)}),o}const i=[];for(let o=0;o<t.length;o++)i.push(Yr(t[o],e,r,n));return i}function Bo(t,e,r,n=!0){const i=e?e.vnode:null;if(e){let o=e.parent;const a=e.proxy,s=r;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,a,s)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Bn(l,null,10,[t,a,s]);return}}IT(t,r,i,n)}function IT(t,e,r,n=!0){console.error(t)}let Eu=!1,zf=!1;const jr=[];let ei=0;const us=[];let Qa=null,Zo=0;const cs=[];let Ci=null,qo=0;const Ly=Promise.resolve();let Ld=null,Wf=null;function cr(t){const e=Ld||Ly;return t?e.then(this?t.bind(this):t):e}function CT(t){let e=ei+1,r=jr.length;for(;e<r;){const n=e+r>>>1;Cs(jr[n])<t?e=n+1:r=n}return e}function Md(t){(!jr.length||!jr.includes(t,Eu&&t.allowRecurse?ei+1:ei))&&t!==Wf&&(t.id==null?jr.push(t):jr.splice(CT(t.id),0,t),My())}function My(){!Eu&&!zf&&(zf=!0,Ld=Ly.then(ky))}function RT(t){const e=jr.indexOf(t);e>ei&&jr.splice(e,1)}function By(t,e,r,n){Ct(t)?r.push(...t):(!e||!e.includes(t,t.allowRecurse?n+1:n))&&r.push(t),My()}function NT(t){By(t,Qa,us,Zo)}function Bd(t){By(t,Ci,cs,qo)}function ic(t,e=null){if(us.length){for(Wf=e,Qa=[...new Set(us)],us.length=0,Zo=0;Zo<Qa.length;Zo++)Qa[Zo]();Qa=null,Zo=0,Wf=null,ic(t,e)}}function Iu(t){if(ic(),cs.length){const e=[...new Set(cs)];if(cs.length=0,Ci){Ci.push(...e);return}for(Ci=e,Ci.sort((r,n)=>Cs(r)-Cs(n)),qo=0;qo<Ci.length;qo++)Ci[qo]();Ci=null,qo=0}}const Cs=t=>t.id==null?1/0:t.id;function ky(t){zf=!1,Eu=!0,ic(t),jr.sort((r,n)=>Cs(r)-Cs(n));const e=xn;try{for(ei=0;ei<jr.length;ei++){const r=jr[ei];r&&r.active!==!1&&Bn(r,null,14)}}finally{ei=0,jr.length=0,Iu(),Eu=!1,Ld=null,(jr.length||us.length||cs.length)&&ky(t)}}let Jo,_l=[];function Gy(t,e){var r,n;Jo=t,Jo?(Jo.enabled=!0,_l.forEach(({event:i,args:o})=>Jo.emit(i,...o)),_l=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((n=(r=window.navigator)===null||r===void 0?void 0:r.userAgent)===null||n===void 0)&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Gy(o,e)}),setTimeout(()=>{Jo||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,_l=[])},3e3)):_l=[]}function PT(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Ee;let i=r;const o=e.startsWith("update:"),a=o&&e.slice(7);if(a&&a in n){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:f,trim:h}=n[c]||Ee;h&&(i=r.map(d=>d.trim())),f&&(i=r.map(Vi))}let s,l=n[s=ss(e)]||n[s=ss(Kr(e))];!l&&o&&(l=n[s=ss(Mn(e))]),l&&Yr(l,t,6,i);const u=n[s+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,Yr(u,t,6,i)}}function Dy(t,e,r=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const o=t.emits;let a={},s=!1;if(!zt(t)){const l=u=>{const c=Dy(u,e,!0);c&&(s=!0,er(a,c))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!s?(n.set(t,null),null):(Ct(o)?o.forEach(l=>a[l]=null):er(a,o),n.set(t,a),a)}function oc(t,e){return!t||!qs(e)?!1:(e=e.slice(2).replace(/Once$/,""),me(t,e[0].toLowerCase()+e.slice(1))||me(t,Mn(e))||me(t,e))}let Ir=null,ac=null;function Rs(t){const e=Ir;return Ir=t,ac=t&&t.type.__scopeId||null,e}function Cn(t){ac=t}function Rn(){ac=null}const ST=t=>Bt;function Bt(t,e=Ir,r){if(!e||t._n)return t;const n=(...i)=>{n._d&&th(-1);const o=Rs(e),a=t(...i);return Rs(o),n._d&&th(1),a};return n._n=!0,n._c=!0,n._d=!0,n}function lu(t){const{type:e,vnode:r,proxy:n,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:l,emit:u,render:c,renderCache:f,data:h,setupState:d,ctx:p,inheritAttrs:v}=t;let m,y;const g=Rs(t);try{if(r.shapeFlag&4){const T=i||n;m=$r(c.call(T,T,f,o,d,h,p)),y=l}else{const T=e;m=$r(T.length>1?T(o,{attrs:l,slots:s,emit:u}):T(o,null)),y=e.props?l:OT(l)}}catch(T){hs.length=0,Bo(T,t,1),m=P(Rr)}let b=m;if(y&&v!==!1){const T=Object.keys(y),{shapeFlag:w}=b;T.length&&w&7&&(a&&T.some(Td)&&(y=UT(y,a)),b=Vn(b,y))}return r.dirs&&(b=Vn(b),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&(b.transition=r.transition),m=b,Rs(g),m}function AT(t){let e;for(let r=0;r<t.length;r++){const n=t[r];if(wn(n)){if(n.type!==Rr||n.children==="v-if"){if(e)return;e=n}}else return}return e}const OT=t=>{let e;for(const r in t)(r==="class"||r==="style"||qs(r))&&((e||(e={}))[r]=t[r]);return e},UT=(t,e)=>{const r={};for(const n in t)(!Td(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function FT(t,e,r){const{props:n,children:i,component:o}=t,{props:a,children:s,patchFlag:l}=e,u=o.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?ev(n,a,u):!!a;if(l&8){const c=e.dynamicProps;for(let f=0;f<c.length;f++){const h=c[f];if(a[h]!==n[h]&&!oc(u,h))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===a?!1:n?a?ev(n,a,u):!0:!!a;return!1}function ev(t,e,r){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let i=0;i<n.length;i++){const o=n[i];if(e[o]!==t[o]&&!oc(r,o))return!0}return!1}function kd({vnode:t,parent:e},r){for(;e&&e.subTree===t;)(t=e.vnode).el=r,e=e.parent}const Hy=t=>t.__isSuspense,LT={name:"Suspense",__isSuspense:!0,process(t,e,r,n,i,o,a,s,l,u){t==null?BT(e,r,n,i,o,a,s,l,u):kT(t,e,r,n,i,a,s,l,u)},hydrate:GT,create:Gd,normalize:DT},MT=LT;function Ns(t,e){const r=t.props&&t.props[e];zt(r)&&r()}function BT(t,e,r,n,i,o,a,s,l){const{p:u,o:{createElement:c}}=l,f=c("div"),h=t.suspense=Gd(t,i,n,e,f,r,o,a,s,l);u(null,h.pendingBranch=t.ssContent,f,null,n,h,o,a),h.deps>0?(Ns(t,"onPending"),Ns(t,"onFallback"),u(null,t.ssFallback,e,r,n,null,o,a),pa(h,t.ssFallback)):h.resolve()}function kT(t,e,r,n,i,o,a,s,{p:l,um:u,o:{createElement:c}}){const f=e.suspense=t.suspense;f.vnode=e,e.el=t.el;const h=e.ssContent,d=e.ssFallback,{activeBranch:p,pendingBranch:v,isInFallback:m,isHydrating:y}=f;if(v)f.pendingBranch=h,Sn(h,v)?(l(v,h,f.hiddenContainer,null,i,f,o,a,s),f.deps<=0?f.resolve():m&&(l(p,d,r,n,i,null,o,a,s),pa(f,d))):(f.pendingId++,y?(f.isHydrating=!1,f.activeBranch=v):u(v,i,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(l(null,h,f.hiddenContainer,null,i,f,o,a,s),f.deps<=0?f.resolve():(l(p,d,r,n,i,null,o,a,s),pa(f,d))):p&&Sn(h,p)?(l(p,h,r,n,i,f,o,a,s),f.resolve(!0)):(l(null,h,f.hiddenContainer,null,i,f,o,a,s),f.deps<=0&&f.resolve()));else if(p&&Sn(h,p))l(p,h,r,n,i,f,o,a,s),pa(f,h);else if(Ns(e,"onPending"),f.pendingBranch=h,f.pendingId++,l(null,h,f.hiddenContainer,null,i,f,o,a,s),f.deps<=0)f.resolve();else{const{timeout:g,pendingId:b}=f;g>0?setTimeout(()=>{f.pendingId===b&&f.fallback(d)},g):g===0&&f.fallback(d)}}function Gd(t,e,r,n,i,o,a,s,l,u,c=!1){const{p:f,m:h,um:d,n:p,o:{parentNode:v,remove:m}}=u,y=Vi(t.props&&t.props.timeout),g={vnode:t,parent:e,parentComponent:r,isSVG:a,container:n,hiddenContainer:i,anchor:o,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:c,isUnmounted:!1,effects:[],resolve(b=!1){const{vnode:T,activeBranch:w,pendingBranch:x,pendingId:R,effects:I,parentComponent:C,container:S}=g;if(g.isHydrating)g.isHydrating=!1;else if(!b){const G=w&&x.transition&&x.transition.mode==="out-in";G&&(w.transition.afterLeave=()=>{R===g.pendingId&&h(x,S,k,0)});let{anchor:k}=g;w&&(k=p(w),d(w,C,g,!0)),G||h(x,S,k,0)}pa(g,x),g.pendingBranch=null,g.isInFallback=!1;let L=g.parent,H=!1;for(;L;){if(L.pendingBranch){L.effects.push(...I),H=!0;break}L=L.parent}H||Bd(I),g.effects=[],Ns(T,"onResolve")},fallback(b){if(!g.pendingBranch)return;const{vnode:T,activeBranch:w,parentComponent:x,container:R,isSVG:I}=g;Ns(T,"onFallback");const C=p(w),S=()=>{!g.isInFallback||(f(null,b,R,C,x,null,I,s,l),pa(g,b))},L=b.transition&&b.transition.mode==="out-in";L&&(w.transition.afterLeave=S),g.isInFallback=!0,d(w,x,null,!0),L||S()},move(b,T,w){g.activeBranch&&h(g.activeBranch,b,T,w),g.container=b},next(){return g.activeBranch&&p(g.activeBranch)},registerDep(b,T){const w=!!g.pendingBranch;w&&g.deps++;const x=b.vnode.el;b.asyncDep.catch(R=>{Bo(R,b,0)}).then(R=>{if(b.isUnmounted||g.isUnmounted||g.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:I}=b;eh(b,R,!1),x&&(I.el=x);const C=!x&&b.subTree.el;T(b,I,v(x||b.subTree.el),x?null:p(b.subTree),g,a,l),C&&m(C),kd(b,I.el),w&&--g.deps===0&&g.resolve()})},unmount(b,T){g.isUnmounted=!0,g.activeBranch&&d(g.activeBranch,r,b,T),g.pendingBranch&&d(g.pendingBranch,r,b,T)}};return g}function GT(t,e,r,n,i,o,a,s,l){const u=e.suspense=Gd(e,n,r,t.parentNode,document.createElement("div"),null,i,o,a,s,!0),c=l(t,u.pendingBranch=e.ssContent,r,u,o,a);return u.deps===0&&u.resolve(),c}function DT(t){const{shapeFlag:e,children:r}=t,n=e&32;t.ssContent=rv(n?r.default:r),t.ssFallback=n?rv(r.fallback):P(Rr)}function rv(t){let e;if(zt(t)){const r=Ao&&t._c;r&&(t._d=!1,B()),t=t(),r&&(t._d=!0,e=Br,mb())}return Ct(t)&&(t=AT(t)),t=$r(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(r=>r!==t)),t}function Vy(t,e){e&&e.pendingBranch?Ct(t)?e.effects.push(...t):e.effects.push(t):Bd(t)}function pa(t,e){t.activeBranch=e;const{vnode:r,parentComponent:n}=t,i=r.el=e.el;n&&n.subTree===r&&(n.vnode.el=i,kd(n,i))}function _o(t,e){if(dr){let r=dr.provides;const n=dr.parent&&dr.parent.provides;n===r&&(r=dr.provides=Object.create(n)),r[t]=e}}function en(t,e,r=!1){const n=dr||Ir;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return r&&zt(e)?e.call(n.proxy):e}}function Xe(t,e){return el(t,null,e)}function $y(t,e){return el(t,null,{flush:"post"})}function HT(t,e){return el(t,null,{flush:"sync"})}const nv={};function ze(t,e,r){return el(t,e,r)}function el(t,e,{immediate:r,deep:n,flush:i,onTrack:o,onTrigger:a}=Ee){const s=dr;let l,u=!1,c=!1;if(oe(t)?(l=()=>t.value,u=wu(t)):ki(t)?(l=()=>t,n=!0):Ct(t)?(c=!0,u=t.some(y=>ki(y)||wu(y)),l=()=>t.map(y=>{if(oe(y))return y.value;if(ki(y))return xo(y);if(zt(y))return Bn(y,s,2)})):zt(t)?e?l=()=>Bn(t,s,2):l=()=>{if(!(s&&s.isUnmounted))return f&&f(),Yr(t,s,3,[h])}:l=xn,e&&n){const y=l;l=()=>xo(y())}let f,h=y=>{f=m.onStop=()=>{Bn(y,s,4)}};if(wa)return h=xn,e?r&&Yr(e,s,3,[l(),c?[]:void 0,h]):l(),xn;let d=c?[]:nv;const p=()=>{if(!!m.active)if(e){const y=m.run();(n||u||(c?y.some((g,b)=>ba(g,d[b])):ba(y,d)))&&(f&&f(),Yr(e,s,3,[y,d===nv?void 0:d,h]),d=y)}else m.run()};p.allowRecurse=!!e;let v;i==="sync"?v=p:i==="post"?v=()=>_r(p,s&&s.suspense):v=()=>NT(p);const m=new tl(l,v);return e?r?p():d=m.run():i==="post"?_r(m.run.bind(m),s&&s.suspense):m.run(),()=>{m.stop(),s&&s.scope&&wd(s.scope.effects,m)}}function VT(t,e,r){const n=this.proxy,i=Ke(t)?t.includes(".")?jy(n,t):()=>n[t]:t.bind(n,n);let o;zt(e)?o=e:(o=e.handler,r=e);const a=dr;ji(this);const s=el(i,o.bind(n),r);return a?ji(a):Gi(),s}function jy(t,e){const r=e.split(".");return()=>{let n=t;for(let i=0;i<r.length&&n;i++)n=n[r[i]];return n}}function xo(t,e){if(!rr(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),oe(t))xo(t.value,e);else if(Ct(t))for(let r=0;r<t.length;r++)xo(t[r],e);else if(Fo(t)||ha(t))t.forEach(r=>{xo(r,e)});else if(yy(t))for(const r in t)xo(t[r],e);return t}function Dd(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Wn(()=>{t.isMounted=!0}),il(()=>{t.isUnmounting=!0}),t}const Jr=[Function,Array],$T={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Jr,onEnter:Jr,onAfterEnter:Jr,onEnterCancelled:Jr,onBeforeLeave:Jr,onLeave:Jr,onAfterLeave:Jr,onLeaveCancelled:Jr,onBeforeAppear:Jr,onAppear:Jr,onAfterAppear:Jr,onAppearCancelled:Jr},setup(t,{slots:e}){const r=Yn(),n=Dd();let i;return()=>{const o=e.default&&sc(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){for(const v of o)if(v.type!==Rr){a=v;break}}const s=ue(t),{mode:l}=s;if(n.isLeaving)return Sc(a);const u=iv(a);if(!u)return Sc(a);const c=xa(u,s,n,r);So(u,c);const f=r.subTree,h=f&&iv(f);let d=!1;const{getTransitionKey:p}=u.type;if(p){const v=p();i===void 0?i=v:v!==i&&(i=v,d=!0)}if(h&&h.type!==Rr&&(!Sn(u,h)||d)){const v=xa(h,s,n,r);if(So(h,v),l==="out-in")return n.isLeaving=!0,v.afterLeave=()=>{n.isLeaving=!1,r.update()},Sc(a);l==="in-out"&&u.type!==Rr&&(v.delayLeave=(m,y,g)=>{const b=Xy(n,h);b[String(h.key)]=h,m._leaveCb=()=>{y(),m._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=g})}return a}}},Hd=$T;function Xy(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function xa(t,e,r,n){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:h,onAfterLeave:d,onLeaveCancelled:p,onBeforeAppear:v,onAppear:m,onAfterAppear:y,onAppearCancelled:g}=e,b=String(t.key),T=Xy(r,t),w=(I,C)=>{I&&Yr(I,n,9,C)},x=(I,C)=>{const S=C[1];w(I,C),Ct(I)?I.every(L=>L.length<=1)&&S():I.length<=1&&S()},R={mode:o,persisted:a,beforeEnter(I){let C=s;if(!r.isMounted)if(i)C=v||s;else return;I._leaveCb&&I._leaveCb(!0);const S=T[b];S&&Sn(t,S)&&S.el._leaveCb&&S.el._leaveCb(),w(C,[I])},enter(I){let C=l,S=u,L=c;if(!r.isMounted)if(i)C=m||l,S=y||u,L=g||c;else return;let H=!1;const G=I._enterCb=k=>{H||(H=!0,k?w(L,[I]):w(S,[I]),R.delayedLeave&&R.delayedLeave(),I._enterCb=void 0)};C?x(C,[I,G]):G()},leave(I,C){const S=String(t.key);if(I._enterCb&&I._enterCb(!0),r.isUnmounting)return C();w(f,[I]);let L=!1;const H=I._leaveCb=G=>{L||(L=!0,C(),G?w(p,[I]):w(d,[I]),I._leaveCb=void 0,T[S]===t&&delete T[S])};T[S]=t,h?x(h,[I,H]):H()},clone(I){return xa(I,e,r,n)}};return R}function Sc(t){if(rl(t))return t=Vn(t),t.children=null,t}function iv(t){return rl(t)?t.children?t.children[0]:void 0:t}function So(t,e){t.shapeFlag&6&&t.component?So(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function sc(t,e=!1,r){let n=[],i=0;for(let o=0;o<t.length;o++){let a=t[o];const s=r==null?a.key:String(r)+String(a.key!=null?a.key:o);a.type===Ot?(a.patchFlag&128&&i++,n=n.concat(sc(a.children,e,s))):(e||a.type!==Rr)&&n.push(s!=null?Vn(a,{key:s}):a)}if(i>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function Pt(t){return zt(t)?{setup:t,name:t.name}:t}const Io=t=>!!t.type.__asyncLoader;function jT(t){zt(t)&&(t={loader:t});const{loader:e,loadingComponent:r,errorComponent:n,delay:i=200,timeout:o,suspensible:a=!0,onError:s}=t;let l=null,u,c=0;const f=()=>(c++,l=null,h()),h=()=>{let d;return l||(d=l=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),s)return new Promise((v,m)=>{s(p,()=>v(f()),()=>m(p),c+1)});throw p}).then(p=>d!==l&&l?l:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return Pt({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return u},setup(){const d=dr;if(u)return()=>Ac(u,d);const p=g=>{l=null,Bo(g,d,13,!n)};if(a&&d.suspense||wa)return h().then(g=>()=>Ac(g,d)).catch(g=>(p(g),()=>n?P(n,{error:g}):null));const v=It(!1),m=It(),y=It(!!i);return i&&setTimeout(()=>{y.value=!1},i),o!=null&&setTimeout(()=>{if(!v.value&&!m.value){const g=new Error(`Async component timed out after ${o}ms.`);p(g),m.value=g}},o),h().then(()=>{v.value=!0,d.parent&&rl(d.parent.vnode)&&Md(d.parent.update)}).catch(g=>{p(g),m.value=g}),()=>{if(v.value&&u)return Ac(u,d);if(m.value&&n)return P(n,{error:m.value});if(r&&!y.value)return P(r)}}})}function Ac(t,{vnode:{ref:e,props:r,children:n,shapeFlag:i},parent:o}){const a=P(t,r,n);return a.ref=e,a}const rl=t=>t.type.__isKeepAlive,XT={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const r=Yn(),n=r.ctx;if(!n.renderer)return()=>{const g=e.default&&e.default();return g&&g.length===1?g[0]:g};const i=new Map,o=new Set;let a=null;const s=r.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:f}}}=n,h=f("div");n.activate=(g,b,T,w,x)=>{const R=g.component;u(g,b,T,0,s),l(R.vnode,g,b,T,R,s,w,g.slotScopeIds,x),_r(()=>{R.isDeactivated=!1,R.a&&da(R.a);const I=g.props&&g.props.onVnodeMounted;I&&Lr(I,R.parent,g)},s)},n.deactivate=g=>{const b=g.component;u(g,h,null,1,s),_r(()=>{b.da&&da(b.da);const T=g.props&&g.props.onVnodeUnmounted;T&&Lr(T,b.parent,g),b.isDeactivated=!0},s)};function d(g){Oc(g),c(g,r,s,!0)}function p(g){i.forEach((b,T)=>{const w=Su(b.type);w&&(!g||!g(w))&&v(T)})}function v(g){const b=i.get(g);!a||b.type!==a.type?d(b):a&&Oc(a),i.delete(g),o.delete(g)}ze(()=>[t.include,t.exclude],([g,b])=>{g&&p(T=>ts(g,T)),b&&p(T=>!ts(b,T))},{flush:"post",deep:!0});let m=null;const y=()=>{m!=null&&i.set(m,Uc(r.subTree))};return Wn(y),nl(y),il(()=>{i.forEach(g=>{const{subTree:b,suspense:T}=r,w=Uc(b);if(g.type===w.type){Oc(w);const x=w.component.da;x&&_r(x,T);return}d(g)})}),()=>{if(m=null,!e.default)return null;const g=e.default(),b=g[0];if(g.length>1)return a=null,g;if(!wn(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return a=null,b;let T=Uc(b);const w=T.type,x=Su(Io(T)?T.type.__asyncResolved||{}:w),{include:R,exclude:I,max:C}=t;if(R&&(!x||!ts(R,x))||I&&x&&ts(I,x))return a=T,b;const S=T.key==null?w:T.key,L=i.get(S);return T.el&&(T=Vn(T),b.shapeFlag&128&&(b.ssContent=T)),m=S,L?(T.el=L.el,T.component=L.component,T.transition&&So(T,T.transition),T.shapeFlag|=512,o.delete(S),o.add(S)):(o.add(S),C&&o.size>parseInt(C,10)&&v(o.values().next().value)),T.shapeFlag|=256,a=T,Hy(b.type)?b:T}}},zT=XT;function ts(t,e){return Ct(t)?t.some(r=>ts(r,e)):Ke(t)?t.split(",").includes(e):t.test?t.test(e):!1}function zy(t,e){Yy(t,"a",e)}function Wy(t,e){Yy(t,"da",e)}function Yy(t,e,r=dr){const n=t.__wdc||(t.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(lc(e,n,r),r){let i=r.parent;for(;i&&i.parent;)rl(i.parent.vnode)&&WT(n,e,r,i),i=i.parent}}function WT(t,e,r,n){const i=lc(e,t,n,!0);Aa(()=>{wd(n[e],i)},r)}function Oc(t){let e=t.shapeFlag;e&256&&(e-=256),e&512&&(e-=512),t.shapeFlag=e}function Uc(t){return t.shapeFlag&128?t.ssContent:t}function lc(t,e,r=dr,n=!1){if(r){const i=r[t]||(r[t]=[]),o=e.__weh||(e.__weh=(...a)=>{if(r.isUnmounted)return;Lo(),ji(r);const s=Yr(e,r,t,a);return Gi(),Mo(),s});return n?i.unshift(o):i.push(o),o}}const mi=t=>(e,r=dr)=>(!wa||t==="sp")&&lc(t,e,r),Ky=mi("bm"),Wn=mi("m"),Zy=mi("bu"),nl=mi("u"),il=mi("bum"),Aa=mi("um"),qy=mi("sp"),Jy=mi("rtg"),Qy=mi("rtc");function tb(t,e=dr){lc("ec",t,e)}function Oa(t,e){const r=Ir;if(r===null)return t;const n=cc(r)||r.proxy,i=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[a,s,l,u=Ee]=e[o];zt(a)&&(a={mounted:a,updated:a}),a.deep&&xo(s),i.push({dir:a,instance:n,value:s,oldValue:void 0,arg:l,modifiers:u})}return t}function Nn(t,e,r,n){const i=t.dirs,o=e&&e.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[n];l&&(Lo(),Yr(l,r,8,[t.el,s,t,e]),Mo())}}const Vd="components",YT="directives";function Re(t,e){return $d(Vd,t,!0,e)||t}const eb=Symbol();function Te(t){return Ke(t)?$d(Vd,t,!1)||t:t||eb}function KT(t){return $d(YT,t)}function $d(t,e,r=!0,n=!1){const i=Ir||dr;if(i){const o=i.type;if(t===Vd){const s=Su(o,!1);if(s&&(s===e||s===Kr(e)||s===Qs(Kr(e))))return o}const a=ov(i[t]||o[t],e)||ov(i.appContext[t],e);return!a&&n?o:a}}function ov(t,e){return t&&(t[e]||t[Kr(e)]||t[Qs(Kr(e))])}function Hn(t,e,r,n){let i;const o=r&&r[n];if(Ct(t)||Ke(t)){i=new Array(t.length);for(let a=0,s=t.length;a<s;a++)i[a]=e(t[a],a,void 0,o&&o[a])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,o&&o[a])}else if(rr(t))if(t[Symbol.iterator])i=Array.from(t,(a,s)=>e(a,s,void 0,o&&o[s]));else{const a=Object.keys(t);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=e(t[u],u,s,o&&o[s])}}else i=[];return r&&(r[n]=i),i}function ZT(t,e){for(let r=0;r<e.length;r++){const n=e[r];if(Ct(n))for(let i=0;i<n.length;i++)t[n[i].name]=n[i].fn;else n&&(t[n.name]=n.fn)}return t}function He(t,e,r={},n,i){if(Ir.isCE||Ir.parent&&Io(Ir.parent)&&Ir.parent.isCE)return P("slot",e==="default"?null:{name:e},n&&n());let o=t[e];o&&o._c&&(o._d=!1),B();const a=o&&rb(o(r)),s=Rt(Ot,{key:r.key||`_${e}`},a||(n?n():[]),a&&t._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function rb(t){return t.some(e=>wn(e)?!(e.type===Rr||e.type===Ot&&!rb(e.children)):!0)?t:null}function nb(t){const e={};for(const r in t)e[ss(r)]=t[r];return e}const Yf=t=>t?xb(t)?cc(t)||t.proxy:Yf(t.parent):null,Cu=er(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Yf(t.parent),$root:t=>Yf(t.root),$emit:t=>t.emit,$options:t=>ob(t),$forceUpdate:t=>t.f||(t.f=()=>Md(t.update)),$nextTick:t=>t.n||(t.n=cr.bind(t.proxy)),$watch:t=>VT.bind(t)}),Kf={get({_:t},e){const{ctx:r,setupState:n,data:i,props:o,accessCache:a,type:s,appContext:l}=t;let u;if(e[0]!=="$"){const d=a[e];if(d!==void 0)switch(d){case 1:return n[e];case 2:return i[e];case 4:return r[e];case 3:return o[e]}else{if(n!==Ee&&me(n,e))return a[e]=1,n[e];if(i!==Ee&&me(i,e))return a[e]=2,i[e];if((u=t.propsOptions[0])&&me(u,e))return a[e]=3,o[e];if(r!==Ee&&me(r,e))return a[e]=4,r[e];Zf&&(a[e]=0)}}const c=Cu[e];let f,h;if(c)return e==="$attrs"&&Zr(t,"get",e),c(t);if((f=s.__cssModules)&&(f=f[e]))return f;if(r!==Ee&&me(r,e))return a[e]=4,r[e];if(h=l.config.globalProperties,me(h,e))return h[e]},set({_:t},e,r){const{data:n,setupState:i,ctx:o}=t;return i!==Ee&&me(i,e)?(i[e]=r,!0):n!==Ee&&me(n,e)?(n[e]=r,!0):me(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:i,propsOptions:o}},a){let s;return!!r[a]||t!==Ee&&me(t,a)||e!==Ee&&me(e,a)||(s=o[0])&&me(s,a)||me(n,a)||me(Cu,a)||me(i.config.globalProperties,a)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:me(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}},qT=er({},Kf,{get(t,e){if(e!==Symbol.unscopables)return Kf.get(t,e,t)},has(t,e){return e[0]!=="_"&&!xx(e)}});let Zf=!0;function JT(t){const e=ob(t),r=t.proxy,n=t.ctx;Zf=!1,e.beforeCreate&&av(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:v,deactivated:m,beforeDestroy:y,beforeUnmount:g,destroyed:b,unmounted:T,render:w,renderTracked:x,renderTriggered:R,errorCaptured:I,serverPrefetch:C,expose:S,inheritAttrs:L,components:H,directives:G,filters:k}=e;if(u&&QT(u,n,null,t.appContext.config.unwrapInjectedRef),a)for(const K in a){const ht=a[K];zt(ht)&&(n[K]=ht.bind(r))}if(i){const K=i.call(r,r);rr(K)&&(t.data=zn(K))}if(Zf=!0,o)for(const K in o){const ht=o[K],bt=zt(ht)?ht.bind(r,r):zt(ht.get)?ht.get.bind(r,r):xn,W=!zt(ht)&&zt(ht.set)?ht.set.bind(r):xn,ft=tt({get:bt,set:W});Object.defineProperty(n,K,{enumerable:!0,configurable:!0,get:()=>ft.value,set:gt=>ft.value=gt})}if(s)for(const K in s)ib(s[K],n,r,K);if(l){const K=zt(l)?l.call(r):l;Reflect.ownKeys(K).forEach(ht=>{_o(ht,K[ht])})}c&&av(c,t,"c");function D(K,ht){Ct(ht)?ht.forEach(bt=>K(bt.bind(r))):ht&&K(ht.bind(r))}if(D(Ky,f),D(Wn,h),D(Zy,d),D(nl,p),D(zy,v),D(Wy,m),D(tb,I),D(Qy,x),D(Jy,R),D(il,g),D(Aa,T),D(qy,C),Ct(S))if(S.length){const K=t.exposed||(t.exposed={});S.forEach(ht=>{Object.defineProperty(K,ht,{get:()=>r[ht],set:bt=>r[ht]=bt})})}else t.exposed||(t.exposed={});w&&t.render===xn&&(t.render=w),L!=null&&(t.inheritAttrs=L),H&&(t.components=H),G&&(t.directives=G)}function QT(t,e,r=xn,n=!1){Ct(t)&&(t=qf(t));for(const i in t){const o=t[i];let a;rr(o)?"default"in o?a=en(o.from||i,o.default,!0):a=en(o.from||i):a=en(o),oe(a)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):e[i]=a}}function av(t,e,r){Yr(Ct(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function ib(t,e,r,n){const i=n.includes(".")?jy(r,n):()=>r[n];if(Ke(t)){const o=e[t];zt(o)&&ze(i,o)}else if(zt(t))ze(i,t.bind(r));else if(rr(t))if(Ct(t))t.forEach(o=>ib(o,e,r,n));else{const o=zt(t.handler)?t.handler.bind(r):e[t.handler];zt(o)&&ze(i,o,t)}}function ob(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=t.appContext,s=o.get(e);let l;return s?l=s:!i.length&&!r&&!n?l=e:(l={},i.length&&i.forEach(u=>Ru(l,u,a,!0)),Ru(l,e,a)),o.set(e,l),l}function Ru(t,e,r,n=!1){const{mixins:i,extends:o}=e;o&&Ru(t,o,r,!0),i&&i.forEach(a=>Ru(t,a,r,!0));for(const a in e)if(!(n&&a==="expose")){const s=t2[a]||r&&r[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const t2={data:sv,props:co,emits:co,methods:co,computed:co,beforeCreate:Nr,created:Nr,beforeMount:Nr,mounted:Nr,beforeUpdate:Nr,updated:Nr,beforeDestroy:Nr,beforeUnmount:Nr,destroyed:Nr,unmounted:Nr,activated:Nr,deactivated:Nr,errorCaptured:Nr,serverPrefetch:Nr,components:co,directives:co,watch:r2,provide:sv,inject:e2};function sv(t,e){return e?t?function(){return er(zt(t)?t.call(this,this):t,zt(e)?e.call(this,this):e)}:e:t}function e2(t,e){return co(qf(t),qf(e))}function qf(t){if(Ct(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function Nr(t,e){return t?[...new Set([].concat(t,e))]:e}function co(t,e){return t?er(er(Object.create(null),t),e):e}function r2(t,e){if(!t)return e;if(!e)return t;const r=er(Object.create(null),t);for(const n in e)r[n]=Nr(t[n],e[n]);return r}function n2(t,e,r,n=!1){const i={},o={};Tu(o,uc,1),t.propsDefaults=Object.create(null),ab(t,e,i,o);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);r?t.props=n?i:Sa(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function i2(t,e,r,n){const{props:i,attrs:o,vnode:{patchFlag:a}}=t,s=ue(i),[l]=t.propsOptions;let u=!1;if((n||a>0)&&!(a&16)){if(a&8){const c=t.vnode.dynamicProps;for(let f=0;f<c.length;f++){let h=c[f];if(oc(t.emitsOptions,h))continue;const d=e[h];if(l)if(me(o,h))d!==o[h]&&(o[h]=d,u=!0);else{const p=Kr(h);i[p]=Jf(l,s,p,d,t,!1)}else d!==o[h]&&(o[h]=d,u=!0)}}}else{ab(t,e,i,o)&&(u=!0);let c;for(const f in s)(!e||!me(e,f)&&((c=Mn(f))===f||!me(e,c)))&&(l?r&&(r[f]!==void 0||r[c]!==void 0)&&(i[f]=Jf(l,s,f,void 0,t,!0)):delete i[f]);if(o!==s)for(const f in o)(!e||!me(e,f)&&!0)&&(delete o[f],u=!0)}u&&fi(t,"set","$attrs")}function ab(t,e,r,n){const[i,o]=t.propsOptions;let a=!1,s;if(e)for(let l in e){if(as(l))continue;const u=e[l];let c;i&&me(i,c=Kr(l))?!o||!o.includes(c)?r[c]=u:(s||(s={}))[c]=u:oc(t.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,a=!0)}if(o){const l=ue(r),u=s||Ee;for(let c=0;c<o.length;c++){const f=o[c];r[f]=Jf(i,l,f,u[f],t,!me(u,f))}}return a}function Jf(t,e,r,n,i,o){const a=t[r];if(a!=null){const s=me(a,"default");if(s&&n===void 0){const l=a.default;if(a.type!==Function&&zt(l)){const{propsDefaults:u}=i;r in u?n=u[r]:(ji(i),n=u[r]=l.call(null,e),Gi())}else n=l}a[0]&&(o&&!s?n=!1:a[1]&&(n===""||n===Mn(r))&&(n=!0))}return n}function sb(t,e,r=!1){const n=e.propsCache,i=n.get(t);if(i)return i;const o=t.props,a={},s=[];let l=!1;if(!zt(t)){const c=f=>{l=!0;const[h,d]=sb(f,e,!0);er(a,h),d&&s.push(...d)};!r&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!o&&!l)return n.set(t,fa),fa;if(Ct(o))for(let c=0;c<o.length;c++){const f=Kr(o[c]);lv(f)&&(a[f]=Ee)}else if(o)for(const c in o){const f=Kr(c);if(lv(f)){const h=o[c],d=a[f]=Ct(h)||zt(h)?{type:h}:h;if(d){const p=fv(Boolean,d.type),v=fv(String,d.type);d[0]=p>-1,d[1]=v<0||p<v,(p>-1||me(d,"default"))&&s.push(f)}}}const u=[a,s];return n.set(t,u),u}function lv(t){return t[0]!=="$"}function uv(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:t===null?"null":""}function cv(t,e){return uv(t)===uv(e)}function fv(t,e){return Ct(e)?e.findIndex(r=>cv(r,t)):zt(e)&&cv(e,t)?0:-1}const lb=t=>t[0]==="_"||t==="$stable",jd=t=>Ct(t)?t.map($r):[$r(t)],o2=(t,e,r)=>{if(e._n)return e;const n=Bt((...i)=>jd(e(...i)),r);return n._c=!1,n},ub=(t,e,r)=>{const n=t._ctx;for(const i in t){if(lb(i))continue;const o=t[i];if(zt(o))e[i]=o2(i,o,n);else if(o!=null){const a=jd(o);e[i]=()=>a}}},cb=(t,e)=>{const r=jd(e);t.slots.default=()=>r},a2=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=ue(e),Tu(e,"_",r)):ub(e,t.slots={})}else t.slots={},e&&cb(t,e);Tu(t.slots,uc,1)},s2=(t,e,r)=>{const{vnode:n,slots:i}=t;let o=!0,a=Ee;if(n.shapeFlag&32){const s=e._;s?r&&s===1?o=!1:(er(i,e),!r&&s===1&&delete i._):(o=!e.$stable,ub(e,i)),a=e}else e&&(cb(t,e),a={default:1});if(o)for(const s in i)!lb(s)&&!(s in a)&&delete i[s]};function fb(){return{app:null,config:{isNativeTag:Nx,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let l2=0;function u2(t,e){return function(n,i=null){zt(n)||(n=Object.assign({},n)),i!=null&&!rr(i)&&(i=null);const o=fb(),a=new Set;let s=!1;const l=o.app={_uid:l2++,_component:n,_props:i,_container:null,_context:o,_instance:null,version:Sb,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&zt(u.install)?(a.add(u),u.install(l,...c)):zt(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,f){if(!s){const h=P(n,i);return h.appContext=o,c&&e?e(h,u):t(h,u,f),s=!0,l._container=u,u.__vue_app__=l,cc(h.component)||h.component.proxy}},unmount(){s&&(t(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l}};return l}}function Nu(t,e,r,n,i=!1){if(Ct(t)){t.forEach((h,d)=>Nu(h,e&&(Ct(e)?e[d]:e),r,n,i));return}if(Io(n)&&!i)return;const o=n.shapeFlag&4?cc(n.component)||n.component.proxy:n.el,a=i?null:o,{i:s,r:l}=t,u=e&&e.r,c=s.refs===Ee?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(Ke(u)?(c[u]=null,me(f,u)&&(f[u]=null)):oe(u)&&(u.value=null)),zt(l))Bn(l,s,12,[a,c]);else{const h=Ke(l),d=oe(l);if(h||d){const p=()=>{if(t.f){const v=h?c[l]:l.value;i?Ct(v)&&wd(v,o):Ct(v)?v.includes(o)||v.push(o):h?(c[l]=[o],me(f,l)&&(f[l]=c[l])):(l.value=[o],t.k&&(c[t.k]=l.value))}else h?(c[l]=a,me(f,l)&&(f[l]=a)):d&&(l.value=a,t.k&&(c[t.k]=a))};a?(p.id=-1,_r(p,r)):p()}}}let Ti=!1;const xl=t=>/svg/.test(t.namespaceURI)&&t.tagName!=="foreignObject",Tl=t=>t.nodeType===8;function c2(t){const{mt:e,p:r,o:{patchProp:n,createText:i,nextSibling:o,parentNode:a,remove:s,insert:l,createComment:u}}=t,c=(y,g)=>{if(!g.hasChildNodes()){r(null,y,g),Iu(),g._vnode=y;return}Ti=!1,f(g.firstChild,y,null,null,null),Iu(),g._vnode=y,Ti&&console.error("Hydration completed but contains mismatches.")},f=(y,g,b,T,w,x=!1)=>{const R=Tl(y)&&y.data==="[",I=()=>v(y,g,b,T,w,R),{type:C,ref:S,shapeFlag:L,patchFlag:H}=g,G=y.nodeType;g.el=y,H===-2&&(x=!1,g.dynamicChildren=null);let k=null;switch(C){case Ta:G!==3?g.children===""?(l(g.el=i(""),a(y),y),k=y):k=I():(y.data!==g.children&&(Ti=!0,y.data=g.children),k=o(y));break;case Rr:G!==8||R?k=I():k=o(y);break;case Co:if(G!==1&&G!==3)k=I();else{k=y;const Y=!g.children.length;for(let D=0;D<g.staticCount;D++)Y&&(g.children+=k.nodeType===1?k.outerHTML:k.data),D===g.staticCount-1&&(g.anchor=k),k=o(k);return k}break;case Ot:R?k=p(y,g,b,T,w,x):k=I();break;default:if(L&1)G!==1||g.type.toLowerCase()!==y.tagName.toLowerCase()?k=I():k=h(y,g,b,T,w,x);else if(L&6){g.slotScopeIds=w;const Y=a(y);if(e(g,Y,null,b,T,xl(Y),x),k=R?m(y):o(y),k&&Tl(k)&&k.data==="teleport end"&&(k=o(k)),Io(g)){let D;R?(D=P(Ot),D.anchor=k?k.previousSibling:Y.lastChild):D=y.nodeType===3?dt(""):P("div"),D.el=y,g.component.subTree=D}}else L&64?G!==8?k=I():k=g.type.hydrate(y,g,b,T,w,x,t,d):L&128&&(k=g.type.hydrate(y,g,b,T,xl(a(y)),w,x,t,f))}return S!=null&&Nu(S,null,T,g),k},h=(y,g,b,T,w,x)=>{x=x||!!g.dynamicChildren;const{type:R,props:I,patchFlag:C,shapeFlag:S,dirs:L}=g,H=R==="input"&&L||R==="option";if(H||C!==-1){if(L&&Nn(g,null,b,"created"),I)if(H||!x||C&48)for(const k in I)(H&&k.endsWith("value")||qs(k)&&!as(k))&&n(y,k,null,I[k],!1,void 0,b);else I.onClick&&n(y,"onClick",null,I.onClick,!1,void 0,b);let G;if((G=I&&I.onVnodeBeforeMount)&&Lr(G,b,g),L&&Nn(g,null,b,"beforeMount"),((G=I&&I.onVnodeMounted)||L)&&Vy(()=>{G&&Lr(G,b,g),L&&Nn(g,null,b,"mounted")},T),S&16&&!(I&&(I.innerHTML||I.textContent))){let k=d(y.firstChild,g,y,b,T,w,x);for(;k;){Ti=!0;const Y=k;k=k.nextSibling,s(Y)}}else S&8&&y.textContent!==g.children&&(Ti=!0,y.textContent=g.children)}return y.nextSibling},d=(y,g,b,T,w,x,R)=>{R=R||!!g.dynamicChildren;const I=g.children,C=I.length;for(let S=0;S<C;S++){const L=R?I[S]:I[S]=$r(I[S]);if(y)y=f(y,L,T,w,x,R);else{if(L.type===Ta&&!L.children)continue;Ti=!0,r(null,L,b,null,T,w,xl(b),x)}}return y},p=(y,g,b,T,w,x)=>{const{slotScopeIds:R}=g;R&&(w=w?w.concat(R):R);const I=a(y),C=d(o(y),g,I,b,T,w,x);return C&&Tl(C)&&C.data==="]"?o(g.anchor=C):(Ti=!0,l(g.anchor=u("]"),I,C),C)},v=(y,g,b,T,w,x)=>{if(Ti=!0,g.el=null,x){const C=m(y);for(;;){const S=o(y);if(S&&S!==C)s(S);else break}}const R=o(y),I=a(y);return s(y),r(null,g,I,R,b,T,xl(I),w),R},m=y=>{let g=0;for(;y;)if(y=o(y),y&&Tl(y)&&(y.data==="["&&g++,y.data==="]")){if(g===0)return o(y);g--}return y};return[c,f]}const _r=Vy;function hb(t){return pb(t)}function db(t){return pb(t,c2)}function pb(t,e){const r=Fx();r.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:h,setScopeId:d=xn,cloneNode:p,insertStaticContent:v}=t,m=(N,A,$,j=null,q=null,st=null,mt=!1,at=null,ct=!!A.dynamicChildren)=>{if(N===A)return;N&&!Sn(N,A)&&(j=Gt(N),_t(N,q,st,!0),N=null),A.patchFlag===-2&&(ct=!1,A.dynamicChildren=null);const{type:rt,ref:Et,shapeFlag:xt}=A;switch(rt){case Ta:y(N,A,$,j);break;case Rr:g(N,A,$,j);break;case Co:N==null&&b(A,$,j,mt);break;case Ot:G(N,A,$,j,q,st,mt,at,ct);break;default:xt&1?x(N,A,$,j,q,st,mt,at,ct):xt&6?k(N,A,$,j,q,st,mt,at,ct):(xt&64||xt&128)&&rt.process(N,A,$,j,q,st,mt,at,ct,kt)}Et!=null&&q&&Nu(Et,N&&N.ref,st,A||N,!A)},y=(N,A,$,j)=>{if(N==null)n(A.el=s(A.children),$,j);else{const q=A.el=N.el;A.children!==N.children&&u(q,A.children)}},g=(N,A,$,j)=>{N==null?n(A.el=l(A.children||""),$,j):A.el=N.el},b=(N,A,$,j)=>{[N.el,N.anchor]=v(N.children,A,$,j,N.el,N.anchor)},T=({el:N,anchor:A},$,j)=>{let q;for(;N&&N!==A;)q=h(N),n(N,$,j),N=q;n(A,$,j)},w=({el:N,anchor:A})=>{let $;for(;N&&N!==A;)$=h(N),i(N),N=$;i(A)},x=(N,A,$,j,q,st,mt,at,ct)=>{mt=mt||A.type==="svg",N==null?R(A,$,j,q,st,mt,at,ct):S(N,A,q,st,mt,at,ct)},R=(N,A,$,j,q,st,mt,at)=>{let ct,rt;const{type:Et,props:xt,shapeFlag:St,transition:Dt,patchFlag:ie,dirs:ye}=N;if(N.el&&p!==void 0&&ie===-1)ct=N.el=p(N.el);else{if(ct=N.el=a(N.type,st,xt&&xt.is,xt),St&8?c(ct,N.children):St&16&&C(N.children,ct,null,j,q,st&&Et!=="foreignObject",mt,at),ye&&Nn(N,null,j,"created"),xt){for(const M in xt)M!=="value"&&!as(M)&&o(ct,M,null,xt[M],st,N.children,j,q,ut);"value"in xt&&o(ct,"value",null,xt.value),(rt=xt.onVnodeBeforeMount)&&Lr(rt,j,N)}I(ct,N,N.scopeId,mt,j)}ye&&Nn(N,null,j,"beforeMount");const F=(!q||q&&!q.pendingBranch)&&Dt&&!Dt.persisted;F&&Dt.beforeEnter(ct),n(ct,A,$),((rt=xt&&xt.onVnodeMounted)||F||ye)&&_r(()=>{rt&&Lr(rt,j,N),F&&Dt.enter(ct),ye&&Nn(N,null,j,"mounted")},q)},I=(N,A,$,j,q)=>{if($&&d(N,$),j)for(let st=0;st<j.length;st++)d(N,j[st]);if(q){let st=q.subTree;if(A===st){const mt=q.vnode;I(N,mt,mt.scopeId,mt.slotScopeIds,q.parent)}}},C=(N,A,$,j,q,st,mt,at,ct=0)=>{for(let rt=ct;rt<N.length;rt++){const Et=N[rt]=at?Ni(N[rt]):$r(N[rt]);m(null,Et,A,$,j,q,st,mt,at)}},S=(N,A,$,j,q,st,mt)=>{const at=A.el=N.el;let{patchFlag:ct,dynamicChildren:rt,dirs:Et}=A;ct|=N.patchFlag&16;const xt=N.props||Ee,St=A.props||Ee;let Dt;$&&Ji($,!1),(Dt=St.onVnodeBeforeUpdate)&&Lr(Dt,$,A,N),Et&&Nn(A,N,$,"beforeUpdate"),$&&Ji($,!0);const ie=q&&A.type!=="foreignObject";if(rt?L(N.dynamicChildren,rt,at,$,j,ie,st):mt||bt(N,A,at,null,$,j,ie,st,!1),ct>0){if(ct&16)H(at,A,xt,St,$,j,q);else if(ct&2&&xt.class!==St.class&&o(at,"class",null,St.class,q),ct&4&&o(at,"style",xt.style,St.style,q),ct&8){const ye=A.dynamicProps;for(let F=0;F<ye.length;F++){const M=ye[F],z=xt[M],ot=St[M];(ot!==z||M==="value")&&o(at,M,z,ot,q,N.children,$,j,ut)}}ct&1&&N.children!==A.children&&c(at,A.children)}else!mt&&rt==null&&H(at,A,xt,St,$,j,q);((Dt=St.onVnodeUpdated)||Et)&&_r(()=>{Dt&&Lr(Dt,$,A,N),Et&&Nn(A,N,$,"updated")},j)},L=(N,A,$,j,q,st,mt)=>{for(let at=0;at<A.length;at++){const ct=N[at],rt=A[at],Et=ct.el&&(ct.type===Ot||!Sn(ct,rt)||ct.shapeFlag&70)?f(ct.el):$;m(ct,rt,Et,null,j,q,st,mt,!0)}},H=(N,A,$,j,q,st,mt)=>{if($!==j){for(const at in j){if(as(at))continue;const ct=j[at],rt=$[at];ct!==rt&&at!=="value"&&o(N,at,rt,ct,mt,A.children,q,st,ut)}if($!==Ee)for(const at in $)!as(at)&&!(at in j)&&o(N,at,$[at],null,mt,A.children,q,st,ut);"value"in j&&o(N,"value",$.value,j.value)}},G=(N,A,$,j,q,st,mt,at,ct)=>{const rt=A.el=N?N.el:s(""),Et=A.anchor=N?N.anchor:s("");let{patchFlag:xt,dynamicChildren:St,slotScopeIds:Dt}=A;Dt&&(at=at?at.concat(Dt):Dt),N==null?(n(rt,$,j),n(Et,$,j),C(A.children,$,Et,q,st,mt,at,ct)):xt>0&&xt&64&&St&&N.dynamicChildren?(L(N.dynamicChildren,St,$,q,st,mt,at),(A.key!=null||q&&A===q.subTree)&&Xd(N,A,!0)):bt(N,A,$,Et,q,st,mt,at,ct)},k=(N,A,$,j,q,st,mt,at,ct)=>{A.slotScopeIds=at,N==null?A.shapeFlag&512?q.ctx.activate(A,$,j,mt,ct):Y(A,$,j,q,st,mt,ct):D(N,A,ct)},Y=(N,A,$,j,q,st,mt)=>{const at=N.component=_b(N,j,q);if(rl(N)&&(at.ctx.renderer=kt),Tb(at),at.asyncDep){if(q&&q.registerDep(at,K),!N.el){const ct=at.subTree=P(Rr);g(null,ct,A,$)}return}K(at,N,A,$,q,st,mt)},D=(N,A,$)=>{const j=A.component=N.component;if(FT(N,A,$))if(j.asyncDep&&!j.asyncResolved){ht(j,A,$);return}else j.next=A,RT(j.update),j.update();else A.el=N.el,j.vnode=A},K=(N,A,$,j,q,st,mt)=>{const at=()=>{if(N.isMounted){let{next:Et,bu:xt,u:St,parent:Dt,vnode:ie}=N,ye=Et,F;Ji(N,!1),Et?(Et.el=ie.el,ht(N,Et,mt)):Et=ie,xt&&da(xt),(F=Et.props&&Et.props.onVnodeBeforeUpdate)&&Lr(F,Dt,Et,ie),Ji(N,!0);const M=lu(N),z=N.subTree;N.subTree=M,m(z,M,f(z.el),Gt(z),N,q,st),Et.el=M.el,ye===null&&kd(N,M.el),St&&_r(St,q),(F=Et.props&&Et.props.onVnodeUpdated)&&_r(()=>Lr(F,Dt,Et,ie),q)}else{let Et;const{el:xt,props:St}=A,{bm:Dt,m:ie,parent:ye}=N,F=Io(A);if(Ji(N,!1),Dt&&da(Dt),!F&&(Et=St&&St.onVnodeBeforeMount)&&Lr(Et,ye,A),Ji(N,!0),xt&&Xt){const M=()=>{N.subTree=lu(N),Xt(xt,N.subTree,N,q,null)};F?A.type.__asyncLoader().then(()=>!N.isUnmounted&&M()):M()}else{const M=N.subTree=lu(N);m(null,M,$,j,N,q,st),A.el=M.el}if(ie&&_r(ie,q),!F&&(Et=St&&St.onVnodeMounted)){const M=A;_r(()=>Lr(Et,ye,M),q)}(A.shapeFlag&256||ye&&Io(ye.vnode)&&ye.vnode.shapeFlag&256)&&N.a&&_r(N.a,q),N.isMounted=!0,A=$=j=null}},ct=N.effect=new tl(at,()=>Md(rt),N.scope),rt=N.update=()=>ct.run();rt.id=N.uid,Ji(N,!0),rt()},ht=(N,A,$)=>{A.component=N;const j=N.vnode.props;N.vnode=A,N.next=null,i2(N,A.props,j,$),s2(N,A.children,$),Lo(),ic(void 0,N.update),Mo()},bt=(N,A,$,j,q,st,mt,at,ct=!1)=>{const rt=N&&N.children,Et=N?N.shapeFlag:0,xt=A.children,{patchFlag:St,shapeFlag:Dt}=A;if(St>0){if(St&128){ft(rt,xt,$,j,q,st,mt,at,ct);return}else if(St&256){W(rt,xt,$,j,q,st,mt,at,ct);return}}Dt&8?(Et&16&&ut(rt,q,st),xt!==rt&&c($,xt)):Et&16?Dt&16?ft(rt,xt,$,j,q,st,mt,at,ct):ut(rt,q,st,!0):(Et&8&&c($,""),Dt&16&&C(xt,$,j,q,st,mt,at,ct))},W=(N,A,$,j,q,st,mt,at,ct)=>{N=N||fa,A=A||fa;const rt=N.length,Et=A.length,xt=Math.min(rt,Et);let St;for(St=0;St<xt;St++){const Dt=A[St]=ct?Ni(A[St]):$r(A[St]);m(N[St],Dt,$,null,q,st,mt,at,ct)}rt>Et?ut(N,q,st,!0,!1,xt):C(A,$,j,q,st,mt,at,ct,xt)},ft=(N,A,$,j,q,st,mt,at,ct)=>{let rt=0;const Et=A.length;let xt=N.length-1,St=Et-1;for(;rt<=xt&&rt<=St;){const Dt=N[rt],ie=A[rt]=ct?Ni(A[rt]):$r(A[rt]);if(Sn(Dt,ie))m(Dt,ie,$,null,q,st,mt,at,ct);else break;rt++}for(;rt<=xt&&rt<=St;){const Dt=N[xt],ie=A[St]=ct?Ni(A[St]):$r(A[St]);if(Sn(Dt,ie))m(Dt,ie,$,null,q,st,mt,at,ct);else break;xt--,St--}if(rt>xt){if(rt<=St){const Dt=St+1,ie=Dt<Et?A[Dt].el:j;for(;rt<=St;)m(null,A[rt]=ct?Ni(A[rt]):$r(A[rt]),$,ie,q,st,mt,at,ct),rt++}}else if(rt>St)for(;rt<=xt;)_t(N[rt],q,st,!0),rt++;else{const Dt=rt,ie=rt,ye=new Map;for(rt=ie;rt<=St;rt++){const Yt=A[rt]=ct?Ni(A[rt]):$r(A[rt]);Yt.key!=null&&ye.set(Yt.key,rt)}let F,M=0;const z=St-ie+1;let ot=!1,Tt=0;const Lt=new Array(z);for(rt=0;rt<z;rt++)Lt[rt]=0;for(rt=Dt;rt<=xt;rt++){const Yt=N[rt];if(M>=z){_t(Yt,q,st,!0);continue}let xe;if(Yt.key!=null)xe=ye.get(Yt.key);else for(F=ie;F<=St;F++)if(Lt[F-ie]===0&&Sn(Yt,A[F])){xe=F;break}xe===void 0?_t(Yt,q,st,!0):(Lt[xe-ie]=rt+1,xe>=Tt?Tt=xe:ot=!0,m(Yt,A[xe],$,null,q,st,mt,at,ct),M++)}const Kt=ot?f2(Lt):fa;for(F=Kt.length-1,rt=z-1;rt>=0;rt--){const Yt=ie+rt,xe=A[Yt],$t=Yt+1<Et?A[Yt+1].el:j;Lt[rt]===0?m(null,xe,$,$t,q,st,mt,at,ct):ot&&(F<0||rt!==Kt[F]?gt(xe,$,$t,2):F--)}}},gt=(N,A,$,j,q=null)=>{const{el:st,type:mt,transition:at,children:ct,shapeFlag:rt}=N;if(rt&6){gt(N.component.subTree,A,$,j);return}if(rt&128){N.suspense.move(A,$,j);return}if(rt&64){mt.move(N,A,$,kt);return}if(mt===Ot){n(st,A,$);for(let xt=0;xt<ct.length;xt++)gt(ct[xt],A,$,j);n(N.anchor,A,$);return}if(mt===Co){T(N,A,$);return}if(j!==2&&rt&1&&at)if(j===0)at.beforeEnter(st),n(st,A,$),_r(()=>at.enter(st),q);else{const{leave:xt,delayLeave:St,afterLeave:Dt}=at,ie=()=>n(st,A,$),ye=()=>{xt(st,()=>{ie(),Dt&&Dt()})};St?St(st,ie,ye):ye()}else n(st,A,$)},_t=(N,A,$,j=!1,q=!1)=>{const{type:st,props:mt,ref:at,children:ct,dynamicChildren:rt,shapeFlag:Et,patchFlag:xt,dirs:St}=N;if(at!=null&&Nu(at,null,$,N,!0),Et&256){A.ctx.deactivate(N);return}const Dt=Et&1&&St,ie=!Io(N);let ye;if(ie&&(ye=mt&&mt.onVnodeBeforeUnmount)&&Lr(ye,A,N),Et&6)lt(N.component,$,j);else{if(Et&128){N.suspense.unmount($,j);return}Dt&&Nn(N,null,A,"beforeUnmount"),Et&64?N.type.remove(N,A,$,q,kt,j):rt&&(st!==Ot||xt>0&&xt&64)?ut(rt,A,$,!1,!0):(st===Ot&&xt&384||!q&&Et&16)&&ut(ct,A,$),j&&V(N)}(ie&&(ye=mt&&mt.onVnodeUnmounted)||Dt)&&_r(()=>{ye&&Lr(ye,A,N),Dt&&Nn(N,null,A,"unmounted")},$)},V=N=>{const{type:A,el:$,anchor:j,transition:q}=N;if(A===Ot){Z($,j);return}if(A===Co){w(N);return}const st=()=>{i($),q&&!q.persisted&&q.afterLeave&&q.afterLeave()};if(N.shapeFlag&1&&q&&!q.persisted){const{leave:mt,delayLeave:at}=q,ct=()=>mt($,st);at?at(N.el,st,ct):ct()}else st()},Z=(N,A)=>{let $;for(;N!==A;)$=h(N),i(N),N=$;i(A)},lt=(N,A,$)=>{const{bum:j,scope:q,update:st,subTree:mt,um:at}=N;j&&da(j),q.stop(),st&&(st.active=!1,_t(mt,N,A,$)),at&&_r(at,A),_r(()=>{N.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},ut=(N,A,$,j=!1,q=!1,st=0)=>{for(let mt=st;mt<N.length;mt++)_t(N[mt],A,$,j,q)},Gt=N=>N.shapeFlag&6?Gt(N.component.subTree):N.shapeFlag&128?N.suspense.next():h(N.anchor||N.el),it=(N,A,$)=>{N==null?A._vnode&&_t(A._vnode,null,null,!0):m(A._vnode||null,N,A,null,null,null,$),Iu(),A._vnode=N},kt={p:m,um:_t,m:gt,r:V,mt:Y,mc:C,pc:bt,pbc:L,n:Gt,o:t};let Vt,Xt;return e&&([Vt,Xt]=e(kt)),{render:it,hydrate:Vt,createApp:u2(it,Vt)}}function Ji({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function Xd(t,e,r=!1){const n=t.children,i=e.children;if(Ct(n)&&Ct(i))for(let o=0;o<n.length;o++){const a=n[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Ni(i[o]),s.el=a.el),r||Xd(a,s))}}function f2(t){const e=t.slice(),r=[0];let n,i,o,a,s;const l=t.length;for(n=0;n<l;n++){const u=t[n];if(u!==0){if(i=r[r.length-1],t[i]<u){e[n]=i,r.push(n);continue}for(o=0,a=r.length-1;o<a;)s=o+a>>1,t[r[s]]<u?o=s+1:a=s;u<t[r[o]]&&(o>0&&(e[n]=r[o-1]),r[o]=n)}}for(o=r.length,a=r[o-1];o-- >0;)r[o]=a,a=e[a];return r}const h2=t=>t.__isTeleport,fs=t=>t&&(t.disabled||t.disabled===""),hv=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,Qf=(t,e)=>{const r=t&&t.to;return Ke(r)?e?e(r):null:r},d2={__isTeleport:!0,process(t,e,r,n,i,o,a,s,l,u){const{mc:c,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:v,createComment:m}}=u,y=fs(e.props);let{shapeFlag:g,children:b,dynamicChildren:T}=e;if(t==null){const w=e.el=v(""),x=e.anchor=v("");d(w,r,n),d(x,r,n);const R=e.target=Qf(e.props,p),I=e.targetAnchor=v("");R&&(d(I,R),a=a||hv(R));const C=(S,L)=>{g&16&&c(b,S,L,i,o,a,s,l)};y?C(r,x):R&&C(R,I)}else{e.el=t.el;const w=e.anchor=t.anchor,x=e.target=t.target,R=e.targetAnchor=t.targetAnchor,I=fs(t.props),C=I?r:x,S=I?w:R;if(a=a||hv(x),T?(h(t.dynamicChildren,T,C,i,o,a,s),Xd(t,e,!0)):l||f(t,e,C,S,i,o,a,s,!1),y)I||wl(e,r,w,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const L=e.target=Qf(e.props,p);L&&wl(e,L,null,u,0)}else I&&wl(e,x,R,u,1)}},remove(t,e,r,n,{um:i,o:{remove:o}},a){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:f,props:h}=t;if(f&&o(c),(a||!fs(h))&&(o(u),s&16))for(let d=0;d<l.length;d++){const p=l[d];i(p,e,r,!0,!!p.dynamicChildren)}},move:wl,hydrate:p2};function wl(t,e,r,{o:{insert:n},m:i},o=2){o===0&&n(t.targetAnchor,e,r);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=t,f=o===2;if(f&&n(a,e,r),(!f||fs(c))&&l&16)for(let h=0;h<u.length;h++)i(u[h],e,r,2);f&&n(s,e,r)}function p2(t,e,r,n,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l}},u){const c=e.target=Qf(e.props,l);if(c){const f=c._lpa||c.firstChild;if(e.shapeFlag&16)if(fs(e.props))e.anchor=u(a(t),e,s(t),r,n,i,o),e.targetAnchor=f;else{e.anchor=a(t);let h=f;for(;h;)if(h=a(h),h&&h.nodeType===8&&h.data==="teleport anchor"){e.targetAnchor=h,c._lpa=e.targetAnchor&&a(e.targetAnchor);break}u(f,e,c,r,n,i,o)}}return e.anchor&&a(e.anchor)}const vb=d2,Ot=Symbol(void 0),Ta=Symbol(void 0),Rr=Symbol(void 0),Co=Symbol(void 0),hs=[];let Br=null;function B(t=!1){hs.push(Br=t?null:[])}function mb(){hs.pop(),Br=hs[hs.length-1]||null}let Ao=1;function th(t){Ao+=t}function gb(t){return t.dynamicChildren=Ao>0?Br||fa:null,mb(),Ao>0&&Br&&Br.push(t),t}function Q(t,e,r,n,i,o){return gb(U(t,e,r,n,i,o,!0))}function Rt(t,e,r,n,i){return gb(P(t,e,r,n,i,!0))}function wn(t){return t?t.__v_isVNode===!0:!1}function Sn(t,e){return t.type===e.type&&t.key===e.key}function v2(t){}const uc="__vInternal",yb=({key:t})=>t!=null?t:null,uu=({ref:t,ref_key:e,ref_for:r})=>t!=null?Ke(t)||oe(t)||zt(t)?{i:Ir,r:t,k:e,f:!!r}:t:null;function U(t,e=null,r=null,n=0,i=null,o=t===Ot?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&yb(e),ref:e&&uu(e),scopeId:ac,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null};return s?(zd(l,r),o&128&&t.normalize(l)):r&&(l.shapeFlag|=Ke(r)?8:16),Ao>0&&!a&&Br&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Br.push(l),l}const P=m2;function m2(t,e=null,r=null,n=0,i=null,o=!1){if((!t||t===eb)&&(t=Rr),wn(t)){const s=Vn(t,e,!0);return r&&zd(s,r),Ao>0&&!o&&Br&&(s.shapeFlag&6?Br[Br.indexOf(t)]=s:Br.push(s)),s.patchFlag|=-2,s}if(C2(t)&&(t=t.__vccOpts),e){e=bb(e);let{class:s,style:l}=e;s&&!Ke(s)&&(e.class=Qt(s)),rr(l)&&(Sd(l)&&!Ct(l)&&(l=er({},l)),e.style=ce(l))}const a=Ke(t)?1:Hy(t)?128:h2(t)?64:rr(t)?4:zt(t)?2:0;return U(t,e,r,n,i,a,o,!0)}function bb(t){return t?Sd(t)||uc in t?er({},t):t:null}function Vn(t,e,r=!1){const{props:n,ref:i,patchFlag:o,children:a}=t,s=e?yr(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:s,key:s&&yb(s),ref:e&&e.ref?r&&i?Ct(i)?i.concat(uu(e)):[i,uu(e)]:uu(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ot?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Vn(t.ssContent),ssFallback:t.ssFallback&&Vn(t.ssFallback),el:t.el,anchor:t.anchor}}function dt(t=" ",e=0){return P(Ta,null,t,e)}function g2(t,e){const r=P(Co,null,t);return r.staticCount=e,r}function yt(t="",e=!1){return e?(B(),Rt(Rr,null,t)):P(Rr,null,t)}function $r(t){return t==null||typeof t=="boolean"?P(Rr):Ct(t)?P(Ot,null,t.slice()):typeof t=="object"?Ni(t):P(Ta,null,String(t))}function Ni(t){return t.el===null||t.memo?t:Vn(t)}function zd(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Ct(e))r=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),zd(t,i()),i._c&&(i._d=!0));return}else{r=32;const i=e._;!i&&!(uc in e)?e._ctx=Ir:i===3&&Ir&&(Ir.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else zt(e)?(e={default:e,_ctx:Ir},r=32):(e=String(e),n&64?(r=16,e=[dt(e)]):r=8);t.children=e,t.shapeFlag|=r}function yr(...t){const e={};for(let r=0;r<t.length;r++){const n=t[r];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=Qt([e.class,n.class]));else if(i==="style")e.style=ce([e.style,n.style]);else if(qs(i)){const o=e[i],a=n[i];a&&o!==a&&!(Ct(o)&&o.includes(a))&&(e[i]=o?[].concat(o,a):a)}else i!==""&&(e[i]=n[i])}return e}function Lr(t,e,r,n=null){Yr(t,e,7,[r,n])}const y2=fb();let b2=0;function _b(t,e,r){const n=t.type,i=(e?e.appContext:t.appContext)||y2,o={uid:b2++,vnode:t,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Cd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:sb(n,i),emitsOptions:Dy(n,i),emit:null,emitted:null,propsDefaults:Ee,inheritAttrs:n.inheritAttrs,ctx:Ee,data:Ee,props:Ee,attrs:Ee,slots:Ee,refs:Ee,setupState:Ee,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=PT.bind(null,o),t.ce&&t.ce(o),o}let dr=null;const Yn=()=>dr||Ir,ji=t=>{dr=t,t.scope.on()},Gi=()=>{dr&&dr.scope.off(),dr=null};function xb(t){return t.vnode.shapeFlag&4}let wa=!1;function Tb(t,e=!1){wa=e;const{props:r,children:n}=t.vnode,i=xb(t);n2(t,r,i,e),a2(t,n);const o=i?_2(t,e):void 0;return wa=!1,o}function _2(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=Ad(new Proxy(t.ctx,Kf));const{setup:n}=r;if(n){const i=t.setupContext=n.length>1?Eb(t):null;ji(t),Lo();const o=Bn(n,t,0,[t.props,i]);if(Mo(),Gi(),Ed(o)){if(o.then(Gi,Gi),e)return o.then(a=>{eh(t,a,e)}).catch(a=>{Bo(a,t,0)});t.asyncDep=o}else eh(t,o,e)}else wb(t,e)}function eh(t,e,r){zt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:rr(e)&&(t.setupState=Fd(e)),wb(t,r)}let Pu,rh;function x2(t){Pu=t,rh=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,qT))}}const T2=()=>!Pu;function wb(t,e,r){const n=t.type;if(!t.render){if(!e&&Pu&&!n.render){const i=n.template;if(i){const{isCustomElement:o,compilerOptions:a}=t.appContext.config,{delimiters:s,compilerOptions:l}=n,u=er(er({isCustomElement:o,delimiters:s},a),l);n.render=Pu(i,u)}}t.render=n.render||xn,rh&&rh(t)}ji(t),Lo(),JT(t),Mo(),Gi()}function w2(t){return new Proxy(t.attrs,{get(e,r){return Zr(t,"get","$attrs"),e[r]}})}function Eb(t){const e=n=>{t.exposed=n||{}};let r;return{get attrs(){return r||(r=w2(t))},slots:t.slots,emit:t.emit,expose:e}}function cc(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Fd(Ad(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in Cu)return Cu[r](t)}}))}const E2=/(?:^|[-_])(\w)/g,I2=t=>t.replace(E2,e=>e.toUpperCase()).replace(/[-_]/g,"");function Su(t,e=!0){return zt(t)?t.displayName||t.name:t.name||e&&t.__name}function Ib(t,e,r=!1){let n=Su(e);if(!n&&e.__file){const i=e.__file.match(/([^/\\]+)\.\w+$/);i&&(n=i[1])}if(!n&&t&&t.parent){const i=o=>{for(const a in o)if(o[a]===e)return a};n=i(t.components||t.parent.type.components)||i(t.appContext.components)}return n?I2(n):r?"App":"Anonymous"}function C2(t){return zt(t)&&"__vccOpts"in t}const tt=(t,e)=>_T(t,e,wa);function R2(){return null}function N2(){return null}function P2(t){}function S2(t,e){return null}function A2(){return Cb().slots}function O2(){return Cb().attrs}function Cb(){const t=Yn();return t.setupContext||(t.setupContext=Eb(t))}function U2(t,e){const r=Ct(t)?t.reduce((n,i)=>(n[i]={},n),{}):t;for(const n in e){const i=r[n];i?Ct(i)||zt(i)?r[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(r[n]={default:e[n]})}return r}function F2(t,e){const r={};for(const n in t)e.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>t[n]});return r}function L2(t){const e=Yn();let r=t();return Gi(),Ed(r)&&(r=r.catch(n=>{throw ji(e),n})),[r,()=>ji(e)]}function Rb(t,e,r){const n=arguments.length;return n===2?rr(e)&&!Ct(e)?wn(e)?P(t,null,[e]):P(t,e):P(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&wn(r)&&(r=[r]),P(t,e,r))}const Nb=Symbol(""),M2=()=>{{const t=en(Nb);return t||Uy("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),t}};function B2(){}function k2(t,e,r,n){const i=r[n];if(i&&Pb(i,t))return i;const o=e();return o.memo=t.slice(),r[n]=o}function Pb(t,e){const r=t.memo;if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(ba(r[n],e[n]))return!1;return Ao>0&&Br&&Br.push(t),!0}const Sb="3.2.37",G2={createComponentInstance:_b,setupComponent:Tb,renderComponentRoot:lu,setCurrentRenderingInstance:Rs,isVNode:wn,normalizeVNode:$r},D2=G2,H2=null,V2=null,$2="http://www.w3.org/2000/svg",go=typeof document!="undefined"?document:null,dv=go&&go.createElement("template"),j2={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e?go.createElementNS($2,t):go.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>go.createTextNode(t),createComment:t=>go.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>go.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},cloneNode(t){const e=t.cloneNode(!0);return"_value"in t&&(e._value=t._value),e},insertStaticContent(t,e,r,n,i,o){const a=r?r.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===o||!(i=i.nextSibling)););else{dv.innerHTML=n?`<svg>${t}</svg>`:t;const s=dv.content;if(n){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function X2(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function z2(t,e,r){const n=t.style,i=Ke(r);if(r&&!i){for(const o in r)nh(n,o,r[o]);if(e&&!Ke(e))for(const o in e)r[o]==null&&nh(n,o,"")}else{const o=n.display;i?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=o)}}const pv=/\s*!important$/;function nh(t,e,r){if(Ct(r))r.forEach(n=>nh(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=W2(t,e);pv.test(r)?t.setProperty(Mn(n),r.replace(pv,""),"important"):t[n]=r}}const vv=["Webkit","Moz","ms"],Fc={};function W2(t,e){const r=Fc[e];if(r)return r;let n=Kr(e);if(n!=="filter"&&n in t)return Fc[e]=n;n=Qs(n);for(let i=0;i<vv.length;i++){const o=vv[i]+n;if(o in t)return Fc[e]=o}return e}const mv="http://www.w3.org/1999/xlink";function Y2(t,e,r,n,i){if(n&&e.startsWith("xlink:"))r==null?t.removeAttributeNS(mv,e.slice(6,e.length)):t.setAttributeNS(mv,e,r);else{const o=wx(e);r==null||o&&!py(r)?t.removeAttribute(e):t.setAttribute(e,o?"":r)}}function K2(t,e,r,n,i,o,a){if(e==="innerHTML"||e==="textContent"){n&&a(n,i,o),t[e]=r==null?"":r;return}if(e==="value"&&t.tagName!=="PROGRESS"&&!t.tagName.includes("-")){t._value=r;const l=r==null?"":r;(t.value!==l||t.tagName==="OPTION")&&(t.value=l),r==null&&t.removeAttribute(e);return}let s=!1;if(r===""||r==null){const l=typeof t[e];l==="boolean"?r=py(r):r==null&&l==="string"?(r="",s=!0):l==="number"&&(r=0,s=!0)}try{t[e]=r}catch{}s&&t.removeAttribute(e)}const[Ab,Z2]=(()=>{let t=Date.now,e=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(t=performance.now.bind(performance));const r=navigator.userAgent.match(/firefox\/(\d+)/i);e=!!(r&&Number(r[1])<=53)}return[t,e]})();let ih=0;const q2=Promise.resolve(),J2=()=>{ih=0},Q2=()=>ih||(q2.then(J2),ih=Ab());function ri(t,e,r,n){t.addEventListener(e,r,n)}function tw(t,e,r,n){t.removeEventListener(e,r,n)}function ew(t,e,r,n,i=null){const o=t._vei||(t._vei={}),a=o[e];if(n&&a)a.value=n;else{const[s,l]=rw(e);if(n){const u=o[e]=nw(n,i);ri(t,s,u,l)}else a&&(tw(t,s,a,l),o[e]=void 0)}}const gv=/(?:Once|Passive|Capture)$/;function rw(t){let e;if(gv.test(t)){e={};let r;for(;r=t.match(gv);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[Mn(t.slice(2)),e]}function nw(t,e){const r=n=>{const i=n.timeStamp||Ab();(Z2||i>=r.attached-1)&&Yr(iw(n,r.value),e,5,[n])};return r.value=t,r.attached=Q2(),r}function iw(t,e){if(Ct(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const yv=/^on[a-z]/,ow=(t,e,r,n,i=!1,o,a,s,l)=>{e==="class"?X2(t,n,i):e==="style"?z2(t,r,n):qs(e)?Td(e)||ew(t,e,r,n,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):aw(t,e,n,i))?K2(t,e,n,o,a,s,l):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Y2(t,e,n,i))};function aw(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&yv.test(e)&&zt(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||yv.test(e)&&Ke(r)?!1:e in t}function Ob(t,e){const r=Pt(t);class n extends fc{constructor(o){super(r,o,e)}}return n.def=r,n}const sw=t=>Ob(t,Wb),lw=typeof HTMLElement!="undefined"?HTMLElement:class{};class fc extends lw{constructor(e,r={},n){super(),this._def=e,this._props=r,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,cr(()=>{this._connected||(ah(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver(n=>{for(const i of n)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const e=n=>{const{props:i,styles:o}=n,a=!Ct(i),s=i?a?Object.keys(i):i:[];let l;if(a)for(const u in this._props){const c=i[u];(c===Number||c&&c.type===Number)&&(this._props[u]=Vi(this._props[u]),(l||(l=Object.create(null)))[u]=!0)}this._numberProps=l;for(const u of Object.keys(this))u[0]!=="_"&&this._setProp(u,this[u],!0,!1);for(const u of s.map(Kr))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(c){this._setProp(u,c)}});this._applyStyles(o),this._update()},r=this._def.__asyncLoader;r?r().then(e):e(this._def)}_setAttr(e){let r=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(r=Vi(r)),this._setProp(Kr(e),r,!1)}_getProp(e){return this._props[e]}_setProp(e,r,n=!0,i=!0){r!==this._props[e]&&(this._props[e]=r,i&&this._instance&&this._update(),n&&(r===!0?this.setAttribute(Mn(e),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Mn(e),r+""):r||this.removeAttribute(Mn(e))))}_update(){ah(this._createVNode(),this.shadowRoot)}_createVNode(){const e=P(this._def,er({},this._props));return this._instance||(e.ce=r=>{this._instance=r,r.isCE=!0,r.emit=(i,...o)=>{this.dispatchEvent(new CustomEvent(i,{detail:o}))};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof fc){r.parent=n._instance;break}}),e}_applyStyles(e){e&&e.forEach(r=>{const n=document.createElement("style");n.textContent=r,this.shadowRoot.appendChild(n)})}}function uw(t="$style"){{const e=Yn();if(!e)return Ee;const r=e.type.__cssModules;if(!r)return Ee;const n=r[t];return n||Ee}}function cw(t){const e=Yn();if(!e)return;const r=()=>oh(e.subTree,t(e.proxy));$y(r),Wn(()=>{const n=new MutationObserver(r);n.observe(e.subTree.el.parentNode,{childList:!0}),Aa(()=>n.disconnect())})}function oh(t,e){if(t.shapeFlag&128){const r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{oh(r.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)bv(t.el,e);else if(t.type===Ot)t.children.forEach(r=>oh(r,e));else if(t.type===Co){let{el:r,anchor:n}=t;for(;r&&(bv(r,e),r!==n);)r=r.nextSibling}}function bv(t,e){if(t.nodeType===1){const r=t.style;for(const n in e)r.setProperty(`--${n}`,e[n])}}const wi="transition",Ba="animation",Yi=(t,{slots:e})=>Rb(Hd,Fb(t),e);Yi.displayName="Transition";const Ub={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},fw=Yi.props=er({},Hd.props,Ub),Qi=(t,e=[])=>{Ct(t)?t.forEach(r=>r(...e)):t&&t(...e)},_v=t=>t?Ct(t)?t.some(e=>e.length>1):t.length>1:!1;function Fb(t){const e={};for(const H in t)H in Ub||(e[H]=t[H]);if(t.css===!1)return e;const{name:r="v",type:n,duration:i,enterFromClass:o=`${r}-enter-from`,enterActiveClass:a=`${r}-enter-active`,enterToClass:s=`${r}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:h=`${r}-leave-active`,leaveToClass:d=`${r}-leave-to`}=t,p=hw(i),v=p&&p[0],m=p&&p[1],{onBeforeEnter:y,onEnter:g,onEnterCancelled:b,onLeave:T,onLeaveCancelled:w,onBeforeAppear:x=y,onAppear:R=g,onAppearCancelled:I=b}=e,C=(H,G,k)=>{Ri(H,G?c:s),Ri(H,G?u:a),k&&k()},S=(H,G)=>{H._isLeaving=!1,Ri(H,f),Ri(H,d),Ri(H,h),G&&G()},L=H=>(G,k)=>{const Y=H?R:g,D=()=>C(G,H,k);Qi(Y,[G,D]),xv(()=>{Ri(G,H?l:o),Qn(G,H?c:s),_v(Y)||Tv(G,n,v,D)})};return er(e,{onBeforeEnter(H){Qi(y,[H]),Qn(H,o),Qn(H,a)},onBeforeAppear(H){Qi(x,[H]),Qn(H,l),Qn(H,u)},onEnter:L(!1),onAppear:L(!0),onLeave(H,G){H._isLeaving=!0;const k=()=>S(H,G);Qn(H,f),Mb(),Qn(H,h),xv(()=>{!H._isLeaving||(Ri(H,f),Qn(H,d),_v(T)||Tv(H,n,m,k))}),Qi(T,[H,k])},onEnterCancelled(H){C(H,!1),Qi(b,[H])},onAppearCancelled(H){C(H,!0),Qi(I,[H])},onLeaveCancelled(H){S(H),Qi(w,[H])}})}function hw(t){if(t==null)return null;if(rr(t))return[Lc(t.enter),Lc(t.leave)];{const e=Lc(t);return[e,e]}}function Lc(t){return Vi(t)}function Qn(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t._vtc||(t._vtc=new Set)).add(e)}function Ri(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function xv(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let dw=0;function Tv(t,e,r,n){const i=t._endId=++dw,o=()=>{i===t._endId&&n()};if(r)return setTimeout(o,r);const{type:a,timeout:s,propCount:l}=Lb(t,e);if(!a)return n();const u=a+"end";let c=0;const f=()=>{t.removeEventListener(u,h),o()},h=d=>{d.target===t&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},s+1),t.addEventListener(u,h)}function Lb(t,e){const r=window.getComputedStyle(t),n=p=>(r[p]||"").split(", "),i=n(wi+"Delay"),o=n(wi+"Duration"),a=wv(i,o),s=n(Ba+"Delay"),l=n(Ba+"Duration"),u=wv(s,l);let c=null,f=0,h=0;e===wi?a>0&&(c=wi,f=a,h=o.length):e===Ba?u>0&&(c=Ba,f=u,h=l.length):(f=Math.max(a,u),c=f>0?a>u?wi:Ba:null,h=c?c===wi?o.length:l.length:0);const d=c===wi&&/\b(transform|all)(,|$)/.test(r[wi+"Property"]);return{type:c,timeout:f,propCount:h,hasTransform:d}}function wv(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((r,n)=>Ev(r)+Ev(t[n])))}function Ev(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Mb(){return document.body.offsetHeight}const Bb=new WeakMap,kb=new WeakMap,pw={name:"TransitionGroup",props:er({},fw,{tag:String,moveClass:String}),setup(t,{slots:e}){const r=Yn(),n=Dd();let i,o;return nl(()=>{if(!i.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!yw(i[0].el,r.vnode.el,a))return;i.forEach(vw),i.forEach(mw);const s=i.filter(gw);Mb(),s.forEach(l=>{const u=l.el,c=u.style;Qn(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const f=u._moveCb=h=>{h&&h.target!==u||(!h||/transform$/.test(h.propertyName))&&(u.removeEventListener("transitionend",f),u._moveCb=null,Ri(u,a))};u.addEventListener("transitionend",f)})}),()=>{const a=ue(t),s=Fb(a);let l=a.tag||Ot;i=o,o=e.default?sc(e.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&So(c,xa(c,s,n,r))}if(i)for(let u=0;u<i.length;u++){const c=i[u];So(c,xa(c,s,n,r)),Bb.set(c,c.el.getBoundingClientRect())}return P(l,null,o)}}},Gb=pw;function vw(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function mw(t){kb.set(t,t.el.getBoundingClientRect())}function gw(t){const e=Bb.get(t),r=kb.get(t),n=e.left-r.left,i=e.top-r.top;if(n||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${n}px,${i}px)`,o.transitionDuration="0s",t}}function yw(t,e,r){const n=t.cloneNode();t._vtc&&t._vtc.forEach(a=>{a.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(n);const{hasTransform:o}=Lb(n);return i.removeChild(n),o}const Xi=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ct(e)?r=>da(e,r):e};function bw(t){t.target.composing=!0}function Iv(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ea={created(t,{modifiers:{lazy:e,trim:r,number:n}},i){t._assign=Xi(i);const o=n||i.props&&i.props.type==="number";ri(t,e?"change":"input",a=>{if(a.target.composing)return;let s=t.value;r&&(s=s.trim()),o&&(s=Vi(s)),t._assign(s)}),r&&ri(t,"change",()=>{t.value=t.value.trim()}),e||(ri(t,"compositionstart",bw),ri(t,"compositionend",Iv),ri(t,"change",Iv))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:n,number:i}},o){if(t._assign=Xi(o),t.composing||document.activeElement===t&&t.type!=="range"&&(r||n&&t.value.trim()===e||(i||t.type==="number")&&Vi(t.value)===e))return;const a=e==null?"":e;t.value!==a&&(t.value=a)}},hc={deep:!0,created(t,e,r){t._assign=Xi(r),ri(t,"change",()=>{const n=t._modelValue,i=Ia(t),o=t.checked,a=t._assign;if(Ct(n)){const s=qu(n,i),l=s!==-1;if(o&&!l)a(n.concat(i));else if(!o&&l){const u=[...n];u.splice(s,1),a(u)}}else if(Fo(n)){const s=new Set(n);o?s.add(i):s.delete(i),a(s)}else a(Hb(t,o))})},mounted:Cv,beforeUpdate(t,e,r){t._assign=Xi(r),Cv(t,e,r)}};function Cv(t,{value:e,oldValue:r},n){t._modelValue=e,Ct(e)?t.checked=qu(e,n.props.value)>-1:Fo(e)?t.checked=e.has(n.props.value):e!==r&&(t.checked=Hi(e,Hb(t,!0)))}const Wd={created(t,{value:e},r){t.checked=Hi(e,r.props.value),t._assign=Xi(r),ri(t,"change",()=>{t._assign(Ia(t))})},beforeUpdate(t,{value:e,oldValue:r},n){t._assign=Xi(n),e!==r&&(t.checked=Hi(e,n.props.value))}},Db={deep:!0,created(t,{value:e,modifiers:{number:r}},n){const i=Fo(e);ri(t,"change",()=>{const o=Array.prototype.filter.call(t.options,a=>a.selected).map(a=>r?Vi(Ia(a)):Ia(a));t._assign(t.multiple?i?new Set(o):o:o[0])}),t._assign=Xi(n)},mounted(t,{value:e}){Rv(t,e)},beforeUpdate(t,e,r){t._assign=Xi(r)},updated(t,{value:e}){Rv(t,e)}};function Rv(t,e){const r=t.multiple;if(!(r&&!Ct(e)&&!Fo(e))){for(let n=0,i=t.options.length;n<i;n++){const o=t.options[n],a=Ia(o);if(r)Ct(e)?o.selected=qu(e,a)>-1:o.selected=e.has(a);else if(Hi(Ia(o),e)){t.selectedIndex!==n&&(t.selectedIndex=n);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Ia(t){return"_value"in t?t._value:t.value}function Hb(t,e){const r=e?"_trueValue":"_falseValue";return r in t?t[r]:e}const Vb={created(t,e,r){El(t,e,r,null,"created")},mounted(t,e,r){El(t,e,r,null,"mounted")},beforeUpdate(t,e,r,n){El(t,e,r,n,"beforeUpdate")},updated(t,e,r,n){El(t,e,r,n,"updated")}};function $b(t,e){switch(t){case"SELECT":return Db;case"TEXTAREA":return Ea;default:switch(e){case"checkbox":return hc;case"radio":return Wd;default:return Ea}}}function El(t,e,r,n,i){const a=$b(t.tagName,r.props&&r.props.type)[i];a&&a(t,e,r,n)}function _w(){Ea.getSSRProps=({value:t})=>({value:t}),Wd.getSSRProps=({value:t},e)=>{if(e.props&&Hi(e.props.value,t))return{checked:!0}},hc.getSSRProps=({value:t},e)=>{if(Ct(t)){if(e.props&&qu(t,e.props.value)>-1)return{checked:!0}}else if(Fo(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},Vb.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const r=$b(e.type.toUpperCase(),e.props&&e.props.type);if(r.getSSRProps)return r.getSSRProps(t,e)}}const xw=["ctrl","shift","alt","meta"],Tw={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>xw.some(r=>t[`${r}Key`]&&!e.includes(r))},mr=(t,e)=>(r,...n)=>{for(let i=0;i<e.length;i++){const o=Tw[e[i]];if(o&&o(r,e))return}return t(r,...n)},ww={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},yo=(t,e)=>r=>{if(!("key"in r))return;const n=Mn(r.key);if(e.some(i=>i===n||ww[i]===n))return t(r)},dc={beforeMount(t,{value:e},{transition:r}){t._vod=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):ka(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),ka(t,!0),n.enter(t)):n.leave(t,()=>{ka(t,!1)}):ka(t,e))},beforeUnmount(t,{value:e}){ka(t,e)}};function ka(t,e){t.style.display=e?t._vod:"none"}function Ew(){dc.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const jb=er({patchProp:ow},j2);let ds,Nv=!1;function Xb(){return ds||(ds=hb(jb))}function zb(){return ds=Nv?ds:db(jb),Nv=!0,ds}const ah=(...t)=>{Xb().render(...t)},Wb=(...t)=>{zb().hydrate(...t)},Yd=(...t)=>{const e=Xb().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=Yb(n);if(!i)return;const o=e._component;!zt(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=r(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e},Iw=(...t)=>{const e=zb().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=Yb(n);if(i)return r(i,!0,i instanceof SVGElement)},e};function Yb(t){return Ke(t)?document.querySelector(t):t}let Pv=!1;const Cw=()=>{Pv||(Pv=!0,_w(),Ew())},Rw=()=>{};var Nw=Object.freeze(Object.defineProperty({__proto__:null,compile:Rw,EffectScope:Cd,ReactiveEffect:tl,customRef:gT,effect:Dx,effectScope:Lx,getCurrentScope:Mx,isProxy:Sd,isReactive:ki,isReadonly:_a,isRef:oe,isShallow:wu,markRaw:Ad,onScopeDispose:Bx,proxyRefs:Fd,reactive:zn,readonly:Pd,ref:It,shallowReactive:Sa,shallowReadonly:hT,shallowRef:Gr,stop:Hx,toRaw:ue,toRef:Mr,toRefs:Ae,triggerRef:pT,unref:E,camelize:Kr,capitalize:Qs,normalizeClass:Qt,normalizeProps:vy,normalizeStyle:ce,toDisplayString:re,toHandlerKey:ss,BaseTransition:Hd,Comment:Rr,Fragment:Ot,KeepAlive:zT,Static:Co,Suspense:MT,Teleport:vb,Text:Ta,callWithAsyncErrorHandling:Yr,callWithErrorHandling:Bn,cloneVNode:Vn,compatUtils:V2,computed:tt,createBlock:Rt,createCommentVNode:yt,createElementBlock:Q,createElementVNode:U,createHydrationRenderer:db,createPropsRestProxy:F2,createRenderer:hb,createSlots:ZT,createStaticVNode:g2,createTextVNode:dt,createVNode:P,defineAsyncComponent:jT,defineComponent:Pt,defineEmits:N2,defineExpose:P2,defineProps:R2,get devtools(){return Jo},getCurrentInstance:Yn,getTransitionRawChildren:sc,guardReactiveProps:bb,h:Rb,handleError:Bo,initCustomFormatter:B2,inject:en,isMemoSame:Pb,isRuntimeOnly:T2,isVNode:wn,mergeDefaults:U2,mergeProps:yr,nextTick:cr,onActivated:zy,onBeforeMount:Ky,onBeforeUnmount:il,onBeforeUpdate:Zy,onDeactivated:Wy,onErrorCaptured:tb,onMounted:Wn,onRenderTracked:Qy,onRenderTriggered:Jy,onServerPrefetch:qy,onUnmounted:Aa,onUpdated:nl,openBlock:B,popScopeId:Rn,provide:_o,pushScopeId:Cn,queuePostFlushCb:Bd,registerRuntimeCompiler:x2,renderList:Hn,renderSlot:He,resolveComponent:Re,resolveDirective:KT,resolveDynamicComponent:Te,resolveFilter:H2,resolveTransitionHooks:xa,setBlockTracking:th,setDevtoolsHook:Gy,setTransitionHooks:So,ssrContextKey:Nb,ssrUtils:D2,toHandlers:nb,transformVNodeArgs:v2,useAttrs:O2,useSSRContext:M2,useSlots:A2,useTransitionState:Dd,version:Sb,warn:Uy,watch:ze,watchEffect:Xe,watchPostEffect:$y,watchSyncEffect:HT,withAsyncContext:L2,withCtx:Bt,withDefaults:S2,withDirectives:Oa,withMemo:k2,withScopeId:ST,Transition:Yi,TransitionGroup:Gb,VueElement:fc,createApp:Yd,createSSRApp:Iw,defineCustomElement:Ob,defineSSRCustomElement:sw,hydrate:Wb,initDirectivesForSSR:Cw,render:ah,useCssModule:uw,useCssVars:cw,vModelCheckbox:hc,vModelDynamic:Vb,vModelRadio:Wd,vModelSelect:Db,vModelText:Ea,vShow:dc,withKeys:yo,withModifiers:mr},Symbol.toStringTag,{value:"Module"}));const Pw="Profectus Demo",Sw="A demo project made in Profectus",Aw="profectus-demo",Ow="",Uw="",Fw="",Lw="0.0",Mw="Initial Commit",Bw=!0,kw=!1,Gw=2,Dw=!0,Hw=null,Vw="Logo.png",$w=["main","c"],jw=3600,Xw=1,zw=!0,Ww="base64";var Ie={title:Pw,description:Sw,id:Aw,author:Ow,discordName:Uw,discordLink:Fw,versionNumber:Lw,versionTitle:Mw,allowGoBack:Bw,defaultShowSmall:kw,defaultDecimalsShown:Gw,useHeader:Dw,banner:Hw,logo:Vw,initialTabs:$w,maxTickLength:jw,offlineLimit:Xw,enablePausing:zw,exportEncoding:Ww};const Mc=17,Yw=9e15,Kw=Math.log10(9e15),Zw=1/9e15,qw=308,Jw=-324,Sv=5,Qw=function(){const t=[];for(let r=Jw+1;r<=qw;r++)t.push(Number("1e"+r));const e=323;return function(r){return t[r+e]}}(),to=[2,Math.E,3,4,5,6,7,8,9,10],tE=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],eE=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],X=function(e){return O.fromValue_noAlloc(e)},qt=function(t,e,r){return O.fromComponents(t,e,r)},he=function(e,r,n){return O.fromComponents_noNormalize(e,r,n)},Ei=function(e,r){const n=r+1,i=Math.ceil(Math.log10(Math.abs(e))),o=Math.round(e*Math.pow(10,n-i))*Math.pow(10,i-n);return parseFloat(o.toFixed(Math.max(n-i,0)))},Bc=function(t){return Math.sign(t)*Math.log10(Math.abs(t))},rE=function(t){if(!isFinite(t))return t;if(t<-50)return t===Math.trunc(t)?Number.NEGATIVE_INFINITY:0;let e=1;for(;t<10;)e=e*t,++t;t-=1;let r=.9189385332046727;r=r+(t+.5)*Math.log(t),r=r-t;const n=t*t;let i=t;return r=r+1/(12*i),i=i*n,r=r+1/(360*i),i=i*n,r=r+1/(1260*i),i=i*n,r=r+1/(1680*i),i=i*n,r=r+1/(1188*i),i=i*n,r=r+691/(360360*i),i=i*n,r=r+7/(1092*i),i=i*n,r=r+3617/(122400*i),Math.exp(r)/e},Kb=.5671432904097838,Av=function(t,e=1e-10){let r,n;if(!Number.isFinite(t)||t===0)return t;if(t===1)return Kb;t<10?r=0:r=Math.log(t)-Math.log(Math.log(t));for(let i=0;i<100;++i){if(n=(t*Math.exp(-r)+r*r)/(r+1),Math.abs(n-r)<e*Math.abs(n))return n;r=n}throw Error(`Iteration failed to converge: ${t.toString()}`)};function Ov(t,e=1e-10){let r,n,i,o;if(!Number.isFinite(t.mag)||t===O.dZero)return t;if(t===O.dOne)return X(Kb);O.abs(t),r=O.ln(t);for(let a=0;a<100;++a){if(n=O.exp(-r),i=r.sub(t.mul(n)),o=r.sub(i.div(r.add(1).sub(r.add(2).mul(i).div(O.mul(2,r).add(2))))),O.abs(o.sub(r)).lt(O.abs(o).mul(e)))return o;r=o}throw Error(`Iteration failed to converge: ${t.toString()}`)}const et=class{constructor(t){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,t instanceof et||t!=null&&typeof t=="object"&&"sign"in t&&"mag"in t&&"layer"in t?this.fromDecimal(t):typeof t=="number"?this.fromNumber(t):typeof t=="string"?this.fromString(t):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(this.sign===0)return 0;if(this.layer===0){const t=Math.floor(Math.log10(this.mag));let e;return this.mag===5e-324?e=5:e=this.mag/Qw(t),this.sign*e}else if(this.layer===1){const t=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,t)}else return this.sign}set m(t){this.layer<=2?this.fromMantissaExponent(t,this.e):(this.sign=Math.sign(t),this.sign===0&&(this.layer,this.exponent))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(t){this.fromMantissaExponent(this.m,t)}get s(){return this.sign}set s(t){t===0?(this.sign=0,this.layer=0,this.mag=0):this.sign=t}get mantissa(){return this.m}set mantissa(t){this.m=t}get exponent(){return this.e}set exponent(t){this.e=t}static fromComponents(t,e,r){return new et().fromComponents(t,e,r)}static fromComponents_noNormalize(t,e,r){return new et().fromComponents_noNormalize(t,e,r)}static fromMantissaExponent(t,e){return new et().fromMantissaExponent(t,e)}static fromMantissaExponent_noNormalize(t,e){return new et().fromMantissaExponent_noNormalize(t,e)}static fromDecimal(t){return new et().fromDecimal(t)}static fromNumber(t){return new et().fromNumber(t)}static fromString(t){return new et().fromString(t)}static fromValue(t){return new et().fromValue(t)}static fromValue_noAlloc(t){return t instanceof et?t:new et(t)}static abs(t){return X(t).abs()}static neg(t){return X(t).neg()}static negate(t){return X(t).neg()}static negated(t){return X(t).neg()}static sign(t){return X(t).sign}static sgn(t){return X(t).sign}static round(t){return X(t).round()}static floor(t){return X(t).floor()}static ceil(t){return X(t).ceil()}static trunc(t){return X(t).trunc()}static add(t,e){return X(t).add(e)}static plus(t,e){return X(t).add(e)}static sub(t,e){return X(t).sub(e)}static subtract(t,e){return X(t).sub(e)}static minus(t,e){return X(t).sub(e)}static mul(t,e){return X(t).mul(e)}static multiply(t,e){return X(t).mul(e)}static times(t,e){return X(t).mul(e)}static div(t,e){return X(t).div(e)}static divide(t,e){return X(t).div(e)}static recip(t){return X(t).recip()}static reciprocal(t){return X(t).recip()}static reciprocate(t){return X(t).reciprocate()}static cmp(t,e){return X(t).cmp(e)}static cmpabs(t,e){return X(t).cmpabs(e)}static compare(t,e){return X(t).cmp(e)}static isNaN(t){return t=X(t),isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)}static isFinite(t){return t=X(t),isFinite(t.sign)&&isFinite(t.layer)&&isFinite(t.mag)}static eq(t,e){return X(t).eq(e)}static equals(t,e){return X(t).eq(e)}static neq(t,e){return X(t).neq(e)}static notEquals(t,e){return X(t).notEquals(e)}static lt(t,e){return X(t).lt(e)}static lte(t,e){return X(t).lte(e)}static gt(t,e){return X(t).gt(e)}static gte(t,e){return X(t).gte(e)}static max(t,e){return X(t).max(e)}static min(t,e){return X(t).min(e)}static minabs(t,e){return X(t).minabs(e)}static maxabs(t,e){return X(t).maxabs(e)}static clamp(t,e,r){return X(t).clamp(e,r)}static clampMin(t,e){return X(t).clampMin(e)}static clampMax(t,e){return X(t).clampMax(e)}static cmp_tolerance(t,e,r){return X(t).cmp_tolerance(e,r)}static compare_tolerance(t,e,r){return X(t).cmp_tolerance(e,r)}static eq_tolerance(t,e,r){return X(t).eq_tolerance(e,r)}static equals_tolerance(t,e,r){return X(t).eq_tolerance(e,r)}static neq_tolerance(t,e,r){return X(t).neq_tolerance(e,r)}static notEquals_tolerance(t,e,r){return X(t).notEquals_tolerance(e,r)}static lt_tolerance(t,e,r){return X(t).lt_tolerance(e,r)}static lte_tolerance(t,e,r){return X(t).lte_tolerance(e,r)}static gt_tolerance(t,e,r){return X(t).gt_tolerance(e,r)}static gte_tolerance(t,e,r){return X(t).gte_tolerance(e,r)}static pLog10(t){return X(t).pLog10()}static absLog10(t){return X(t).absLog10()}static log10(t){return X(t).log10()}static log(t,e){return X(t).log(e)}static log2(t){return X(t).log2()}static ln(t){return X(t).ln()}static logarithm(t,e){return X(t).logarithm(e)}static pow(t,e){return X(t).pow(e)}static pow10(t){return X(t).pow10()}static root(t,e){return X(t).root(e)}static factorial(t,e){return X(t).factorial()}static gamma(t,e){return X(t).gamma()}static lngamma(t,e){return X(t).lngamma()}static exp(t){return X(t).exp()}static sqr(t){return X(t).sqr()}static sqrt(t){return X(t).sqrt()}static cube(t){return X(t).cube()}static cbrt(t){return X(t).cbrt()}static tetrate(t,e=2,r=he(1,0,1)){return X(t).tetrate(e,r)}static iteratedexp(t,e=2,r=he(1,0,1)){return X(t).iteratedexp(e,r)}static iteratedlog(t,e=10,r=1){return X(t).iteratedlog(e,r)}static layeradd10(t,e){return X(t).layeradd10(e)}static layeradd(t,e,r=10){return X(t).layeradd(e,r)}static slog(t,e=10){return X(t).slog(e)}static lambertw(t){return X(t).lambertw()}static ssqrt(t){return X(t).ssqrt()}static pentate(t,e=2,r=he(1,0,1)){return X(t).pentate(e,r)}static affordGeometricSeries(t,e,r,n){return this.affordGeometricSeries_core(X(t),X(e),X(r),n)}static sumGeometricSeries(t,e,r,n){return this.sumGeometricSeries_core(t,X(e),X(r),n)}static affordArithmeticSeries(t,e,r,n){return this.affordArithmeticSeries_core(X(t),X(e),X(r),X(n))}static sumArithmeticSeries(t,e,r,n){return this.sumArithmeticSeries_core(X(t),X(e),X(r),X(n))}static efficiencyOfPurchase(t,e,r){return this.efficiencyOfPurchase_core(X(t),X(e),X(r))}static randomDecimalForTesting(t){if(Math.random()*20<1)return he(0,0,0);const e=Math.random()>.5?1:-1;if(Math.random()*20<1)return he(e,0,1);const r=Math.floor(Math.random()*(t+1));let n=r===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let i=Math.pow(10,n);return Math.random()>.9&&(i=Math.trunc(i)),qt(e,r,i)}static affordGeometricSeries_core(t,e,r,n){const i=e.mul(r.pow(n));return et.floor(t.div(i).mul(r.sub(1)).add(1).log10().div(r.log10()))}static sumGeometricSeries_core(t,e,r,n){return e.mul(r.pow(n)).mul(et.sub(1,r.pow(t))).div(et.sub(1,r))}static affordArithmeticSeries_core(t,e,r,n){const o=e.add(n.mul(r)).sub(r.div(2)),a=o.pow(2);return o.neg().add(a.add(r.mul(t).mul(2)).sqrt()).div(r).floor()}static sumArithmeticSeries_core(t,e,r,n){const i=e.add(n.mul(r));return t.div(2).mul(i.mul(2).plus(t.sub(1).mul(r)))}static efficiencyOfPurchase_core(t,e,r){return t.div(e).add(t.div(r))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag<Zw)return this.layer+=1,this.mag=Math.log10(this.mag),this;let t=Math.abs(this.mag),e=Math.sign(this.mag);if(t>=Yw)return this.layer+=1,this.mag=e*Math.log10(t),this;for(;t<Kw&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=e*Math.pow(10,t),t=Math.abs(this.mag),e=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(t,e,r){return this.sign=t,this.layer=e,this.mag=r,this.normalize(),this}fromComponents_noNormalize(t,e,r){return this.sign=t,this.layer=e,this.mag=r,this}fromMantissaExponent(t,e){return this.layer=1,this.sign=Math.sign(t),t=Math.abs(t),this.mag=e+Math.log10(t),this.normalize(),this}fromMantissaExponent_noNormalize(t,e){return this.fromMantissaExponent(t,e),this}fromDecimal(t){return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}fromNumber(t){return this.mag=Math.abs(t),this.sign=Math.sign(t),this.layer=0,this.normalize(),this}fromString(t){t=t.replace(",","");const e=t.split("^^^");if(e.length===2){const h=parseFloat(e[0]),d=parseFloat(e[1]),p=e[1].split(";");let v=1;if(p.length===2&&(v=parseFloat(p[1]),isFinite(v)||(v=1)),isFinite(h)&&isFinite(d)){const m=et.pentate(h,d,v);return this.sign=m.sign,this.layer=m.layer,this.mag=m.mag,this}}const r=t.split("^^");if(r.length===2){const h=parseFloat(r[0]),d=parseFloat(r[1]),p=r[1].split(";");let v=1;if(p.length===2&&(v=parseFloat(p[1]),isFinite(v)||(v=1)),isFinite(h)&&isFinite(d)){const m=et.tetrate(h,d,v);return this.sign=m.sign,this.layer=m.layer,this.mag=m.mag,this}}const n=t.split("^");if(n.length===2){const h=parseFloat(n[0]),d=parseFloat(n[1]);if(isFinite(h)&&isFinite(d)){const p=et.pow(h,d);return this.sign=p.sign,this.layer=p.layer,this.mag=p.mag,this}}t=t.trim().toLowerCase();let i,o,a=t.split("pt");if(a.length===2){i=10,o=parseFloat(a[0]),a[1]=a[1].replace("(",""),a[1]=a[1].replace(")","");let h=parseFloat(a[1]);if(isFinite(h)||(h=1),isFinite(i)&&isFinite(o)){const d=et.tetrate(i,o,h);return this.sign=d.sign,this.layer=d.layer,this.mag=d.mag,this}}if(a=t.split("p"),a.length===2){i=10,o=parseFloat(a[0]),a[1]=a[1].replace("(",""),a[1]=a[1].replace(")","");let h=parseFloat(a[1]);if(isFinite(h)||(h=1),isFinite(i)&&isFinite(o)){const d=et.tetrate(i,o,h);return this.sign=d.sign,this.layer=d.layer,this.mag=d.mag,this}}const s=t.split("e"),l=s.length-1;if(l===0){const h=parseFloat(t);if(isFinite(h))return this.fromNumber(h)}else if(l===1){const h=parseFloat(t);if(isFinite(h)&&h!==0)return this.fromNumber(h)}const u=t.split("e^");if(u.length===2){this.sign=1,u[0].charAt(0)=="-"&&(this.sign=-1);let h="";for(let d=0;d<u[1].length;++d){const p=u[1].charCodeAt(d);if(p>=43&&p<=57||p===101)h+=u[1].charAt(d);else return this.layer=parseFloat(h),this.mag=parseFloat(u[1].substr(d+1)),this.normalize(),this}}if(l<1)return this.sign=0,this.layer=0,this.mag=0,this;const c=parseFloat(s[0]);if(c===0)return this.sign=0,this.layer=0,this.mag=0,this;let f=parseFloat(s[s.length-1]);if(l>=2){const h=parseFloat(s[s.length-2]);isFinite(h)&&(f*=Math.sign(h),f+=Bc(h))}if(!isFinite(c))this.sign=s[0]==="-"?-1:1,this.layer=l,this.mag=f;else if(l===1)this.sign=Math.sign(c),this.layer=1,this.mag=f+Math.log10(Math.abs(c));else if(this.sign=Math.sign(c),this.layer=l,l===2){const h=et.mul(qt(1,2,f),X(c));return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}else this.mag=f;return this.normalize(),this}fromValue(t){return t instanceof et||t!=null&&typeof t=="object"&&"sign"in t&&"mag"in t&&"layer"in t?this.fromDecimal(t):typeof t=="number"?this.fromNumber(t):typeof t=="string"?this.fromString(t):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(t){return isNaN(this.m)?Number.NaN:this.m===0?0:Ei(this.m,t)}magnitudeWithDecimalPlaces(t){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Ei(this.mag,t)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=Sv?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(t){return this.layer===0?(this.sign*this.mag).toExponential(t):this.toStringWithDecimalPlaces(t)}toFixed(t){return this.layer===0?(this.sign*this.mag).toFixed(t):this.toStringWithDecimalPlaces(t)}toPrecision(t){return this.e<=-7?this.toExponential(t-1):t>this.e?this.toFixed(t-this.exponent-1):this.toExponential(t-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(t){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(t):Ei(this.m,t)+"e"+Ei(this.e,t):this.layer===1?Ei(this.m,t)+"e"+Ei(this.e,t):this.layer<=Sv?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Ei(this.mag,t):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Ei(this.mag,t)}abs(){return he(this.sign===0?0:1,this.layer,this.mag)}neg(){return he(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?et.dZero:this.layer===0?qt(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?et.dZero:this.layer===0?qt(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?et.dZero:this.layer===0?qt(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?et.dZero:this.layer===0?qt(this.sign,0,Math.trunc(this.mag)):this}add(t){const e=X(t);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(e.layer)||this.sign===0)return e;if(e.sign===0)return this;if(this.sign===-e.sign&&this.layer===e.layer&&this.mag===e.mag)return he(0,0,0);let r,n;if(this.layer>=2||e.layer>=2)return this.maxabs(e);if(et.cmpabs(this,e)>0?(r=this,n=e):(r=e,n=this),r.layer===0&&n.layer===0)return X(r.sign*r.mag+n.sign*n.mag);const i=r.layer*Math.sign(r.mag),o=n.layer*Math.sign(n.mag);if(i-o>=2)return r;if(i===0&&o===-1){if(Math.abs(n.mag-Math.log10(r.mag))>Mc)return r;{const a=Math.pow(10,Math.log10(r.mag)-n.mag),s=n.sign+r.sign*a;return qt(Math.sign(s),1,n.mag+Math.log10(Math.abs(s)))}}if(i===1&&o===0){if(Math.abs(r.mag-Math.log10(n.mag))>Mc)return r;{const a=Math.pow(10,r.mag-Math.log10(n.mag)),s=n.sign+r.sign*a;return qt(Math.sign(s),1,Math.log10(n.mag)+Math.log10(Math.abs(s)))}}if(Math.abs(r.mag-n.mag)>Mc)return r;{const a=Math.pow(10,r.mag-n.mag),s=n.sign+r.sign*a;return qt(Math.sign(s),1,n.mag+Math.log10(Math.abs(s)))}}plus(t){return this.add(t)}sub(t){return this.add(X(t).neg())}subtract(t){return this.sub(t)}minus(t){return this.sub(t)}mul(t){const e=X(t);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(e.layer))return e;if(this.sign===0||e.sign===0)return he(0,0,0);if(this.layer===e.layer&&this.mag===-e.mag)return he(this.sign*e.sign,0,1);let r,n;if(this.layer>e.layer||this.layer==e.layer&&Math.abs(this.mag)>Math.abs(e.mag)?(r=this,n=e):(r=e,n=this),r.layer===0&&n.layer===0)return X(r.sign*n.sign*r.mag*n.mag);if(r.layer>=3||r.layer-n.layer>=2)return qt(r.sign*n.sign,r.layer,r.mag);if(r.layer===1&&n.layer===0)return qt(r.sign*n.sign,1,r.mag+Math.log10(n.mag));if(r.layer===1&&n.layer===1)return qt(r.sign*n.sign,1,r.mag+n.mag);if(r.layer===2&&n.layer===1){const i=qt(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)).add(qt(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return qt(r.sign*n.sign,i.layer+1,i.sign*i.mag)}if(r.layer===2&&n.layer===2){const i=qt(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)).add(qt(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return qt(r.sign*n.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+t)}multiply(t){return this.mul(t)}times(t){return this.mul(t)}div(t){const e=X(t);return this.mul(e.recip())}divide(t){return this.div(t)}divideBy(t){return this.div(t)}dividedBy(t){return this.div(t)}recip(){return this.mag===0?et.dNaN:this.layer===0?qt(this.sign,0,1/this.mag):qt(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(t){const e=X(t);return this.sign>e.sign?1:this.sign<e.sign?-1:this.sign*this.cmpabs(t)}cmpabs(t){const e=X(t),r=this.mag>0?this.layer:-this.layer,n=e.mag>0?e.layer:-e.layer;return r>n?1:r<n?-1:this.mag>e.mag?1:this.mag<e.mag?-1:0}compare(t){return this.cmp(t)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(t){const e=X(t);return this.sign===e.sign&&this.layer===e.layer&&this.mag===e.mag}equals(t){return this.eq(t)}neq(t){return!this.eq(t)}notEquals(t){return this.neq(t)}lt(t){return this.cmp(t)===-1}lte(t){return!this.gt(t)}gt(t){return this.cmp(t)===1}gte(t){return!this.lt(t)}max(t){const e=X(t);return this.lt(e)?e:this}min(t){const e=X(t);return this.gt(e)?e:this}maxabs(t){const e=X(t);return this.cmpabs(e)<0?e:this}minabs(t){const e=X(t);return this.cmpabs(e)>0?e:this}clamp(t,e){return this.max(t).min(e)}clampMin(t){return this.max(t)}clampMax(t){return this.min(t)}cmp_tolerance(t,e){const r=X(t);return this.eq_tolerance(r,e)?0:this.cmp(r)}compare_tolerance(t,e){return this.cmp_tolerance(t,e)}eq_tolerance(t,e){const r=X(t);if(e==null&&(e=1e-7),this.sign!==r.sign||Math.abs(this.layer-r.layer)>1)return!1;let n=this.mag,i=r.mag;return this.layer>r.layer&&(i=Bc(i)),this.layer<r.layer&&(n=Bc(n)),Math.abs(n-i)<=e*Math.max(Math.abs(n),Math.abs(i))}equals_tolerance(t,e){return this.eq_tolerance(t,e)}neq_tolerance(t,e){return!this.eq_tolerance(t,e)}notEquals_tolerance(t,e){return this.neq_tolerance(t,e)}lt_tolerance(t,e){const r=X(t);return!this.eq_tolerance(r,e)&&this.lt(r)}lte_tolerance(t,e){const r=X(t);return this.eq_tolerance(r,e)||this.lt(r)}gt_tolerance(t,e){const r=X(t);return!this.eq_tolerance(r,e)&&this.gt(r)}gte_tolerance(t,e){const r=X(t);return this.eq_tolerance(r,e)||this.gt(r)}pLog10(){return this.lt(et.dZero)?et.dZero:this.log10()}absLog10(){return this.sign===0?et.dNaN:this.layer>0?qt(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):qt(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?et.dNaN:this.layer>0?qt(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):qt(this.sign,0,Math.log10(this.mag))}log(t){return t=X(t),this.sign<=0||t.sign<=0||t.sign===1&&t.layer===0&&t.mag===1?et.dNaN:this.layer===0&&t.layer===0?qt(this.sign,0,Math.log(this.mag)/Math.log(t.mag)):et.div(this.log10(),t.log10())}log2(){return this.sign<=0?et.dNaN:this.layer===0?qt(this.sign,0,Math.log2(this.mag)):this.layer===1?qt(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?qt(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):qt(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?et.dNaN:this.layer===0?qt(this.sign,0,Math.log(this.mag)):this.layer===1?qt(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?qt(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):qt(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(t){return this.log(t)}pow(t){const e=X(t),r=this,n=e;if(r.sign===0)return n.eq(0)?he(1,0,1):r;if(r.sign===1&&r.layer===0&&r.mag===1)return r;if(n.sign===0)return he(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return r;const i=r.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?i.neg():Math.abs(n.toNumber()%2)%2===0?i:et.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return et.dNaN;let t=this;if(t.layer===0){const e=Math.pow(10,t.sign*t.mag);if(Number.isFinite(e)&&Math.abs(e)>=.1)return qt(1,0,e);if(t.sign===0)return et.dOne;t=he(t.sign,t.layer+1,Math.log10(t.mag))}return t.sign>0&&t.mag>=0?qt(t.sign,t.layer+1,t.mag):t.sign<0&&t.mag>=0?qt(-t.sign,t.layer+1,-t.mag):et.dOne}pow_base(t){return X(t).pow(this)}root(t){const e=X(t);return this.pow(e.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?et.exp(et.mul(this,et.ln(this).sub(1))):et.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(he(1,0,24)))return X(rE(this.sign*this.mag));const t=this.mag-1;let e=.9189385332046727;e=e+(t+.5)*Math.log(t),e=e-t;const r=t*t;let n=t,i=12*n,o=1/i,a=e+o;if(a===e||(e=a,n=n*r,i=360*n,o=1/i,a=e-o,a===e))return et.exp(e);e=a,n=n*r,i=1260*n;let s=1/i;return e=e+s,n=n*r,i=1680*n,s=1/i,e=e-s,et.exp(e)}else return this.layer===1?et.exp(et.mul(this,et.ln(this).sub(1))):et.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?et.dOne:this.layer===0&&this.mag<=709.7?X(Math.exp(this.sign*this.mag)):this.layer===0?qt(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?qt(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):qt(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return X(Math.sqrt(this.sign*this.mag));if(this.layer===1)return qt(1,2,Math.log10(this.mag)-.3010299956639812);{const t=et.div(he(this.sign,this.layer-1,this.mag),he(1,0,2));return t.layer+=1,t.normalize(),t}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(t=2,e=he(1,0,1)){if(t===1)return et.pow(this,e);if(t===0)return new et(e);if(this.eq(et.dOne))return et.dOne;if(this.eq(-1))return et.pow(this,e);if(t===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return new et(Math.E);const o=et.ln(this).neg();return o.lambertw().div(o)}else return i>1.444667861009766?new et(Number.POSITIVE_INFINITY):et.dNaN}if(this.eq(et.dZero)){let i=Math.abs((t+1)%2);return i>1&&(i=2-i),new et(i)}if(t<0)return et.iteratedlog(e,this,-t);e=X(e);const r=t;t=Math.trunc(t);const n=r-t;if(this.gt(et.dZero)&&this.lte(1.444667861009766)){t=Math.min(1e4,t);for(let i=0;i<t;++i){const o=e;if(e=this.pow(e),o.eq(e))return e}if(n!=0){const i=this.pow(e);return e.mul(1-n).add(i.mul(n))}return e}n!==0&&(e.eq(et.dOne)?this.gt(10)?e=this.pow(n):(e=X(et.tetrate_critical(this.toNumber(),n)),this.lt(2)&&(e=e.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?e=e.layeradd10(n):e=e.layeradd(n,this));for(let i=0;i<t;++i){if(e=this.pow(e),!isFinite(e.layer)||!isFinite(e.mag))return e.normalize();if(e.layer-this.layer>3)return he(e.sign,e.layer+(t-i-1),e.mag);if(i>1e4)return e}return e}iteratedexp(t=2,e=he(1,0,1)){return this.tetrate(t,e)}iteratedlog(t=10,e=1){if(e<0)return et.tetrate(t,-e,this);t=X(t);let r=X(this);const n=e;e=Math.trunc(e);const i=n-e;if(r.layer-t.layer>3){const o=Math.min(e,r.layer-t.layer-3);e-=o,r.layer-=o}for(let o=0;o<e;++o){if(r=r.log(t),!isFinite(r.layer)||!isFinite(r.mag))return r.normalize();if(o>1e4)return r}return i>0&&i<1&&(t.eq(10)?r=r.layeradd10(-i):r=r.layeradd(-i,t)),r}slog(t=10){if(t=X(t),t.lte(et.dZero)||t.eq(et.dOne))return et.dNaN;if(t.lt(et.dOne))return this.eq(et.dOne)?et.dZero:this.eq(et.dZero)?et.dNegOne:et.dNaN;if(this.mag<0||this.eq(et.dZero))return et.dNegOne;let e=0,r=X(this);if(r.layer-t.layer>3){const n=r.layer-t.layer-3;e+=n,r.layer-=n}for(let n=0;n<100;++n)if(r.lt(et.dZero))r=et.pow(t,r),e-=1;else{if(r.lte(et.dOne))return X(e+et.slog_critical(t.toNumber(),r.toNumber()));e+=1,r=et.log(r,t)}return X(e)}static slog_critical(t,e){return t>10?e-1:et.critical_section(t,e,eE)}static tetrate_critical(t,e){return et.critical_section(t,e,tE)}static critical_section(t,e,r){e*=10,e<0&&(e=0),e>10&&(e=10),t<2&&(t=2),t>10&&(t=10);let n=0,i=0;for(let s=0;s<to.length;++s)if(to[s]==t){n=r[s][Math.floor(e)],i=r[s][Math.ceil(e)];break}else if(to[s]<t&&to[s+1]>t){const l=(t-to[s])/(to[s+1]-to[s]);n=r[s][Math.floor(e)]*(1-l)+r[s+1][Math.floor(e)]*l,i=r[s][Math.ceil(e)]*(1-l)+r[s+1][Math.ceil(e)]*l;break}const o=e-Math.floor(e);return n*(1-o)+i*o}layeradd10(t){t=et.fromValue_noAlloc(t).toNumber();const e=X(this);if(t>=1){e.mag<0&&e.layer>0?(e.sign=0,e.mag=0,e.layer=0):e.sign===-1&&e.layer==0&&(e.sign=1,e.mag=-e.mag);const r=Math.trunc(t);t-=r,e.layer+=r}if(t<=-1){const r=Math.trunc(t);if(t-=r,e.layer+=r,e.layer<0)for(let n=0;n<100;++n){if(e.layer++,e.mag=Math.log10(e.mag),!isFinite(e.mag))return e.sign===0&&(e.sign=1),e.layer<0&&(e.layer=0),e.normalize();if(e.layer>=0)break}}for(;e.layer<0;)e.layer++,e.mag=Math.log10(e.mag);return e.sign===0&&(e.sign=1,e.mag===0&&e.layer>=1&&(e.layer-=1,e.mag=1)),e.normalize(),t!==0?e.layeradd(t,10):e}layeradd(t,e){const n=this.slog(e).toNumber()+t;return n>=0?et.tetrate(e,n):Number.isFinite(n)?n>=-1?et.log(et.tetrate(e,n+1),e):et.log(et.log(et.tetrate(e,n+2),e),e):et.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return X(Av(this.toNumber()));if(this.layer===0)return X(Av(this.sign*this.mag));if(this.layer===1)return Ov(this);if(this.layer===2)return Ov(this);if(this.layer>=3)return he(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return he(this.sign,this.layer-1,this.mag);const t=this.ln();return t.div(t.lambertw())}pentate(t=2,e=he(1,0,1)){e=X(e);const r=t;t=Math.trunc(t);const n=r-t;n!==0&&(e.eq(et.dOne)?(++t,e=new et(n)):this.eq(10)?e=e.layeradd10(n):e=e.layeradd(n,this));for(let i=0;i<t;++i){if(e=this.tetrate(e.toNumber()),!isFinite(e.layer)||!isFinite(e.mag))return e.normalize();if(i>10)return e}return e}sin(){return this.mag<0?this:this.layer===0?X(Math.sin(this.sign*this.mag)):he(0,0,0)}cos(){return this.mag<0?et.dOne:this.layer===0?X(Math.cos(this.sign*this.mag)):he(0,0,0)}tan(){return this.mag<0?this:this.layer===0?X(Math.tan(this.sign*this.mag)):he(0,0,0)}asin(){return this.mag<0?this:this.layer===0?X(Math.asin(this.sign*this.mag)):he(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?X(Math.acos(this.toNumber())):this.layer===0?X(Math.acos(this.sign*this.mag)):he(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?X(Math.atan(this.sign*this.mag)):X(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return et.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return et.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?he(Number.NaN,Number.NaN,Number.NaN):et.ln(this.add(1).div(X(1).sub(this))).div(2)}ascensionPenalty(t){return t===0?this:this.root(et.pow(10,t))}egg(){return this.add(9)}lessThanOrEqualTo(t){return this.cmp(t)<1}lessThan(t){return this.cmp(t)<0}greaterThanOrEqualTo(t){return this.cmp(t)>-1}greaterThan(t){return this.cmp(t)>0}};let O=et;O.dZero=he(0,0,0);O.dOne=he(1,0,1);O.dNegOne=he(-1,0,1);O.dTwo=he(1,0,2);O.dTen=he(1,0,10);O.dNaN=he(Number.NaN,Number.NaN,Number.NaN);O.dInf=he(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);O.dNegInf=he(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);O.dNumberMax=qt(1,0,Number.MAX_VALUE);O.dNumberMin=qt(1,0,Number.MIN_VALUE);const nE=new O(1);function es(t,e,r=!0){let n=O.log10(t).floor(),i=O.div(t,O.pow(10,n));i.toStringWithDecimalPlaces(e)==="10"&&(i=nE,n=n.add(1));const o=n.gte(1e9)?rn(n,Math.max(Math.max(e,3),Ie.defaultDecimalsShown)):n.gte(1e4)?Au(n,0):n.toStringWithDecimalPlaces(0);return r?i.toStringWithDecimalPlaces(e)+"e"+o:"e"+o}function Au(t,e){if(t==null)return"NaN";if(t=new O(t),t.mag<.001)return 0 .toFixed(e);const n=t.toStringWithDecimalPlaces(e).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function Zb(t,e){return t==null?"NaN":(t=new O(t),t.mag<1e-4?0 .toFixed(e):(t.mag<.1&&e!==0&&(e=Math.max(Math.max(e,t.log10().negate().ceil().toNumber()),Ie.defaultDecimalsShown)),t.toStringWithDecimalPlaces(e)))}const iE=new O("eeee1000"),oE=new O("e100000"),Uv=new O("e1000"),qb=new O(1e9),aE=new O(1e6),sE=new O(1e3),lE=new O(.98),uE=new O(.001),Jb=new O(0);function rn(t,e,r){if(e==null&&(e=Ie.defaultDecimalsShown),r=r!=null?r:Ie.defaultShowSmall,t=new O(t),isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag))return"NaN";if(t.sign<0)return"-"+rn(t.neg(),e);if(t.mag===Number.POSITIVE_INFINITY)return"Infinity";if(t.gte(iE)){const n=t.slog();return n.gte(aE)?"F"+rn(n.floor()):O.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+Au(n.floor(),0)}else{if(t.gte(oE))return es(t,0,!1);if(t.gte(Uv))return es(t,0);if(t.gte(qb))return es(t,e);if(t.gte(sE))return Au(t,0);if(t.gte(uE)||!r)return Zb(t,e);if(t.eq(Jb))return 0 .toFixed(e)}return t=t_(t),t.lt(Uv)?es(t,e).replace(/([^(?:e|F)]*)$/,"-$1"):rn(t,e)+"\u207B\xB9"}function tn(t){return t=new O(t),t.sign<0?"-"+tn(t.neg()):t.gte(qb)||t.lte(lE)&&!t.eq(Jb)?rn(t):rn(t,0)}function Qb(t){return O.lt(t,0)?"-"+Qb(O.neg(t)):O.gt(t,2**51)?rn(O.div(t,31536e3))+"y":(t=new O(t).toNumber(),t<60?rn(t)+"s":t<3600?tn(Math.floor(t/60))+"m "+rn(t%60)+"s":t<86400?tn(Math.floor(t/3600))+"h "+tn(Math.floor(t/60)%60)+"m "+tn(t%60)+"s":t<31536e3?tn(Math.floor(t/84600)%365)+"d "+tn(Math.floor(t/3600)%24)+"h "+tn(Math.floor(t/60)%60)+"m":tn(Math.floor(t/31536e3))+"y "+tn(Math.floor(t/84600)%365)+"d "+tn(Math.floor(t/3600)%24)+"h")}function cE(t,e,r){t=new O(t);let n=t.toStringWithDecimalPlaces(e);return new O(n).gte(r)&&(n=O.sub(r,Math.pow(.1,e)).toStringWithDecimalPlaces(e)),n}function fE(t,e){return rn(t,e,!0)}function t_(t){let e=O.log10(t).ceil();const r=O.div(t,O.pow(10,e));return e=e.neg(),t=new O(10).pow(e).times(r),t}var hE=Object.freeze(Object.defineProperty({__proto__:null,default:O,exponentialFormat:es,commaFormat:Au,regularFormat:Zb,format:rn,formatWhole:tn,formatTime:Qb,toPlaces:cE,formatSmall:fE,invertOOM:t_},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:dE,commaFormat:pE,regularFormat:vE,format:je,formatWhole:Cr,formatTime:pc,toPlaces:mE,formatSmall:gE,invertOOM:yE}=hE;window.Decimal=O;window.exponentialFormat=dE;window.commaFormat=pE;window.regularFormat=vE;window.format=je;window.formatWhole=Cr;window.formatTime=pc;window.toPlaces=mE;window.formatSmall=gE;window.invertOOM=yE;function e_(t){let e=t.replace(/([A-Z])/g," $1");return e=e.charAt(0).toUpperCase()+e.slice(1),e}function na(t){return typeof t=="function"}var Ne=(t=>(t.Up="Up",t.Down="Down",t.Left="Left",t.Right="Right",t.Default="Up",t))(Ne||{});const vc=Symbol("DoNotCache");function J(t,e){const r=t[e];na(r)&&r.length===0&&!r[vc]&&(t[e]=tt(r.bind(t)))}function nn(t){return na(t)&&!t[vc]&&(t=tt(t)),t}const ir=Symbol("Component"),fr=Symbol("GatherProps");let bE=0;function Sr(t="feature-"){return t+bE++}var ae=(t=>(t[t.Visible=0]="Visible",t[t.Hidden=1]="Hidden",t[t.None=2]="None",t))(ae||{});function le(t){return t[vc]=!0,t}function Ga(t,e=2){return t?0:e}function ve(t,e,r){t[e]===void 0&&r!=null&&(t[e]=r)}function r_(t,...e){const r=[],n=i=>{Object.keys(i).forEach(o=>{const a=i[o];a&&typeof a=="object"&&(e.includes(a.type)?r.push(a):!(a instanceof O)&&!oe(a)&&n(a))})};return n(t),r}const eo={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Kd=(t=>(t.Classic="classic",t.Paper="paper",t.Nordic="nordic",t.Aqua="aqua",t))(Kd||{}),gi={classic:eo,paper:{...eo,variables:{...eo.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...eo,variables:{...eo.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...eo,variables:{...eo.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function Fv(t){return Object.prototype.toString.call(t)==="[object Object]"}function _E(t){var e,r;return Fv(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(Fv(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}const lr=Symbol("ProxyState"),Qo=Symbol("ProxyPath");function pr(t,e={}){const r=e;let n=!1;function i(){return n||(Object.assign(r,t(r)),n=!0),r}return new Proxy(r,{get(o,a){return a===lr?i():i()[a]},set(o,a,s){return i()[a]=s,!0},has(o,a){return a===lr?!0:Reflect.has(i(),a)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(o,a){return n||(Object.assign(r,t(r)),n=!0),Object.getOwnPropertyDescriptor(o,a)}})}var Le=window.state=Sa({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const n_=zn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function i_(t){return JSON.stringify(t,(e,r)=>E(r))}const o_={get(t,e){var n;if(e===lr||e===Qo)return t[e];const r=t[lr][e];if(e!=="value"&&(_E(r)||Array.isArray(r))){if(r!==((n=t[e])==null?void 0:n[lr])){const i=[...t[Qo],e];t[e]=new Proxy({[lr]:r,[Qo]:i},o_)}return t[e]}return r},set(t,e,r,n){if(!Le.hasNaN&&(typeof r=="number"&&isNaN(r)||r instanceof O&&(isNaN(r.sign)||isNaN(r.layer)||isNaN(r.mag)))){const i=t[lr][e];if(!(typeof i=="number"&&isNaN(i)||i instanceof O&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw n_.autosave=!1,Le.hasNaN=!0,Le.NaNPath=[...t[Qo],e],Le.NaNReceiver=n,console.error("Attempted to set NaN value",[...t[Qo],e],t[lr]),"Attempted to set NaN value. See above for details"}return t[lr][e]=r,!0},ownKeys(t){return Reflect.ownKeys(t[lr])},has(t,e){return Reflect.has(t[lr],e)},getOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t[lr],e)}};var wt=window.player=new Proxy({[lr]:n_,[Qo]:["player"]},o_);let a_=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}});const vr=a_();let ta=null,ps=null;function Ou(){const t=Date.now();let e=(t-wt.time)/1e3;wt.time=t;const r=e;if(Le.lastTenTicks.push(r),Le.lastTenTicks.length>10&&(Le.lastTenTicks=Le.lastTenTicks.slice(1)),!((ps==null?void 0:ps.value)&&!wt.keepGoing)&&!Le.hasNaN&&(e=Math.max(e,0),wt.devSpeed!==0)){if(wt.offlineTime!=null){if(O.gt(wt.offlineTime,Ie.offlineLimit*3600)&&(wt.offlineTime=Ie.offlineLimit*3600),O.gt(wt.offlineTime,0)&&wt.devSpeed!==0){const n=Math.max(wt.offlineTime/10,e);wt.offlineTime=wt.offlineTime-n,e+=n}else wt.devSpeed===0&&(wt.offlineTime+=e);(!wt.offlineProd||O.lt(wt.offlineTime,0))&&(wt.offlineTime=null)}e=Math.min(e,Ie.maxTickLength),wt.devSpeed!=null&&(e*=wt.devSpeed),Number.isFinite(e)||(e=1e308),!O.eq(e,0)&&(wt.timePlayed+=e,Number.isFinite(wt.timePlayed)||(wt.timePlayed=1e308),vr.emit("update",e,r),Pe.unthrottled?(requestAnimationFrame(Ou),ta!=null&&(clearInterval(ta),ta=null)):ta==null&&(ta=setInterval(Ou,50)))}}async function xE(){ps=(await xu(()=>Promise.resolve().then(function(){return vx}),void 0)).hasWon,ze(ps,t=>{t&&vr.emit("gameWon")}),Pe.unthrottled?requestAnimationFrame(Ou):ta=setInterval(Ou,50)}var TE=Object.freeze(Object.defineProperty({__proto__:null,globalBus:vr,startGameLoop:xE},Symbol.toStringTag,{value:"Module"})),cu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function wE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s_(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}),e}var l_={exports:{}};(function(t){var e=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function a(l,u){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[l][u]}var s={compressToBase64:function(l){if(l==null)return"";var u=s._compress(l,6,function(c){return n.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:s._decompress(l.length,32,function(u){return a(n,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":s._compress(l,15,function(u){return r(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:s._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=s.compress(l),c=new Uint8Array(u.length*2),f=0,h=u.length;f<h;f++){var d=u.charCodeAt(f);c[f*2]=d>>>8,c[f*2+1]=d%256}return c},decompressFromUint8Array:function(l){if(l==null)return s.decompress(l);for(var u=new Array(l.length/2),c=0,f=u.length;c<f;c++)u[c]=l[c*2]*256+l[c*2+1];var h=[];return u.forEach(function(d){h.push(r(d))}),s.decompress(h.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":s._compress(l,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),s._decompress(l.length,32,function(u){return a(i,l.charAt(u))}))},compress:function(l){return s._compress(l,16,function(u){return r(u)})},_compress:function(l,u,c){if(l==null)return"";var f,h,d={},p={},v="",m="",y="",g=2,b=3,T=2,w=[],x=0,R=0,I;for(I=0;I<l.length;I+=1)if(v=l.charAt(I),Object.prototype.hasOwnProperty.call(d,v)||(d[v]=b++,p[v]=!0),m=y+v,Object.prototype.hasOwnProperty.call(d,m))y=m;else{if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)x=x<<1,R==u-1?(R=0,w.push(c(x)),x=0):R++;for(h=y.charCodeAt(0),f=0;f<8;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1}else{for(h=1,f=0;f<T;f++)x=x<<1|h,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1}g--,g==0&&(g=Math.pow(2,T),T++),delete p[y]}else for(h=d[y],f=0;f<T;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1;g--,g==0&&(g=Math.pow(2,T),T++),d[m]=b++,y=String(v)}if(y!==""){if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)x=x<<1,R==u-1?(R=0,w.push(c(x)),x=0):R++;for(h=y.charCodeAt(0),f=0;f<8;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1}else{for(h=1,f=0;f<T;f++)x=x<<1|h,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1}g--,g==0&&(g=Math.pow(2,T),T++),delete p[y]}else for(h=d[y],f=0;f<T;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1;g--,g==0&&(g=Math.pow(2,T),T++)}for(h=2,f=0;f<T;f++)x=x<<1|h&1,R==u-1?(R=0,w.push(c(x)),x=0):R++,h=h>>1;for(;;)if(x=x<<1,R==u-1){w.push(c(x));break}else R++;return w.join("")},decompress:function(l){return l==null?"":l==""?null:s._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var f=[],h=4,d=4,p=3,v="",m=[],y,g,b,T,w,x,R,I={val:c(0),position:u,index:1};for(y=0;y<3;y+=1)f[y]=y;for(b=0,w=Math.pow(2,2),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;switch(b){case 0:for(b=0,w=Math.pow(2,8),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;R=r(b);break;case 1:for(b=0,w=Math.pow(2,16),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;R=r(b);break;case 2:return""}for(f[3]=R,g=R,m.push(R);;){if(I.index>l)return"";for(b=0,w=Math.pow(2,p),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;switch(R=b){case 0:for(b=0,w=Math.pow(2,8),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;f[d++]=r(b),R=d-1,h--;break;case 1:for(b=0,w=Math.pow(2,16),x=1;x!=w;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*x,x<<=1;f[d++]=r(b),R=d-1,h--;break;case 2:return m.join("")}if(h==0&&(h=Math.pow(2,p),p++),f[R])v=f[R];else if(R===d)v=g+g.charAt(0);else return null;m.push(v),f[d++]=g+v.charAt(0),h--,g=v,h==0&&(h=Math.pow(2,p),p++)}}};return s}();t!=null&&(t.exports=e)})(l_);var Oi=l_.exports;function u_(t={}){return Object.assign({id:`${Ie.id}-0`,name:"Default Save",tabs:Ie.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ie.id,modVersion:Ie.versionNumber,layers:{}},t)}function pn(t){const e=Oi.compressToUTF16(i_(t!=null?t:wt[lr]));return localStorage.setItem((t!=null?t:wt[lr]).id,e),e}async function EE(){CE();try{let t=localStorage.getItem(Pe.active);if(t==null){await To(va());return}if(t[0]!=="{")if(t[0]==="e")t=decodeURIComponent(escape(atob(t)));else if(t[0]==="\u1BE1")t=Oi.decompressFromUTF16(t);else throw"Unable to determine save encoding";const e=JSON.parse(t);if(e.modID!==Ie.id){await To(va());return}e.id=Pe.active,await To(e)}catch(t){console.error(`Failed to load save. Falling back to new save.
`,t),await To(va())}}function va(){const t=fu(),e=u_({id:t});return pn(e),Pe.saves.push(t),e}function fu(){let t,e=0;do t=`${Ie.id}-${e++}`;while(localStorage.getItem(t));return t}async function To(t){console.info("Loading save",t);const{layers:e,removeLayer:r,addLayer:n}=await xu(()=>Promise.resolve().then(function(){return zE}),void 0),{fixOldSave:i,getInitialLayers:o}=await xu(()=>Promise.resolve().then(function(){return vx}),void 0);for(const a in e){const s=e[a];s&&r(s)}o(t).forEach(a=>n(a,t)),t=u_(t),t.offlineProd&&t.time&&(t.offlineTime==null&&(t.offlineTime=0),t.offlineTime+=(Date.now()-t.time)/1e3),t.time=Date.now(),t.modVersion!==Ie.versionNumber&&i(t.modVersion,t),Object.assign(wt,t),Pe.active=wt.id}setInterval(()=>{wt.autosave&&pn()},1e3);window.onbeforeunload=()=>{wt.autosave&&pn()};window.save=pn;const IE=window.hardReset=async()=>{await To(va())},Ps=zn({active:"",saves:[],showTPS:!0,theme:Kd.Nordic,unthrottled:!1});ze(Ps,t=>{const e=Oi.compressToUTF16(JSON.stringify(t));localStorage.setItem(Ie.id,e)},{deep:!0});var Pe=window.settings=Ps;function CE(){try{let t=localStorage.getItem(Ie.id);if(t!=null&&t!==""){if(t[0]!=="{")if(t[0]==="e")t=decodeURIComponent(escape(atob(t)));else if(t[0]==="\u1BE1")t=Oi.decompressFromUTF16(t);else{console.warn("Unable to determine settings encoding",t);return}const e=JSON.parse(t);typeof e=="object"&&Object.assign(Ps,e)}vr.emit("loadSettings",Ps)}catch{}}window.hardResetSettings=()=>{const t={active:"",saves:[],showTPS:!0,theme:Kd.Nordic};vr.emit("loadSettings",t),Object.assign(Ps,t),IE()};const c_=zn([]);function f_(t){c_.push(t)}const h_=zn([]);function RE(t){h_.push(t)}const NE=zn([]),PE={class:"table"},hu=Pt({__name:"Column",setup(t){const e=tt(()=>gi[Pe.theme].mergeAdjacent);return(r,n)=>(B(),Q("div",PE,[U("div",{class:Qt(["col",{mergeAdjacent:E(e)}])},[He(r.$slots,"default")],2)]))}}),SE={class:"table"},vs=Pt({__name:"Row",setup(t){const e=tt(()=>gi[Pe.theme].mergeAdjacent);return(r,n)=>(B(),Q("div",SE,[U("div",{class:Qt(["row",{mergeAdjacent:E(e)}])},[He(r.$slots,"default")],2)]))}});function d_(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!wn(t)}function te(t,e="span"){return typeof t=="function"?Pt({render:t}):typeof t=="string"?t.length>0?(t=t.trim(),t.charAt(0)!=="<"&&(t=`<${e}>${t}</${e}>`),Pt({template:t})):Pt({render:()=>({})}):t}function Ge(t){if(on(t))return typeof t=="function"?t():te(t);const e=t[ir];return P(e,t[fr](),null)}function hn(...t){let e;return P(vs,null,d_(e=t.map(Ge))?e:{default:()=>[e]})}function AE(...t){let e;return P(hu,null,d_(e=t.map(Ge))?e:{default:()=>[e]})}function oi(t){if(on(t))return typeof t=="function"?t():typeof t=="string"?P(Ot,null,[t]):P(t,null,null);const e=t[ir];return P(e,t[fr](),null)}function on(t){return typeof t=="string"?!0:typeof t=="object"?t==null?!1:"render"in t||"component"in t:typeof t=="function"&&t[vc]===!0}function Zd(t,e){const r=It(null),n=It(void 0);function i(s){r.value||(r.value=setInterval(a,250)),n.value=s}function o(){r.value&&(clearInterval(r.value),r.value=null)}function a(){e&&e.value?e.value():t&&t.value&&t.value(n.value)}return Aa(o),{start:i,stop:o,handleHolding:a}}function Ca(t,e="div"){const r=Gr();return Xe(()=>{r.value=te(Be(t),e)}),r}function ko(t,e="div"){const r=Gr(null);return Xe(()=>{const n=Be(t);r.value=n==null?null:te(n,e)}),r}function OE(t){return tt(()=>Be(t))}function Be(t){return E(E(t))}function nt(...t){return t.includes(Object)||t.push(Object),t}var ne=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r};const UE=Pt({__name:"Context",emits:["updateNodes"],setup(t,{emit:e}){var c;const r=It({}),n=new ResizeObserver(s),i=It(null);Wn(()=>{const f=i.value;f!=null&&n.observe(f)});let o=!0,a=It((c=i.value)==null?void 0:c.getBoundingClientRect());function s(){i.value!=null&&o&&(o=!1,cr(()=>{var f;a.value=(f=i.value)==null?void 0:f.getBoundingClientRect(),Object.values(r.value).filter(h=>h).forEach(h=>h.rect=h.element.getBoundingClientRect()),e("updateNodes",r.value),o=!0}))}document.fonts.ready.then(s);const l={attributes:!1,childList:!0,subtree:!1};_o(qd,(f,h)=>{const d=new MutationObserver(()=>u(f));d.observe(h,l),r.value[f]={element:h,observer:d,rect:h.getBoundingClientRect()},e("updateNodes",r.value),cr(()=>u(f))}),_o(Jd,f=>{var h;(h=r.value[f])==null||h.observer.disconnect(),r.value[f]=void 0,e("updateNodes",r.value)}),_o(Qd,r),_o(tp,a);function u(f){const h=r.value[f];h!=null&&(h.rect=h.element.getBoundingClientRect(),e("updateNodes",r.value))}return(f,h)=>(B(),Q(Ot,null,[He(f.$slots,"default",{},void 0,!0),U("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var p_=ne(UE,[["__scopeId","data-v-6a08ac80"]]);const FE=["onPointerdown"],LE={class:"modal-wrapper"},ME={class:"modal-container"},BE={class:"modal-header"},kE=dt(" default header "),GE={class:"modal-body"},DE=dt(" default body "),HE={class:"modal-footer"},VE=U("div",{class:"modal-default-flex-grow"},null,-1),Ki=Pt({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:e,emit:r}){const i=Ae(t),o=tt(()=>i.modelValue||s.value);function a(){r("update:modelValue",!1)}const s=It(!1),l=It(null),u=tt(()=>{var c,f;return(f=(c=l.value)==null?void 0:c.nodes)!=null?f:null});return e({isOpen:o,nodes:u}),(c,f)=>(B(),Rt(vb,{to:"#modal-root"},[P(Yi,{name:"modal",onBeforeEnter:f[0]||(f[0]=h=>s.value=!0),onAfterLeave:f[1]||(f[1]=h=>s.value=!1)},{default:Bt(()=>[Oa(U("div",yr({class:"modal-mask",onPointerdown:mr(a,["self"])},c.$attrs),[U("div",LE,[U("div",ME,[U("div",BE,[He(c.$slots,"header",{shown:E(o)},()=>[kE])]),U("div",GE,[P(p_,{ref_key:"contextRef",ref:l},{default:Bt(()=>[He(c.$slots,"body",{shown:E(o)},()=>[DE])]),_:3},512)]),U("div",HE,[He(c.$slots,"footer",{shown:E(o)},()=>[U("div",{class:"modal-default-footer"},[VE,U("button",{class:"button modal-default-button",onClick:a}," Close ")])])])])])],16,FE),[[dc,t.modelValue]])]),_:3})]))}}),Ss=Symbol("PersistentState"),As=Symbol("DefaultValue"),Uu=Symbol("StackTrace"),v_=Symbol("Deleted");function $E(){var t;return((t=new Error().stack)==null?void 0:t.split(`
`).slice(3,5).map(e=>e.trim()).join(`
`))||""}function nr(t){const e=oe(t)?t:It(t);return e[Ss]=e,e[As]=oe(t)?t.value:t,e[Uu]=$E(),e[v_]=!1,vn.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",e,`
Created at:
`+e[Uu]):ma[vn[vn.length-1]].add(e),e}vr.on("addLayer",(t,e)=>{const r=[],n=(i,o=[])=>{let a=!1;return Object.keys(i).forEach(s=>{const l=i[s];if(l&&typeof l=="object")if(Ss in l){if(a=!0,l[v_]){console.warn("Deleted persistent ref present in returned object. Ignoring...",l,`
Created at:
`+l[Uu]);return}ma[t.id].delete(lr in l?l[lr]:l);const u=o.reduce((f,h)=>(h in f||(f[h]={}),f[h]),e),c=u[s];u[s]=l[Ss],ki(u)?c!=null?u[s]=c:u[s]=l[As]:c!=null?u[s].value=c:u[s].value=l[As]}else!(l instanceof O)&&!oe(l)&&!r.includes(l)&&(typeof l.type=="symbol"&&r.push(l),n(l,[...o,s])&&(Ct(l)&&!Ct(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",lr in i?i[lr]:i,s):a=!0))}),a};n(t),ma[t.id].forEach(i=>{console.error(`Created persistent ref in ${t.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
Created at:
`+i[Uu])}),ma[t.id].clear()});const qd=Symbol("RegisterNode"),Jd=Symbol("UnregisterNode"),Qd=Symbol("Nodes"),tp=Symbol("Bounds"),kr=Sa({});window.layers=kr;const ma={},vn=[];function ol(t,e){return pr(()=>{const r={},n=r.emitter=a_();if(r.on=n.on.bind(n),r.emit=n.emit.bind(n),r.nodes=It({}),r.id=t,vn.push(t),ma[t]=new Set,r.minimized=nr(!1),Object.assign(r,e.call(r)),vn[vn.length-1]==null||vn[vn.length-1]!==t)throw`Adding layers stack in invalid state. This should not happen
Stack: ${vn}
Trying to pop ${r.id}`;return vn.pop(),J(r,"color"),J(r,"display"),J(r,"name"),ve(r,"name",r.id),J(r,"minWidth"),ve(r,"minWidth",600),J(r,"minimizable"),ve(r,"minimizable",!0),r})}function m_(t,e){if(console.info("Adding layer",t.id),kr[t.id]){console.error("Attempted to add layer with same ID as existing layer",t.id,kr[t.id]);return}ve(e,"layers",{}),e.layers[t.id]==null&&(e.layers[t.id]={}),kr[t.id]=t,vr.emit("addLayer",t,e.layers[t.id])}function jE(t){return kr[t]}function g_(t){console.info("Removing layer",t.id),vr.emit("removeLayer",t),kr[t.id]=void 0}function XE(t){g_(t),m_(t,wt)}function y_(t){const e=It(!1);return{openModal:()=>e.value=!0,modal:le(()=>P(Ki,{modelValue:e.value,"onUpdate:modelValue":r=>e.value=r},{header:()=>P("h2",null,[E(t.name)]),body:E(t.display)}))}}vr.on("update",function(e){Object.values(kr).forEach(r=>{r==null||r.emit("preUpdate",e)}),Object.values(kr).forEach(r=>{r==null||r.emit("update",e)}),Object.values(kr).forEach(r=>{r==null||r.emit("postUpdate",e)})});var zE=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:qd,UnregisterNodeInjectionKey:Jd,NodesInjectionKey:Qd,BoundsInjectionKey:tp,layers:kr,persistentRefs:ma,addingLayers:vn,createLayer:ol,addLayer:m_,getLayer:jE,removeLayer:g_,reloadLayer:XE,setupLayerModal:y_},Symbol.toStringTag,{value:"Module"}));const WE=Pt({components:{Context:p_},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:nt(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:nt(Number,String),required:!0},name:{type:nt(String),required:!0},color:nt(String),minimizable:nt(Boolean),nodes:{type:Object,required:!0}},setup(t){const{display:e,index:r,minimized:n,minWidth:i,tab:o}=Ae(t),a=Ca(e),s=tt(()=>Ie.allowGoBack&&r.value>0&&!n.value);function l(){wt.tabs.splice(E(t.index),1/0)}cr(()=>c(n.value,E(i.value))),ze([n,OE(i)],([f,h])=>c(f,h));function u(f){t.nodes.value=f}function c(f,h){const d=typeof h=="number"||Number.isNaN(parseInt(h))?h+"px":h,p=o.value();p!=null&&(f?(p.style.flexGrow="0",p.style.flexShrink="0",p.style.width="60px",p.style.minWidth=p.style.flexBasis="",p.style.margin="0"):(p.style.flexGrow="",p.style.flexShrink="",p.style.width="",p.style.minWidth=p.style.flexBasis=d,p.style.margin=""))}return{component:a,showGoBack:s,updateNodes:u,unref:E,goBack:l}}});function YE(t,e,r,n,i,o){const a=Re("Context");return B(),Q("div",{class:"layer-container",style:ce({"--layer-color":t.unref(t.color)})},[t.showGoBack?(B(),Q("button",{key:0,class:"goBack",onClick:e[0]||(e[0]=(...s)=>t.goBack&&t.goBack(...s))},"\u2190")):yt("",!0),t.minimized.value?(B(),Q("button",{key:1,class:"layer-tab minimized",onClick:e[1]||(e[1]=s=>t.minimized.value=!1)},[U("div",null,re(t.unref(t.name)),1)])):(B(),Q("div",{key:2,class:Qt(["layer-tab",{showGoBack:t.showGoBack}])},[P(a,{onUpdateNodes:t.updateNodes},{default:Bt(()=>[(B(),Rt(Te(t.component)))]),_:1},8,["onUpdateNodes"])],2)),t.unref(t.minimizable)?(B(),Q("button",{key:3,class:"minimize",onClick:e[2]||(e[2]=s=>t.minimized.value=!0)}," \u25BC ")):yt("",!0)],4)}var KE=ne(WE,[["render",YE],["__scopeId","data-v-34c9d881"]]);const b_=t=>(Cn("data-v-4b4bda40"),t=t(),Rn(),t),ZE=b_(()=>U("h2",null,"Changelog",-1)),qE=b_(()=>U("details",{open:""},[U("summary",null,[dt("v0.0 Initial Commit - "),U("time",null,"2021-09-04")]),dt(" This is the first release :D "),U("ul",null,[U("li",{class:"feature"},"Did everything"),U("li",{class:"fix"},"Had some fun"),U("li",{class:"breaking"},"Removed everything"),U("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),JE=Pt({__name:"Changelog",setup(t,{expose:e}){const r=It(!1);return e({open(){r.value=!0}}),(n,i)=>(B(),Rt(Ki,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o)},{header:Bt(()=>[ZE]),body:Bt(()=>[qE]),_:1},8,["modelValue"]))}});var QE=ne(JE,[["__scopeId","data-v-4b4bda40"]]);const tI=Pt({props:{element:nt(Object),display:{type:nt(Object,String,Function),required:!0},style:nt(Object,String,Array),classes:nt(Object),direction:nt(String),xoffset:nt(String),yoffset:nt(String),pinned:Object},setup(t){const{element:e,display:r,pinned:n}=Ae(t),i=It(!1),o=tt(()=>(Be(n)||i.value)&&a.value),a=ko(r),s=Gr(null);Xe(()=>{const c=Be(e);s.value=c==null?null:te(le(()=>Ge(c)))});function l(c){const f=n;c.shiftKey&&f&&(f.value=!f.value,c.stopPropagation(),c.preventDefault())}const u=tt(()=>Be(n)&&gi[Pe.theme].showPin);return{Direction:Ne,isHovered:i,isShown:o,comp:a,elementComp:s,unref:E,togglePinned:l,showPin:u}}}),eI={key:0,class:"material-icons pinned"};function rI(t,e,r,n,i,o){return B(),Q("div",{class:Qt(["tooltip-container",{shown:t.isShown}]),onMouseenter:e[0]||(e[0]=a=>t.isHovered=!0),onMouseleave:e[1]||(e[1]=a=>t.isHovered=!1),onClickCapture:e[2]||(e[2]=(...a)=>t.togglePinned&&t.togglePinned(...a))},[He(t.$slots,"default",{},void 0,!0),t.elementComp?(B(),Rt(Te(t.elementComp),{key:0})):yt("",!0),P(Yi,{name:"fade"},{default:Bt(()=>{var a;return[t.isShown?(B(),Q("div",{key:0,class:Qt(["tooltip",{top:t.unref(t.direction)===t.Direction.Up,left:t.unref(t.direction)===t.Direction.Left,right:t.unref(t.direction)===t.Direction.Right,bottom:t.unref(t.direction)===t.Direction.Down,...t.unref(t.classes)}]),style:ce([{"--xoffset":t.unref(t.xoffset)||"0px","--yoffset":t.unref(t.yoffset)||"0px"},(a=t.unref(t.style))!=null?a:{}])},[t.showPin?(B(),Q("span",eI,"push_pin")):yt("",!0),t.comp?(B(),Rt(Te(t.comp),{key:1})):yt("",!0)],6)):yt("",!0)]}),_:1})],34)}var Me=ne(tI,[["render",rI],["__scopeId","data-v-5ddf6b77"]]);const Go=t=>(Cn("data-v-7dec2dec"),t=t(),Rn(),t),nI={class:"info-modal-header"},iI=["src","alt"],oI={class:"info-modal-title"},aI={key:0},sI={key:0},lI={key:0},uI=Go(()=>U("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),cI=Go(()=>U("br",null,null,-1)),fI=Go(()=>U("br",null,null,-1)),hI=["href"],dI=Go(()=>U("span",{class:"material-icons info-modal-discord"},"discord",-1)),pI=Go(()=>U("div",null,[U("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[U("span",{class:"material-icons info-modal-discord"},"discord"),dt(" The Paper Pilot Community ")])],-1)),vI=Go(()=>U("div",null,[U("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[U("span",{class:"material-icons info-modal-discord"},"discord"),dt(" The Modding Tree ")])],-1)),mI=Go(()=>U("br",null,null,-1));var gI=Pt({__name:"Info",props:{changelog:null},setup(t,{expose:e}){const r=t,{title:n,logo:i,author:o,discordName:a,discordLink:s,versionNumber:l,versionTitle:u}=Ie,c=Ae(r),f=It(!1),h=tt(()=>pc(wt.timePlayed)),d=tt(()=>te(le(()=>P(Ot,null,[h_.map(Ge)]))));e({open(){f.value=!0}});function p(){var v;(v=E(c.changelog))==null||v.open()}return(v,m)=>(B(),Rt(Ki,{modelValue:f.value,"onUpdate:modelValue":m[0]||(m[0]=y=>f.value=y)},{header:Bt(()=>[U("div",nI,[E(i)?(B(),Q("img",{key:0,class:"info-modal-logo",src:E(i),alt:E(n)},null,8,iI)):yt("",!0),U("div",oI,[U("h2",null,re(E(n)),1),U("h4",null,[dt(" v"+re(E(l)),1),E(u)?(B(),Q("span",aI,": "+re(E(u)),1)):yt("",!0)])])])]),body:Bt(({shown:y})=>[y?(B(),Q("div",sI,[E(o)?(B(),Q("div",lI,"By "+re(E(o)),1)):yt("",!0),uI,cI,U("div",{class:"link",onClick:p},"Changelog"),fI,U("div",null,[E(s)?(B(),Q("a",{key:0,href:E(s),class:"info-modal-discord-link"},[dI,dt(" "+re(E(a)),1)],8,hI)):yt("",!0)]),pI,vI,mI,U("div",null,"Time Played: "+re(E(h)),1),(B(),Rt(Te(E(d))))])):yt("",!0)]),_:1},8,["modelValue"]))}});var yI=ne(gI,[["__scopeId","data-v-7dec2dec"]]);function ep(t){return(ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Lv(t){return function(e){if(Array.isArray(e))return sh(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||__(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function __(t,e){if(t){if(typeof t=="string")return sh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sh(t,e):void 0}}function sh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bo(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=__(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{a||r.return==null||r.return()}finally{if(s)throw o}}}}var lh={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(t,e){var r=It(null);return Wn(function(){t.autofocus&&r.value.focus()}),nl(function(){t.autofocus&&r.value.focus()}),{handleInput:function(n){e.emit("input",n),e.emit("update:modelValue",n.target.value)},handleChange:function(n){e.emit("change",n),e.emit("update:modelValue",n.target.value)},handleFocus:function(n){e.emit("focus",n)},handleBlur:function(n){e.emit("blur",n)},input:r,handleEscape:function(n){r.value.blur(),e.emit("escape",n)}}}},bI={class:"vue-input"},_I=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];lh.render=function(t,e,r,n,i,o){return B(),Q("div",bI,[He(t.$slots,"prepend"),U("input",{ref:"input",autocomplete:r.autocomplete,modelValue:r.modelValue,placeholder:r.placeholder,disabled:r.disabled,onInput:e[0]||(e[0]=function(){return n.handleInput&&n.handleInput.apply(n,arguments)}),onChange:e[1]||(e[1]=function(){return n.handleChange&&n.handleChange.apply(n,arguments)}),onFocus:e[2]||(e[2]=function(){return n.handleFocus&&n.handleFocus.apply(n,arguments)}),onBlur:e[3]||(e[3]=function(){return n.handleBlur&&n.handleBlur.apply(n,arguments)}),onKeyup:e[4]||(e[4]=yo(mr(function(){return n.handleEscape&&n.handleEscape.apply(n,arguments)},["exact"]),["esc"])),tabindex:r.tabindex,autofocus:r.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(r.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(r.comboboxUid,"-combobox")},null,40,_I),He(t.$slots,"append")])},lh.__file="src/components/input.vue";var uh={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(t){return t.every(function(e){return ep(e.key)!==void 0&&e.label!==void 0&&typeof e.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(t,e){return{dataAttrs:en("dataAttrs"),handleClick:function(r){e.emit("click",r)}}}};uh.render=function(t,e,r,n,i,o){return B(),Q("ul",yr({class:["vue-tags",{collapsed:r.collapseTags}],onMousedown:e[0]||(e[0]=mr(function(){},["prevent"])),tabindex:"-1",onClick:e[1]||(e[1]=function(){return n.handleClick&&n.handleClick.apply(n,arguments)})},n.dataAttrs),[(B(!0),Q(Ot,null,Hn(r.modelValue,function(a){return B(),Q(Ot,{key:a.key},[a.group?yt("v-if",!0):(B(),Q("li",{key:0,class:Qt(["vue-tag",{selected:a.selected}])},[He(t.$slots,"default",{option:a},function(){return[U("span",null,re(a.label),1)]})],2))],64)}),128))],16)},uh.__file="src/components/tags.vue";var ch={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(t){return t.every(function(e){return ep(e.key)!==void 0&&e.label!==void 0&&typeof e.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(t,e){return{dataAttrs:en("dataAttrs"),handleClickItem:function(r,n){n.disabled||e.emit("click-item",r,n)},handleMouseenter:function(r,n){e.emit("mouseenter",r,n)}}}},xI=["id","aria-multiselectable","aria-busy","aria-disabled"],TI=["onClick","onMouseenter","id","aria-selected","aria-disabled"];ch.render=function(t,e,r,n,i,o){return B(),Q("ul",yr({class:"vue-dropdown",style:{maxHeight:r.maxHeight+"px"},onMousedown:e[0]||(e[0]=mr(function(){},["prevent"]))},n.dataAttrs,{role:"listbox",id:"vs".concat(r.comboboxUid,"-listbox"),"aria-multiselectable":n.dataAttrs["data-multiple"],"aria-busy":n.dataAttrs["data-loading"],"aria-disabled":n.dataAttrs["data-disabled"]}),[(B(!0),Q(Ot,null,Hn(r.modelValue,function(a,s){return B(),Q(Ot,{key:a.key},[a.visible&&a.hidden===!1?(B(),Q("li",{key:0,onClick:function(l){return n.handleClickItem(l,a)},class:Qt(["vue-dropdown-item",{selected:a.selected,disabled:a.disabled,highlighted:a.originalIndex===r.highlightedOriginalIndex,group:a.group}]),onMouseenter:function(l){return n.handleMouseenter(l,a)},role:"option",id:"vs".concat(r.comboboxUid,"-option-").concat(s),"aria-selected":!!a.selected||!!a.disabled&&void 0,"aria-disabled":a.disabled},[He(t.$slots,"default",{option:a},function(){return[U("span",null,re(a.label),1)]})],42,TI)):yt("v-if",!0)],64)}),128))],16,xI)},ch.__file="src/components/dropdown.vue";var x_=function(t,e,r){var n=r.valueBy;return n(t)===n(e)},ia=function(t,e,r){var n=r.valueBy;return t.some(function(i){return x_(i,e,{valueBy:n})})},ro=function(t,e,r){var n=r.valueBy;return t.find(function(i){return n(i)===e})},kc=function(t,e,r){var n=r.max,i=r.valueBy;return ia(t,e,{valueBy:i})||t.length>=n?t:t.concat(e)},Gc=function(t,e,r){var n=r.min,i=r.valueBy;return ia(t,e,{valueBy:i})===!1||t.length<=n?t:t.filter(function(o){return x_(o,e,{valueBy:i})===!1})},Il=function(t){return tt(function(){return typeof t.value=="function"?t.value:typeof t.value=="string"?function(e){return t.value.split(".").reduce(function(r,n){return r[n]},e)}:function(e){return e}})},wI=function(t,e){var r=tt(function(){return t.value.reduce(function(a,s){return Object.assign(a,(l={},u=s.originalIndex,c=s,u in l?Object.defineProperty(l,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):l[u]=c,l));var l,u,c},{})}),n=function(a){var s=r.value[a];return s!==void 0&&i(s)!==!1&&(e.value=a,!0)},i=function(a){return!a.disabled&&!a.hidden&&a.visible},o=tt(function(){return t.value.some(function(a){return i(a)})});return Xe(function(){if(o.value===!1&&(e.value=null),e.value!==null&&t.value.length<=e.value){var a,s=bo(t.value.reverse());try{for(s.s();!(a=s.n()).done;){var l=a.value;if(n(l.originalIndex))break}}catch(h){s.e(h)}finally{s.f()}}if(e.value===null||i(t.value[e.value])===!1){var u,c=bo(t.value);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(n(f.originalIndex))break}}catch(h){c.e(h)}finally{c.f()}}}),{pointerForward:function(){if(o.value!==!1&&e.value!==null)for(var a=e.value+1,s=0;a!==e.value&&s++<t.value.length&&(t.value.length<=a&&(a=0),!n(a));)++a},pointerBackward:function(){if(o.value!==!1&&e.value!==null)for(var a=e.value-1,s=0;a!==e.value&&s++<t.value.length&&(a<0&&(a=t.value.length-1),!n(a));)--a},pointerSet:n}},Fu=Pt({name:"vue-select",inheritAttrs:!1,props:{modelValue:{required:!0},emptyModelValue:{},options:{required:!0,type:Array},labelBy:{type:[String,Function]},valueBy:{type:[String,Function]},disabledBy:{default:"disabled",type:[String,Function]},groupBy:{default:"group",type:[String,Function]},visibleOptions:{type:Array,default:null},multiple:{default:!1,type:Boolean},min:{default:0,type:Number},max:{default:1/0,type:Number},searchable:{default:!1,type:Boolean},searchPlaceholder:{default:"Type to search",type:String},clearOnSelect:{default:!1,type:Boolean},clearOnClose:{default:!1,type:Boolean},taggable:{default:!1,type:Boolean},collapseTags:{default:!1,type:Boolean},autocomplete:{default:"off",type:String},disabled:{default:!1,type:Boolean},loading:{default:!1,type:Boolean},closeOnSelect:{default:!1,type:Boolean},hideSelected:{default:!1,type:Boolean},placeholder:{default:"Select option",type:String},tabindex:{default:0,type:Number},autofocus:{default:!1,type:Boolean},maxHeight:{default:300,type:Number},openDirection:{type:String,validator:function(t){return["top","bottom"].includes(t)}}},emits:["selected","removed","update:modelValue","focus","blur","toggle","opened","closed","search:input","search:change","search:focus","search:blur"],setup:function(t,e){var r=function(V){var Z=zn({}),lt=Il(Mr(V,"labelBy"));Xe(function(){return Z.labelBy=lt.value});var ut=Il(Mr(V,"valueBy"));Xe(function(){return Z.valueBy=ut.value});var Gt=Il(Mr(V,"disabledBy"));Xe(function(){return Z.disabledBy=Gt.value});var it=Il(Mr(V,"groupBy"));Xe(function(){return Z.groupBy=it.value});var kt=tt(function(){return V.multiple?V.min:Math.min(1,V.min)});Xe(function(){return Z.min=kt.value});var Vt=tt(function(){return V.multiple?V.max:1});return Xe(function(){return Z.max=Vt.value}),Xe(function(){return Z.options=V.options}),Z}(t),n=tt(function(){var V;return(V=t.emptyModelValue)!==null&&V!==void 0?V:null}),i=Yn(),o=It(),a=It(),s=It(),l=tt(function(){var V;return(V=s.value)===null||V===void 0?void 0:V._.refs.input}),u=It(!1);ze(function(){return u.value},function(){var V,Z;u.value?(e.emit("opened"),e.emit("focus"),t.searchable?(l.value!==document.activeElement&&l.value.focus(),e.emit("search:focus")):(V=o.value)===null||V===void 0||V.focus()):(t.searchable?(l.value===document.activeElement&&l.value.blur(),t.clearOnClose&&R(),e.emit("search:blur")):(Z=o.value)===null||Z===void 0||Z.blur(),e.emit("closed"),e.emit("blur")),e.emit("toggle")});var c=function(){t.disabled||(u.value=!0)},f=function(V){var Z;!((Z=o.value)===null||Z===void 0)&&Z.contains(V==null?void 0:V.relatedTarget)?setTimeout(function(){var lt;(lt=o.value)===null||lt===void 0||lt.focus()}):u.value=!1};ze(function(){return t.disabled},function(){return f()});var h=It(""),d=tt(function(){return new RegExp(h.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i")}),p=tt(function(){return h.value?r.options.filter(function(V){return d.value.test(r.labelBy(V))}):void 0}),v=It([]),m=tt(function(){return new Set(v.value.map(function(V){return r.valueBy(V)}))}),y=function(){if(t.multiple){if(Array.isArray(t.modelValue)===!1||v.value.length!==t.modelValue.length||Object.keys(v.value).some(function(V){return v.value[V]!==ro(r.options,t.modelValue[V],{valueBy:r.valueBy})}))return!1}else if(v.value.length===0&&t.modelValue!==n.value||v.value.length===1&&t.modelValue===n.value||v.value[0]!==ro(r.options,t.modelValue,{valueBy:r.valueBy}))return!1;return!0},g=function(){if(!y()){v.value=[];var V,Z=bo(t.multiple?t.modelValue:t.modelValue===n.value?[]:[t.modelValue]);try{for(Z.s();!(V=Z.n()).done;){var lt=V.value,ut=ro(r.options,lt,{valueBy:r.valueBy});ia(r.options,ut,{valueBy:r.valueBy})!==!1&&(v.value=kc(v.value,ut,{max:1/0,valueBy:r.valueBy}))}}catch(Gt){Z.e(Gt)}finally{Z.f()}}};g(),ze(function(){return t.modelValue},function(){return g()},{deep:!0}),ze(function(){return r.options},function(){v.value=r.options.filter(function(V){return m.value.has(r.valueBy(V))})},{deep:!0});var b,T=function(V,Z){(Z=Z.originalOption).value.every(function(lt){var ut=ro(r.options,lt,{valueBy:r.valueBy});return ia(v.value,ut,{valueBy:r.valueBy})})?Z.value.forEach(function(lt){var ut=ro(r.options,lt,{valueBy:r.valueBy});v.value=Gc(v.value,ut,{min:r.min,valueBy:r.valueBy}),e.emit("removed",ut)}):Z.value.forEach(function(lt){var ut=ro(r.options,lt,{valueBy:r.valueBy});ia(v.value,ut,{valueBy:r.valueBy})||(v.value=kc(v.value,ut,{max:r.max,valueBy:r.valueBy}),e.emit("selected",ut))})},w=function(V,Z){if(Z=Z.originalOption,ia(v.value,Z,{valueBy:r.valueBy}))v.value=Gc(v.value,Z,{min:r.min,valueBy:r.valueBy}),e.emit("removed",Z);else{if(!t.multiple&&v.value.length===1){var lt=v.value[0];v.value=Gc(v.value,v.value[0],{min:0,valueBy:r.valueBy}),e.emit("removed",lt)}v.value=kc(v.value,Z,{max:r.max,valueBy:r.valueBy}),e.emit("selected",Z)}},x=function(){if(!y()){var V=v.value.map(function(Z){return r.valueBy(Z)});t.multiple?e.emit("update:modelValue",V):V.length?e.emit("update:modelValue",V[0]):e.emit("update:modelValue",n.value)}},R=function(){l.value.value="",l.value.dispatchEvent(new Event("input")),l.value.dispatchEvent(new Event("change"))},I=tt(function(){var V,Z;return(Z=(V=t.visibleOptions)!==null&&V!==void 0?V:p.value)!==null&&Z!==void 0?Z:r.options}),C=It(0),S=tt(function(){var V,Z=new Set(I.value.map(function(it){return r.valueBy(it)})),lt=r.options.map(function(it,kt){var Vt,Xt={key:r.valueBy(it),label:r.labelBy(it),group:(Vt=r.groupBy(it))!==null&&Vt!==void 0&&Vt,originalIndex:kt,originalOption:it};return Xt.selected=Xt.group?it.value.every(function(N){return m.value.has(N)}):m.value.has(r.valueBy(it)),Xt.disabled=Xt.group?r.disabledBy(it)||it.value.every(function(N){var A=ro(r.options,N,{valueBy:r.valueBy});return r.disabledBy(A)}):r.disabledBy(it),Xt.visible=Xt.group?it.value.some(function(N){return Z.has(N)}):Z.has(r.valueBy(it)),Xt.hidden=!!t.hideSelected&&(Xt.group?it.value.every(function(N){return m.value.has(N)}):m.value.has(r.valueBy(it))),Xt}),ut=bo(lt);try{for(ut.s();!(V=ut.n()).done;){var Gt=V.value;Gt.group!==!1&&Gt.disabled&&function(){var it=new Set(Gt.originalOption.value);lt.filter(function(kt){return it.has(r.valueBy(kt.originalOption))}).forEach(function(kt){return kt.disabled=!0})}()}}catch(it){ut.e(it)}finally{ut.f()}return lt}),L=wI(S,C),H=L.pointerForward,G=L.pointerBackward,k=L.pointerSet,Y="",D=/^[\w]$/,K=tt(function(){var V=Lv(r.options.keys());return V.slice(C.value).concat(V.slice(0,C.value))}),ht=function(){var V,Z=(V=o.value)===null||V===void 0?void 0:V.querySelector(".highlighted");if(Z&&a.value){var lt,ut=getComputedStyle(Z);for(lt=0;Z.offsetTop+parseFloat(ut.height)+parseFloat(ut.paddingTop)+parseFloat(ut.paddingBottom)>a.value.$el.clientHeight+a.value.$el.scrollTop&&lt++<S.value.length;)a.value.$el.scrollTop=a.value.$el.scrollTop+parseFloat(ut.height)+parseFloat(ut.paddingTop)+parseFloat(ut.paddingBottom);for(lt=0;Z.offsetTop<a.value.$el.scrollTop&&lt++<S.value.length;)a.value.$el.scrollTop=a.value.$el.scrollTop-parseFloat(ut.height)-parseFloat(ut.paddingTop)-parseFloat(ut.paddingBottom)}};ze(function(){return[u.value,r.options,m.value]},function(V,Z){(Z==null?void 0:Z[0])!==!0&&u.value!==!1&&v.value.length!==0&&(k(r.options.findIndex(function(lt){return m.value.has(r.valueBy(lt))})),cr(ht))},{deep:!0,immediate:!0});var bt=tt(function(){return{"data-is-focusing":u.value,"data-visible-length":S.value.filter(function(V){return V.visible&&V.hidden===!1}).length,"data-not-selected-length":r.options.length-S.value.filter(function(V){return V.selected}).length,"data-selected-length":S.value.filter(function(V){return V.selected}).length,"data-addable":S.value.filter(function(V){return V.selected}).length<r.max,"data-removable":S.value.filter(function(V){return V.selected}).length>r.min,"data-total-length":r.options.length,"data-multiple":t.multiple,"data-loading":t.loading,"data-disabled":t.disabled}});_o("dataAttrs",bt);var W=tt(function(){return S.value.filter(function(V){return V.selected}).filter(function(V){return!V.group})}),ft=tt(function(){return t.multiple?W.value.length===0?t.placeholder:W.value.length===1?"1 option selected":W.value.length+" options selected":W.value.length===0?t.placeholder:W.value[0].label+""}),gt=tt(function(){var V=W.value.map(function(Z){return Z.originalOption});return t.multiple?V:V[0]||n.value}),_t=It();return ze(function(){return[t.openDirection,u.value]},function(){var V,Z;_t.value=(Z=(V=t.openDirection)!==null&&V!==void 0?V:function(){if(o.value!==void 0&&window!==void 0)return window.innerHeight-o.value.getBoundingClientRect().bottom>=t.maxHeight?"bottom":"top"}())!==null&&Z!==void 0?Z:"bottom"},{immediate:!0}),{instance:i,isFocusing:u,wrapper:o,dropdown:a,input:s,focus:c,blur:f,toggle:function(){u.value?f():c()},searchingInputValue:h,handleInputForInput:function(V){e.emit("search:input",V)},handleChangeForInput:function(V){e.emit("search:change",V)},handleFocusForInput:function(V){c()},handleBlurForInput:function(V){f()},optionsWithInfo:S,addOrRemoveOption:function(V,Z){t.disabled||(Z.group&&t.multiple?T(V,Z):w(V,Z),x(),t.closeOnSelect===!0&&(u.value=!1),t.clearOnSelect===!0&&h.value&&R())},dataAttrs:bt,innerPlaceholder:ft,selected:gt,highlightedOriginalIndex:C,pointerForward:function(){H(),cr(ht)},pointerBackward:function(){G(),cr(ht)},pointerFirst:function(){var V,Z=bo(r.options.keys());try{for(Z.s();!(V=Z.n()).done;){var lt=V.value;if(k(lt))break}}catch(ut){Z.e(ut)}finally{Z.f()}cr(ht)},pointerLast:function(){var V,Z=bo(Lv(r.options.keys()).reverse());try{for(Z.s();!(V=Z.n()).done;){var lt=V.value;if(k(lt))break}}catch(ut){Z.e(ut)}finally{Z.f()}cr(ht)},typeAhead:function(V){var Z,lt;if(!t.searchable){var ut=!1;if(D.test(V.key)?(Y+=V.key.toLowerCase(),ut=!0):V.code==="Space"&&(Y+=" "),ut){var Gt,it=bo(K.value);try{for(it.s();!(Gt=it.n()).done;){var kt=Gt.value;if(((lt=(Z=r.labelBy(r.options[kt]))===null||Z===void 0?void 0:Z.toLowerCase())===null||lt===void 0?void 0:lt.startsWith(Y))===!0&&k(kt))break}}catch(Vt){it.e(Vt)}finally{it.f()}clearTimeout(b),b=setTimeout(function(){Y=""},500)}}},pointerSet:k,direction:_t}},components:{VInput:lh,VTags:uh,VDropdown:ch}});Fu.__VERSION__="2.10.4";var EI=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],II={class:"vue-select-header"},CI={key:0,class:"vue-input"},RI=["placeholder","autocomplete"],NI=["onClick"],PI=U("span",{class:"icon loading"},[U("div"),U("div"),U("div")],-1),SI={key:0,class:"vue-select-input-wrapper"},AI=U("span",{class:"icon loading"},[U("div"),U("div"),U("div")],-1);Fu.render=function(t,e,r,n,i,o){var a=Re("v-tags"),s=Re("v-input"),l=Re("v-dropdown");return B(),Q("div",yr({ref:"wrapper",class:["vue-select",["direction-".concat(t.direction)]],tabindex:t.isFocusing?-1:t.tabindex,onFocus:e[9]||(e[9]=function(){return t.focus&&t.focus.apply(t,arguments)}),onBlur:e[10]||(e[10]=function(u){return!t.searchable&&t.blur(u)})},Object.assign({},t.dataAttrs,t.$attrs),{onKeypress:e[11]||(e[11]=yo(mr(function(){return t.highlightedOriginalIndex!==null&&t.addOrRemoveOption(t.$event,t.optionsWithInfo[t.highlightedOriginalIndex])},["prevent","exact"]),["enter"])),onKeydown:[e[12]||(e[12]=yo(mr(function(){return t.pointerForward&&t.pointerForward.apply(t,arguments)},["prevent","exact"]),["down"])),e[13]||(e[13]=yo(mr(function(){return t.pointerBackward&&t.pointerBackward.apply(t,arguments)},["prevent","exact"]),["up"])),e[14]||(e[14]=yo(mr(function(){return t.pointerFirst&&t.pointerFirst.apply(t,arguments)},["prevent","exact"]),["home"])),e[15]||(e[15]=yo(mr(function(){return t.pointerLast&&t.pointerLast.apply(t,arguments)},["prevent","exact"]),["end"])),e[16]||(e[16]=function(){return t.typeAhead&&t.typeAhead.apply(t,arguments)})],id:"vs".concat(t.instance.uid,"-combobox"),role:t.searchable?"combobox":null,"aria-expanded":t.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(t.instance.uid,"-listbox"),"aria-activedescendant":t.highlightedOriginalIndex===null?null:"vs".concat(t.instance.uid,"-option-").concat(t.highlightedOriginalIndex),"aria-busy":t.loading,"aria-disabled":t.disabled}),[U("div",II,[t.multiple&&t.taggable&&t.modelValue.length===0||t.searchable===!1&&t.taggable===!1?(B(),Q("div",CI,[He(t.$slots,"label",{selected:t.selected},function(){return[U("input",{placeholder:t.innerPlaceholder,autocomplete:t.autocomplete,readonly:"",onClick:e[0]||(e[0]=function(){return t.focus&&t.focus.apply(t,arguments)})},null,8,RI)]})])):yt("v-if",!0),t.multiple&&t.taggable?(B(),Q(Ot,{key:1},[P(a,{modelValue:t.optionsWithInfo,"collapse-tags":t.collapseTags,tabindex:"-1",onClick:t.focus},{default:Bt(function(u){var c=u.option;return[He(t.$slots,"tag",{option:c.originalOption,remove:function(){return t.addOrRemoveOption(t.$event,c)}},function(){return[U("span",null,re(c.label),1),U("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:mr(function(){return t.addOrRemoveOption(t.$event,c)},["prevent","stop"])},null,8,NI)]})]}),_:3},8,["modelValue","collapse-tags","onClick"]),He(t.$slots,"toggle",{isFocusing:t.isFocusing,toggle:t.toggle},function(){return[U("span",{class:Qt(["icon arrow-downward",{active:t.isFocusing}]),onClick:e[1]||(e[1]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onMousedown:e[2]||(e[2]=mr(function(){},["prevent","stop"]))},null,34)]})],64)):(B(),Q(Ot,{key:2},[t.searchable?(B(),Rt(s,{key:0,ref:"input",modelValue:t.searchingInputValue,"onUpdate:modelValue":e[3]||(e[3]=function(u){return t.searchingInputValue=u}),disabled:t.disabled,autocomplete:t.autocomplete,placeholder:t.isFocusing?t.searchPlaceholder:t.innerPlaceholder,onInput:t.handleInputForInput,onChange:t.handleChangeForInput,onFocus:t.handleFocusForInput,onBlur:t.handleBlurForInput,onEscape:t.blur,autofocus:t.autofocus||t.taggable&&t.searchable,tabindex:t.tabindex,comboboxUid:t.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):yt("v-if",!0),t.loading?He(t.$slots,"loading",{key:1},function(){return[PI]}):He(t.$slots,"toggle",{key:2,isFocusing:t.isFocusing,toggle:t.toggle},function(){return[U("span",{class:Qt(["icon arrow-downward",{active:t.isFocusing}]),onClick:e[4]||(e[4]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onMousedown:e[5]||(e[5]=mr(function(){},["prevent","stop"]))},null,34)]})],64))]),t.multiple&&t.taggable&&t.searchable?(B(),Q("div",SI,[Oa(P(s,{ref:"input",modelValue:t.searchingInputValue,"onUpdate:modelValue":e[6]||(e[6]=function(u){return t.searchingInputValue=u}),disabled:t.disabled,autocomplete:t.autocomplete,placeholder:t.isFocusing?t.searchPlaceholder:t.innerPlaceholder,onInput:t.handleInputForInput,onChange:t.handleChangeForInput,onFocus:t.handleFocusForInput,onBlur:t.handleBlurForInput,onEscape:t.blur,autofocus:t.autofocus||t.taggable&&t.searchable,tabindex:t.tabindex,comboboxUid:t.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[dc,t.isFocusing]]),t.loading?He(t.$slots,"loading",{key:0},function(){return[AI]}):yt("v-if",!0)])):yt("v-if",!0),P(l,{ref:"dropdown",modelValue:t.optionsWithInfo,"onUpdate:modelValue":e[7]||(e[7]=function(u){return t.optionsWithInfo=u}),onClickItem:t.addOrRemoveOption,onMouseenter:e[8]||(e[8]=function(u,c){return t.pointerSet(c.originalIndex)}),comboboxUid:t.instance.uid,maxHeight:t.maxHeight,highlightedOriginalIndex:t.highlightedOriginalIndex},{default:Bt(function(u){var c=u.option;return[He(t.$slots,"dropdown-item",{option:c.originalOption},function(){return[U("span",null,re(c.label),1)]})]}),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,EI)},Fu.__file="src/index.vue";const OI={class:"field"},UI={key:0,class:"field-title"},rp=Pt({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){var a;const r=t,n=ko(Mr(r,"title"),"span"),i=It((a=r.options.find(s=>s.value===r.modelValue))!=null?a:null);ze(Mr(r,"modelValue"),s=>{var l;Be(i)!==s&&(i.value=(l=r.options.find(u=>u.value===s))!=null?l:null)});function o(s){e("update:modelValue",s.value)}return(s,l)=>(B(),Q("div",OI,[E(n)?(B(),Q("span",UI,[(B(),Rt(Te(E(n))))])):yt("",!0),P(E(Fu),{options:t.options,modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=u=>i.value=u),o],min:1,"label-by":"label",placeholder:t.placeholder,"close-on-select":t.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const FI={class:"field"},LI=Pt({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=tt(()=>te(E(r.title)||"<span></span>","span")),i=tt({get(){return!!r.modelValue},set(o){e("update:modelValue",o)}});return(o,a)=>(B(),Q("label",FI,[Oa(U("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":a[0]||(a[0]=s=>oe(i)?i.value=s:null)},null,512),[[hc,E(i)]]),(B(),Rt(Te(E(n))))]))}});var Xr=ne(LI,[["__scopeId","data-v-2b109500"]]);const T_=t=>(Cn("data-v-bc13791c"),t=t(),Rn(),t),MI=T_(()=>U("div",{class:"header"},[U("h2",null,"Options")],-1)),BI=T_(()=>U("hr",null,null,-1));var kI=Pt({__name:"Options",setup(t,{expose:e}){const r=It(!1);e({open(){r.value=!0}});const n=Object.keys(gi).map(p=>({label:e_(p),value:p})),i=tt(()=>te(le(()=>P(Ot,null,[c_.map(Ge)])))),{showTPS:o,theme:a,unthrottled:s}=Ae(Pe),{autosave:l,offlineProd:u}=Ae(wt),c=tt({get(){return wt.devSpeed===0},set(p){wt.devSpeed=p?0:null}}),f=le(()=>P("span",null,[dt("Offline Production"),P(Me,{display:"Save-specific"},{default:()=>[dt("*")]})])),h=le(()=>P("span",null,[dt("Autosave"),P(Me,{display:"Save-specific"},{default:()=>[dt("*")]})])),d=le(()=>P("span",null,[dt("Pause game"),P(Me,{display:"Save-specific"},{default:()=>[dt("*")]})]));return(p,v)=>(B(),Rt(Ki,{modelValue:r.value,"onUpdate:modelValue":v[6]||(v[6]=m=>r.value=m)},{header:Bt(()=>[MI]),body:Bt(()=>[P(rp,{title:"Theme",options:E(n),modelValue:E(a),"onUpdate:modelValue":v[0]||(v[0]=m=>oe(a)?a.value=m:null)},null,8,["options","modelValue"]),(B(),Rt(Te(E(i)))),P(Xr,{title:"Show TPS",modelValue:E(o),"onUpdate:modelValue":v[1]||(v[1]=m=>oe(o)?o.value=m:null)},null,8,["modelValue"]),BI,P(Xr,{title:"Unthrottled",modelValue:E(s),"onUpdate:modelValue":v[2]||(v[2]=m=>oe(s)?s.value=m:null)},null,8,["modelValue"]),P(Xr,{title:E(f),modelValue:E(u),"onUpdate:modelValue":v[3]||(v[3]=m=>oe(u)?u.value=m:null)},null,8,["title","modelValue"]),P(Xr,{title:E(h),modelValue:E(l),"onUpdate:modelValue":v[4]||(v[4]=m=>oe(l)?l.value=m:null)},null,8,["title","modelValue"]),E(Ie).enablePausing?(B(),Rt(Xr,{key:0,title:E(d),modelValue:E(c),"onUpdate:modelValue":v[5]||(v[5]=m=>oe(c)?c.value=m:null)},null,8,["title","modelValue"])):yt("",!0)]),_:1},8,["modelValue"]))}});var GI=ne(kI,[["__scopeId","data-v-bc13791c"]]),w_={exports:{}},DI=s_(Nw);/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function Mv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $n(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mv(Object(r),!0).forEach(function(n){HI(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function du(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?du=function(e){return typeof e}:du=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},du(t)}function HI(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function an(){return an=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},an.apply(this,arguments)}function VI(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function $I(t,e){if(t==null)return{};var r=VI(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(r[n]=t[n]))}return r}function jI(t){return XI(t)||zI(t)||WI(t)||YI()}function XI(t){if(Array.isArray(t))return fh(t)}function zI(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function WI(t,e){if(!!t){if(typeof t=="string")return fh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fh(t,e)}}function fh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function YI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var KI="1.14.0";function ai(t){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(t)}var yi=ai(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),al=ai(/Edge/i),Bv=ai(/firefox/i),ms=ai(/safari/i)&&!ai(/chrome/i)&&!ai(/android/i),E_=ai(/iP(ad|od|hone)/i),ZI=ai(/chrome/i)&&ai(/android/i),I_={capture:!1,passive:!1};function de(t,e,r){t.addEventListener(e,r,!yi&&I_)}function se(t,e,r){t.removeEventListener(e,r,!yi&&I_)}function Lu(t,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function qI(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function mn(t,e,r,n){if(t){r=r||document;do{if(e!=null&&(e[0]===">"?t.parentNode===r&&Lu(t,e):Lu(t,e))||n&&t===r)return t;if(t===r)break}while(t=qI(t))}return null}var kv=/\s+/g;function $e(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(kv," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(kv," ")}}function Nt(t,e,r){var n=t&&t.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),e===void 0?r:r[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=r+(typeof r=="string"?"":"px")}}function Ro(t,e){var r="";if(typeof t=="string")r=t;else do{var n=Nt(t,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function C_(t,e,r){if(t){var n=t.getElementsByTagName(e),i=0,o=n.length;if(r)for(;i<o;i++)r(n[i],i);return n}return[]}function kn(){var t=document.scrollingElement;return t||document.documentElement}function De(t,e,r,n,i){if(!(!t.getBoundingClientRect&&t!==window)){var o,a,s,l,u,c,f;if(t!==window&&t.parentNode&&t!==kn()?(o=t.getBoundingClientRect(),a=o.top,s=o.left,l=o.bottom,u=o.right,c=o.height,f=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||r)&&t!==window&&(i=i||t.parentNode,!yi))do if(i&&i.getBoundingClientRect&&(Nt(i,"transform")!=="none"||r&&Nt(i,"position")!=="static")){var h=i.getBoundingClientRect();a-=h.top+parseInt(Nt(i,"border-top-width")),s-=h.left+parseInt(Nt(i,"border-left-width")),l=a+o.height,u=s+o.width;break}while(i=i.parentNode);if(n&&t!==window){var d=Ro(i||t),p=d&&d.a,v=d&&d.d;d&&(a/=v,s/=p,f/=p,c/=v,l=a+c,u=s+f)}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function Gv(t,e,r){for(var n=Ui(t,!0),i=De(t)[e];n;){var o=De(n)[r],a=void 0;if(r==="top"||r==="left"?a=i>=o:a=i<=o,!a)return n;if(n===kn())break;n=Ui(n,!1)}return!1}function Ra(t,e,r,n){for(var i=0,o=0,a=t.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==jt.ghost&&(n||a[o]!==jt.dragged)&&mn(a[o],r.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function np(t,e){for(var r=t.lastElementChild;r&&(r===jt.ghost||Nt(r,"display")==="none"||e&&!Lu(r,e));)r=r.previousElementSibling;return r||null}function Je(t,e){var r=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==jt.clone&&(!e||Lu(t,e))&&r++;return r}function Dv(t){var e=0,r=0,n=kn();if(t)do{var i=Ro(t),o=i.a,a=i.d;e+=t.scrollLeft*o,r+=t.scrollTop*a}while(t!==n&&(t=t.parentNode));return[e,r]}function JI(t,e){for(var r in t)if(!!t.hasOwnProperty(r)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[r][n])return Number(r)}return-1}function Ui(t,e){if(!t||!t.getBoundingClientRect)return kn();var r=t,n=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var i=Nt(r);if(r.clientWidth<r.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return kn();if(n||e)return r;n=!0}}while(r=r.parentNode);return kn()}function QI(t,e){if(t&&e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function Dc(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var gs;function R_(t,e){return function(){if(!gs){var r=arguments,n=this;r.length===1?t.call(n,r[0]):t.apply(n,r),gs=setTimeout(function(){gs=void 0},e)}}}function tC(){clearTimeout(gs),gs=void 0}function N_(t,e,r){t.scrollLeft+=e,t.scrollTop+=r}function ip(t){var e=window.Polymer,r=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):r?r(t).clone(!0)[0]:t.cloneNode(!0)}function Hv(t,e){Nt(t,"position","absolute"),Nt(t,"top",e.top),Nt(t,"left",e.left),Nt(t,"width",e.width),Nt(t,"height",e.height)}function Hc(t){Nt(t,"position",""),Nt(t,"top",""),Nt(t,"left",""),Nt(t,"width",""),Nt(t,"height","")}var Er="Sortable"+new Date().getTime();function eC(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(Nt(i,"display")==="none"||i===jt.ghost)){t.push({target:i,rect:De(i)});var o=$n({},t[t.length-1].rect);if(i.thisAnimationDuration){var a=Ro(i,!0);a&&(o.top-=a.f,o.left-=a.e)}i.fromRect=o}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(JI(t,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,a=0;t.forEach(function(s){var l=0,u=s.target,c=u.fromRect,f=De(u),h=u.prevFromRect,d=u.prevToRect,p=s.rect,v=Ro(u,!0);v&&(f.top-=v.f,f.left-=v.e),u.toRect=f,u.thisAnimationDuration&&Dc(h,f)&&!Dc(c,f)&&(p.top-f.top)/(p.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=nC(p,h,d,i.options)),Dc(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=i.options.animation),i.animate(u,p,f,l)),l&&(o=!0,a=Math.max(a,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),t=[]},animate:function(n,i,o,a){if(a){Nt(n,"transition",""),Nt(n,"transform","");var s=Ro(this.el),l=s&&s.a,u=s&&s.d,c=(i.left-o.left)/(l||1),f=(i.top-o.top)/(u||1);n.animatingX=!!c,n.animatingY=!!f,Nt(n,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=rC(n),Nt(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),Nt(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Nt(n,"transition",""),Nt(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function rC(t){return t.offsetWidth}function nC(t,e,r,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))*n.animation}var Ho=[],Vc={initializeByDefault:!0},sl={mount:function(e){for(var r in Vc)Vc.hasOwnProperty(r)&&!(r in e)&&(e[r]=Vc[r]);Ho.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ho.push(e)},pluginEvent:function(e,r,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";Ho.forEach(function(a){!r[a.pluginName]||(r[a.pluginName][o]&&r[a.pluginName][o]($n({sortable:r},n)),r.options[a.pluginName]&&r[a.pluginName][e]&&r[a.pluginName][e]($n({sortable:r},n)))})},initializePlugins:function(e,r,n,i){Ho.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var u=new s(e,r,e.options);u.sortable=e,u.options=e.options,e[l]=u,an(n,u.defaults)}});for(var o in e.options)if(!!e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);typeof a!="undefined"&&(e.options[o]=a)}},getEventProperties:function(e,r){var n={};return Ho.forEach(function(i){typeof i.eventProperties=="function"&&an(n,i.eventProperties.call(r[i.pluginName],e))}),n},modifyOption:function(e,r,n){var i;return Ho.forEach(function(o){!e[o.pluginName]||o.optionListeners&&typeof o.optionListeners[r]=="function"&&(i=o.optionListeners[r].call(e[o.pluginName],n))}),i}};function rs(t){var e=t.sortable,r=t.rootEl,n=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,d=t.putSortable,p=t.extraEventProperties;if(e=e||r&&r[Er],!!e){var v,m=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!yi&&!al?v=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(n,!0,!0)),v.to=a||r,v.from=s||r,v.item=i||r,v.clone=o,v.oldIndex=l,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=f,v.originalEvent=h,v.pullMode=d?d.lastPutMode:void 0;var g=$n($n({},p),sl.getEventProperties(n,e));for(var b in g)v[b]=g[b];r&&r.dispatchEvent(v),m[y]&&m[y].call(e,v)}}var iC=["evt"],Or=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=$I(n,iC);sl.pluginEvent.bind(jt)(e,r,$n({dragEl:vt,parentEl:Ze,ghostEl:Jt,rootEl:ke,nextEl:fo,lastDownEl:pu,cloneEl:qe,cloneHidden:Ai,dragStarted:ns,putSortable:br,activeSortable:jt.active,originalEvent:i,oldIndex:oa,oldDraggableIndex:ys,newIndex:Hr,newDraggableIndex:Pi,hideGhostForTarget:O_,unhideGhostForTarget:U_,cloneNowHidden:function(){Ai=!0},cloneNowShown:function(){Ai=!1},dispatchSortableEvent:function(s){Pr({sortable:r,name:s,originalEvent:i})}},o))};function Pr(t){rs($n({putSortable:br,cloneEl:qe,targetEl:vt,rootEl:ke,oldIndex:oa,oldDraggableIndex:ys,newIndex:Hr,newDraggableIndex:Pi},t))}var vt,Ze,Jt,ke,fo,pu,qe,Ai,oa,Hr,ys,Pi,Cl,br,ea=!1,Mu=!1,Bu=[],no,sn,$c,jc,Vv,$v,ns,Vo,bs,_s=!1,Rl=!1,vu,xr,Xc=[],hh=!1,ku=[],mc=typeof document!="undefined",Nl=E_,jv=al||yi?"cssFloat":"float",oC=mc&&!ZI&&!E_&&"draggable"in document.createElement("div"),P_=function(){if(!!mc){if(yi)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),S_=function(e,r){var n=Nt(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Ra(e,0,r),a=Ra(e,1,r),s=o&&Nt(o),l=a&&Nt(a),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+De(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+De(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=i&&n[jv]==="none"||a&&n[jv]==="none"&&u+c>i)?"vertical":"horizontal"},aC=function(e,r,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,s=n?r.left:r.top,l=n?r.right:r.bottom,u=n?r.width:r.height;return i===s||o===l||i+a/2===s+u/2},sC=function(e,r){var n;return Bu.some(function(i){var o=i[Er].options.emptyInsertThreshold;if(!(!o||np(i))){var a=De(i),s=e>=a.left-o&&e<=a.right+o,l=r>=a.top-o&&r<=a.bottom+o;if(s&&l)return n=i}}),n},A_=function(e){function r(o,a){return function(s,l,u,c){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(o==null&&(a||f))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return r(o(s,l,u,c),a)(s,l,u,c);var h=(a?s:l).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var n={},i=e.group;(!i||du(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,e.group=n},O_=function(){!P_&&Jt&&Nt(Jt,"display","none")},U_=function(){!P_&&Jt&&Nt(Jt,"display","")};mc&&document.addEventListener("click",function(t){if(Mu)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Mu=!1,!1},!0);var io=function(e){if(vt){e=e.touches?e.touches[0]:e;var r=sC(e.clientX,e.clientY);if(r){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[Er]._onDragOver(n)}}},lC=function(e){vt&&vt.parentNode[Er]._isOutsideThisEl(e.target)};function jt(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=an({},e),t[Er]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return S_(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:jt.supportPointer!==!1&&"PointerEvent"in window&&!ms,emptyInsertThreshold:5};sl.initializePlugins(this,t,r);for(var n in r)!(n in e)&&(e[n]=r[n]);A_(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:oC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?de(t,"pointerdown",this._onTapStart):(de(t,"mousedown",this._onTapStart),de(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(de(t,"dragover",this),de(t,"dragenter",this)),Bu.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),an(this,eC())}jt.prototype={constructor:jt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Vo=null)},_getDirection:function(e,r){return typeof this.options.direction=="function"?this.options.direction.call(this,e,r,vt):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var r=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=i.filter;if(mC(n),!vt&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&ms&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=mn(l,i.draggable,n,!1),!(l&&l.animated)&&pu!==l)){if(oa=Je(l),ys=Je(l,i.draggable),typeof c=="function"){if(c.call(this,e,l,this)){Pr({sortable:r,rootEl:u,name:"filter",targetEl:l,toEl:n,fromEl:n}),Or("filter",r,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=mn(u,f.trim(),n,!1),f)return Pr({sortable:r,rootEl:f,name:"filter",targetEl:l,fromEl:n,toEl:n}),Or("filter",r,{evt:e}),!0}),c)){o&&e.cancelable&&e.preventDefault();return}i.handle&&!mn(u,i.handle,n,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,r,n){var i=this,o=i.el,a=i.options,s=o.ownerDocument,l;if(n&&!vt&&n.parentNode===o){var u=De(n);if(ke=o,vt=n,Ze=vt.parentNode,fo=vt.nextSibling,pu=n,Cl=a.group,jt.dragged=vt,no={target:vt,clientX:(r||e).clientX,clientY:(r||e).clientY},Vv=no.clientX-u.left,$v=no.clientY-u.top,this._lastX=(r||e).clientX,this._lastY=(r||e).clientY,vt.style["will-change"]="all",l=function(){if(Or("delayEnded",i,{evt:e}),jt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Bv&&i.nativeDraggable&&(vt.draggable=!0),i._triggerDragStart(e,r),Pr({sortable:i,name:"choose",originalEvent:e}),$e(vt,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){C_(vt,c.trim(),zc)}),de(s,"dragover",io),de(s,"mousemove",io),de(s,"touchmove",io),de(s,"mouseup",i._onDrop),de(s,"touchend",i._onDrop),de(s,"touchcancel",i._onDrop),Bv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,vt.draggable=!0),Or("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(al||yi))){if(jt.eventCanceled){this._onDrop();return}de(s,"mouseup",i._disableDelayedDrag),de(s,"touchend",i._disableDelayedDrag),de(s,"touchcancel",i._disableDelayedDrag),de(s,"mousemove",i._delayedDragTouchMoveHandler),de(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&de(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var r=e.touches?e.touches[0]:e;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){vt&&zc(vt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;se(e,"mouseup",this._disableDelayedDrag),se(e,"touchend",this._disableDelayedDrag),se(e,"touchcancel",this._disableDelayedDrag),se(e,"mousemove",this._delayedDragTouchMoveHandler),se(e,"touchmove",this._delayedDragTouchMoveHandler),se(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,r){r=r||e.pointerType=="touch"&&e,!this.nativeDraggable||r?this.options.supportPointer?de(document,"pointermove",this._onTouchMove):r?de(document,"touchmove",this._onTouchMove):de(document,"mousemove",this._onTouchMove):(de(vt,"dragend",this),de(ke,"dragstart",this._onDragStart));try{document.selection?mu(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,r){if(ea=!1,ke&&vt){Or("dragStarted",this,{evt:r}),this.nativeDraggable&&de(document,"dragover",lC);var n=this.options;!e&&$e(vt,n.dragClass,!1),$e(vt,n.ghostClass,!0),jt.active=this,e&&this._appendGhost(),Pr({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(sn){this._lastX=sn.clientX,this._lastY=sn.clientY,O_();for(var e=document.elementFromPoint(sn.clientX,sn.clientY),r=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(sn.clientX,sn.clientY),e!==r);)r=e;if(vt.parentNode[Er]._isOutsideThisEl(e),r)do{if(r[Er]){var n=void 0;if(n=r[Er]._onDragOver({clientX:sn.clientX,clientY:sn.clientY,target:e,rootEl:r}),n&&!this.options.dragoverBubble)break}e=r}while(r=r.parentNode);U_()}},_onTouchMove:function(e){if(no){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,o=e.touches?e.touches[0]:e,a=Jt&&Ro(Jt,!0),s=Jt&&a&&a.a,l=Jt&&a&&a.d,u=Nl&&xr&&Dv(xr),c=(o.clientX-no.clientX+i.x)/(s||1)+(u?u[0]-Xc[0]:0)/(s||1),f=(o.clientY-no.clientY+i.y)/(l||1)+(u?u[1]-Xc[1]:0)/(l||1);if(!jt.active&&!ea){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Jt){a?(a.e+=c-($c||0),a.f+=f-(jc||0)):a={a:1,b:0,c:0,d:1,e:c,f};var h="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Nt(Jt,"webkitTransform",h),Nt(Jt,"mozTransform",h),Nt(Jt,"msTransform",h),Nt(Jt,"transform",h),$c=c,jc=f,sn=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Jt){var e=this.options.fallbackOnBody?document.body:ke,r=De(vt,!0,Nl,!0,e),n=this.options;if(Nl){for(xr=e;Nt(xr,"position")==="static"&&Nt(xr,"transform")==="none"&&xr!==document;)xr=xr.parentNode;xr!==document.body&&xr!==document.documentElement?(xr===document&&(xr=kn()),r.top+=xr.scrollTop,r.left+=xr.scrollLeft):xr=kn(),Xc=Dv(xr)}Jt=vt.cloneNode(!0),$e(Jt,n.ghostClass,!1),$e(Jt,n.fallbackClass,!0),$e(Jt,n.dragClass,!0),Nt(Jt,"transition",""),Nt(Jt,"transform",""),Nt(Jt,"box-sizing","border-box"),Nt(Jt,"margin",0),Nt(Jt,"top",r.top),Nt(Jt,"left",r.left),Nt(Jt,"width",r.width),Nt(Jt,"height",r.height),Nt(Jt,"opacity","0.8"),Nt(Jt,"position",Nl?"absolute":"fixed"),Nt(Jt,"zIndex","100000"),Nt(Jt,"pointerEvents","none"),jt.ghost=Jt,e.appendChild(Jt),Nt(Jt,"transform-origin",Vv/parseInt(Jt.style.width)*100+"% "+$v/parseInt(Jt.style.height)*100+"%")}},_onDragStart:function(e,r){var n=this,i=e.dataTransfer,o=n.options;if(Or("dragStart",this,{evt:e}),jt.eventCanceled){this._onDrop();return}Or("setupClone",this),jt.eventCanceled||(qe=ip(vt),qe.draggable=!1,qe.style["will-change"]="",this._hideClone(),$e(qe,this.options.chosenClass,!1),jt.clone=qe),n.cloneId=mu(function(){Or("clone",n),!jt.eventCanceled&&(n.options.removeCloneOnHide||ke.insertBefore(qe,vt),n._hideClone(),Pr({sortable:n,name:"clone"}))}),!r&&$e(vt,o.dragClass,!0),r?(Mu=!0,n._loopId=setInterval(n._emulateDragOver,50)):(se(document,"mouseup",n._onDrop),se(document,"touchend",n._onDrop),se(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,vt)),de(document,"drop",n),Nt(vt,"transform","translateZ(0)")),ea=!0,n._dragStartId=mu(n._dragStarted.bind(n,r,e)),de(document,"selectstart",n),ns=!0,ms&&Nt(document.body,"user-select","none")},_onDragOver:function(e){var r=this.el,n=e.target,i,o,a,s=this.options,l=s.group,u=jt.active,c=Cl===l,f=s.sort,h=br||u,d,p=this,v=!1;if(hh)return;function m(ht,bt){Or(ht,p,$n({evt:e,isOwner:c,axis:d?"vertical":"horizontal",revert:a,dragRect:i,targetRect:o,canSort:f,fromSortable:h,target:n,completed:g,onMove:function(ft,gt){return Pl(ke,r,vt,i,ft,De(ft),e,gt)},changed:b},bt))}function y(){m("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function g(ht){return m("dragOverCompleted",{insertion:ht}),ht&&(c?u._hideClone():u._showClone(p),p!==h&&($e(vt,br?br.options.ghostClass:u.options.ghostClass,!1),$e(vt,s.ghostClass,!0)),br!==p&&p!==jt.active?br=p:p===jt.active&&br&&(br=null),h===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){m("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(n===vt&&!vt.animated||n===r&&!n.animated)&&(Vo=null),!s.dragoverBubble&&!e.rootEl&&n!==document&&(vt.parentNode[Er]._isOutsideThisEl(e.target),!ht&&io(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function b(){Hr=Je(vt),Pi=Je(vt,s.draggable),Pr({sortable:p,name:"change",toEl:r,newIndex:Hr,newDraggableIndex:Pi,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=mn(n,s.draggable,r,!0),m("dragOver"),jt.eventCanceled)return v;if(vt.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return g(!1);if(Mu=!1,u&&!s.disabled&&(c?f||(a=Ze!==ke):br===this||(this.lastPutMode=Cl.checkPull(this,u,vt,e))&&l.checkPut(this,u,vt,e))){if(d=this._getDirection(e,n)==="vertical",i=De(vt),m("dragOverValid"),jt.eventCanceled)return v;if(a)return Ze=ke,y(),this._hideClone(),m("revert"),jt.eventCanceled||(fo?ke.insertBefore(vt,fo):ke.appendChild(vt)),g(!0);var T=np(r,s.draggable);if(!T||hC(e,d,this)&&!T.animated){if(T===vt)return g(!1);if(T&&r===e.target&&(n=T),n&&(o=De(n)),Pl(ke,r,vt,i,n,o,e,!!n)!==!1)return y(),r.appendChild(vt),Ze=r,b(),g(!0)}else if(T&&fC(e,d,this)){var w=Ra(r,0,s,!0);if(w===vt)return g(!1);if(n=w,o=De(n),Pl(ke,r,vt,i,n,o,e,!1)!==!1)return y(),r.insertBefore(vt,w),Ze=r,b(),g(!0)}else if(n.parentNode===r){o=De(n);var x=0,R,I=vt.parentNode!==r,C=!aC(vt.animated&&vt.toRect||i,n.animated&&n.toRect||o,d),S=d?"top":"left",L=Gv(n,"top","top")||Gv(vt,"top","top"),H=L?L.scrollTop:void 0;Vo!==n&&(R=o[S],_s=!1,Rl=!C&&s.invertSwap||I),x=dC(e,n,o,d,C?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Rl,Vo===n);var G;if(x!==0){var k=Je(vt);do k-=x,G=Ze.children[k];while(G&&(Nt(G,"display")==="none"||G===Jt))}if(x===0||G===n)return g(!1);Vo=n,bs=x;var Y=n.nextElementSibling,D=!1;D=x===1;var K=Pl(ke,r,vt,i,n,o,e,D);if(K!==!1)return(K===1||K===-1)&&(D=K===1),hh=!0,setTimeout(cC,30),y(),D&&!Y?r.appendChild(vt):n.parentNode.insertBefore(vt,D?Y:n),L&&N_(L,0,H-L.scrollTop),Ze=vt.parentNode,R!==void 0&&!Rl&&(vu=Math.abs(R-De(n)[S])),b(),g(!0)}if(r.contains(vt))return g(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){se(document,"mousemove",this._onTouchMove),se(document,"touchmove",this._onTouchMove),se(document,"pointermove",this._onTouchMove),se(document,"dragover",io),se(document,"mousemove",io),se(document,"touchmove",io)},_offUpEvents:function(){var e=this.el.ownerDocument;se(e,"mouseup",this._onDrop),se(e,"touchend",this._onDrop),se(e,"pointerup",this._onDrop),se(e,"touchcancel",this._onDrop),se(document,"selectstart",this)},_onDrop:function(e){var r=this.el,n=this.options;if(Hr=Je(vt),Pi=Je(vt,n.draggable),Or("drop",this,{evt:e}),Ze=vt&&vt.parentNode,Hr=Je(vt),Pi=Je(vt,n.draggable),jt.eventCanceled){this._nulling();return}ea=!1,Rl=!1,_s=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),dh(this.cloneId),dh(this._dragStartId),this.nativeDraggable&&(se(document,"drop",this),se(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ms&&Nt(document.body,"user-select",""),Nt(vt,"transform",""),e&&(ns&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),(ke===Ze||br&&br.lastPutMode!=="clone")&&qe&&qe.parentNode&&qe.parentNode.removeChild(qe),vt&&(this.nativeDraggable&&se(vt,"dragend",this),zc(vt),vt.style["will-change"]="",ns&&!ea&&$e(vt,br?br.options.ghostClass:this.options.ghostClass,!1),$e(vt,this.options.chosenClass,!1),Pr({sortable:this,name:"unchoose",toEl:Ze,newIndex:null,newDraggableIndex:null,originalEvent:e}),ke!==Ze?(Hr>=0&&(Pr({rootEl:Ze,name:"add",toEl:Ze,fromEl:ke,originalEvent:e}),Pr({sortable:this,name:"remove",toEl:Ze,originalEvent:e}),Pr({rootEl:Ze,name:"sort",toEl:Ze,fromEl:ke,originalEvent:e}),Pr({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),br&&br.save()):Hr!==oa&&Hr>=0&&(Pr({sortable:this,name:"update",toEl:Ze,originalEvent:e}),Pr({sortable:this,name:"sort",toEl:Ze,originalEvent:e})),jt.active&&((Hr==null||Hr===-1)&&(Hr=oa,Pi=ys),Pr({sortable:this,name:"end",toEl:Ze,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Or("nulling",this),ke=vt=Ze=Jt=fo=qe=pu=Ai=no=sn=ns=Hr=Pi=oa=ys=Vo=bs=br=Cl=jt.dragged=jt.ghost=jt.clone=jt.active=null,ku.forEach(function(e){e.checked=!0}),ku.length=$c=jc=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":vt&&(this._onDragOver(e),uC(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],r,n=this.el.children,i=0,o=n.length,a=this.options;i<o;i++)r=n[i],mn(r,a.draggable,this.el,!1)&&e.push(r.getAttribute(a.dataIdAttr)||vC(r));return e},sort:function(e,r){var n={},i=this.el;this.toArray().forEach(function(o,a){var s=i.children[a];mn(s,this.options.draggable,i,!1)&&(n[o]=s)},this),r&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),r&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,r){return mn(e,r||this.options.draggable,this.el,!1)},option:function(e,r){var n=this.options;if(r===void 0)return n[e];var i=sl.modifyOption(this,e,r);typeof i!="undefined"?n[e]=i:n[e]=r,e==="group"&&A_(n)},destroy:function(){Or("destroy",this);var e=this.el;e[Er]=null,se(e,"mousedown",this._onTapStart),se(e,"touchstart",this._onTapStart),se(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(se(e,"dragover",this),se(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Bu.splice(Bu.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ai){if(Or("hideClone",this),jt.eventCanceled)return;Nt(qe,"display","none"),this.options.removeCloneOnHide&&qe.parentNode&&qe.parentNode.removeChild(qe),Ai=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Ai){if(Or("showClone",this),jt.eventCanceled)return;vt.parentNode==ke&&!this.options.group.revertClone?ke.insertBefore(qe,vt):fo?ke.insertBefore(qe,fo):ke.appendChild(qe),this.options.group.revertClone&&this.animate(vt,qe),Nt(qe,"display",""),Ai=!1}}};function uC(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Pl(t,e,r,n,i,o,a,s){var l,u=t[Er],c=u.options.onMove,f;return window.CustomEvent&&!yi&&!al?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=r,l.draggedRect=n,l.related=i||e,l.relatedRect=o||De(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),c&&(f=c.call(u,l,a)),f}function zc(t){t.draggable=!1}function cC(){hh=!1}function fC(t,e,r){var n=De(Ra(r.el,0,r.options,!0)),i=10;return e?t.clientX<n.left-i||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-i||t.clientY<n.bottom&&t.clientX<n.left}function hC(t,e,r){var n=De(np(r.el,r.options.draggable)),i=10;return e?t.clientX>n.right+i||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+i}function dC(t,e,r,n,i,o,a,s){var l=n?t.clientY:t.clientX,u=n?r.height:r.width,c=n?r.top:r.left,f=n?r.bottom:r.right,h=!1;if(!a){if(s&&vu<u*i){if(!_s&&(bs===1?l>c+u*o/2:l<f-u*o/2)&&(_s=!0),_s)h=!0;else if(bs===1?l<c+vu:l>f-vu)return-bs}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return pC(e)}return h=h||a,h&&(l<c+u*o/2||l>f-u*o/2)?l>c+u/2?1:-1:0}function pC(t){return Je(vt)<Je(t)?1:-1}function vC(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,r=e.length,n=0;r--;)n+=e.charCodeAt(r);return n.toString(36)}function mC(t){ku.length=0;for(var e=t.getElementsByTagName("input"),r=e.length;r--;){var n=e[r];n.checked&&ku.push(n)}}function mu(t){return setTimeout(t,0)}function dh(t){return clearTimeout(t)}mc&&de(document,"touchmove",function(t){(jt.active||ea)&&t.cancelable&&t.preventDefault()});jt.utils={on:de,off:se,css:Nt,find:C_,is:function(e,r){return!!mn(e,r,e,!1)},extend:QI,throttle:R_,closest:mn,toggleClass:$e,clone:ip,index:Je,nextTick:mu,cancelNextTick:dh,detectDirection:S_,getChild:Ra};jt.get=function(t){return t[Er]};jt.mount=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(jt.utils=$n($n({},jt.utils),n.utils)),sl.mount(n)})};jt.create=function(t,e){return new jt(t,e)};jt.version=KI;var sr=[],is,ph,vh=!1,Wc,Yc,Gu,os;function gC(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(r){var n=r.originalEvent;this.sortable.nativeDraggable?de(document,"dragover",this._handleAutoScroll):this.options.supportPointer?de(document,"pointermove",this._handleFallbackAutoScroll):n.touches?de(document,"touchmove",this._handleFallbackAutoScroll):de(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var n=r.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?se(document,"dragover",this._handleAutoScroll):(se(document,"pointermove",this._handleFallbackAutoScroll),se(document,"touchmove",this._handleFallbackAutoScroll),se(document,"mousemove",this._handleFallbackAutoScroll)),Xv(),gu(),tC()},nulling:function(){Gu=ph=is=vh=os=Wc=Yc=null,sr.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,n){var i=this,o=(r.touches?r.touches[0]:r).clientX,a=(r.touches?r.touches[0]:r).clientY,s=document.elementFromPoint(o,a);if(Gu=r,n||this.options.forceAutoScrollFallback||al||yi||ms){Kc(r,this.options,s,n);var l=Ui(s,!0);vh&&(!os||o!==Wc||a!==Yc)&&(os&&Xv(),os=setInterval(function(){var u=Ui(document.elementFromPoint(o,a),!0);u!==l&&(l=u,gu()),Kc(r,i.options,u,n)},10),Wc=o,Yc=a)}else{if(!this.options.bubbleScroll||Ui(s,!0)===kn()){gu();return}Kc(r,this.options,Ui(s,!1),!1)}}},an(t,{pluginName:"scroll",initializeByDefault:!0})}function gu(){sr.forEach(function(t){clearInterval(t.pid)}),sr=[]}function Xv(){clearInterval(os)}var Kc=R_(function(t,e,r,n){if(!!e.scroll){var i=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,l=kn(),u=!1,c;ph!==r&&(ph=r,gu(),is=e.scroll,c=e.scrollFn,is===!0&&(is=Ui(r,!0)));var f=0,h=is;do{var d=h,p=De(d),v=p.top,m=p.bottom,y=p.left,g=p.right,b=p.width,T=p.height,w=void 0,x=void 0,R=d.scrollWidth,I=d.scrollHeight,C=Nt(d),S=d.scrollLeft,L=d.scrollTop;d===l?(w=b<R&&(C.overflowX==="auto"||C.overflowX==="scroll"||C.overflowX==="visible"),x=T<I&&(C.overflowY==="auto"||C.overflowY==="scroll"||C.overflowY==="visible")):(w=b<R&&(C.overflowX==="auto"||C.overflowX==="scroll"),x=T<I&&(C.overflowY==="auto"||C.overflowY==="scroll"));var H=w&&(Math.abs(g-i)<=a&&S+b<R)-(Math.abs(y-i)<=a&&!!S),G=x&&(Math.abs(m-o)<=a&&L+T<I)-(Math.abs(v-o)<=a&&!!L);if(!sr[f])for(var k=0;k<=f;k++)sr[k]||(sr[k]={});(sr[f].vx!=H||sr[f].vy!=G||sr[f].el!==d)&&(sr[f].el=d,sr[f].vx=H,sr[f].vy=G,clearInterval(sr[f].pid),(H!=0||G!=0)&&(u=!0,sr[f].pid=setInterval(function(){n&&this.layer===0&&jt.active._onTouchMove(Gu);var Y=sr[this.layer].vy?sr[this.layer].vy*s:0,D=sr[this.layer].vx?sr[this.layer].vx*s:0;typeof c=="function"&&c.call(jt.dragged.parentNode[Er],D,Y,t,Gu,sr[this.layer].el)!=="continue"||N_(sr[this.layer].el,D,Y)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==l&&(h=Ui(h,!1)));vh=u}},30),F_=function(e){var r=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(!!r){var u=n||o;s();var c=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(a("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function op(){}op.prototype={startIndex:null,dragStart:function(e){var r=e.oldDraggableIndex;this.startIndex=r},onSpill:function(e){var r=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=Ra(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(r,i):this.sortable.el.appendChild(r),this.sortable.animateAll(),n&&n.animateAll()},drop:F_};an(op,{pluginName:"revertOnSpill"});function ap(){}ap.prototype={onSpill:function(e){var r=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),i.animateAll()},drop:F_};an(ap,{pluginName:"removeOnSpill"});var Qr;function yC(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(r){var n=r.dragEl;Qr=n},dragOverValid:function(r){var n=r.completed,i=r.target,o=r.onMove,a=r.activeSortable,s=r.changed,l=r.cancel;if(!!a.options.swap){var u=this.sortable.el,c=this.options;if(i&&i!==u){var f=Qr;o(i)!==!1?($e(i,c.swapClass,!0),Qr=i):Qr=null,f&&f!==Qr&&$e(f,c.swapClass,!1)}s(),n(!0),l()}},drop:function(r){var n=r.activeSortable,i=r.putSortable,o=r.dragEl,a=i||this.sortable,s=this.options;Qr&&$e(Qr,s.swapClass,!1),Qr&&(s.swap||i&&i.options.swap)&&o!==Qr&&(a.captureAnimationState(),a!==n&&n.captureAnimationState(),bC(o,Qr),a.animateAll(),a!==n&&n.animateAll())},nulling:function(){Qr=null}},an(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Qr}}})}function bC(t,e){var r=t.parentNode,n=e.parentNode,i,o;!r||!n||r.isEqualNode(e)||n.isEqualNode(t)||(i=Je(t),o=Je(e),r.isEqualNode(n)&&i<o&&o++,r.insertBefore(e,r.children[i]),n.insertBefore(t,n.children[o]))}var Zt=[],Dr=[],Da,ln,Ha=!1,Ur=!1,$o=!1,Oe,Va,Sl;function _C(){function t(e){for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));e.options.supportPointer?de(document,"pointerup",this._deselectMultiDrag):(de(document,"mouseup",this._deselectMultiDrag),de(document,"touchend",this._deselectMultiDrag)),de(document,"keydown",this._checkKeyDown),de(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(i,o){var a="";Zt.length&&ln===e?Zt.forEach(function(s,l){a+=(l?", ":"")+s.textContent}):a=o.textContent,i.setData("Text",a)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(r){var n=r.dragEl;Oe=n},delayEnded:function(){this.isMultiDrag=~Zt.indexOf(Oe)},setupClone:function(r){var n=r.sortable,i=r.cancel;if(!!this.isMultiDrag){for(var o=0;o<Zt.length;o++)Dr.push(ip(Zt[o])),Dr[o].sortableIndex=Zt[o].sortableIndex,Dr[o].draggable=!1,Dr[o].style["will-change"]="",$e(Dr[o],this.options.selectedClass,!1),Zt[o]===Oe&&$e(Dr[o],this.options.chosenClass,!1);n._hideClone(),i()}},clone:function(r){var n=r.sortable,i=r.rootEl,o=r.dispatchSortableEvent,a=r.cancel;!this.isMultiDrag||this.options.removeCloneOnHide||Zt.length&&ln===n&&(zv(!0,i),o("clone"),a())},showClone:function(r){var n=r.cloneNowShown,i=r.rootEl,o=r.cancel;!this.isMultiDrag||(zv(!1,i),Dr.forEach(function(a){Nt(a,"display","")}),n(),Sl=!1,o())},hideClone:function(r){var n=this;r.sortable;var i=r.cloneNowHidden,o=r.cancel;!this.isMultiDrag||(Dr.forEach(function(a){Nt(a,"display","none"),n.options.removeCloneOnHide&&a.parentNode&&a.parentNode.removeChild(a)}),i(),Sl=!0,o())},dragStartGlobal:function(r){r.sortable,!this.isMultiDrag&&ln&&ln.multiDrag._deselectMultiDrag(),Zt.forEach(function(n){n.sortableIndex=Je(n)}),Zt=Zt.sort(function(n,i){return n.sortableIndex-i.sortableIndex}),$o=!0},dragStarted:function(r){var n=this,i=r.sortable;if(!!this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){Zt.forEach(function(a){a!==Oe&&Nt(a,"position","absolute")});var o=De(Oe,!1,!0,!0);Zt.forEach(function(a){a!==Oe&&Hv(a,o)}),Ur=!0,Ha=!0}i.animateAll(function(){Ur=!1,Ha=!1,n.options.animation&&Zt.forEach(function(a){Hc(a)}),n.options.sort&&Al()})}},dragOver:function(r){var n=r.target,i=r.completed,o=r.cancel;Ur&&~Zt.indexOf(n)&&(i(!1),o())},revert:function(r){var n=r.fromSortable,i=r.rootEl,o=r.sortable,a=r.dragRect;Zt.length>1&&(Zt.forEach(function(s){o.addAnimationState({target:s,rect:Ur?De(s):a}),Hc(s),s.fromRect=a,n.removeAnimationState(s)}),Ur=!1,xC(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(r){var n=r.sortable,i=r.isOwner,o=r.insertion,a=r.activeSortable,s=r.parentEl,l=r.putSortable,u=this.options;if(o){if(i&&a._hideClone(),Ha=!1,u.animation&&Zt.length>1&&(Ur||!i&&!a.options.sort&&!l)){var c=De(Oe,!1,!0,!0);Zt.forEach(function(h){h!==Oe&&(Hv(h,c),s.appendChild(h))}),Ur=!0}if(!i)if(Ur||Al(),Zt.length>1){var f=Sl;a._showClone(n),a.options.animation&&!Sl&&f&&Dr.forEach(function(h){a.addAnimationState({target:h,rect:Va}),h.fromRect=Va,h.thisAnimationDuration=null})}else a._showClone(n)}},dragOverAnimationCapture:function(r){var n=r.dragRect,i=r.isOwner,o=r.activeSortable;if(Zt.forEach(function(s){s.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){Va=an({},n);var a=Ro(Oe,!0);Va.top-=a.f,Va.left-=a.e}},dragOverAnimationComplete:function(){Ur&&(Ur=!1,Al())},drop:function(r){var n=r.originalEvent,i=r.rootEl,o=r.parentEl,a=r.sortable,s=r.dispatchSortableEvent,l=r.oldIndex,u=r.putSortable,c=u||this.sortable;if(!!n){var f=this.options,h=o.children;if(!$o)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),$e(Oe,f.selectedClass,!~Zt.indexOf(Oe)),~Zt.indexOf(Oe))Zt.splice(Zt.indexOf(Oe),1),Da=null,rs({sortable:a,rootEl:i,name:"deselect",targetEl:Oe,originalEvt:n});else{if(Zt.push(Oe),rs({sortable:a,rootEl:i,name:"select",targetEl:Oe,originalEvt:n}),n.shiftKey&&Da&&a.el.contains(Da)){var d=Je(Da),p=Je(Oe);if(~d&&~p&&d!==p){var v,m;for(p>d?(m=d,v=p):(m=p,v=d+1);m<v;m++)~Zt.indexOf(h[m])||($e(h[m],f.selectedClass,!0),Zt.push(h[m]),rs({sortable:a,rootEl:i,name:"select",targetEl:h[m],originalEvt:n}))}}else Da=Oe;ln=c}if($o&&this.isMultiDrag){if(Ur=!1,(o[Er].options.sort||o!==i)&&Zt.length>1){var y=De(Oe),g=Je(Oe,":not(."+this.options.selectedClass+")");if(!Ha&&f.animation&&(Oe.thisAnimationDuration=null),c.captureAnimationState(),!Ha&&(f.animation&&(Oe.fromRect=y,Zt.forEach(function(T){if(T.thisAnimationDuration=null,T!==Oe){var w=Ur?De(T):y;T.fromRect=w,c.addAnimationState({target:T,rect:w})}})),Al(),Zt.forEach(function(T){h[g]?o.insertBefore(T,h[g]):o.appendChild(T),g++}),l===Je(Oe))){var b=!1;Zt.forEach(function(T){if(T.sortableIndex!==Je(T)){b=!0;return}}),b&&s("update")}Zt.forEach(function(T){Hc(T)}),c.animateAll()}ln=c}(i===o||u&&u.lastPutMode!=="clone")&&Dr.forEach(function(T){T.parentNode&&T.parentNode.removeChild(T)})}},nullingGlobal:function(){this.isMultiDrag=$o=!1,Dr.length=0},destroyGlobal:function(){this._deselectMultiDrag(),se(document,"pointerup",this._deselectMultiDrag),se(document,"mouseup",this._deselectMultiDrag),se(document,"touchend",this._deselectMultiDrag),se(document,"keydown",this._checkKeyDown),se(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(r){if(!(typeof $o!="undefined"&&$o)&&ln===this.sortable&&!(r&&mn(r.target,this.options.draggable,this.sortable.el,!1))&&!(r&&r.button!==0))for(;Zt.length;){var n=Zt[0];$e(n,this.options.selectedClass,!1),Zt.shift(),rs({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n,originalEvt:r})}},_checkKeyDown:function(r){r.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(r){r.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},an(t,{pluginName:"multiDrag",utils:{select:function(r){var n=r.parentNode[Er];!n||!n.options.multiDrag||~Zt.indexOf(r)||(ln&&ln!==n&&(ln.multiDrag._deselectMultiDrag(),ln=n),$e(r,n.options.selectedClass,!0),Zt.push(r))},deselect:function(r){var n=r.parentNode[Er],i=Zt.indexOf(r);!n||!n.options.multiDrag||!~i||($e(r,n.options.selectedClass,!1),Zt.splice(i,1))}},eventProperties:function(){var r=this,n=[],i=[];return Zt.forEach(function(o){n.push({multiDragElement:o,index:o.sortableIndex});var a;Ur&&o!==Oe?a=-1:Ur?a=Je(o,":not(."+r.options.selectedClass+")"):a=Je(o),i.push({multiDragElement:o,index:a})}),{items:jI(Zt),clones:[].concat(Dr),oldIndicies:n,newIndicies:i}},optionListeners:{multiDragKey:function(r){return r=r.toLowerCase(),r==="ctrl"?r="Control":r.length>1&&(r=r.charAt(0).toUpperCase()+r.substr(1)),r}}})}function xC(t,e){Zt.forEach(function(r,n){var i=e.children[r.sortableIndex+(t?Number(n):0)];i?e.insertBefore(r,i):e.appendChild(r)})}function zv(t,e){Dr.forEach(function(r,n){var i=e.children[r.sortableIndex+(t?Number(n):0)];i?e.insertBefore(r,i):e.appendChild(r)})}function Al(){Zt.forEach(function(t){t!==Oe&&t.parentNode&&t.parentNode.removeChild(t)})}jt.mount(new gC);jt.mount(ap,op);var TC=Object.freeze(Object.defineProperty({__proto__:null,default:jt,MultiDrag:_C,Sortable:jt,Swap:yC},Symbol.toStringTag,{value:"Module"})),wC=s_(TC);(function(t,e){(function(n,i){t.exports=i(DI,wC)})(typeof self!="undefined"?self:cu,function(r,n){return function(i){var o={};function a(s){if(o[s])return o[s].exports;var l=o[s]={i:s,l:!1,exports:{}};return i[s].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=i,a.c=o,a.d=function(s,l,u){a.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:u})},a.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,l){if(l&1&&(s=a(s)),l&8||l&4&&typeof s=="object"&&s&&s.__esModule)return s;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:s}),l&2&&typeof s!="string")for(var c in s)a.d(u,c,function(f){return s[f]}.bind(null,c));return u},a.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(l,"a",l),l},a.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},a.p="",a(a.s="fb15")}({"00ee":function(i,o,a){var s=a("b622"),l=s("toStringTag"),u={};u[l]="z",i.exports=String(u)==="[object z]"},"0366":function(i,o,a){var s=a("1c0b");i.exports=function(l,u,c){if(s(l),u===void 0)return l;switch(c){case 0:return function(){return l.call(u)};case 1:return function(f){return l.call(u,f)};case 2:return function(f,h){return l.call(u,f,h)};case 3:return function(f,h,d){return l.call(u,f,h,d)}}return function(){return l.apply(u,arguments)}}},"057f":function(i,o,a){var s=a("fc6a"),l=a("241c").f,u={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(h){try{return l(h)}catch{return c.slice()}};i.exports.f=function(d){return c&&u.call(d)=="[object Window]"?f(d):l(s(d))}},"06cf":function(i,o,a){var s=a("83ab"),l=a("d1e7"),u=a("5c6c"),c=a("fc6a"),f=a("c04e"),h=a("5135"),d=a("0cfb"),p=Object.getOwnPropertyDescriptor;o.f=s?p:function(m,y){if(m=c(m),y=f(y,!0),d)try{return p(m,y)}catch{}if(h(m,y))return u(!l.f.call(m,y),m[y])}},"0cfb":function(i,o,a){var s=a("83ab"),l=a("d039"),u=a("cc12");i.exports=!s&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(i,o,a){var s=a("23e7"),l=a("d58f").left,u=a("a640"),c=a("ae40"),f=u("reduce"),h=c("reduce",{1:0});s({target:"Array",proto:!0,forced:!f||!h},{reduce:function(p){return l(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(i,o,a){var s=a("c6b6"),l=a("9263");i.exports=function(u,c){var f=u.exec;if(typeof f=="function"){var h=f.call(u,c);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}if(s(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,c)}},"159b":function(i,o,a){var s=a("da84"),l=a("fdbc"),u=a("17c2"),c=a("9112");for(var f in l){var h=s[f],d=h&&h.prototype;if(d&&d.forEach!==u)try{c(d,"forEach",u)}catch{d.forEach=u}}},"17c2":function(i,o,a){var s=a("b727").forEach,l=a("a640"),u=a("ae40"),c=l("forEach"),f=u("forEach");i.exports=!c||!f?function(d){return s(this,d,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(i,o,a){var s=a("d066");i.exports=s("document","documentElement")},"1c0b":function(i,o){i.exports=function(a){if(typeof a!="function")throw TypeError(String(a)+" is not a function");return a}},"1c7e":function(i,o,a){var s=a("b622"),l=s("iterator"),u=!1;try{var c=0,f={next:function(){return{done:!!c++}},return:function(){u=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}i.exports=function(h,d){if(!d&&!u)return!1;var p=!1;try{var v={};v[l]=function(){return{next:function(){return{done:p=!0}}}},h(v)}catch{}return p}},"1d80":function(i,o){i.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},"1dde":function(i,o,a){var s=a("d039"),l=a("b622"),u=a("2d00"),c=l("species");i.exports=function(f){return u>=51||!s(function(){var h=[],d=h.constructor={};return d[c]=function(){return{foo:1}},h[f](Boolean).foo!==1})}},"23cb":function(i,o,a){var s=a("a691"),l=Math.max,u=Math.min;i.exports=function(c,f){var h=s(c);return h<0?l(h+f,0):u(h,f)}},"23e7":function(i,o,a){var s=a("da84"),l=a("06cf").f,u=a("9112"),c=a("6eeb"),f=a("ce4e"),h=a("e893"),d=a("94ca");i.exports=function(p,v){var m=p.target,y=p.global,g=p.stat,b,T,w,x,R,I;if(y?T=s:g?T=s[m]||f(m,{}):T=(s[m]||{}).prototype,T)for(w in v){if(R=v[w],p.noTargetGet?(I=l(T,w),x=I&&I.value):x=T[w],b=d(y?w:m+(g?".":"#")+w,p.forced),!b&&x!==void 0){if(typeof R==typeof x)continue;h(R,x)}(p.sham||x&&x.sham)&&u(R,"sham",!0),c(T,w,R,p)}}},"241c":function(i,o,a){var s=a("ca84"),l=a("7839"),u=l.concat("length","prototype");o.f=Object.getOwnPropertyNames||function(f){return s(f,u)}},"25f0":function(i,o,a){var s=a("6eeb"),l=a("825a"),u=a("d039"),c=a("ad6d"),f="toString",h=RegExp.prototype,d=h[f],p=u(function(){return d.call({source:"a",flags:"b"})!="/a/b"}),v=d.name!=f;(p||v)&&s(RegExp.prototype,f,function(){var y=l(this),g=String(y.source),b=y.flags,T=String(b===void 0&&y instanceof RegExp&&!("flags"in h)?c.call(y):b);return"/"+g+"/"+T},{unsafe:!0})},"2ca0":function(i,o,a){var s=a("23e7"),l=a("06cf").f,u=a("50c4"),c=a("5a34"),f=a("1d80"),h=a("ab13"),d=a("c430"),p="".startsWith,v=Math.min,m=h("startsWith"),y=!d&&!m&&!!function(){var g=l(String.prototype,"startsWith");return g&&!g.writable}();s({target:"String",proto:!0,forced:!y&&!m},{startsWith:function(b){var T=String(f(this));c(b);var w=u(v(arguments.length>1?arguments[1]:void 0,T.length)),x=String(b);return p?p.call(T,x,w):T.slice(w,w+x.length)===x}})},"2d00":function(i,o,a){var s=a("da84"),l=a("342f"),u=s.process,c=u&&u.versions,f=c&&c.v8,h,d;f?(h=f.split("."),d=h[0]+h[1]):l&&(h=l.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=l.match(/Chrome\/(\d+)/),h&&(d=h[1]))),i.exports=d&&+d},"342f":function(i,o,a){var s=a("d066");i.exports=s("navigator","userAgent")||""},"35a1":function(i,o,a){var s=a("f5df"),l=a("3f8c"),u=a("b622"),c=u("iterator");i.exports=function(f){if(f!=null)return f[c]||f["@@iterator"]||l[s(f)]}},"37e8":function(i,o,a){var s=a("83ab"),l=a("9bf2"),u=a("825a"),c=a("df75");i.exports=s?Object.defineProperties:function(h,d){u(h);for(var p=c(d),v=p.length,m=0,y;v>m;)l.f(h,y=p[m++],d[y]);return h}},"3bbe":function(i,o,a){var s=a("861d");i.exports=function(l){if(!s(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(i,o,a){var s=a("6547").charAt,l=a("69f3"),u=a("7dd0"),c="String Iterator",f=l.set,h=l.getterFor(c);u(String,"String",function(d){f(this,{type:c,string:String(d),index:0})},function(){var p=h(this),v=p.string,m=p.index,y;return m>=v.length?{value:void 0,done:!0}:(y=s(v,m),p.index+=y.length,{value:y,done:!1})})},"3f8c":function(i,o){i.exports={}},4160:function(i,o,a){var s=a("23e7"),l=a("17c2");s({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(i,o,a){var s=a("da84");i.exports=s},"44ad":function(i,o,a){var s=a("d039"),l=a("c6b6"),u="".split;i.exports=s(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return l(c)=="String"?u.call(c,""):Object(c)}:Object},"44d2":function(i,o,a){var s=a("b622"),l=a("7c73"),u=a("9bf2"),c=s("unscopables"),f=Array.prototype;f[c]==null&&u.f(f,c,{configurable:!0,value:l(null)}),i.exports=function(h){f[c][h]=!0}},"44e7":function(i,o,a){var s=a("861d"),l=a("c6b6"),u=a("b622"),c=u("match");i.exports=function(f){var h;return s(f)&&((h=f[c])!==void 0?!!h:l(f)=="RegExp")}},4930:function(i,o,a){var s=a("d039");i.exports=!!Object.getOwnPropertySymbols&&!s(function(){return!String(Symbol())})},"4d64":function(i,o,a){var s=a("fc6a"),l=a("50c4"),u=a("23cb"),c=function(f){return function(h,d,p){var v=s(h),m=l(v.length),y=u(p,m),g;if(f&&d!=d){for(;m>y;)if(g=v[y++],g!=g)return!0}else for(;m>y;y++)if((f||y in v)&&v[y]===d)return f||y||0;return!f&&-1}};i.exports={includes:c(!0),indexOf:c(!1)}},"4de4":function(i,o,a){var s=a("23e7"),l=a("b727").filter,u=a("1dde"),c=a("ae40"),f=u("filter"),h=c("filter");s({target:"Array",proto:!0,forced:!f||!h},{filter:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(i,o,a){var s=a("0366"),l=a("7b0b"),u=a("9bdd"),c=a("e95a"),f=a("50c4"),h=a("8418"),d=a("35a1");i.exports=function(v){var m=l(v),y=typeof this=="function"?this:Array,g=arguments.length,b=g>1?arguments[1]:void 0,T=b!==void 0,w=d(m),x=0,R,I,C,S,L,H;if(T&&(b=s(b,g>2?arguments[2]:void 0,2)),w!=null&&!(y==Array&&c(w)))for(S=w.call(m),L=S.next,I=new y;!(C=L.call(S)).done;x++)H=T?u(S,b,[C.value,x],!0):C.value,h(I,x,H);else for(R=f(m.length),I=new y(R);R>x;x++)H=T?b(m[x],x):m[x],h(I,x,H);return I.length=x,I}},"4fad":function(i,o,a){var s=a("23e7"),l=a("6f53").entries;s({target:"Object",stat:!0},{entries:function(c){return l(c)}})},"50c4":function(i,o,a){var s=a("a691"),l=Math.min;i.exports=function(u){return u>0?l(s(u),9007199254740991):0}},5135:function(i,o){var a={}.hasOwnProperty;i.exports=function(s,l){return a.call(s,l)}},5319:function(i,o,a){var s=a("d784"),l=a("825a"),u=a("7b0b"),c=a("50c4"),f=a("a691"),h=a("1d80"),d=a("8aa5"),p=a("14c3"),v=Math.max,m=Math.min,y=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,T=function(w){return w===void 0?w:String(w)};s("replace",2,function(w,x,R,I){var C=I.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,S=I.REPLACE_KEEPS_$0,L=C?"$":"$0";return[function(k,Y){var D=h(this),K=k==null?void 0:k[w];return K!==void 0?K.call(k,D,Y):x.call(String(D),k,Y)},function(G,k){if(!C&&S||typeof k=="string"&&k.indexOf(L)===-1){var Y=R(x,G,this,k);if(Y.done)return Y.value}var D=l(G),K=String(this),ht=typeof k=="function";ht||(k=String(k));var bt=D.global;if(bt){var W=D.unicode;D.lastIndex=0}for(var ft=[];;){var gt=p(D,K);if(gt===null||(ft.push(gt),!bt))break;var _t=String(gt[0]);_t===""&&(D.lastIndex=d(K,c(D.lastIndex),W))}for(var V="",Z=0,lt=0;lt<ft.length;lt++){gt=ft[lt];for(var ut=String(gt[0]),Gt=v(m(f(gt.index),K.length),0),it=[],kt=1;kt<gt.length;kt++)it.push(T(gt[kt]));var Vt=gt.groups;if(ht){var Xt=[ut].concat(it,Gt,K);Vt!==void 0&&Xt.push(Vt);var N=String(k.apply(void 0,Xt))}else N=H(ut,K,Gt,it,Vt,k);Gt>=Z&&(V+=K.slice(Z,Gt)+N,Z=Gt+ut.length)}return V+K.slice(Z)}];function H(G,k,Y,D,K,ht){var bt=Y+G.length,W=D.length,ft=b;return K!==void 0&&(K=u(K),ft=g),x.call(ht,ft,function(gt,_t){var V;switch(_t.charAt(0)){case"$":return"$";case"&":return G;case"`":return k.slice(0,Y);case"'":return k.slice(bt);case"<":V=K[_t.slice(1,-1)];break;default:var Z=+_t;if(Z===0)return gt;if(Z>W){var lt=y(Z/10);return lt===0?gt:lt<=W?D[lt-1]===void 0?_t.charAt(1):D[lt-1]+_t.charAt(1):gt}V=D[Z-1]}return V===void 0?"":V})}})},5692:function(i,o,a){var s=a("c430"),l=a("c6cd");(i.exports=function(u,c){return l[u]||(l[u]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:s?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(i,o,a){var s=a("d066"),l=a("241c"),u=a("7418"),c=a("825a");i.exports=s("Reflect","ownKeys")||function(h){var d=l.f(c(h)),p=u.f;return p?d.concat(p(h)):d}},"5a34":function(i,o,a){var s=a("44e7");i.exports=function(l){if(s(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(i,o){i.exports=function(a,s){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:s}}},"5db7":function(i,o,a){var s=a("23e7"),l=a("a2bf"),u=a("7b0b"),c=a("50c4"),f=a("1c0b"),h=a("65f0");s({target:"Array",proto:!0},{flatMap:function(p){var v=u(this),m=c(v.length),y;return f(p),y=h(v,0),y.length=l(y,v,v,m,0,1,p,arguments.length>1?arguments[1]:void 0),y}})},6547:function(i,o,a){var s=a("a691"),l=a("1d80"),u=function(c){return function(f,h){var d=String(l(f)),p=s(h),v=d.length,m,y;return p<0||p>=v?c?"":void 0:(m=d.charCodeAt(p),m<55296||m>56319||p+1===v||(y=d.charCodeAt(p+1))<56320||y>57343?c?d.charAt(p):m:c?d.slice(p,p+2):(m-55296<<10)+(y-56320)+65536)}};i.exports={codeAt:u(!1),charAt:u(!0)}},"65f0":function(i,o,a){var s=a("861d"),l=a("e8b5"),u=a("b622"),c=u("species");i.exports=function(f,h){var d;return l(f)&&(d=f.constructor,typeof d=="function"&&(d===Array||l(d.prototype))?d=void 0:s(d)&&(d=d[c],d===null&&(d=void 0))),new(d===void 0?Array:d)(h===0?0:h)}},"69f3":function(i,o,a){var s=a("7f9a"),l=a("da84"),u=a("861d"),c=a("9112"),f=a("5135"),h=a("f772"),d=a("d012"),p=l.WeakMap,v,m,y,g=function(C){return y(C)?m(C):v(C,{})},b=function(C){return function(S){var L;if(!u(S)||(L=m(S)).type!==C)throw TypeError("Incompatible receiver, "+C+" required");return L}};if(s){var T=new p,w=T.get,x=T.has,R=T.set;v=function(C,S){return R.call(T,C,S),S},m=function(C){return w.call(T,C)||{}},y=function(C){return x.call(T,C)}}else{var I=h("state");d[I]=!0,v=function(C,S){return c(C,I,S),S},m=function(C){return f(C,I)?C[I]:{}},y=function(C){return f(C,I)}}i.exports={set:v,get:m,has:y,enforce:g,getterFor:b}},"6eeb":function(i,o,a){var s=a("da84"),l=a("9112"),u=a("5135"),c=a("ce4e"),f=a("8925"),h=a("69f3"),d=h.get,p=h.enforce,v=String(String).split("String");(i.exports=function(m,y,g,b){var T=b?!!b.unsafe:!1,w=b?!!b.enumerable:!1,x=b?!!b.noTargetGet:!1;if(typeof g=="function"&&(typeof y=="string"&&!u(g,"name")&&l(g,"name",y),p(g).source=v.join(typeof y=="string"?y:"")),m===s){w?m[y]=g:c(y,g);return}else T?!x&&m[y]&&(w=!0):delete m[y];w?m[y]=g:l(m,y,g)})(Function.prototype,"toString",function(){return typeof this=="function"&&d(this).source||f(this)})},"6f53":function(i,o,a){var s=a("83ab"),l=a("df75"),u=a("fc6a"),c=a("d1e7").f,f=function(h){return function(d){for(var p=u(d),v=l(p),m=v.length,y=0,g=[],b;m>y;)b=v[y++],(!s||c.call(p,b))&&g.push(h?[b,p[b]]:p[b]);return g}};i.exports={entries:f(!0),values:f(!1)}},"73d9":function(i,o,a){var s=a("44d2");s("flatMap")},7418:function(i,o){o.f=Object.getOwnPropertySymbols},"746f":function(i,o,a){var s=a("428f"),l=a("5135"),u=a("e538"),c=a("9bf2").f;i.exports=function(f){var h=s.Symbol||(s.Symbol={});l(h,f)||c(h,f,{value:u.f(f)})}},7839:function(i,o){i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(i,o,a){var s=a("1d80");i.exports=function(l){return Object(s(l))}},"7c73":function(i,o,a){var s=a("825a"),l=a("37e8"),u=a("7839"),c=a("d012"),f=a("1be4"),h=a("cc12"),d=a("f772"),p=">",v="<",m="prototype",y="script",g=d("IE_PROTO"),b=function(){},T=function(C){return v+y+p+C+v+"/"+y+p},w=function(C){C.write(T("")),C.close();var S=C.parentWindow.Object;return C=null,S},x=function(){var C=h("iframe"),S="java"+y+":",L;return C.style.display="none",f.appendChild(C),C.src=String(S),L=C.contentWindow.document,L.open(),L.write(T("document.F=Object")),L.close(),L.F},R,I=function(){try{R=document.domain&&new ActiveXObject("htmlfile")}catch{}I=R?w(R):x();for(var C=u.length;C--;)delete I[m][u[C]];return I()};c[g]=!0,i.exports=Object.create||function(S,L){var H;return S!==null?(b[m]=s(S),H=new b,b[m]=null,H[g]=S):H=I(),L===void 0?H:l(H,L)}},"7dd0":function(i,o,a){var s=a("23e7"),l=a("9ed3"),u=a("e163"),c=a("d2bb"),f=a("d44e"),h=a("9112"),d=a("6eeb"),p=a("b622"),v=a("c430"),m=a("3f8c"),y=a("ae93"),g=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,T=p("iterator"),w="keys",x="values",R="entries",I=function(){return this};i.exports=function(C,S,L,H,G,k,Y){l(L,S,H);var D=function(lt){if(lt===G&&ft)return ft;if(!b&&lt in bt)return bt[lt];switch(lt){case w:return function(){return new L(this,lt)};case x:return function(){return new L(this,lt)};case R:return function(){return new L(this,lt)}}return function(){return new L(this)}},K=S+" Iterator",ht=!1,bt=C.prototype,W=bt[T]||bt["@@iterator"]||G&&bt[G],ft=!b&&W||D(G),gt=S=="Array"&&bt.entries||W,_t,V,Z;if(gt&&(_t=u(gt.call(new C)),g!==Object.prototype&&_t.next&&(!v&&u(_t)!==g&&(c?c(_t,g):typeof _t[T]!="function"&&h(_t,T,I)),f(_t,K,!0,!0),v&&(m[K]=I))),G==x&&W&&W.name!==x&&(ht=!0,ft=function(){return W.call(this)}),(!v||Y)&&bt[T]!==ft&&h(bt,T,ft),m[S]=ft,G)if(V={values:D(x),keys:k?ft:D(w),entries:D(R)},Y)for(Z in V)(b||ht||!(Z in bt))&&d(bt,Z,V[Z]);else s({target:S,proto:!0,forced:b||ht},V);return V}},"7f9a":function(i,o,a){var s=a("da84"),l=a("8925"),u=s.WeakMap;i.exports=typeof u=="function"&&/native code/.test(l(u))},"825a":function(i,o,a){var s=a("861d");i.exports=function(l){if(!s(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(i,o,a){var s=a("d039");i.exports=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(i,o,a){var s=a("c04e"),l=a("9bf2"),u=a("5c6c");i.exports=function(c,f,h){var d=s(f);d in c?l.f(c,d,u(0,h)):c[d]=h}},"861d":function(i,o){i.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},8875:function(i,o,a){var s,l,u;(function(c,f){l=[],s=f,u=typeof s=="function"?s.apply(o,l):s,u!==void 0&&(i.exports=u)})(typeof self!="undefined"?self:this,function(){function c(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(R){var h=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,d=/@([^@]*):(\d+):(\d+)\s*$/ig,p=h.exec(R.stack)||d.exec(R.stack),v=p&&p[1]||!1,m=p&&p[2]||!1,y=document.location.href.replace(document.location.hash,""),g,b,T,w=document.getElementsByTagName("script");v===y&&(g=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),T=g.replace(b,"$1").trim());for(var x=0;x<w.length;x++)if(w[x].readyState==="interactive"||w[x].src===v||v===y&&w[x].innerHTML&&w[x].innerHTML.trim()===T)return w[x];return null}}return c})},8925:function(i,o,a){var s=a("c6cd"),l=Function.toString;typeof s.inspectSource!="function"&&(s.inspectSource=function(u){return l.call(u)}),i.exports=s.inspectSource},"8aa5":function(i,o,a){var s=a("6547").charAt;i.exports=function(l,u,c){return u+(c?s(l,u).length:1)}},"8bbf":function(i,o){i.exports=r},"90e3":function(i,o){var a=0,s=Math.random();i.exports=function(l){return"Symbol("+String(l===void 0?"":l)+")_"+(++a+s).toString(36)}},9112:function(i,o,a){var s=a("83ab"),l=a("9bf2"),u=a("5c6c");i.exports=s?function(c,f,h){return l.f(c,f,u(1,h))}:function(c,f,h){return c[f]=h,c}},9263:function(i,o,a){var s=a("ad6d"),l=a("9f7f"),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,h=function(){var m=/a/,y=/b*/g;return u.call(m,"a"),u.call(y,"a"),m.lastIndex!==0||y.lastIndex!==0}(),d=l.UNSUPPORTED_Y||l.BROKEN_CARET,p=/()??/.exec("")[1]!==void 0,v=h||p||d;v&&(f=function(y){var g=this,b,T,w,x,R=d&&g.sticky,I=s.call(g),C=g.source,S=0,L=y;return R&&(I=I.replace("y",""),I.indexOf("g")===-1&&(I+="g"),L=String(y).slice(g.lastIndex),g.lastIndex>0&&(!g.multiline||g.multiline&&y[g.lastIndex-1]!==`
`)&&(C="(?: "+C+")",L=" "+L,S++),T=new RegExp("^(?:"+C+")",I)),p&&(T=new RegExp("^"+C+"$(?!\\s)",I)),h&&(b=g.lastIndex),w=u.call(R?T:g,L),R?w?(w.input=w.input.slice(S),w[0]=w[0].slice(S),w.index=g.lastIndex,g.lastIndex+=w[0].length):g.lastIndex=0:h&&w&&(g.lastIndex=g.global?w.index+w[0].length:b),p&&w&&w.length>1&&c.call(w[0],T,function(){for(x=1;x<arguments.length-2;x++)arguments[x]===void 0&&(w[x]=void 0)}),w}),i.exports=f},"94ca":function(i,o,a){var s=a("d039"),l=/#|\.prototype\./,u=function(p,v){var m=f[c(p)];return m==d?!0:m==h?!1:typeof v=="function"?s(v):!!v},c=u.normalize=function(p){return String(p).replace(l,".").toLowerCase()},f=u.data={},h=u.NATIVE="N",d=u.POLYFILL="P";i.exports=u},"99af":function(i,o,a){var s=a("23e7"),l=a("d039"),u=a("e8b5"),c=a("861d"),f=a("7b0b"),h=a("50c4"),d=a("8418"),p=a("65f0"),v=a("1dde"),m=a("b622"),y=a("2d00"),g=m("isConcatSpreadable"),b=9007199254740991,T="Maximum allowed index exceeded",w=y>=51||!l(function(){var C=[];return C[g]=!1,C.concat()[0]!==C}),x=v("concat"),R=function(C){if(!c(C))return!1;var S=C[g];return S!==void 0?!!S:u(C)},I=!w||!x;s({target:"Array",proto:!0,forced:I},{concat:function(S){var L=f(this),H=p(L,0),G=0,k,Y,D,K,ht;for(k=-1,D=arguments.length;k<D;k++)if(ht=k===-1?L:arguments[k],R(ht)){if(K=h(ht.length),G+K>b)throw TypeError(T);for(Y=0;Y<K;Y++,G++)Y in ht&&d(H,G,ht[Y])}else{if(G>=b)throw TypeError(T);d(H,G++,ht)}return H.length=G,H}})},"9bdd":function(i,o,a){var s=a("825a");i.exports=function(l,u,c,f){try{return f?u(s(c)[0],c[1]):u(c)}catch(d){var h=l.return;throw h!==void 0&&s(h.call(l)),d}}},"9bf2":function(i,o,a){var s=a("83ab"),l=a("0cfb"),u=a("825a"),c=a("c04e"),f=Object.defineProperty;o.f=s?f:function(d,p,v){if(u(d),p=c(p,!0),u(v),l)try{return f(d,p,v)}catch{}if("get"in v||"set"in v)throw TypeError("Accessors not supported");return"value"in v&&(d[p]=v.value),d}},"9ed3":function(i,o,a){var s=a("ae93").IteratorPrototype,l=a("7c73"),u=a("5c6c"),c=a("d44e"),f=a("3f8c"),h=function(){return this};i.exports=function(d,p,v){var m=p+" Iterator";return d.prototype=l(s,{next:u(1,v)}),c(d,m,!1,!0),f[m]=h,d}},"9f7f":function(i,o,a){var s=a("d039");function l(u,c){return RegExp(u,c)}o.UNSUPPORTED_Y=s(function(){var u=l("a","y");return u.lastIndex=2,u.exec("abcd")!=null}),o.BROKEN_CARET=s(function(){var u=l("^r","gy");return u.lastIndex=2,u.exec("str")!=null})},a2bf:function(i,o,a){var s=a("e8b5"),l=a("50c4"),u=a("0366"),c=function(f,h,d,p,v,m,y,g){for(var b=v,T=0,w=y?u(y,g,3):!1,x;T<p;){if(T in d){if(x=w?w(d[T],T,h):d[T],m>0&&s(x))b=c(f,h,x,l(x.length),b,m-1)-1;else{if(b>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[b]=x}b++}T++}return b};i.exports=c},a352:function(i,o){i.exports=n},a434:function(i,o,a){var s=a("23e7"),l=a("23cb"),u=a("a691"),c=a("50c4"),f=a("7b0b"),h=a("65f0"),d=a("8418"),p=a("1dde"),v=a("ae40"),m=p("splice"),y=v("splice",{ACCESSORS:!0,0:0,1:2}),g=Math.max,b=Math.min,T=9007199254740991,w="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!m||!y},{splice:function(R,I){var C=f(this),S=c(C.length),L=l(R,S),H=arguments.length,G,k,Y,D,K,ht;if(H===0?G=k=0:H===1?(G=0,k=S-L):(G=H-2,k=b(g(u(I),0),S-L)),S+G-k>T)throw TypeError(w);for(Y=h(C,k),D=0;D<k;D++)K=L+D,K in C&&d(Y,D,C[K]);if(Y.length=k,G<k){for(D=L;D<S-k;D++)K=D+k,ht=D+G,K in C?C[ht]=C[K]:delete C[ht];for(D=S;D>S-k+G;D--)delete C[D-1]}else if(G>k)for(D=S-k;D>L;D--)K=D+k-1,ht=D+G-1,K in C?C[ht]=C[K]:delete C[ht];for(D=0;D<G;D++)C[D+L]=arguments[D+2];return C.length=S-k+G,Y}})},a4d3:function(i,o,a){var s=a("23e7"),l=a("da84"),u=a("d066"),c=a("c430"),f=a("83ab"),h=a("4930"),d=a("fdbf"),p=a("d039"),v=a("5135"),m=a("e8b5"),y=a("861d"),g=a("825a"),b=a("7b0b"),T=a("fc6a"),w=a("c04e"),x=a("5c6c"),R=a("7c73"),I=a("df75"),C=a("241c"),S=a("057f"),L=a("7418"),H=a("06cf"),G=a("9bf2"),k=a("d1e7"),Y=a("9112"),D=a("6eeb"),K=a("5692"),ht=a("f772"),bt=a("d012"),W=a("90e3"),ft=a("b622"),gt=a("e538"),_t=a("746f"),V=a("d44e"),Z=a("69f3"),lt=a("b727").forEach,ut=ht("hidden"),Gt="Symbol",it="prototype",kt=ft("toPrimitive"),Vt=Z.set,Xt=Z.getterFor(Gt),N=Object[it],A=l.Symbol,$=u("JSON","stringify"),j=H.f,q=G.f,st=S.f,mt=k.f,at=K("symbols"),ct=K("op-symbols"),rt=K("string-to-symbol-registry"),Et=K("symbol-to-string-registry"),xt=K("wks"),St=l.QObject,Dt=!St||!St[it]||!St[it].findChild,ie=f&&p(function(){return R(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a!=7})?function($t,At,Ht){var pe=j(N,At);pe&&delete N[At],q($t,At,Ht),pe&&$t!==N&&q(N,At,pe)}:q,ye=function($t,At){var Ht=at[$t]=R(A[it]);return Vt(Ht,{type:Gt,tag:$t,description:At}),f||(Ht.description=At),Ht},F=d?function($t){return typeof $t=="symbol"}:function($t){return Object($t)instanceof A},M=function(At,Ht,pe){At===N&&M(ct,Ht,pe),g(At);var be=w(Ht,!0);return g(pe),v(at,be)?(pe.enumerable?(v(At,ut)&&At[ut][be]&&(At[ut][be]=!1),pe=R(pe,{enumerable:x(0,!1)})):(v(At,ut)||q(At,ut,x(1,{})),At[ut][be]=!0),ie(At,be,pe)):q(At,be,pe)},z=function(At,Ht){g(At);var pe=T(Ht),be=I(pe).concat(Yt(pe));return lt(be,function(Ar){(!f||Tt.call(pe,Ar))&&M(At,Ar,pe[Ar])}),At},ot=function(At,Ht){return Ht===void 0?R(At):z(R(At),Ht)},Tt=function(At){var Ht=w(At,!0),pe=mt.call(this,Ht);return this===N&&v(at,Ht)&&!v(ct,Ht)?!1:pe||!v(this,Ht)||!v(at,Ht)||v(this,ut)&&this[ut][Ht]?pe:!0},Lt=function(At,Ht){var pe=T(At),be=w(Ht,!0);if(!(pe===N&&v(at,be)&&!v(ct,be))){var Ar=j(pe,be);return Ar&&v(at,be)&&!(v(pe,ut)&&pe[ut][be])&&(Ar.enumerable=!0),Ar}},Kt=function(At){var Ht=st(T(At)),pe=[];return lt(Ht,function(be){!v(at,be)&&!v(bt,be)&&pe.push(be)}),pe},Yt=function(At){var Ht=At===N,pe=st(Ht?ct:T(At)),be=[];return lt(pe,function(Ar){v(at,Ar)&&(!Ht||v(N,Ar))&&be.push(at[Ar])}),be};if(h||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor");var At=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Ht=W(At),pe=function(be){this===N&&pe.call(ct,be),v(this,ut)&&v(this[ut],Ht)&&(this[ut][Ht]=!1),ie(this,Ht,x(1,be))};return f&&Dt&&ie(N,Ht,{configurable:!0,set:pe}),ye(Ht,At)},D(A[it],"toString",function(){return Xt(this).tag}),D(A,"withoutSetter",function($t){return ye(W($t),$t)}),k.f=Tt,G.f=M,H.f=Lt,C.f=S.f=Kt,L.f=Yt,gt.f=function($t){return ye(ft($t),$t)},f&&(q(A[it],"description",{configurable:!0,get:function(){return Xt(this).description}}),c||D(N,"propertyIsEnumerable",Tt,{unsafe:!0}))),s({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:A}),lt(I(xt),function($t){_t($t)}),s({target:Gt,stat:!0,forced:!h},{for:function($t){var At=String($t);if(v(rt,At))return rt[At];var Ht=A(At);return rt[At]=Ht,Et[Ht]=At,Ht},keyFor:function(At){if(!F(At))throw TypeError(At+" is not a symbol");if(v(Et,At))return Et[At]},useSetter:function(){Dt=!0},useSimple:function(){Dt=!1}}),s({target:"Object",stat:!0,forced:!h,sham:!f},{create:ot,defineProperty:M,defineProperties:z,getOwnPropertyDescriptor:Lt}),s({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:Kt,getOwnPropertySymbols:Yt}),s({target:"Object",stat:!0,forced:p(function(){L.f(1)})},{getOwnPropertySymbols:function(At){return L.f(b(At))}}),$){var xe=!h||p(function(){var $t=A();return $([$t])!="[null]"||$({a:$t})!="{}"||$(Object($t))!="{}"});s({target:"JSON",stat:!0,forced:xe},{stringify:function(At,Ht,pe){for(var be=[At],Ar=1,Pc;arguments.length>Ar;)be.push(arguments[Ar++]);if(Pc=Ht,!(!y(Ht)&&At===void 0||F(At)))return m(Ht)||(Ht=function(mx,pl){if(typeof Pc=="function"&&(pl=Pc.call(this,mx,pl)),!F(pl))return pl}),be[1]=Ht,$.apply(null,be)}})}A[it][kt]||Y(A[it],kt,A[it].valueOf),V(A,Gt),bt[ut]=!0},a630:function(i,o,a){var s=a("23e7"),l=a("4df4"),u=a("1c7e"),c=!u(function(f){Array.from(f)});s({target:"Array",stat:!0,forced:c},{from:l})},a640:function(i,o,a){var s=a("d039");i.exports=function(l,u){var c=[][l];return!!c&&s(function(){c.call(null,u||function(){throw 1},1)})}},a691:function(i,o){var a=Math.ceil,s=Math.floor;i.exports=function(l){return isNaN(l=+l)?0:(l>0?s:a)(l)}},ab13:function(i,o,a){var s=a("b622"),l=s("match");i.exports=function(u){var c=/./;try{"/./"[u](c)}catch{try{return c[l]=!1,"/./"[u](c)}catch{}}return!1}},ac1f:function(i,o,a){var s=a("23e7"),l=a("9263");s({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})},ad6d:function(i,o,a){var s=a("825a");i.exports=function(){var l=s(this),u="";return l.global&&(u+="g"),l.ignoreCase&&(u+="i"),l.multiline&&(u+="m"),l.dotAll&&(u+="s"),l.unicode&&(u+="u"),l.sticky&&(u+="y"),u}},ae40:function(i,o,a){var s=a("83ab"),l=a("d039"),u=a("5135"),c=Object.defineProperty,f={},h=function(d){throw d};i.exports=function(d,p){if(u(f,d))return f[d];p||(p={});var v=[][d],m=u(p,"ACCESSORS")?p.ACCESSORS:!1,y=u(p,0)?p[0]:h,g=u(p,1)?p[1]:void 0;return f[d]=!!v&&!l(function(){if(m&&!s)return!0;var b={length:-1};m?c(b,1,{enumerable:!0,get:h}):b[1]=1,v.call(b,y,g)})}},ae93:function(i,o,a){var s=a("e163"),l=a("9112"),u=a("5135"),c=a("b622"),f=a("c430"),h=c("iterator"),d=!1,p=function(){return this},v,m,y;[].keys&&(y=[].keys(),"next"in y?(m=s(s(y)),m!==Object.prototype&&(v=m)):d=!0),v==null&&(v={}),!f&&!u(v,h)&&l(v,h,p),i.exports={IteratorPrototype:v,BUGGY_SAFARI_ITERATORS:d}},b041:function(i,o,a){var s=a("00ee"),l=a("f5df");i.exports=s?{}.toString:function(){return"[object "+l(this)+"]"}},b0c0:function(i,o,a){var s=a("83ab"),l=a("9bf2").f,u=Function.prototype,c=u.toString,f=/^\s*function ([^ (]*)/,h="name";s&&!(h in u)&&l(u,h,{configurable:!0,get:function(){try{return c.call(this).match(f)[1]}catch{return""}}})},b622:function(i,o,a){var s=a("da84"),l=a("5692"),u=a("5135"),c=a("90e3"),f=a("4930"),h=a("fdbf"),d=l("wks"),p=s.Symbol,v=h?p:p&&p.withoutSetter||c;i.exports=function(m){return u(d,m)||(f&&u(p,m)?d[m]=p[m]:d[m]=v("Symbol."+m)),d[m]}},b64b:function(i,o,a){var s=a("23e7"),l=a("7b0b"),u=a("df75"),c=a("d039"),f=c(function(){u(1)});s({target:"Object",stat:!0,forced:f},{keys:function(d){return u(l(d))}})},b727:function(i,o,a){var s=a("0366"),l=a("44ad"),u=a("7b0b"),c=a("50c4"),f=a("65f0"),h=[].push,d=function(p){var v=p==1,m=p==2,y=p==3,g=p==4,b=p==6,T=p==5||b;return function(w,x,R,I){for(var C=u(w),S=l(C),L=s(x,R,3),H=c(S.length),G=0,k=I||f,Y=v?k(w,H):m?k(w,0):void 0,D,K;H>G;G++)if((T||G in S)&&(D=S[G],K=L(D,G,C),p)){if(v)Y[G]=K;else if(K)switch(p){case 3:return!0;case 5:return D;case 6:return G;case 2:h.call(Y,D)}else if(g)return!1}return b?-1:y||g?g:Y}};i.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6)}},c04e:function(i,o,a){var s=a("861d");i.exports=function(l,u){if(!s(l))return l;var c,f;if(u&&typeof(c=l.toString)=="function"&&!s(f=c.call(l))||typeof(c=l.valueOf)=="function"&&!s(f=c.call(l))||!u&&typeof(c=l.toString)=="function"&&!s(f=c.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},c430:function(i,o){i.exports=!1},c6b6:function(i,o){var a={}.toString;i.exports=function(s){return a.call(s).slice(8,-1)}},c6cd:function(i,o,a){var s=a("da84"),l=a("ce4e"),u="__core-js_shared__",c=s[u]||l(u,{});i.exports=c},c740:function(i,o,a){var s=a("23e7"),l=a("b727").findIndex,u=a("44d2"),c=a("ae40"),f="findIndex",h=!0,d=c(f);f in[]&&Array(1)[f](function(){h=!1}),s({target:"Array",proto:!0,forced:h||!d},{findIndex:function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}}),u(f)},c8ba:function(i,o){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch{typeof window=="object"&&(a=window)}i.exports=a},c975:function(i,o,a){var s=a("23e7"),l=a("4d64").indexOf,u=a("a640"),c=a("ae40"),f=[].indexOf,h=!!f&&1/[1].indexOf(1,-0)<0,d=u("indexOf"),p=c("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:h||!d||!p},{indexOf:function(m){return h?f.apply(this,arguments)||0:l(this,m,arguments.length>1?arguments[1]:void 0)}})},ca84:function(i,o,a){var s=a("5135"),l=a("fc6a"),u=a("4d64").indexOf,c=a("d012");i.exports=function(f,h){var d=l(f),p=0,v=[],m;for(m in d)!s(c,m)&&s(d,m)&&v.push(m);for(;h.length>p;)s(d,m=h[p++])&&(~u(v,m)||v.push(m));return v}},caad:function(i,o,a){var s=a("23e7"),l=a("4d64").includes,u=a("44d2"),c=a("ae40"),f=c("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:!f},{includes:function(d){return l(this,d,arguments.length>1?arguments[1]:void 0)}}),u("includes")},cc12:function(i,o,a){var s=a("da84"),l=a("861d"),u=s.document,c=l(u)&&l(u.createElement);i.exports=function(f){return c?u.createElement(f):{}}},ce4e:function(i,o,a){var s=a("da84"),l=a("9112");i.exports=function(u,c){try{l(s,u,c)}catch{s[u]=c}return c}},d012:function(i,o){i.exports={}},d039:function(i,o){i.exports=function(a){try{return!!a()}catch{return!0}}},d066:function(i,o,a){var s=a("428f"),l=a("da84"),u=function(c){return typeof c=="function"?c:void 0};i.exports=function(c,f){return arguments.length<2?u(s[c])||u(l[c]):s[c]&&s[c][f]||l[c]&&l[c][f]}},d1e7:function(i,o,a){var s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,u=l&&!s.call({1:2},1);o.f=u?function(f){var h=l(this,f);return!!h&&h.enumerable}:s},d28b:function(i,o,a){var s=a("746f");s("iterator")},d2bb:function(i,o,a){var s=a("825a"),l=a("3bbe");i.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,c={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(c,[]),u=c instanceof Array}catch{}return function(d,p){return s(d),l(p),u?f.call(d,p):d.__proto__=p,d}}():void 0)},d3b7:function(i,o,a){var s=a("00ee"),l=a("6eeb"),u=a("b041");s||l(Object.prototype,"toString",u,{unsafe:!0})},d44e:function(i,o,a){var s=a("9bf2").f,l=a("5135"),u=a("b622"),c=u("toStringTag");i.exports=function(f,h,d){f&&!l(f=d?f:f.prototype,c)&&s(f,c,{configurable:!0,value:h})}},d58f:function(i,o,a){var s=a("1c0b"),l=a("7b0b"),u=a("44ad"),c=a("50c4"),f=function(h){return function(d,p,v,m){s(p);var y=l(d),g=u(y),b=c(y.length),T=h?b-1:0,w=h?-1:1;if(v<2)for(;;){if(T in g){m=g[T],T+=w;break}if(T+=w,h?T<0:b<=T)throw TypeError("Reduce of empty array with no initial value")}for(;h?T>=0:b>T;T+=w)T in g&&(m=p(m,g[T],T,y));return m}};i.exports={left:f(!1),right:f(!0)}},d784:function(i,o,a){a("ac1f");var s=a("6eeb"),l=a("d039"),u=a("b622"),c=a("9263"),f=a("9112"),h=u("species"),d=!l(function(){var g=/./;return g.exec=function(){var b=[];return b.groups={a:"7"},b},"".replace(g,"$<a>")!=="7"}),p=function(){return"a".replace(/./,"$0")==="$0"}(),v=u("replace"),m=function(){return/./[v]?/./[v]("a","$0")==="":!1}(),y=!l(function(){var g=/(?:)/,b=g.exec;g.exec=function(){return b.apply(this,arguments)};var T="ab".split(g);return T.length!==2||T[0]!=="a"||T[1]!=="b"});i.exports=function(g,b,T,w){var x=u(g),R=!l(function(){var G={};return G[x]=function(){return 7},""[g](G)!=7}),I=R&&!l(function(){var G=!1,k=/a/;return g==="split"&&(k={},k.constructor={},k.constructor[h]=function(){return k},k.flags="",k[x]=/./[x]),k.exec=function(){return G=!0,null},k[x](""),!G});if(!R||!I||g==="replace"&&!(d&&p&&!m)||g==="split"&&!y){var C=/./[x],S=T(x,""[g],function(G,k,Y,D,K){return k.exec===c?R&&!K?{done:!0,value:C.call(k,Y,D)}:{done:!0,value:G.call(Y,k,D)}:{done:!1}},{REPLACE_KEEPS_$0:p,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:m}),L=S[0],H=S[1];s(String.prototype,g,L),s(RegExp.prototype,x,b==2?function(G,k){return H.call(G,this,k)}:function(G){return H.call(G,this)})}w&&f(RegExp.prototype[x],"sham",!0)}},d81d:function(i,o,a){var s=a("23e7"),l=a("b727").map,u=a("1dde"),c=a("ae40"),f=u("map"),h=c("map");s({target:"Array",proto:!0,forced:!f||!h},{map:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})},da84:function(i,o,a){(function(s){var l=function(u){return u&&u.Math==Math&&u};i.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof s=="object"&&s)||Function("return this")()}).call(this,a("c8ba"))},dbb4:function(i,o,a){var s=a("23e7"),l=a("83ab"),u=a("56ef"),c=a("fc6a"),f=a("06cf"),h=a("8418");s({target:"Object",stat:!0,sham:!l},{getOwnPropertyDescriptors:function(p){for(var v=c(p),m=f.f,y=u(v),g={},b=0,T,w;y.length>b;)w=m(v,T=y[b++]),w!==void 0&&h(g,T,w);return g}})},dbf1:function(i,o,a){(function(s){a.d(o,"a",function(){return u});function l(){return typeof window!="undefined"?window.console:s.console}var u=l()}).call(this,a("c8ba"))},ddb0:function(i,o,a){var s=a("da84"),l=a("fdbc"),u=a("e260"),c=a("9112"),f=a("b622"),h=f("iterator"),d=f("toStringTag"),p=u.values;for(var v in l){var m=s[v],y=m&&m.prototype;if(y){if(y[h]!==p)try{c(y,h,p)}catch{y[h]=p}if(y[d]||c(y,d,v),l[v]){for(var g in u)if(y[g]!==u[g])try{c(y,g,u[g])}catch{y[g]=u[g]}}}}},df75:function(i,o,a){var s=a("ca84"),l=a("7839");i.exports=Object.keys||function(c){return s(c,l)}},e01a:function(i,o,a){var s=a("23e7"),l=a("83ab"),u=a("da84"),c=a("5135"),f=a("861d"),h=a("9bf2").f,d=a("e893"),p=u.Symbol;if(l&&typeof p=="function"&&(!("description"in p.prototype)||p().description!==void 0)){var v={},m=function(){var x=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),R=this instanceof m?new p(x):x===void 0?p():p(x);return x===""&&(v[R]=!0),R};d(m,p);var y=m.prototype=p.prototype;y.constructor=m;var g=y.toString,b=String(p("test"))=="Symbol(test)",T=/^Symbol\((.*)\)[^)]+$/;h(y,"description",{configurable:!0,get:function(){var x=f(this)?this.valueOf():this,R=g.call(x);if(c(v,x))return"";var I=b?R.slice(7,-1):R.replace(T,"$1");return I===""?void 0:I}}),s({global:!0,forced:!0},{Symbol:m})}},e163:function(i,o,a){var s=a("5135"),l=a("7b0b"),u=a("f772"),c=a("e177"),f=u("IE_PROTO"),h=Object.prototype;i.exports=c?Object.getPrototypeOf:function(d){return d=l(d),s(d,f)?d[f]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?h:null}},e177:function(i,o,a){var s=a("d039");i.exports=!s(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})},e260:function(i,o,a){var s=a("fc6a"),l=a("44d2"),u=a("3f8c"),c=a("69f3"),f=a("7dd0"),h="Array Iterator",d=c.set,p=c.getterFor(h);i.exports=f(Array,"Array",function(v,m){d(this,{type:h,target:s(v),index:0,kind:m})},function(){var v=p(this),m=v.target,y=v.kind,g=v.index++;return!m||g>=m.length?(v.target=void 0,{value:void 0,done:!0}):y=="keys"?{value:g,done:!1}:y=="values"?{value:m[g],done:!1}:{value:[g,m[g]],done:!1}},"values"),u.Arguments=u.Array,l("keys"),l("values"),l("entries")},e439:function(i,o,a){var s=a("23e7"),l=a("d039"),u=a("fc6a"),c=a("06cf").f,f=a("83ab"),h=l(function(){c(1)}),d=!f||h;s({target:"Object",stat:!0,forced:d,sham:!f},{getOwnPropertyDescriptor:function(v,m){return c(u(v),m)}})},e538:function(i,o,a){var s=a("b622");o.f=s},e893:function(i,o,a){var s=a("5135"),l=a("56ef"),u=a("06cf"),c=a("9bf2");i.exports=function(f,h){for(var d=l(h),p=c.f,v=u.f,m=0;m<d.length;m++){var y=d[m];s(f,y)||p(f,y,v(h,y))}}},e8b5:function(i,o,a){var s=a("c6b6");i.exports=Array.isArray||function(u){return s(u)=="Array"}},e95a:function(i,o,a){var s=a("b622"),l=a("3f8c"),u=s("iterator"),c=Array.prototype;i.exports=function(f){return f!==void 0&&(l.Array===f||c[u]===f)}},f5df:function(i,o,a){var s=a("00ee"),l=a("c6b6"),u=a("b622"),c=u("toStringTag"),f=l(function(){return arguments}())=="Arguments",h=function(d,p){try{return d[p]}catch{}};i.exports=s?l:function(d){var p,v,m;return d===void 0?"Undefined":d===null?"Null":typeof(v=h(p=Object(d),c))=="string"?v:f?l(p):(m=l(p))=="Object"&&typeof p.callee=="function"?"Arguments":m}},f772:function(i,o,a){var s=a("5692"),l=a("90e3"),u=s("keys");i.exports=function(c){return u[c]||(u[c]=l(c))}},fb15:function(i,o,a){if(a.r(o),typeof window!="undefined"){var s=window.document.currentScript;{var l=a("8875");s=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l})}var u=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);u&&(a.p=u[1])}a("99af"),a("4de4"),a("4160"),a("c975"),a("d81d"),a("a434"),a("159b"),a("a4d3"),a("e439"),a("dbb4"),a("b64b");function c(F,M,z){return M in F?Object.defineProperty(F,M,{value:z,enumerable:!0,configurable:!0,writable:!0}):F[M]=z,F}function f(F,M){var z=Object.keys(F);if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(F);M&&(ot=ot.filter(function(Tt){return Object.getOwnPropertyDescriptor(F,Tt).enumerable})),z.push.apply(z,ot)}return z}function h(F){for(var M=1;M<arguments.length;M++){var z=arguments[M]!=null?arguments[M]:{};M%2?f(Object(z),!0).forEach(function(ot){c(F,ot,z[ot])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(z)):f(Object(z)).forEach(function(ot){Object.defineProperty(F,ot,Object.getOwnPropertyDescriptor(z,ot))})}return F}function d(F){if(Array.isArray(F))return F}a("e01a"),a("d28b"),a("e260"),a("d3b7"),a("3ca3"),a("ddb0");function p(F,M){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))){var z=[],ot=!0,Tt=!1,Lt=void 0;try{for(var Kt=F[Symbol.iterator](),Yt;!(ot=(Yt=Kt.next()).done)&&(z.push(Yt.value),!(M&&z.length===M));ot=!0);}catch(xe){Tt=!0,Lt=xe}finally{try{!ot&&Kt.return!=null&&Kt.return()}finally{if(Tt)throw Lt}}return z}}a("a630"),a("fb6a"),a("b0c0"),a("25f0");function v(F,M){(M==null||M>F.length)&&(M=F.length);for(var z=0,ot=new Array(M);z<M;z++)ot[z]=F[z];return ot}function m(F,M){if(!!F){if(typeof F=="string")return v(F,M);var z=Object.prototype.toString.call(F).slice(8,-1);if(z==="Object"&&F.constructor&&(z=F.constructor.name),z==="Map"||z==="Set")return Array.from(F);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return v(F,M)}}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(F,M){return d(F)||p(F,M)||m(F,M)||y()}function b(F){if(Array.isArray(F))return v(F)}function T(F){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(F))return Array.from(F)}function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(F){return b(F)||T(F)||m(F)||w()}var R=a("a352"),I=a.n(R);function C(F){F.parentElement!==null&&F.parentElement.removeChild(F)}function S(F,M,z){var ot=z===0?F.children[0]:F.children[z-1].nextSibling;F.insertBefore(M,ot)}var L=a("dbf1");a("13d5"),a("4fad"),a("ac1f"),a("5319");function H(F){var M=Object.create(null);return function(ot){var Tt=M[ot];return Tt||(M[ot]=F(ot))}}var G=/-(\w)/g,k=H(function(F){return F.replace(G,function(M,z){return z.toUpperCase()})});a("5db7"),a("73d9");var Y=["Start","Add","Remove","Update","End"],D=["Choose","Unchoose","Sort","Filter","Clone"],K=["Move"],ht=[K,Y,D].flatMap(function(F){return F}).map(function(F){return"on".concat(F)}),bt={manage:K,manageAndEmit:Y,emit:D};function W(F){return ht.indexOf(F)!==-1}a("caad"),a("2ca0");var ft=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function gt(F){return ft.includes(F)}function _t(F){return["transition-group","TransitionGroup"].includes(F)}function V(F){return["id","class","role","style"].includes(F)||F.startsWith("data-")||F.startsWith("aria-")||F.startsWith("on")}function Z(F){return F.reduce(function(M,z){var ot=g(z,2),Tt=ot[0],Lt=ot[1];return M[Tt]=Lt,M},{})}function lt(F){var M=F.$attrs,z=F.componentData,ot=z===void 0?{}:z,Tt=Z(Object.entries(M).filter(function(Lt){var Kt=g(Lt,2),Yt=Kt[0];return Kt[1],V(Yt)}));return h(h({},Tt),ot)}function ut(F){var M=F.$attrs,z=F.callBackBuilder,ot=Z(Gt(M));Object.entries(z).forEach(function(Lt){var Kt=g(Lt,2),Yt=Kt[0],xe=Kt[1];bt[Yt].forEach(function($t){ot["on".concat($t)]=xe($t)})});var Tt="[data-draggable]".concat(ot.draggable||"");return h(h({},ot),{},{draggable:Tt})}function Gt(F){return Object.entries(F).filter(function(M){var z=g(M,2),ot=z[0];return z[1],!V(ot)}).map(function(M){var z=g(M,2),ot=z[0],Tt=z[1];return[k(ot),Tt]}).filter(function(M){var z=g(M,2),ot=z[0];return z[1],!W(ot)})}a("c740");function it(F,M){if(!(F instanceof M))throw new TypeError("Cannot call a class as a function")}function kt(F,M){for(var z=0;z<M.length;z++){var ot=M[z];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(F,ot.key,ot)}}function Vt(F,M,z){return M&&kt(F.prototype,M),z&&kt(F,z),F}var Xt=function(M){var z=M.el;return z},N=function(M,z){return M.__draggable_context=z},A=function(M){return M.__draggable_context},$=function(){function F(M){var z=M.nodes,ot=z.header,Tt=z.default,Lt=z.footer,Kt=M.root,Yt=M.realList;it(this,F),this.defaultNodes=Tt,this.children=[].concat(x(ot),x(Tt),x(Lt)),this.externalComponent=Kt.externalComponent,this.rootTransition=Kt.transition,this.tag=Kt.tag,this.realList=Yt}return Vt(F,[{key:"render",value:function(z,ot){var Tt=this.tag,Lt=this.children,Kt=this._isRootComponent,Yt=Kt?{default:function(){return Lt}}:Lt;return z(Tt,ot,Yt)}},{key:"updated",value:function(){var z=this.defaultNodes,ot=this.realList;z.forEach(function(Tt,Lt){N(Xt(Tt),{element:ot[Lt],index:Lt})})}},{key:"getUnderlyingVm",value:function(z){return A(z)}},{key:"getVmIndexFromDomIndex",value:function(z,ot){var Tt=this.defaultNodes,Lt=Tt.length,Kt=ot.children,Yt=Kt.item(z);if(Yt===null)return Lt;var xe=A(Yt);if(xe)return xe.index;if(Lt===0)return 0;var $t=Xt(Tt[0]),At=x(Kt).findIndex(function(Ht){return Ht===$t});return z<At?0:Lt}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),F}(),j=a("8bbf");function q(F,M){var z=F[M];return z?z():[]}function st(F){var M=F.$slots,z=F.realList,ot=F.getKey,Tt=z||[],Lt=["header","footer"].map(function(Ht){return q(M,Ht)}),Kt=g(Lt,2),Yt=Kt[0],xe=Kt[1],$t=M.item;if(!$t)throw new Error("draggable element must have an item slot");var At=Tt.flatMap(function(Ht,pe){return $t({element:Ht,index:pe}).map(function(be){return be.key=ot(Ht),be.props=h(h({},be.props||{}),{},{"data-draggable":!0}),be})});if(At.length!==Tt.length)throw new Error("Item slot must have only one child");return{header:Yt,footer:xe,default:At}}function mt(F){var M=_t(F),z=!gt(F)&&!M;return{transition:M,externalComponent:z,tag:z?Object(j.resolveComponent)(F):M?j.TransitionGroup:F}}function at(F){var M=F.$slots,z=F.tag,ot=F.realList,Tt=F.getKey,Lt=st({$slots:M,realList:ot,getKey:Tt}),Kt=mt(z);return new $({nodes:Lt,root:Kt,realList:ot})}function ct(F,M){var z=this;Object(j.nextTick)(function(){return z.$emit(F.toLowerCase(),M)})}function rt(F){var M=this;return function(z,ot){if(M.realList!==null)return M["onDrag".concat(F)](z,ot)}}function Et(F){var M=this,z=rt.call(this,F);return function(ot,Tt){z.call(M,ot,Tt),ct.call(M,F,ot)}}var xt=null,St={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(M){return M}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Dt=["update:modelValue","change"].concat(x([].concat(x(bt.manageAndEmit),x(bt.emit)).map(function(F){return F.toLowerCase()}))),ie=Object(j.defineComponent)({name:"draggable",inheritAttrs:!1,props:St,emits:Dt,data:function(){return{error:!1}},render:function(){try{this.error=!1;var M=this.$slots,z=this.$attrs,ot=this.tag,Tt=this.componentData,Lt=this.realList,Kt=this.getKey,Yt=at({$slots:M,tag:ot,realList:Lt,getKey:Kt});this.componentStructure=Yt;var xe=lt({$attrs:z,componentData:Tt});return Yt.render(j.h,xe)}catch($t){return this.error=!0,Object(j.h)("pre",{style:{color:"red"}},$t.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&L.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var M=this;if(!this.error){var z=this.$attrs,ot=this.$el,Tt=this.componentStructure;Tt.updated();var Lt=ut({$attrs:z,callBackBuilder:{manageAndEmit:function(xe){return Et.call(M,xe)},emit:function(xe){return ct.bind(M,xe)},manage:function(xe){return rt.call(M,xe)}}}),Kt=ot.nodeType===1?ot:ot.parentElement;this._sortable=new I.a(Kt,Lt),this.targetDomElement=Kt,Kt.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var M=this.list;return M||this.modelValue},getKey:function(){var M=this.itemKey;return typeof M=="function"?M:function(z){return z[M]}}},watch:{$attrs:{handler:function(M){var z=this._sortable;!z||Gt(M).forEach(function(ot){var Tt=g(ot,2),Lt=Tt[0],Kt=Tt[1];z.option(Lt,Kt)})},deep:!0}},methods:{getUnderlyingVm:function(M){return this.componentStructure.getUnderlyingVm(M)||null},getUnderlyingPotencialDraggableComponent:function(M){return M.__draggable_component__},emitChanges:function(M){var z=this;Object(j.nextTick)(function(){return z.$emit("change",M)})},alterList:function(M){if(this.list){M(this.list);return}var z=x(this.modelValue);M(z),this.$emit("update:modelValue",z)},spliceList:function(){var M=arguments,z=function(Tt){return Tt.splice.apply(Tt,x(M))};this.alterList(z)},updatePosition:function(M,z){var ot=function(Lt){return Lt.splice(z,0,Lt.splice(M,1)[0])};this.alterList(ot)},getRelatedContextFromMoveEvent:function(M){var z=M.to,ot=M.related,Tt=this.getUnderlyingPotencialDraggableComponent(z);if(!Tt)return{component:Tt};var Lt=Tt.realList,Kt={list:Lt,component:Tt};if(z!==ot&&Lt){var Yt=Tt.getUnderlyingVm(ot)||{};return h(h({},Yt),Kt)}return Kt},getVmIndexFromDomIndex:function(M){return this.componentStructure.getVmIndexFromDomIndex(M,this.targetDomElement)},onDragStart:function(M){this.context=this.getUnderlyingVm(M.item),M.item._underlying_vm_=this.clone(this.context.element),xt=M.item},onDragAdd:function(M){var z=M.item._underlying_vm_;if(z!==void 0){C(M.item);var ot=this.getVmIndexFromDomIndex(M.newIndex);this.spliceList(ot,0,z);var Tt={element:z,newIndex:ot};this.emitChanges({added:Tt})}},onDragRemove:function(M){if(S(this.$el,M.item,M.oldIndex),M.pullMode==="clone"){C(M.clone);return}var z=this.context,ot=z.index,Tt=z.element;this.spliceList(ot,1);var Lt={element:Tt,oldIndex:ot};this.emitChanges({removed:Lt})},onDragUpdate:function(M){C(M.item),S(M.from,M.item,M.oldIndex);var z=this.context.index,ot=this.getVmIndexFromDomIndex(M.newIndex);this.updatePosition(z,ot);var Tt={element:this.context.element,oldIndex:z,newIndex:ot};this.emitChanges({moved:Tt})},computeFutureIndex:function(M,z){if(!M.element)return 0;var ot=x(z.to.children).filter(function(Yt){return Yt.style.display!=="none"}),Tt=ot.indexOf(z.related),Lt=M.component.getVmIndexFromDomIndex(Tt),Kt=ot.indexOf(xt)!==-1;return Kt||!z.willInsertAfter?Lt:Lt+1},onDragMove:function(M,z){var ot=this.move,Tt=this.realList;if(!ot||!Tt)return!0;var Lt=this.getRelatedContextFromMoveEvent(M),Kt=this.computeFutureIndex(Lt,M),Yt=h(h({},this.context),{},{futureIndex:Kt}),xe=h(h({},M),{},{relatedContext:Lt,draggedContext:Yt});return ot(xe,z)},onDragEnd:function(){xt=null}}}),ye=ie;o.default=ye},fb6a:function(i,o,a){var s=a("23e7"),l=a("861d"),u=a("e8b5"),c=a("23cb"),f=a("50c4"),h=a("fc6a"),d=a("8418"),p=a("b622"),v=a("1dde"),m=a("ae40"),y=v("slice"),g=m("slice",{ACCESSORS:!0,0:0,1:2}),b=p("species"),T=[].slice,w=Math.max;s({target:"Array",proto:!0,forced:!y||!g},{slice:function(R,I){var C=h(this),S=f(C.length),L=c(R,S),H=c(I===void 0?S:I,S),G,k,Y;if(u(C)&&(G=C.constructor,typeof G=="function"&&(G===Array||u(G.prototype))?G=void 0:l(G)&&(G=G[b],G===null&&(G=void 0)),G===Array||G===void 0))return T.call(C,L,H);for(k=new(G===void 0?Array:G)(w(H-L,0)),Y=0;L<H;L++,Y++)L in C&&d(k,Y,C[L]);return k.length=Y,k}})},fc6a:function(i,o,a){var s=a("44ad"),l=a("1d80");i.exports=function(u){return s(l(u))}},fdbc:function(i,o){i.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(i,o,a){var s=a("4930");i.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}).default})})(w_);var EC=wE(w_.exports);/*!
* vue-textarea-autosize v1.1.1
* (c) 2019 Saymon
* Released under the MIT License.
*/var IC={name:"TextareaAutosize",props:{value:{type:[String,Number],default:""},autosize:{type:Boolean,default:!0},minHeight:{type:[Number],default:null},maxHeight:{type:[Number],default:null},important:{type:[Boolean,Array],default:!1}},data:function(){return{val:null,maxHeightScroll:!1,height:"auto"}},computed:{computedStyles:function(){return this.autosize?{resize:this.isResizeImportant?"none !important":"none",height:this.height,overflow:this.maxHeightScroll?"auto":this.isOverflowImportant?"hidden !important":"hidden"}:{}},isResizeImportant:function(){var e=this.important;return e===!0||Array.isArray(e)&&e.includes("resize")},isOverflowImportant:function(){var e=this.important;return e===!0||Array.isArray(e)&&e.includes("overflow")},isHeightImportant:function(){var e=this.important;return e===!0||Array.isArray(e)&&e.includes("height")}},watch:{value:function(e){this.val=e},val:function(e){this.$nextTick(this.resize),this.$emit("input",e)},minHeight:function(){this.$nextTick(this.resize)},maxHeight:function(){this.$nextTick(this.resize)},autosize:function(e){e&&this.resize()}},methods:{resize:function(){var e=this,r=this.isHeightImportant?"important":"";return this.height="auto".concat(r?" !important":""),this.$nextTick(function(){var n=e.$el.scrollHeight+1;e.minHeight&&(n=n<e.minHeight?e.minHeight:n),e.maxHeight&&(n>e.maxHeight?(n=e.maxHeight,e.maxHeightScroll=!0):e.maxHeightScroll=!1);var i=n+"px";e.height="".concat(i).concat(r?" !important":"")}),this}},created:function(){this.val=this.value},mounted:function(){this.resize()}};function CC(t,e,r,n,i,o,a,s,l,u){typeof a!="boolean"&&(l=s,s=a,a=!1);var c=typeof r=="function"?r.options:r;t&&t.render&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),n&&(c._scopeId=n);var f;if(o?(f=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(v=__VUE_SSR_CONTEXT__),e&&e.call(this,l(v)),v&&v._registeredComponents&&v._registeredComponents.add(o)},c._ssrRegister=f):e&&(f=a?function(){e.call(this,u(this.$root.$options.shadowRoot))}:function(p){e.call(this,s(p))}),f)if(c.functional){var h=c.render;c.render=function(v,m){return f.call(m),h(v,m)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,f):[f]}return r}var RC=CC;const NC=IC;var PC=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("textarea",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],style:t.computedStyles,domProps:{value:t.val},on:{focus:t.resize,input:function(n){n.target.composing||(t.val=n.target.value)}}})},SC=[];const AC=void 0,OC=void 0,UC=void 0,FC=!1;var LC=RC({render:PC,staticRenderFns:SC},AC,NC,OC,FC,UC,void 0,void 0),MC="1.1.1",BC=function(e){e.component("TextareaAutosize",LC)},L_={install:BC,version:MC};typeof window!="undefined"&&window.Vue&&window.Vue.use(L_);const kC=["onSubmit"],GC={class:"field"},DC={key:0,class:"field-title"},HC=["placeholder"],VC=Pt({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(t,{emit:e}){const n=Ae(t),i=tt(()=>{var l;return((l=n.title)==null?void 0:l.value)&&te(E(n.title.value),"span")}),o=It(null);Wn(()=>{var l;(l=o.value)==null||l.focus()});const a=tt({get(){return E(n.modelValue)||""},set(l){e("update:modelValue",l)}});function s(){e("submit")}return(l,u)=>(B(),Q("form",{onSubmit:mr(s,["prevent"])},[U("div",GC,[E(i)?(B(),Q("span",DC,[(B(),Rt(Te(E(i))))])):yt("",!0),t.textArea?(B(),Rt(E(L_),{key:1,modelValue:E(a),"onUpdate:modelValue":u[0]||(u[0]=c=>oe(a)?a.value=c:null),placeholder:t.placeholder,maxHeight:t.maxHeight,onBlur:s,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):Oa((B(),Q("input",{key:2,type:"text","onUpdate:modelValue":u[1]||(u[1]=c=>oe(a)?a.value=c:null),placeholder:t.placeholder,class:Qt({fullWidth:!t.title}),onBlur:s,ref_key:"field",ref:o},null,42,HC)),[[Ea,E(a)]])])],40,kC))}});var sp=ne(VC,[["__scopeId","data-v-d74adb0a"]]);const $C={key:0},jC=["onClick","disabled"],XC={key:0},zC=["onClick"],WC=Pt({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(t,{emit:e}){const n=Ae(t),i=It(!1);ze(i,s=>{e("confirmingChanged",s)});function o(){if(E(n.skipConfirm)){e("click");return}i.value&&e("click"),i.value=!i.value}function a(){i.value=!1}return(s,l)=>(B(),Q("span",{class:Qt(["container",{confirming:i.value}])},[i.value?(B(),Q("span",$C,"Are you sure?")):yt("",!0),U("button",{onClick:mr(o,["stop"]),class:"button danger",disabled:t.disabled},[i.value?(B(),Q("span",XC,"Yes")):He(s.$slots,"default",{key:1},void 0,!0)],8,jC),i.value?(B(),Q("button",{key:1,class:"button",onClick:mr(a,["stop"])},"No",8,zC)):yt("",!0)],2))}});var YC=ne(WC,[["__scopeId","data-v-2f8ef34c"]]);const KC=["onClick"],ZC=Pt({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(t,{emit:e}){const r=It(!1),n=It(null);function i(){e("click"),n.value&&clearTimeout(n.value),r.value=!1,cr(()=>{r.value=!0,n.value=setTimeout(()=>r.value=!1,500)})}return(o,a)=>(B(),Q("button",{onClick:mr(i,["stop"]),class:Qt(["feedback",{activated:r.value,left:t.left}])},[He(o.$slots,"default",{},void 0,!0)],10,KC))}});var qC=ne(ZC,[["__scopeId","data-v-01a1b95c"]]);const bi=t=>(Cn("data-v-0136bef4"),t=t(),Rn(),t),JC=bi(()=>U("div",{class:"handle material-icons"},"drag_handle",-1)),QC={key:0,class:"actions"},tR=bi(()=>U("span",{class:"material-icons"},"content_paste",-1)),eR=bi(()=>U("span",{class:"material-icons"},"content_copy",-1)),rR=bi(()=>U("span",{class:"material-icons"},"edit",-1)),nR=bi(()=>U("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),iR={key:1,class:"actions"},oR=bi(()=>U("span",{class:"material-icons"},"check",-1)),aR=bi(()=>U("span",{class:"material-icons"},"close",-1)),sR={key:2,class:"details"},lR={class:"save-version"},uR=bi(()=>U("br",null,null,-1)),cR={key:0},fR={key:3,class:"details"},hR={key:4,class:"details error"},dR=bi(()=>U("br",null,null,-1)),pR=Pt({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(t,{emit:e}){const r=t,{save:n}=Ae(r),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),o=It(!1),a=It(!1),s=It("");ze(o,()=>s.value=n.value.name||"");const l=tt(()=>n.value&&n.value.id===wt.id),u=tt(()=>l.value?wt.time:n.value&&n.value.time||0);function c(){e("editName",s.value),o.value=!1}return(f,h)=>(B(),Q("div",{class:Qt(["save",{active:E(l)}])},[JC,o.value?(B(),Q("div",iR,[U("button",{onClick:c,class:"button"},[P(Me,{display:"Save",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[oR]),_:1},8,["direction"])]),U("button",{onClick:h[5]||(h[5]=d=>o.value=!o.value),class:"button"},[P(Me,{display:"Cancel",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[aR]),_:1},8,["direction"])])])):(B(),Q("div",QC,[E(n).error==null&&!a.value?(B(),Rt(qC,{key:0,onClick:h[0]||(h[0]=d=>e("export")),class:"button",left:""},{default:Bt(()=>[P(Me,{display:"Export",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[tR]),_:1},8,["direction"])]),_:1})):yt("",!0),E(n).error==null&&!a.value?(B(),Q("button",{key:1,onClick:h[1]||(h[1]=d=>e("duplicate")),class:"button"},[P(Me,{display:"Duplicate",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[eR]),_:1},8,["direction"])])):yt("",!0),E(n).error==null&&!a.value?(B(),Q("button",{key:2,onClick:h[2]||(h[2]=d=>o.value=!o.value),class:"button"},[P(Me,{display:"Edit Name",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[rR]),_:1},8,["direction"])])):yt("",!0),P(YC,{disabled:E(l),onClick:h[3]||(h[3]=d=>e("delete")),onConfirmingChanged:h[4]||(h[4]=d=>a.value=d)},{default:Bt(()=>[P(Me,{display:"Delete",direction:E(Ne).Left,class:"info"},{default:Bt(()=>[nR]),_:1},8,["direction"])]),_:1},8,["disabled"])])),E(n).error==null&&!o.value?(B(),Q("div",sR,[U("button",{class:"button open",onClick:h[6]||(h[6]=d=>e("open"))},[U("h3",null,re(E(n).name),1)]),U("span",lR,"v"+re(E(n).modVersion),1),uR,E(u)?(B(),Q("div",cR,"Last played "+re(E(i).format(E(u))),1)):yt("",!0)])):E(n).error==null&&o.value?(B(),Q("div",fR,[P(sp,{modelValue:s.value,"onUpdate:modelValue":h[7]||(h[7]=d=>s.value=d),class:"editname",onSubmit:c},null,8,["modelValue"])])):(B(),Q("div",hR,[dt(" Error: Failed to load save with id "+re(E(n).id),1),dR,dt(re(E(n).error),1)]))],2))}});var vR=ne(pR,[["__scopeId","data-v-0136bef4"]]);const lp=t=>(Cn("data-v-3b9991aa"),t=t(),Rn(),t),mR=lp(()=>U("h2",null,"Saves Manager",-1)),gR={class:"modal-footer"},yR={class:"field"},bR=lp(()=>U("span",{class:"field-title"},"Create Save",-1)),_R={class:"field-buttons"},xR={class:"footer"},TR=lp(()=>U("div",{style:{"flex-grow":"1"}},null,-1)),wR=Pt({__name:"SavesManager",setup(t,{expose:e}){const r=It(!1),n=It(null);e({open(){r.value=!0}});const i=It(!1),o=It(""),a=It(null);ze(o,g=>{g?cr(()=>{try{if(g[0]!=="{")if(g[0]==="e")g=decodeURIComponent(escape(atob(g)));else if(g[0]==="\u1BE1")g=Oi.decompressFromUTF16(g);else{console.warn("Unable to determine preset encoding",g),i.value=!0;return}const b=JSON.parse(g);if(typeof b!="object"){i.value=!0;return}const T=fu();b.id=T,pn(b),o.value="",i.value=!1,Pe.saves.push(T)}catch{i.value=!0}}):i.value=!1});let s={},l=It(Object.keys(s).reduce((g,b)=>(g.push({label:b.split("/").slice(-1)[0].slice(0,-4),value:s[b]}),g),[]));const u=Sa({});function c(g){if(u[g]==null){let b=localStorage.getItem(g);if(b==null)u[g]={error:"Save doesn't exist in localStorage",id:g};else if(b==="dW5kZWZpbmVk")u[g]={error:"Save is undefined",id:g};else try{if(b[0]!=="{")if(b[0]==="e")b=decodeURIComponent(escape(atob(b)));else if(b[0]==="\u1BE1")b=Oi.decompressFromUTF16(b);else return console.warn("Unable to determine preset encoding",b),i.value=!0,u[g]={error:"Unable to determine preset encoding",id:g},u[g];u[g]={...JSON.parse(b),id:g}}catch(T){u[g]={error:T,id:g},console.warn(`SavesManager: Failed to load info about save with id ${g}:
${T}
${b}`)}}return u[g]}ze(r,g=>{g&&Object.keys(u).forEach(b=>delete u[b])});const f=tt(()=>Pe.saves.reduce((g,b)=>(g[b]=c(b),g),{}));function h(g){let b;switch(wt.id===g?b=i_(wt[lr]):b=JSON.stringify(f.value[g]),Ie.exportEncoding){default:console.warn(`Unknown save encoding: ${Ie.exportEncoding}. Defaulting to lz`);case"lz":b=Oi.compressToUTF16(b);break;case"base64":b=btoa(unescape(encodeURIComponent(b)));break;case"plain":break}const T=document.createElement("textarea");T.value=b,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function d(g){wt.id===g&&pn();const b={...f.value[g],id:fu()};pn(b),Pe.saves.push(b.id)}function p(g){Pe.saves=Pe.saves.filter(b=>b!==g),localStorage.removeItem(g),u[g]=void 0}function v(g){f.value[wt.id].time=wt.time,pn(),u[wt.id]=void 0,To(f.value[g]),u[g]=void 0}function m(g){if(a.value=g,cr(()=>{a.value=null}),g[0]!=="{")if(g[0]==="e")g=decodeURIComponent(escape(atob(g)));else if(g[0]==="\u1BE1")g=Oi.decompressFromUTF16(g);else{console.warn("Unable to determine preset encoding",g);return}const b=JSON.parse(g);b.id=fu(),pn(b),Pe.saves.push(b.id),v(b.id)}function y(g,b){const T=f.value[g];T&&(T.name=b,wt.id===g?(wt.name=b,pn()):(pn(T),u[g]=void 0))}return(g,b)=>(B(),Rt(Ki,{modelValue:r.value,"onUpdate:modelValue":b[4]||(b[4]=T=>r.value=T),ref_key:"modal",ref:n},{header:Bt(()=>[mR]),body:Bt(({shown:T})=>[T?(B(),Rt(E(EC),{key:0,list:E(Pe).saves,handle:".handle",itemKey:w=>w},{item:Bt(({element:w})=>[P(vR,{save:E(f)[w],onOpen:x=>v(w),onExport:x=>h(w),onEditName:x=>y(w,x),onDuplicate:x=>d(w),onDelete:x=>p(w)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):yt("",!0)]),footer:Bt(()=>[U("div",gR,[P(sp,{modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=T=>o.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Qt({importingFailed:i.value})},null,8,["modelValue","class"]),U("div",yR,[bR,U("div",_R,[U("button",{class:"button",onClick:b[1]||(b[1]=T=>v(E(va)().id))},"New Game"),Object.keys(E(l)).length>0?(B(),Rt(rp,{key:0,options:E(l),modelValue:a.value,"onUpdate:modelValue":b[2]||(b[2]=T=>m(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):yt("",!0)])]),U("div",xR,[TR,U("button",{class:"button modal-default-button",onClick:b[3]||(b[3]=T=>r.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var M_=ne(wR,[["__scopeId","data-v-3b9991aa"]]);const qr=t=>(Cn("data-v-4a3f8425"),t=t(),Rn(),t),ER=["src","alt"],IR={key:1,class:"title"},CR=qr(()=>U("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),RR={class:"discord"},NR={class:"discord-links"},PR={key:0},SR=["href"],AR=qr(()=>U("li",null,[U("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),OR=qr(()=>U("li",null,[U("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),UR={href:"https://forums.moddingtree.com/",target:"_blank"},FR=qr(()=>U("span",{class:"material-icons"},"forum",-1)),LR=qr(()=>U("span",{class:"material-icons"},"info",-1)),MR=qr(()=>U("span",{class:"material-icons"},"library_books",-1)),BR=qr(()=>U("span",{class:"material-icons"},"settings",-1)),kR=qr(()=>U("span",{class:"material-icons"},"library_books",-1)),GR=qr(()=>U("span",{class:"material-icons"},"settings",-1)),DR=qr(()=>U("span",{class:"material-icons"},"info",-1)),HR={href:"https://forums.moddingtree.com/",target:"_blank"},VR=qr(()=>U("span",{class:"material-icons"},"forum",-1)),$R={class:"discord"},jR={class:"discord-links"},XR={key:0},zR=["href"],WR=qr(()=>U("li",null,[U("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),YR=qr(()=>U("li",null,[U("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),KR=Pt({__name:"Nav",setup(t){const e=It(null),r=It(null),n=It(null),i=It(null),{useHeader:o,banner:a,title:s,discordName:l,discordLink:u,versionNumber:c}=Ie;function f(){window.open(u,"mywindow")}return(h,d)=>(B(),Q(Ot,null,[E(o)?(B(),Q("div",yr({key:0,class:"nav"},h.$attrs),[E(a)?(B(),Q("img",{key:0,src:E(a),class:"banner",alt:E(s)},null,8,ER)):(B(),Q("div",IR,re(E(s)),1)),U("div",{onClick:d[0]||(d[0]=p=>{var v;return(v=i.value)==null?void 0:v.open()}),class:"version-container"},[P(Me,{display:"Changelog",direction:E(Ne).Down,class:"version"},{default:Bt(()=>[U("span",null,"v"+re(E(c)),1)]),_:1},8,["direction"])]),CR,U("div",RR,[U("span",{onClick:f,class:"material-icons"},"discord"),U("ul",NR,[E(u)?(B(),Q("li",PR,[U("a",{href:E(u),target:"_blank"},re(E(l)),9,SR)])):yt("",!0),AR,OR])]),U("div",null,[U("a",UR,[P(Me,{display:"Forums",direction:E(Ne).Down,yoffset:"5px"},{default:Bt(()=>[FR]),_:1},8,["direction"])])]),U("div",{onClick:d[1]||(d[1]=p=>{var v;return(v=e.value)==null?void 0:v.open()})},[P(Me,{display:"Info",direction:E(Ne).Down,class:"info"},{default:Bt(()=>[LR]),_:1},8,["direction"])]),U("div",{onClick:d[2]||(d[2]=p=>{var v;return(v=r.value)==null?void 0:v.open()})},[P(Me,{display:"Saves",direction:E(Ne).Down,xoffset:"-20px"},{default:Bt(()=>[MR]),_:1},8,["direction"])]),U("div",{onClick:d[3]||(d[3]=p=>{var v;return(v=n.value)==null?void 0:v.open()})},[P(Me,{display:"Options",direction:E(Ne).Down,xoffset:"-66px"},{default:Bt(()=>[BR]),_:1},8,["direction"])])],16)):(B(),Q("div",yr({key:1,class:"overlay-nav"},h.$attrs),[U("div",{onClick:d[4]||(d[4]=p=>{var v;return(v=i.value)==null?void 0:v.open()}),class:"version-container"},[P(Me,{display:"Changelog",direction:E(Ne).Right,xoffset:"25%",class:"version"},{default:Bt(()=>[U("span",null,"v"+re(E(c)),1)]),_:1},8,["direction"])]),U("div",{onClick:d[5]||(d[5]=p=>{var v;return(v=r.value)==null?void 0:v.open()})},[P(Me,{display:"Saves",direction:E(Ne).Right},{default:Bt(()=>[kR]),_:1},8,["direction"])]),U("div",{onClick:d[6]||(d[6]=p=>{var v;return(v=n.value)==null?void 0:v.open()})},[P(Me,{display:"Options",direction:E(Ne).Right},{default:Bt(()=>[GR]),_:1},8,["direction"])]),U("div",{onClick:d[7]||(d[7]=p=>{var v;return(v=e.value)==null?void 0:v.open()})},[P(Me,{display:"Info",direction:E(Ne).Right},{default:Bt(()=>[DR]),_:1},8,["direction"])]),U("div",null,[U("a",HR,[P(Me,{display:"Forums",direction:E(Ne).Right,xoffset:"7px"},{default:Bt(()=>[VR]),_:1},8,["direction"])])]),U("div",$R,[U("span",{onClick:f,class:"material-icons"},"discord"),U("ul",jR,[E(u)?(B(),Q("li",XR,[U("a",{href:E(u),target:"_blank"},re(E(l)),9,zR)])):yt("",!0),WR,YR])])],16)),P(yI,{ref_key:"info",ref:e,changelog:i.value},null,8,["changelog"]),P(M_,{ref_key:"savesManager",ref:r},null,512),P(GI,{ref_key:"options",ref:n},null,512),P(QE,{ref_key:"changelog",ref:i},null,512)],64))}});var B_=ne(KR,[["__scopeId","data-v-4a3f8425"]]);const ZR={class:"inner-tab"},qR=Pt({__name:"Game",setup(t){const e=Mr(wt,"tabs"),r=tt(()=>Object.keys(kr)),n=Ie.useHeader;function i(o){const{display:a,minimized:s,minWidth:l,name:u,color:c,minimizable:f,nodes:h}=o;return{display:a,minimized:s,minWidth:l,name:u,color:c,minimizable:f,nodes:h}}return(o,a)=>(B(),Q("div",{class:Qt(["tabs-container",{useHeader:E(n)}])},[(B(!0),Q(Ot,null,Hn(E(e),(s,l)=>{var u,c;return B(),Q("div",{key:l,class:Qt(["tab",E((u=E(kr)[s])==null?void 0:u.classes)]),ref_for:!0,ref:`tab-${l}`,style:ce(E((c=E(kr)[s])==null?void 0:c.style))},[l===0&&!E(n)?(B(),Rt(B_,{key:0})):yt("",!0),U("div",ZR,[E(r).includes(s)?(B(),Rt(KE,yr({key:0},i(E(kr)[s]),{index:l,tab:()=>{var f;return(f=o.$refs[`tab-${l}`])==null?void 0:f[0]}}),null,16,["index","tab"])):(B(),Rt(Te(s),{key:1,index:l},null,8,["index"]))])],6)}),128))],2))}});var JR=ne(qR,[["__scopeId","data-v-4cb9ce0f"]]);const QR={},tN=t=>(Cn("data-v-89b4b00a"),t=t(),Rn(),t),eN=tN(()=>U("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[U("g",{id:"P"},[U("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),U("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),U("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),U("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),U("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),U("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),U("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],-1));function rN(t,e){return B(),Rt(Yi,{appear:""},{default:Bt(()=>[eN]),_:1})}var nN=ne(QR,[["render",rN],["__scopeId","data-v-89b4b00a"]]);const Fr=Pt({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(t){return(e,r)=>(B(),Q("div",{style:ce({width:t.width,height:t.height})},null,4))}});function Os(t,e="points",r=0,n=void 0){const i=oe(t)?t:nr(t);return i.displayName=e,i.precision=r,i.small=n,i}function k_(t){const e=nr(t.value);return ze(t,r=>{O.gt(r,e.value)&&(e.value=r)}),e}function iN(t){const e=nr(t.value);return ze(t,(r,n)=>{O.gt(r,n)&&(e.value=O.add(e.value,O.sub(r,n)))}),e}const oN=new O("10^^8"),aN=new O("1e100");function sN(t,e){const r=It(0),n=It(0),i=It(0);return vr.on("update",a=>{if(n.value=0,O.lte(t.value,aN)){i.value=t.value;return}let s=t.value,l=i.value;if(i.value=s,O.gt(s,l))if(O.gte(s,oN))s=O.slog(s,1e10),l=O.slog(l,1e10),r.value=s.sub(l).div(a),n.value=-1;else for(;O.div(s,l).log(10).div(a).gte("100")&&n.value<=5&&O.gt(l,0);)s=O.log10(s),l=O.log10(l),r.value=s.sub(l).div(a),n.value++}),tt(()=>n.value===0?e?je(e.value,t.precision,t.small)+" "+t.displayName+"/s":"":je(r.value)+" OOM"+(n.value<0?"^OOM":"^"+n.value)+"s/sec")}function hi(t,e){const r=e!=null?e:t.value;return O.eq(t.precision,0)?Cr(r):je(r,t.precision,t.small)}const lN=["x1","y1","x2","y2"],uN=Pt({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(t){const r=Ae(t),n=tt(()=>{const o=r.startNode.value.rect,a=r.boundingRect.value,s=a?{x:o.x+o.width/2-a.x,y:o.y+o.height/2-a.y}:{x:0,y:0};return r.link.value.offsetStart&&(s.x+=r.link.value.offsetStart.x,s.y+=r.link.value.offsetStart.y),s}),i=tt(()=>{const o=r.endNode.value.rect,a=r.boundingRect.value,s=a?{x:o.x+o.width/2-a.x,y:o.y+o.height/2-a.y}:{x:0,y:0};return r.link.value.offsetEnd&&(s.x+=r.link.value.offsetEnd.x,s.y+=r.link.value.offsetEnd.y),s});return(o,a)=>(B(),Q("line",yr({"stroke-width":"15px",stroke:"white"},t.link,{x1:E(n).x,y1:E(n).y,x2:E(i).x,y2:E(i).y}),null,16,lN))}});const cN=Pt({__name:"Links",props:{links:null},setup(t){const r=Mr(t,"links"),n=It(null),i=en(Qd),o=en(tp),a=It(void 0);ze([o],()=>{var l;return a.value=(l=n.value)==null?void 0:l.getBoundingClientRect()});const s=tt(()=>{var u,c;const l=i.value;return(c=(u=r.value)==null?void 0:u.filter(f=>{var h,d;return((h=l[f.startNode.id])==null?void 0:h.rect)&&((d=l[f.startNode.id])==null?void 0:d.rect)}))!=null?c:[]});return(l,u)=>(B(),Q(Ot,null,[E(s)?(B(),Q("svg",vy(yr({key:0},l.$attrs)),[(B(!0),Q(Ot,null,Hn(E(s),(c,f)=>(B(),Rt(uN,{key:f,link:c,boundingRect:a.value,startNode:E(i)[c.startNode.id],endNode:E(i)[c.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):yt("",!0),U("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var G_=ne(cN,[["__scopeId","data-v-9b4b944e"]]),fN=Pt({props:{nodes:{type:nt(Array),required:!0},leftSideNodes:nt(Array),rightSideNodes:nt(Array),branches:nt(Array)},components:{Links:G_},setup(t){const{nodes:e,leftSideNodes:r,rightSideNodes:n}=Ae(t),i=Gr();Xe(()=>{const s=Be(e);i.value=te(le(()=>P(Ot,null,[s.map(l=>P("span",{class:"row tree-row",style:"margin: 50px auto;"},[l.map(oi)]))])))});const o=Gr();Xe(()=>{const s=Be(r);o.value=s?te(le(()=>P("span",{class:"left-side-nodes small"},[s.map(oi)]))):""});const a=Gr();return Xe(()=>{const s=Be(n);a.value=s?te(le(()=>P("span",{class:"side-nodes small"},[s.map(oi)]))):""}),{unref:E,nodesComp:i,leftNodesComp:o,rightNodesComp:a}}});function hN(t,e,r,n,i,o){const a=Re("Links");return B(),Q(Ot,null,[(B(),Rt(Te(t.nodesComp))),t.leftNodesComp?(B(),Rt(Te(t.leftNodesComp),{key:0})):yt("",!0),t.rightNodesComp?(B(),Rt(Te(t.rightNodesComp),{key:1})):yt("",!0),t.branches?(B(),Rt(a,{key:2,links:t.unref(t.branches)},null,8,["links"])):yt("",!0)],64)}var dN=ne(fN,[["render",hN],["__scopeId","data-v-39ca96d0"]]);const pN={key:0},vN={key:0,class:"mark star"},mN=["src"],gN=Pt({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(t){return(e,r)=>t.mark?(B(),Q("div",pN,[t.mark===!0?(B(),Q("div",vN)):(B(),Q("img",{key:1,class:"mark",src:t.mark},null,8,mN))])):yt("",!0)}});var Ua=ne(gN,[["__scopeId","data-v-2207999f"]]);const yN=Pt({__name:"Node",props:{id:null},setup(t){const r=Ae(t),n=en(qd),i=en(Jd),o=It(null),a=tt(()=>o.value&&o.value.parentElement);return n&&i&&(ze([a,r.id],([s,l],[u,c])=>{u&&i(E(c)),s&&n(l,s)}),Aa(()=>i(E(r.id)))),(s,l)=>(B(),Q("div",{class:"node",ref_key:"node",ref:o},null,512))}});var _i=ne(yN,[["__scopeId","data-v-14704fd0"]]);const bN=Pt({props:{display:nt(Object,String,Function),visibility:{type:nt(Number),required:!0},style:nt(String,Object,Array),classes:nt(Object),onClick:Function,onHold:Function,color:nt(String),glowColor:nt(String),canClick:{type:nt(Boolean),required:!0},mark:nt(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Ua,Node:_i},setup(t){const{onClick:e,onHold:r,display:n}=Ae(t),i=ko(n),{start:o,stop:a}=Zd(e,r);return{start:o,stop:a,comp:i,unref:E,Visibility:ae,isCoercableComponent:on}}});function _N(t,e,r,n,i,o){var l;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce({visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0}),class:Qt({treeNode:!0,can:t.unref(t.canClick),...t.unref(t.classes)}),onClick:e[0]||(e[0]=(...u)=>t.onClick&&t.onClick(...u)),onMousedown:e[1]||(e[1]=(...u)=>t.start&&t.start(...u)),onMouseleave:e[2]||(e[2]=(...u)=>t.stop&&t.stop(...u)),onMouseup:e[3]||(e[3]=(...u)=>t.stop&&t.stop(...u)),onTouchstartPassive:e[4]||(e[4]=(...u)=>t.start&&t.start(...u)),onTouchendPassive:e[5]||(e[5]=(...u)=>t.stop&&t.stop(...u)),onTouchcancelPassive:e[6]||(e[6]=(...u)=>t.stop&&t.stop(...u))},[U("div",{style:ce([{backgroundColor:t.unref(t.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${t.unref(t.glowColor)}`},(l=t.unref(t.style))!=null?l:[]])},[(B(),Rt(Te(t.unref(t.comp))))],4),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],38)):yt("",!0)}var xN=ne(bN,[["render",_N],["__scopeId","data-v-1c0c107d"]]);const TN=Symbol("TreeNode"),wN=Symbol("Tree");function xs(t){return pr(()=>{var r;const e=(r=t==null?void 0:t())!=null?r:{};if(e.id=Sr("treeNode-"),e.type=TN,e[ir]=xN,J(e,"visibility"),ve(e,"visibility",ae.Visible),J(e,"canClick"),ve(e,"canClick",!0),J(e,"color"),J(e,"display"),J(e,"glowColor"),J(e,"classes"),J(e,"style"),J(e,"mark"),e.onClick){const n=e.onClick.bind(e);e.onClick=function(){E(e.canClick)&&n()}}if(e.onHold){const n=e.onHold.bind(e);e.onHold=function(){E(e.canClick)&&n()}}return e[fr]=function(){const{display:n,visibility:i,style:o,classes:a,onClick:s,onHold:l,color:u,glowColor:c,canClick:f,mark:h,id:d}=this;return{display:n,visibility:i,style:o,classes:a,onClick:s,onHold:l,color:u,glowColor:c,canClick:f,mark:h,id:d}},e})}function D_(t){return pr(()=>{const e=t();return e.id=Sr("tree-"),e.type=wN,e[ir]=dN,e.isResetting=It(!1),e.resettingNode=Gr(null),e.reset=function(r){var i,o;const n=e;n.isResetting.value=!0,n.resettingNode.value=r,(i=n.resetPropagation)==null||i.call(n,n,r),(o=n.onReset)==null||o.call(n,r),n.isResetting.value=!1,n.resettingNode.value=null},e.links=tt(()=>{var n;return(n=E(e.branches))!=null?n:[]}),J(e,"visibility"),ve(e,"visibility",ae.Visible),J(e,"nodes"),J(e,"leftSideNodes"),J(e,"rightSideNodes"),J(e,"branches"),e[fr]=function(){const{nodes:r,leftSideNodes:n,rightSideNodes:i,branches:o}=this;return{nodes:r,leftSideNodes:n,rightSideNodes:i,branches:o}},e})}const EN=function(t,e){const r=[e];let n=[e];if(t.branches!=null){const i=E(t.branches);for(;n.length>0;){const o=[];n.forEach(a=>{i.filter(s=>s.startNode===a||s.endNode===a).map(s=>s.startNode===a?s.endNode:s.startNode).filter(s=>!r.includes(s)).forEach(s=>{var l;o.includes(s)||(o.push(s),(l=s.reset)==null||l.reset())})}),n=o,r.push(...n)}}};function H_(t,e=null,r=0){const n=nn(r);return tt(()=>e==null||O.gte(t.value,E(n))?hi(t)+" "+t.displayName:`Reach ${O.eq(e.precision,0)?Cr(E(n)):je(E(n),e.precision)} ${e.displayName} to unlock (You have ${O.eq(e.precision,0)?Cr(e.value):je(e.value,e.precision)})`)}const IN=Pt({props:{visibility:{type:nt(Number),required:!0},display:nt(Object,String,Function),earned:{type:nt(Boolean),required:!0},image:nt(String),style:nt(String,Object,Array),classes:nt(Object),mark:nt(Boolean,String),id:{type:String,required:!0}},components:{Node:_i,MarkNode:Ua},setup(t){const{display:e}=Ae(t);return{component:ko(e),unref:E,Visibility:ae}}});function CN(t,e,r,n,i,o){var l;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0,backgroundImage:t.earned&&t.image&&`url(${t.image})`||""},(l=t.unref(t.style))!=null?l:[]]),class:Qt({feature:!0,achievement:!0,locked:!t.unref(t.earned),bought:t.unref(t.earned),...t.unref(t.classes)})},[t.component?(B(),Rt(Te(t.component),{key:0})):yt("",!0),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],6)):yt("",!0)}var RN=ne(IN,[["render",CN],["__scopeId","data-v-58163dab"]]),NN=Object.defineProperty,Wv=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,SN=Object.prototype.propertyIsEnumerable,Yv=(t,e,r)=>e in t?NN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V_=(t,e)=>{for(var r in e||(e={}))PN.call(e,r)&&Yv(t,r,e[r]);if(Wv)for(var r of Wv(e))SN.call(e,r)&&Yv(t,r,e[r]);return t},gc=t=>typeof t=="function",yc=t=>typeof t=="string",$_=t=>yc(t)&&t.trim().length>0,AN=t=>typeof t=="number",wo=t=>typeof t=="undefined",Us=t=>typeof t=="object"&&t!==null,ON=t=>Gn(t,"tag")&&$_(t.tag),j_=t=>window.TouchEvent&&t instanceof TouchEvent,X_=t=>Gn(t,"component")&&z_(t.component),UN=t=>gc(t)||Us(t),z_=t=>!wo(t)&&(yc(t)||UN(t)||X_(t)),Kv=t=>Us(t)&&["height","width","right","left","top","bottom"].every(e=>AN(t[e])),Gn=(t,e)=>(Us(t)||gc(t))&&e in t,FN=(t=>()=>t++)(0);function Zc(t){return j_(t)?t.targetTouches[0].clientX:t.clientX}function Zv(t){return j_(t)?t.targetTouches[0].clientY:t.clientY}var LN=t=>{wo(t.remove)?t.parentNode&&t.parentNode.removeChild(t):t.remove()},ll=t=>X_(t)?ll(t.component):ON(t)?Pt({render(){return t}}):typeof t=="string"?t:ue(E(t)),MN=t=>{if(typeof t=="string")return t;const e=Gn(t,"props")&&Us(t.props)?t.props:{},r=Gn(t,"listeners")&&Us(t.listeners)?t.listeners:{};return{component:ll(t),props:e,listeners:r}},BN=()=>typeof window!="undefined",up=class{constructor(){this.allHandlers={}}getHandlers(t){return this.allHandlers[t]||[]}on(t,e){const r=this.getHandlers(t);r.push(e),this.allHandlers[t]=r}off(t,e){const r=this.getHandlers(t);r.splice(r.indexOf(e)>>>0,1)}emit(t,e){this.getHandlers(t).forEach(n=>n(e))}},kN=t=>["on","off","emit"].every(e=>Gn(t,e)&&gc(t[e])),zr;(function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.INFO="info",t.DEFAULT="default"})(zr||(zr={}));var Du;(function(t){t.TOP_LEFT="top-left",t.TOP_CENTER="top-center",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_CENTER="bottom-center",t.BOTTOM_RIGHT="bottom-right"})(Du||(Du={}));var Wr;(function(t){t.ADD="add",t.DISMISS="dismiss",t.UPDATE="update",t.CLEAR="clear",t.UPDATE_DEFAULTS="update_defaults"})(Wr||(Wr={}));var bn="Vue-Toastification",gn={type:{type:String,default:zr.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},W_={type:gn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},yu={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:gn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},mh={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Y_={transition:{type:[Object,String],default:`${bn}__bounce`}},GN={position:{type:String,default:Du.TOP_RIGHT},draggable:gn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:gn.trueBoolean,pauseOnHover:gn.trueBoolean,closeOnClick:gn.trueBoolean,timeout:mh.timeout,hideProgressBar:mh.hideProgressBar,toastClassName:gn.classNames,bodyClassName:gn.classNames,icon:W_.customIcon,closeButton:yu.component,closeButtonClassName:yu.classNames,showCloseButtonOnHover:yu.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new up}},DN={id:{type:[String,Number],required:!0,default:0},type:gn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},HN={container:{type:[Object,Function],default:()=>document.body},newestOnTop:gn.trueBoolean,maxToasts:{type:Number,default:20},transition:Y_.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:t=>t},filterToasts:{type:Function,default:t=>t},containerClassName:gn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},si={CORE_TOAST:GN,TOAST:DN,CONTAINER:HN,PROGRESS_BAR:mh,ICON:W_,TRANSITION:Y_,CLOSE_BUTTON:yu},K_=Pt({name:"VtProgressBar",props:si.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${bn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function VN(t,e){return B(),Q("div",{style:ce(t.style),class:Qt(t.cpClass)},null,6)}K_.render=VN;var $N=K_,Z_=Pt({name:"VtCloseButton",props:si.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?ll(this.component):"button"},classes(){const t=[`${bn}__close-button`];return this.showOnHover&&t.push("show-on-hover"),t.concat(this.classNames)}}}),jN=dt(" \xD7 ");function XN(t,e){return B(),Rt(Te(t.buttonComponent),yr({"aria-label":t.ariaLabel,class:t.classes},t.$attrs),{default:Bt(()=>[jN]),_:1},16,["aria-label","class"])}Z_.render=XN;var zN=Z_,q_={},WN={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},YN=U("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),KN=[YN];function ZN(t,e){return B(),Q("svg",WN,KN)}q_.render=ZN;var qN=q_,J_={},JN={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},QN=U("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),tP=[QN];function eP(t,e){return B(),Q("svg",JN,tP)}J_.render=eP;var qv=J_,Q_={},rP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},nP=U("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),iP=[nP];function oP(t,e){return B(),Q("svg",rP,iP)}Q_.render=oP;var aP=Q_,t1={},sP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},lP=U("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),uP=[lP];function cP(t,e){return B(),Q("svg",sP,uP)}t1.render=cP;var fP=t1,e1=Pt({name:"VtIcon",props:si.ICON,computed:{customIconChildren(){return Gn(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return yc(this.customIcon)?this.trimValue(this.customIcon):Gn(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Gn(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:z_(this.customIcon)?ll(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[zr.DEFAULT]:qv,[zr.INFO]:qv,[zr.SUCCESS]:qN,[zr.ERROR]:fP,[zr.WARNING]:aP}[this.type]},iconClasses(){const t=[`${bn}__icon`];return this.hasCustomIcon?t.concat(this.customIconClass):t}},methods:{trimValue(t,e=""){return $_(t)?t.trim():e}}});function hP(t,e){return B(),Rt(Te(t.component),{class:Qt(t.iconClasses)},{default:Bt(()=>[dt(re(t.customIconChildren),1)]),_:1},8,["class"])}e1.render=hP;var dP=e1,r1=Pt({name:"VtToast",components:{ProgressBar:$N,CloseButton:zN,Icon:dP},inheritAttrs:!1,props:Object.assign({},si.CORE_TOAST,si.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const t=[`${bn}__toast`,`${bn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&t.push("disable-transition"),this.rtl&&t.push(`${bn}__toast--rtl`),t},bodyClasses(){return[`${bn}__toast-${yc(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Kv(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Gn,getVueComponentFromObj:ll,closeToast(){this.eventBus.emit(Wr.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const t=this.$el;t.addEventListener("touchstart",this.onDragStart,{passive:!0}),t.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const t=this.$el;t.removeEventListener("touchstart",this.onDragStart),t.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(t){this.beingDragged=!0,this.dragPos={x:Zc(t),y:Zv(t)},this.dragStart=Zc(t),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(t){this.beingDragged&&(t.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Zc(t),y:Zv(t)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Kv(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),pP=["role"];function vP(t,e){const r=Re("Icon"),n=Re("CloseButton"),i=Re("ProgressBar");return B(),Q("div",{class:Qt(t.classes),style:ce(t.draggableStyle),onClick:e[0]||(e[0]=(...o)=>t.clickHandler&&t.clickHandler(...o)),onMouseenter:e[1]||(e[1]=(...o)=>t.hoverPause&&t.hoverPause(...o)),onMouseleave:e[2]||(e[2]=(...o)=>t.hoverPlay&&t.hoverPlay(...o))},[t.icon?(B(),Rt(r,{key:0,"custom-icon":t.icon,type:t.type},null,8,["custom-icon","type"])):yt("v-if",!0),U("div",{role:t.accessibility.toastRole||"alert",class:Qt(t.bodyClasses)},[typeof t.content=="string"?(B(),Q(Ot,{key:0},[dt(re(t.content),1)],2112)):(B(),Rt(Te(t.getVueComponentFromObj(t.content)),yr({key:1,"toast-id":t.id},t.hasProp(t.content,"props")?t.content.props:{},nb(t.hasProp(t.content,"listeners")?t.content.listeners:{}),{onCloseToast:t.closeToast}),null,16,["toast-id","onCloseToast"]))],10,pP),t.closeButton?(B(),Rt(n,{key:1,component:t.closeButton,"class-names":t.closeButtonClassName,"show-on-hover":t.showCloseButtonOnHover,"aria-label":t.accessibility.closeButtonLabel,onClick:mr(t.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):yt("v-if",!0),t.timeout?(B(),Rt(i,{key:2,"is-running":t.isRunning,"hide-progress-bar":t.hideProgressBar,timeout:t.timeout,onCloseToast:t.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):yt("v-if",!0)],38)}r1.render=vP;var mP=r1,n1=Pt({name:"VtTransition",props:si.TRANSITION,emits:["leave"],methods:{hasProp:Gn,leave(t){t instanceof HTMLElement&&(t.style.left=t.offsetLeft+"px",t.style.top=t.offsetTop+"px",t.style.width=getComputedStyle(t).width,t.style.position="absolute")}}});function gP(t,e){return B(),Rt(Gb,{tag:"div","enter-active-class":t.transition.enter?t.transition.enter:`${t.transition}-enter-active`,"move-class":t.transition.move?t.transition.move:`${t.transition}-move`,"leave-active-class":t.transition.leave?t.transition.leave:`${t.transition}-leave-active`,onLeave:t.leave},{default:Bt(()=>[He(t.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}n1.render=gP;var yP=n1,i1=Pt({name:"VueToastification",devtools:{hide:!0},components:{Toast:mP,VtTransition:yP},props:Object.assign({},si.CORE_TOAST,si.CONTAINER,si.TRANSITION),data(){return{count:0,positions:Object.values(Du),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const t=this.eventBus;t.on(Wr.ADD,this.addToast),t.on(Wr.CLEAR,this.clearToasts),t.on(Wr.DISMISS,this.dismissToast),t.on(Wr.UPDATE,this.updateToast),t.on(Wr.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(t){gc(t)&&(t=await t()),LN(this.$el),t.appendChild(this.$el)},setToast(t){wo(t.id)||(this.toasts[t.id]=t)},addToast(t){t.content=MN(t.content);const e=Object.assign({},this.defaults,t.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[t.type],t),r=this.defaults.filterBeforeCreate(e,this.toastArray);r&&this.setToast(r)},dismissToast(t){const e=this.toasts[t];!wo(e)&&!wo(e.onClose)&&e.onClose(),delete this.toasts[t]},clearToasts(){Object.keys(this.toasts).forEach(t=>{this.dismissToast(t)})},getPositionToasts(t){const e=this.filteredToasts.filter(r=>r.position===t).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(t){wo(t.container)||this.setup(t.container),this.defaults=Object.assign({},this.defaults,t)},updateToast({id:t,options:e,create:r}){this.toasts[t]?(e.timeout&&e.timeout===this.toasts[t].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[t],e))):r&&this.addToast(Object.assign({},{id:t},e))},getClasses(t){return[`${bn}__container`,t].concat(this.defaults.containerClassName)}}});function bP(t,e){const r=Re("Toast"),n=Re("VtTransition");return B(),Q("div",null,[(B(!0),Q(Ot,null,Hn(t.positions,i=>(B(),Q("div",{key:i},[P(n,{transition:t.defaults.transition,class:Qt(t.getClasses(i))},{default:Bt(()=>[(B(!0),Q(Ot,null,Hn(t.getPositionToasts(i),o=>(B(),Rt(r,yr({key:o.id},o),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}i1.render=bP;var _P=i1,Jv=(t={},e=!0)=>{const r=t.eventBus=t.eventBus||new up;e&&cr(()=>{const o=Yd(_P,V_({},t)),a=o.mount(document.createElement("div")),s=t.onMounted;if(wo(s)||s(a,o),t.shareAppContext){const l=t.shareAppContext;l===!0?console.warn(`[${bn}] App to share context with was not provided.`):(o._context.components=l._context.components,o._context.directives=l._context.directives,o._context.mixins=l._context.mixins,o._context.provides=l._context.provides,o.config.globalProperties=l.config.globalProperties)}});const n=(o,a)=>{const s=Object.assign({},{id:FN(),type:zr.DEFAULT},a,{content:o});return r.emit(Wr.ADD,s),s.id};n.clear=()=>r.emit(Wr.CLEAR,void 0),n.updateDefaults=o=>{r.emit(Wr.UPDATE_DEFAULTS,o)},n.dismiss=o=>{r.emit(Wr.DISMISS,o)};function i(o,{content:a,options:s},l=!1){const u=Object.assign({},s,{content:a});r.emit(Wr.UPDATE,{id:o,options:u,create:l})}return n.update=i,n.success=(o,a)=>n(o,Object.assign({},a,{type:zr.SUCCESS})),n.info=(o,a)=>n(o,Object.assign({},a,{type:zr.INFO})),n.error=(o,a)=>n(o,Object.assign({},a,{type:zr.ERROR})),n.warning=(o,a)=>n(o,Object.assign({},a,{type:zr.WARNING})),n},xP=()=>{const t=()=>console.warn(`[${bn}] This plugin does not support SSR!`);return new Proxy(t,{get(){return t}})};function gh(t){return BN()?kN(t)?Jv({eventBus:t},!1):Jv(t,!0):xP()}var o1=Symbol("VueToastification"),a1=new up,TP=(t,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=t);const r=gh(V_({eventBus:a1},e));t.provide(o1,r)},cp=t=>{if(t)return gh(t);const e=Yn()?en(o1,void 0):void 0;return e||gh(a1)},wP=TP;vr.on("setupVue",t=>t.use(wP));function fp(t="white",e="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${e} ${t}`,zIndex:1}}function EP(){return fp("red","20px")}const IP=cp(),CP=Symbol("Achievement");function qc(t){const e=nr(!1);return pr(()=>{var n;const r=(n=t==null?void 0:t())!=null?n:{};if(r.id=Sr("achievement-"),r.type=CP,r[ir]=RN,r.earned=e,r.complete=function(){e.value=!0},J(r,"visibility"),ve(r,"visibility",ae.Visible),J(r,"display"),J(r,"mark"),J(r,"image"),J(r,"style"),J(r,"classes"),r[fr]=function(){const{visibility:i,display:o,earned:a,image:s,style:l,classes:u,mark:c,id:f}=this;return{visibility:i,display:o,earned:a,image:s,style:E(l),classes:u,mark:c,id:f}},r.shouldEarn){const i=r;Xe(()=>{var o,a;if(!i.earned.value&&E(i.visibility)===ae.Visible&&((o=i.shouldEarn)==null?void 0:o.call(i))&&(i.earned.value=!0,(a=i.onComplete)==null||a.call(i),i.display)){const s=te(E(i.display));IP.info(P("div",null,[P("h3",null,[dt("Achievement earned!")]),P("div",null,[P(s,null,null)])]))}})}return r})}const RP=Pt({props:{visibility:{type:nt(Number),required:!0},onClick:Function,onHold:Function,display:{type:nt(Object,String,Function),required:!0},title:nt(Object,String,Function),style:nt(String,Object,Array),canClick:{type:nt(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:_i},setup(t){const{onClick:e,onHold:r,title:n,display:i}=Ae(t),{start:o,stop:a}=Zd(e,r),s=ko(n),l=Ca(i);return{start:o,stop:a,titleComponent:s,component:l,Visibility:ae,unref:E}}}),NP={key:0};function PP(t,e,r,n,i,o){var s;const a=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("button",{key:0,class:Qt({feature:!0,tile:!0,can:t.unref(t.canClick),locked:!t.unref(t.canClick)}),style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(s=t.unref(t.style))!=null?s:{}]),onClick:e[0]||(e[0]=(...l)=>t.onClick&&t.onClick(...l)),onMousedown:e[1]||(e[1]=(...l)=>t.start&&t.start(...l)),onMouseleave:e[2]||(e[2]=(...l)=>t.stop&&t.stop(...l)),onMouseup:e[3]||(e[3]=(...l)=>t.stop&&t.stop(...l)),onTouchstartPassive:e[4]||(e[4]=(...l)=>t.start&&t.start(...l)),onTouchendPassive:e[5]||(e[5]=(...l)=>t.stop&&t.stop(...l)),onTouchcancelPassive:e[6]||(e[6]=(...l)=>t.stop&&t.stop(...l))},[t.title?(B(),Q("div",NP,[(B(),Rt(Te(t.titleComponent)))])):yt("",!0),(B(),Rt(Te(t.component),{style:{"white-space":"pre-line"}})),P(a,{id:t.id},null,8,["id"])],38)):yt("",!0)}var SP=ne(RP,[["render",PP],["__scopeId","data-v-26ac0e82"]]);const AP=Pt({props:{visibility:{type:nt(Number),required:!0},rows:{type:nt(Number),required:!0},cols:{type:nt(Number),required:!0},cells:{type:nt(Object),required:!0}},components:{GridCell:SP},setup(){const t=tt(()=>gi[Pe.theme].mergeAdjacent);function e(r){const{visibility:n,onClick:i,onHold:o,display:a,title:s,style:l,canClick:u,id:c}=r;return{visibility:n,onClick:i,onHold:o,display:a,title:s,style:l,canClick:u,id:c}}return{unref:E,gatherCellProps:e,Visibility:ae,mergeAdjacent:t}}});function OP(t,e,r,n,i,o){const a=Re("GridCell");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce({visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0}),class:"table"},[(B(!0),Q(Ot,null,Hn(t.unref(t.rows),s=>(B(),Q("div",{class:Qt(["row",{mergeAdjacent:t.mergeAdjacent}]),key:s},[(B(!0),Q(Ot,null,Hn(t.unref(t.cols),l=>(B(),Rt(a,yr({key:l},t.gatherCellProps(t.unref(t.cells)[s*100+l])),null,16))),128))],2))),128))],4)):yt("",!0)}var UP=ne(AP,[["render",OP]]);function FP(t){return new Proxy({},LP(t))}function LP(t){const e=tt(()=>{const r=[];for(let n=1;n<=E(t.rows);n++)for(let i=1;i<=E(t.cols);i++)r.push((n*100+i).toString());return r});return{get(r,n){if(n==="isProxy")return!0;if(typeof n=="symbol")return t[n];if(!!e.value.includes(n.toString()))return r[n]==null&&(r[n]=new Proxy(t,MP(n.toString()))),r[n]},set(r,n,i){return console.warn("Cannot set grid cells",r,n,i),!1},ownKeys(){return e.value},has(r,n){return e.value.includes(n.toString())},getOwnPropertyDescriptor(r,n){if(e.value.includes(n.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function MP(t){const e=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],r={};return{get(n,i,o){if(i==="isProxy")return!0;let a=n[i];return na(a)?()=>a.call(o,t,n.getState(t)):a!=null||typeof i=="symbol"?a:(i=i.slice(0,1).toUpperCase()+i.slice(1),i==="startState"?a.call(o,t):(a=n[`get${i}`],na(a)?(i in r||(r[i]=tt(()=>a.call(o,t,n.getState(t)))),r[i].value):a!=null?E(a):(a=n[`on${i}`],na(a)?()=>a.call(o,t,n.getState(t)):a!=null?a:n[i])))},set(n,i,o,a){return i=`set${i.slice(0,1).toUpperCase()+i.slice(1)}`,i in n&&na(n[i])&&n[i].length<3?(n[i].call(a,t,o),!0):(console.warn(`No setter for "${i}".`,n),!1)},ownKeys(){return e},has(n,i){return e.includes(i.toString())},getOwnPropertyDescriptor(n,i){if(e.includes(i.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function BP(t){const e=nr({});return pr(()=>{const r=t();if(r.id=Sr("grid-"),r[ir]=UP,r.cellState=e,r.getID=function(n){return r.id+"-"+n},r.getState=function(n){return this.cellState.value[n]!=null?e.value[n]:this.cells[n].startState},r.setState=function(n,i){e.value[n]=i},r.cells=FP(r),J(r,"visibility"),ve(r,"visibility",ae.Visible),J(r,"rows"),J(r,"cols"),J(r,"getVisibility"),ve(r,"getVisibility",ae.Visible),J(r,"getCanClick"),ve(r,"getCanClick",!0),J(r,"getStartState"),J(r,"getStyle"),J(r,"getClasses"),J(r,"getTitle"),J(r,"getDisplay"),r.onClick){const n=r.onClick.bind(r);r.onClick=function(i,o){E(r.cells[i].canClick)&&n(i,o)}}if(r.onHold){const n=r.onHold.bind(r);r.onHold=function(i,o){E(r.cells[i].canClick)&&n(i,o)}}return r[fr]=function(){const{visibility:n,rows:i,cols:o,cells:a,id:s}=this;return{visibility:n,rows:i,cols:o,cells:a,id:s}},r})}var kP=Pt({props:{display:{type:nt(Object,String,Function),required:!0},visibility:{type:nt(Number),required:!0},style:nt(Object,String,Array),classes:nt(Object),onClick:Function,onHold:Function,canClick:{type:nt(Boolean),required:!0},small:Boolean,mark:nt(Boolean,String),id:{type:String,required:!0}},components:{Node:_i,MarkNode:Ua},setup(t){const{display:e,onClick:r,onHold:n}=Ae(t),i=Gr("");Xe(()=>{const s=Be(e);if(s==null){i.value="";return}if(on(s)){i.value=te(s);return}const l=te(s.title||"","h3"),u=te(s.description,"div");i.value=te(le(()=>P("span",null,[s.title?P("div",null,[P(l,null,null)]):null,P(u,null,null)])))});const{start:o,stop:a}=Zd(r,n);return{start:o,stop:a,comp:i,Visibility:ae,unref:E}}});function GP(t,e,r,n,i,o){var l;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("button",{key:0,style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(l=t.unref(t.style))!=null?l:[]]),onClick:e[0]||(e[0]=(...u)=>t.onClick&&t.onClick(...u)),onMousedown:e[1]||(e[1]=(...u)=>t.start&&t.start(...u)),onMouseleave:e[2]||(e[2]=(...u)=>t.stop&&t.stop(...u)),onMouseup:e[3]||(e[3]=(...u)=>t.stop&&t.stop(...u)),onTouchstartPassive:e[4]||(e[4]=(...u)=>t.start&&t.start(...u)),onTouchendPassive:e[5]||(e[5]=(...u)=>t.stop&&t.stop(...u)),onTouchcancelPassive:e[6]||(e[6]=(...u)=>t.stop&&t.stop(...u)),class:Qt({feature:!0,clickable:!0,can:t.unref(t.canClick),locked:!t.unref(t.canClick),small:t.small,...t.unref(t.classes)})},[t.unref(t.comp)?(B(),Rt(Te(t.unref(t.comp)),{key:0})):yt("",!0),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],38)):yt("",!0)}var s1=ne(kP,[["render",GP],["__scopeId","data-v-5e7c90cf"]]);const DP=Symbol("Clickable");function Fs(t){return pr(()=>{var r;const e=(r=t==null?void 0:t())!=null?r:{};if(e.id=Sr("clickable-"),e.type=DP,e[ir]=s1,J(e,"visibility"),ve(e,"visibility",ae.Visible),J(e,"canClick"),ve(e,"canClick",!0),J(e,"classes"),J(e,"style"),J(e,"mark"),J(e,"display"),e.onClick){const n=e.onClick.bind(e);e.onClick=function(i){E(e.canClick)&&n(i)}}if(e.onHold){const n=e.onHold.bind(e);e.onHold=function(){E(e.canClick)&&n()}}return e[fr]=function(){const{display:n,visibility:i,style:o,classes:a,onClick:s,onHold:l,canClick:u,small:c,mark:f,id:h}=this;return{display:n,visibility:i,style:E(o),classes:a,onClick:s,onHold:l,canClick:u,small:c,mark:f,id:h}},e})}function l1(t){return Fs(()=>{const e=t();J(e,"showNextAt"),ve(e,"showNextAt",!0),ve(e,"minimumGain",1),e.resetDescription==null?e.resetDescription=tt(()=>O.lt(e.conversion.gainResource.value,1e3)?"Reset for ":""):J(e,"resetDescription"),e.display==null&&(e.display=le(()=>P("span",null,[E(e.resetDescription),P("b",null,[hi(e.conversion.gainResource,O.max(E(e.conversion.actualGain),E(e.minimumGain)))])," ",e.conversion.gainResource.displayName,E(e.showNextAt)?P("div",null,[P("br",null,null),E(e.conversion.buyMax)?"Next:":"Req:"," ",hi(e.conversion.baseResource,E(e.conversion.buyMax)||O.floor(E(e.conversion.actualGain)).neq(1)?E(e.conversion.nextAt):E(e.conversion.currentAt))," ",e.conversion.baseResource.displayName]):null]))),e.canClick==null&&(e.canClick=tt(()=>O.gte(E(e.conversion.actualGain),E(e.minimumGain))));const r=e.onClick;return e.onClick=function(){!E(e.canClick)||(e.conversion.convert(),e.tree.reset(e.treeNode),e.resetTime&&(e.resetTime.value=e.resetTime[As]),r==null||r())},e})}function u1(t){return xs(()=>{const e=t();return J(e,"display"),ve(e,"display",e.layerID),J(e,"append"),{...e,display:e.display,onClick:E(e.append)?function(){if(wt.tabs.includes(e.layerID)){const r=wt.tabs.lastIndexOf(e.layerID);wt.tabs.splice(r,1)}else wt.tabs.push(e.layerID)}:function(){wt.tabs.splice(1,1,e.layerID)}}})}function c1(t){return pr(()=>{const e=t();return e.currentGain==null&&(e.currentGain=tt(()=>{let r=e.gainModifier?e.gainModifier.apply(e.scaling.currentGain(e)):e.scaling.currentGain(e);return r=O.floor(r).max(0),E(e.buyMax)||(r=r.min(1)),r})),e.actualGain==null&&(e.actualGain=e.currentGain),e.currentAt==null&&(e.currentAt=tt(()=>{let r=e.scaling.currentAt(e);return e.roundUpCost&&(r=O.ceil(r)),r})),e.nextAt==null&&(e.nextAt=tt(()=>{let r=e.scaling.nextAt(e);return e.roundUpCost&&(r=O.ceil(r)),r})),e.convert==null&&(e.convert=function(){var n;const r=E(e.currentGain);e.gainResource.value=O.add(e.gainResource.value,r),e.spend(r),(n=e.onConvert)==null||n.call(e,r)}),e.spend==null&&(e.spend=function(){e.baseResource.value=0}),J(e,"currentGain"),J(e,"actualGain"),J(e,"currentAt"),J(e,"nextAt"),J(e,"buyMax"),ve(e,"buyMax",!0),J(e,"roundUpCost"),ve(e,"roundUpCost",!0),e})}function f1(t,e){const r=nn(t),n=nn(e);return{currentGain(i){let o=E(i.baseResource.value);if(i.costModifier&&(o=i.costModifier.apply(o)),O.lt(o,E(r)))return 0;const a=O.div(o,E(r)).pow(E(n));return a.isNan()?new O(0):a},currentAt(i){let o=E(i.currentGain);return i.gainModifier&&(o=i.gainModifier.revert(o)),o=O.max(0,o).root(E(n)).times(E(r)),i.costModifier&&(o=i.costModifier.revert(o)),o},nextAt(i){let o=O.add(E(i.currentGain),1).floor();return i.gainModifier&&(o=i.gainModifier.revert(o)),o=O.max(0,o).root(E(n)).times(E(r)).max(E(r)),i.costModifier&&(o=i.costModifier.revert(o)),o}}}function HP(t){return c1(t)}function VP(t){return c1(()=>{const e=t();return ve(e,"buyMax",!1),e.currentGain==null&&(e.currentGain=tt(()=>{let r=e.gainModifier?e.gainModifier.apply(e.scaling.currentGain(e)):e.scaling.currentGain(e);return r=O.floor(r).max(e.gainResource.value),E(e.buyMax)||(r=r.min(O.add(e.gainResource.value,1))),r})),e.actualGain==null&&(e.actualGain=tt(()=>{let r=O.sub(O.floor(e.scaling.currentGain(e)),e.gainResource.value).max(0);return E(e.buyMax)||(r=r.min(1)),r})),ve(e,"convert",function(){var n;const r=E(e.actualGain);e.gainResource.value=e.gainModifier?e.gainModifier.apply(E(e.currentGain)):E(e.currentGain),e.spend(r),(n=e.onConvert)==null||n.call(e,r)}),e})}function $P(t,e,r=.5){return O.lte(t,e)?t:O.pow(t,r).times(O.pow(e,O.sub(1,r)))}function jP(t,e,r=.5){return{...t,currentGain:n=>$P(t.currentGain(n),E(e),E(r))}}const XP={name:"CollapseTransition",props:{name:{type:String,required:!1,default:"collapse"},dimension:{type:String,required:!1,default:"height",validator:t=>["height","width"].includes(t)},duration:{type:Number,required:!1,default:300},easing:{type:String,required:!1,default:"ease-in-out"}},watch:{dimension(){this.clearCachedDimensions()}},data(){return{cachedStyles:null}},computed:{transition(){let t=[];return Object.keys(this.cachedStyles).forEach(e=>{t.push(`${this.convertToCssProperty(e)} ${this.duration}ms ${this.easing}`)}),t.join(", ")}},methods:{beforeAppear(t){this.$emit("before-appear",t)},appear(t){this.$emit("appear",t)},afterAppear(t){this.$emit("after-appear",t)},appearCancelled(t){this.$emit("appear-cancelled",t)},beforeEnter(t){this.$emit("before-enter",t)},enter(t,e){this.detectAndCacheDimensions(t),this.setClosedDimensions(t),this.hideOverflow(t),this.forceRepaint(t),this.setTransition(t),this.setOpenedDimensions(t),this.$emit("enter",t,e),setTimeout(e,this.duration)},afterEnter(t){this.unsetOverflow(t),this.unsetTransition(t),this.unsetDimensions(t),this.clearCachedDimensions(),this.$emit("after-enter",t)},enterCancelled(t){this.$emit("enter-cancelled",t)},beforeLeave(t){this.$emit("before-leave",t)},leave(t,e){this.detectAndCacheDimensions(t),this.setOpenedDimensions(t),this.hideOverflow(t),this.forceRepaint(t),this.setTransition(t),this.setClosedDimensions(t),this.$emit("leave",t,e),setTimeout(e,this.duration)},afterLeave(t){this.unsetOverflow(t),this.unsetTransition(t),this.unsetDimensions(t),this.clearCachedDimensions(),this.$emit("after-leave",t)},leaveCancelled(t){this.$emit("leave-cancelled",t)},detectAndCacheDimensions(t){if(this.cachedStyles)return;const e=t.style.visibility,r=t.style.display;t.style.visibility="hidden",t.style.display="",this.cachedStyles=this.detectRelevantDimensions(t),t.style.visibility=e,t.style.display=r},clearCachedDimensions(){this.cachedStyles=null},detectRelevantDimensions(t){return this.dimension==="height"?{height:t.offsetHeight+"px",paddingTop:t.style.paddingTop||this.getCssValue(t,"padding-top"),paddingBottom:t.style.paddingBottom||this.getCssValue(t,"padding-bottom")}:this.dimension==="width"?{width:t.offsetWidth+"px",paddingLeft:t.style.paddingLeft||this.getCssValue(t,"padding-left"),paddingRight:t.style.paddingRight||this.getCssValue(t,"padding-right")}:{}},setTransition(t){t.style.transition=this.transition},unsetTransition(t){t.style.transition=""},hideOverflow(t){t.style.overflow="hidden"},unsetOverflow(t){t.style.overflow=""},setClosedDimensions(t){Object.keys(this.cachedStyles).forEach(e=>{t.style[e]="0"})},setOpenedDimensions(t){Object.keys(this.cachedStyles).forEach(e=>{t.style[e]=this.cachedStyles[e]})},unsetDimensions(t){Object.keys(this.cachedStyles).forEach(e=>{t.style[e]=""})},forceRepaint(t){getComputedStyle(t)[this.dimension]},getCssValue(t,e){return getComputedStyle(t,null).getPropertyValue(e)},convertToCssProperty(t){const e=t.match(/([A-Z])/g);if(!e)return t;for(let r=0,n=e.length;r<n;r++)t=t.replace(new RegExp(e[r]),"-"+e[r].toLowerCase());return t.slice(0,1)==="-"&&(t=t.slice(1)),t}}};function zP(t,e,r,n,i,o){return B(),Rt(Yi,{name:r.name,onBeforeAppear:o.beforeAppear,onAppear:o.appear,onAfterAppear:o.afterAppear,onAppearCancelled:o.appearCancelled,onBeforeEnter:o.beforeEnter,onEnter:o.enter,onAfterEnter:o.afterEnter,onEnterCancelled:o.enterCancelled,onBeforeLeave:o.beforeLeave,onLeave:o.leave,onAfterLeave:o.afterLeave,onLeaveCancelled:o.leaveCancelled},{default:Bt(()=>[He(t.$slots,"default")]),_:3},8,["name","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled"])}var WP=ne(XP,[["render",zP]]);const YP=Pt({props:{visibility:{type:nt(Number),required:!0},display:{type:nt(Object,String,Function),required:!0},title:{type:nt(Object,String,Function),required:!0},color:nt(String),collapsed:{type:Object,required:!0},style:nt(Object,String,Array),titleStyle:nt(Object,String,Array),bodyStyle:nt(Object,String,Array),classes:nt(Object),id:{type:String,required:!0}},components:{Node:_i,CollapseTransition:WP},setup(t){const{title:e,display:r}=Ae(t),n=Ca(e),i=Ca(r),o=tt(()=>gi[Pe.theme].mergeAdjacent);return{titleComponent:n,bodyComponent:i,stacked:o,unref:E,Visibility:ae}}}),KP=t=>(Cn("data-v-338c9154"),t=t(),Rn(),t),ZP=KP(()=>U("span",{class:"toggle"},"\u25BC",-1));function qP(t,e,r,n,i,o){var l;const a=Re("CollapseTransition"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,class:Qt(["infobox",{collapsed:t.unref(t.collapsed),stacked:t.stacked,...t.unref(t.classes)}]),style:ce([{borderColor:t.unref(t.color),visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(l=t.unref(t.style))!=null?l:{}])},[U("button",{class:"title",style:ce([{backgroundColor:t.unref(t.color)},t.unref(t.titleStyle)||[]]),onClick:e[0]||(e[0]=u=>t.collapsed.value=!t.unref(t.collapsed))},[ZP,(B(),Rt(Te(t.titleComponent)))],4),P(a,null,{default:Bt(()=>[t.unref(t.collapsed)?yt("",!0):(B(),Q("div",{key:0,class:"body",style:ce({backgroundColor:t.unref(t.color)})},[(B(),Rt(Te(t.bodyComponent),{style:ce(t.unref(t.bodyStyle))},null,8,["style"]))],4))]),_:1}),P(s,{id:t.id},null,8,["id"])],6)):yt("",!0)}var JP=ne(YP,[["render",qP],["__scopeId","data-v-338c9154"]]);const QP=Symbol("Infobox");function h1(t){const e=nr(!1);return pr(()=>{const r=t();return r.id=Sr("infobox-"),r.type=QP,r[ir]=JP,r.collapsed=e,J(r,"visibility"),ve(r,"visibility",ae.Visible),J(r,"color"),J(r,"style"),J(r,"titleStyle"),J(r,"bodyStyle"),J(r,"classes"),J(r,"title"),J(r,"display"),r[fr]=function(){const{visibility:n,display:i,title:o,color:a,collapsed:s,style:l,titleStyle:u,bodyStyle:c,classes:f,id:h}=this;return{visibility:n,display:i,title:o,color:a,collapsed:s,style:E(l),titleStyle:u,bodyStyle:c,classes:f,id:h}},r})}var Jc=/iPhone/i,Qv=/iPod/i,tm=/iPad/i,em=/\biOS-universal(?:.+)Mac\b/i,Qc=/\bAndroid(?:.+)Mobile\b/i,rm=/Android/i,jo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ol=/Silk/i,Zn=/Windows Phone/i,nm=/\bWindows(?:.+)ARM\b/i,im=/BlackBerry/i,om=/BB10/i,am=/Opera Mini/i,sm=/\b(CriOS|Chrome)(?:.+)Mobile/i,lm=/Mobile(?:.+)Firefox\b/i,um=function(t){return typeof t!="undefined"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream=="undefined"};function tS(t){return function(e){return e.test(t)}}function eS(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator!="undefined"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]!="undefined"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]!="undefined"&&(r=n[0]);var i=tS(r),o={apple:{phone:i(Jc)&&!i(Zn),ipod:i(Qv),tablet:!i(Jc)&&(i(tm)||um(e))&&!i(Zn),universal:i(em),device:(i(Jc)||i(Qv)||i(tm)||i(em)||um(e))&&!i(Zn)},amazon:{phone:i(jo),tablet:!i(jo)&&i(Ol),device:i(jo)||i(Ol)},android:{phone:!i(Zn)&&i(jo)||!i(Zn)&&i(Qc),tablet:!i(Zn)&&!i(jo)&&!i(Qc)&&(i(Ol)||i(rm)),device:!i(Zn)&&(i(jo)||i(Ol)||i(Qc)||i(rm))||i(/\bokhttp\b/i)},windows:{phone:i(Zn),tablet:i(nm),device:i(Zn)||i(nm)},other:{blackberry:i(im),blackberry10:i(om),opera:i(am),firefox:i(lm),chrome:i(sm),device:i(im)||i(om)||i(am)||i(lm)||i(sm)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}/*!
* @pixi/settings - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Un=eS(globalThis.navigator);function rS(t){var e=!0;if(Un.tablet||Un.phone){if(Un.apple.device){var r=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(r){var n=parseInt(r[1],10);n<11&&(e=!1)}}if(Un.android.device){var r=navigator.userAgent.match(/Android\s([0-9.]*)/);if(r){var n=parseInt(r[1],10);n<7&&(e=!1)}}}return e?t:4}function nS(){return!Un.apple.device}/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var cm;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(cm||(cm={}));var fm;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(fm||(fm={}));var hm;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(hm||(hm={}));var dm;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(dm||(dm={}));var pm;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(pm||(pm={}));var vm;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(vm||(vm={}));var mm;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(mm||(mm={}));var gm;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(gm||(gm={}));var ym;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(ym||(ym={}));var yh;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(yh||(yh={}));var bh;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(bh||(bh={}));var _h;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(_h||(_h={}));var bm;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(bm||(bm={}));var _m;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(_m||(_m={}));var xh;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(xh||(xh={}));var Ts;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(Ts||(Ts={}));var xm;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(xm||(xm={}));var Th;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(Th||(Th={}));var Tm;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Tm||(Tm={}));var Ft={MIPMAP_TEXTURES:_h.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Th.NONE,SPRITE_MAX_TEXTURES:rS(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:xh.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:bh.CLAMP,SCALE_MODE:yh.LINEAR,PRECISION_VERTEX:Ts.HIGH,PRECISION_FRAGMENT:Un.apple.device?Ts.HIGH:Ts.MEDIUM,CAN_UPLOAD_SAME_BUFFER:nS(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var di;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(di||(di={}));var Ls;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(Ls||(Ls={}));var Hu;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(Hu||(Hu={}));var Ut;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(Ut||(Ut={}));var _n;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(_n||(_n={}));var pt;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(pt||(pt={}));var No;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(No||(No={}));var Mt;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(Mt||(Mt={}));var Vu;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(Vu||(Vu={}));var ii;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(ii||(ii={}));var li;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(li||(li={}));var pi;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(pi||(pi={}));var En;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(En||(En={}));var Si;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(Si||(Si={}));var wh;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(wh||(wh={}));var Fn;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(Fn||(Fn={}));var Tr;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(Tr||(Tr={}));var ur;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(ur||(ur={}));var Dn;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Dn||(Dn={}));var d1={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function o(l,u,c,f,h){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,f||l,h),p=r?r+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],d]:l._events[p].push(d):(l._events[p]=d,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)e.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,d=f.length,p=new Array(d);h<d;h++)p[h]=f[h].fn;return p},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,h,d,p){var v=r?r+u:u;if(!this._events[v])return!1;var m=this._events[v],y=arguments.length,g,b;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),y){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,c),!0;case 3:return m.fn.call(m.context,c,f),!0;case 4:return m.fn.call(m.context,c,f,h),!0;case 5:return m.fn.call(m.context,c,f,h,d),!0;case 6:return m.fn.call(m.context,c,f,h,d,p),!0}for(b=1,g=new Array(y-1);b<y;b++)g[b-1]=arguments[b];m.fn.apply(m.context,g)}else{var T=m.length,w;for(b=0;b<T;b++)switch(m[b].once&&this.removeListener(u,m[b].fn,void 0,!0),y){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,c);break;case 3:m[b].fn.call(m[b].context,c,f);break;case 4:m[b].fn.call(m[b].context,c,f,h);break;default:if(!g)for(w=1,g=new Array(y-1);w<y;w++)g[w-1]=arguments[w];m[b].fn.apply(m[b].context,g)}}return!0},s.prototype.on=function(u,c,f){return o(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return o(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,h){var d=r?r+u:u;if(!this._events[d])return this;if(!c)return a(this,d),this;var p=this._events[d];if(p.fn)p.fn===c&&(!h||p.once)&&(!f||p.context===f)&&a(this,d);else{for(var v=0,m=[],y=p.length;v<y;v++)(p[v].fn!==c||h&&!p[v].once||f&&p[v].context!==f)&&m.push(p[v]);m.length?this._events[d]=m.length===1?m[0]:m:a(this,d)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s})(d1);var Fa=d1.exports,hp={exports:{}};hp.exports=bc;hp.exports.default=bc;function bc(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,o=p1(t,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var s,l,u,c,f,h,d;if(n&&(o=lS(t,e,o,r)),t.length>80*r){s=u=t[0],l=c=t[1];for(var p=r;p<i;p+=r)f=t[p],h=t[p+1],f<s&&(s=f),h<l&&(l=h),f>u&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?1/d:0}return Ms(o,a,r,s,l,d),a}function p1(t,e,r,n,i){var o,a;if(i===Ch(t,e,r,n)>0)for(o=e;o<r;o+=n)a=wm(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=wm(o,t[o],t[o+1],a);return a&&_c(a,a.next)&&(ks(a),a=a.next),a}function zi(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(_c(r,r.next)||We(r.prev,r,r.next)===0)){if(ks(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Ms(t,e,r,n,i,o,a){if(!!t){!a&&o&&dS(t,n,i,o);for(var s=t,l,u;t.prev!==t.next;){if(l=t.prev,u=t.next,o?oS(t,n,i,o):iS(t)){e.push(l.i/r),e.push(t.i/r),e.push(u.i/r),ks(t),t=u.next,s=u.next;continue}if(t=u,t===s){a?a===1?(t=aS(zi(t),e,r),Ms(t,e,r,n,i,o,2)):a===2&&sS(t,e,r,n,i,o):Ms(zi(t),e,r,n,i,o,1);break}}}}function iS(t){var e=t.prev,r=t,n=t.next;if(We(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(aa(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&We(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function oS(t,e,r,n){var i=t.prev,o=t,a=t.next;if(We(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=Eh(s,l,e,r,n),h=Eh(u,c,e,r,n),d=t.prevZ,p=t.nextZ;d&&d.z>=f&&p&&p.z<=h;){if(d!==t.prev&&d!==t.next&&aa(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&We(d.prev,d,d.next)>=0||(d=d.prevZ,p!==t.prev&&p!==t.next&&aa(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&We(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;d&&d.z>=f;){if(d!==t.prev&&d!==t.next&&aa(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&We(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;p&&p.z<=h;){if(p!==t.prev&&p!==t.next&&aa(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&We(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function aS(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!_c(i,o)&&v1(i,n,n.next,o)&&Bs(i,o)&&Bs(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),ks(n),ks(n.next),n=t=o),n=n.next}while(n!==t);return zi(n)}function sS(t,e,r,n,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&mS(a,s)){var l=m1(a,s);a=zi(a,a.next),l=zi(l,l.next),Ms(a,e,r,n,i,o),Ms(l,e,r,n,i,o);return}s=s.next}a=a.next}while(a!==t)}function lS(t,e,r,n){var i=[],o,a,s,l,u;for(o=0,a=e.length;o<a;o++)s=e[o]*n,l=o<a-1?e[o+1]*n:t.length,u=p1(t,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(vS(u));for(i.sort(uS),o=0;o<i.length;o++)r=cS(i[o],r),r=zi(r,r.next);return r}function uS(t,e){return t.x-e.x}function cS(t,e){var r=fS(t,e);if(!r)return e;var n=m1(r,t),i=zi(r,r.next);return zi(n,n.next),e===r?i:e}function fS(t,e){var r=e,n=t.x,i=t.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o){if(o=s,s===n){if(i===r.y)return r;if(i===r.next.y)return r.next}a=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!a)return null;if(n===o)return a;var l=a,u=a.x,c=a.y,f=1/0,h;r=a;do n>=r.x&&r.x>=u&&n!==r.x&&aa(i<c?n:o,i,u,c,i<c?o:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),Bs(r,t)&&(h<f||h===f&&(r.x>a.x||r.x===a.x&&hS(a,r)))&&(a=r,f=h)),r=r.next;while(r!==l);return a}function hS(t,e){return We(t.prev,t,e.prev)<0&&We(e.next,t,t.next)<0}function dS(t,e,r,n){var i=t;do i.z===null&&(i.z=Eh(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,pS(i)}function pS(t){var e,r,n,i,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ,!!n);e++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(a>1);return t}function Eh(t,e,r,n,i){return t=32767*(t-r)*i,e=32767*(e-n)*i,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function vS(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function aa(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function mS(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!gS(t,e)&&(Bs(t,e)&&Bs(e,t)&&yS(t,e)&&(We(t.prev,t,e.prev)||We(t,e.prev,e))||_c(t,e)&&We(t.prev,t,t.next)>0&&We(e.prev,e,e.next)>0)}function We(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function _c(t,e){return t.x===e.x&&t.y===e.y}function v1(t,e,r,n){var i=Fl(We(t,e,r)),o=Fl(We(t,e,n)),a=Fl(We(r,n,t)),s=Fl(We(r,n,e));return!!(i!==o&&a!==s||i===0&&Ul(t,r,e)||o===0&&Ul(t,n,e)||a===0&&Ul(r,t,n)||s===0&&Ul(r,e,n))}function Ul(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Fl(t){return t>0?1:t<0?-1:0}function gS(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&v1(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Bs(t,e){return We(t.prev,t,t.next)<0?We(t,e,t.next)>=0&&We(t,t.prev,e)>=0:We(t,e,t.prev)<0||We(t,t.next,e)<0}function yS(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function m1(t,e){var r=new Ih(t.i,t.x,t.y),n=new Ih(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function wm(t,e,r,n){var i=new Ih(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ks(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Ih(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}bc.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(Ch(t,0,o,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(Ch(t,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;f+=Math.abs((t[h]-t[p])*(t[d+1]-t[h+1])-(t[h]-t[d])*(t[p+1]-t[h+1]))}return a===0&&f===0?0:Math.abs((f-a)/a)};function Ch(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}bc.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var g1=hp.exports,Rh={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */(function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,o=typeof cu=="object"&&cu;(o.global===o||o.window===o||o.self===o)&&(r=o);var a,s=2147483647,l=36,u=1,c=26,f=38,h=700,d=72,p=128,v="-",m=/^xn--/,y=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-u,w=Math.floor,x=String.fromCharCode,R;function I(W){throw RangeError(b[W])}function C(W,ft){for(var gt=W.length,_t=[];gt--;)_t[gt]=ft(W[gt]);return _t}function S(W,ft){var gt=W.split("@"),_t="";gt.length>1&&(_t=gt[0]+"@",W=gt[1]),W=W.replace(g,".");var V=W.split("."),Z=C(V,ft).join(".");return _t+Z}function L(W){for(var ft=[],gt=0,_t=W.length,V,Z;gt<_t;)V=W.charCodeAt(gt++),V>=55296&&V<=56319&&gt<_t?(Z=W.charCodeAt(gt++),(Z&64512)==56320?ft.push(((V&1023)<<10)+(Z&1023)+65536):(ft.push(V),gt--)):ft.push(V);return ft}function H(W){return C(W,function(ft){var gt="";return ft>65535&&(ft-=65536,gt+=x(ft>>>10&1023|55296),ft=56320|ft&1023),gt+=x(ft),gt}).join("")}function G(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:l}function k(W,ft){return W+22+75*(W<26)-((ft!=0)<<5)}function Y(W,ft,gt){var _t=0;for(W=gt?w(W/h):W>>1,W+=w(W/ft);W>T*c>>1;_t+=l)W=w(W/T);return w(_t+(T+1)*W/(W+f))}function D(W){var ft=[],gt=W.length,_t,V=0,Z=p,lt=d,ut,Gt,it,kt,Vt,Xt,N,A,$;for(ut=W.lastIndexOf(v),ut<0&&(ut=0),Gt=0;Gt<ut;++Gt)W.charCodeAt(Gt)>=128&&I("not-basic"),ft.push(W.charCodeAt(Gt));for(it=ut>0?ut+1:0;it<gt;){for(kt=V,Vt=1,Xt=l;it>=gt&&I("invalid-input"),N=G(W.charCodeAt(it++)),(N>=l||N>w((s-V)/Vt))&&I("overflow"),V+=N*Vt,A=Xt<=lt?u:Xt>=lt+c?c:Xt-lt,!(N<A);Xt+=l)$=l-A,Vt>w(s/$)&&I("overflow"),Vt*=$;_t=ft.length+1,lt=Y(V-kt,_t,kt==0),w(V/_t)>s-Z&&I("overflow"),Z+=w(V/_t),V%=_t,ft.splice(V++,0,Z)}return H(ft)}function K(W){var ft,gt,_t,V,Z,lt,ut,Gt,it,kt,Vt,Xt=[],N,A,$,j;for(W=L(W),N=W.length,ft=p,gt=0,Z=d,lt=0;lt<N;++lt)Vt=W[lt],Vt<128&&Xt.push(x(Vt));for(_t=V=Xt.length,V&&Xt.push(v);_t<N;){for(ut=s,lt=0;lt<N;++lt)Vt=W[lt],Vt>=ft&&Vt<ut&&(ut=Vt);for(A=_t+1,ut-ft>w((s-gt)/A)&&I("overflow"),gt+=(ut-ft)*A,ft=ut,lt=0;lt<N;++lt)if(Vt=W[lt],Vt<ft&&++gt>s&&I("overflow"),Vt==ft){for(Gt=gt,it=l;kt=it<=Z?u:it>=Z+c?c:it-Z,!(Gt<kt);it+=l)j=Gt-kt,$=l-kt,Xt.push(x(k(kt+j%$,0))),Gt=w(j/$);Xt.push(x(k(Gt,0))),Z=Y(gt,A,_t==V),gt=0,++_t}++gt,++ft}return Xt.join("")}function ht(W){return S(W,function(ft){return m.test(ft)?D(ft.slice(4).toLowerCase()):ft})}function bt(W){return S(W,function(ft){return y.test(ft)?"xn--"+K(ft):ft})}if(a={version:"1.3.2",ucs2:{decode:L,encode:H},decode:D,encode:K,toASCII:bt,toUnicode:ht},n&&i)if(t.exports==n)i.exports=a;else for(R in a)a.hasOwnProperty(R)&&(n[R]=a[R]);else r.punycode=a})(cu)})(Rh,Rh.exports);var bS={isString:function(t){return typeof t=="string"},isObject:function(t){return typeof t=="object"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}},Gs={};function _S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var xS=function(t,e,r,n){e=e||"&",r=r||"=";var i={};if(typeof t!="string"||t.length===0)return i;var o=/\+/g;t=t.split(e);var a=1e3;n&&typeof n.maxKeys=="number"&&(a=n.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var l=0;l<s;++l){var u=t[l].replace(o,"%20"),c=u.indexOf(r),f,h,d,p;c>=0?(f=u.substr(0,c),h=u.substr(c+1)):(f=u,h=""),d=decodeURIComponent(f),p=decodeURIComponent(h),_S(i,d)?Array.isArray(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i},$a=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},TS=function(t,e,r,n){return e=e||"&",r=r||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(i){var o=encodeURIComponent($a(i))+r;return Array.isArray(t[i])?t[i].map(function(a){return o+encodeURIComponent($a(a))}).join(e):o+encodeURIComponent($a(t[i]))}).join(e):n?encodeURIComponent($a(n))+r+encodeURIComponent($a(t)):""};Gs.decode=Gs.parse=xS;Gs.encode=Gs.stringify=TS;var wS=Rh.exports,Pn=bS,ES=xc,IS=MS,CS=LS;function Tn(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var RS=/^([a-z0-9.+-]+:)/i,NS=/:[0-9]*$/,PS=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,SS=["<",">",'"',"`"," ","\r",`
`," "],AS=["{","}","|","\\","^","`"].concat(SS),Nh=["'"].concat(AS),Em=["%","/","?",";","#"].concat(Nh),Im=["/","?","#"],OS=255,Cm=/^[+a-z0-9A-Z_-]{0,63}$/,US=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,FS={javascript:!0,"javascript:":!0},Ph={javascript:!0,"javascript:":!0},ga={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Sh=Gs;function xc(t,e,r){if(t&&Pn.isObject(t)&&t instanceof Tn)return t;var n=new Tn;return n.parse(t,e,r),n}Tn.prototype.parse=function(t,e,r){if(!Pn.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",o=t.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),t=o.join(i);var s=t;if(s=s.trim(),!r&&t.split("#").length===1){var l=PS.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],e?this.query=Sh.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var u=RS.exec(s);if(u){u=u[0];var c=u.toLowerCase();this.protocol=c,s=s.substr(u.length)}if(r||u||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f=s.substr(0,2)==="//";f&&!(u&&Ph[u])&&(s=s.substr(2),this.slashes=!0)}if(!Ph[u]&&(f||u&&!ga[u])){for(var h=-1,d=0;d<Im.length;d++){var p=s.indexOf(Im[d]);p!==-1&&(h===-1||p<h)&&(h=p)}var v,m;h===-1?m=s.lastIndexOf("@"):m=s.lastIndexOf("@",h),m!==-1&&(v=s.slice(0,m),s=s.slice(m+1),this.auth=decodeURIComponent(v)),h=-1;for(var d=0;d<Em.length;d++){var p=s.indexOf(Em[d]);p!==-1&&(h===-1||p<h)&&(h=p)}h===-1&&(h=s.length),this.host=s.slice(0,h),s=s.slice(h),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var g=this.hostname.split(/\./),d=0,b=g.length;d<b;d++){var T=g[d];if(!!T&&!T.match(Cm)){for(var w="",x=0,R=T.length;x<R;x++)T.charCodeAt(x)>127?w+="x":w+=T[x];if(!w.match(Cm)){var I=g.slice(0,d),C=g.slice(d+1),S=T.match(US);S&&(I.push(S[1]),C.unshift(S[2])),C.length&&(s="/"+C.join(".")+s),this.hostname=I.join(".");break}}}this.hostname.length>OS?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=wS.toASCII(this.hostname));var L=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+L,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!FS[c])for(var d=0,b=Nh.length;d<b;d++){var G=Nh[d];if(s.indexOf(G)!==-1){var k=encodeURIComponent(G);k===G&&(k=escape(G)),s=s.split(G).join(k)}}var Y=s.indexOf("#");Y!==-1&&(this.hash=s.substr(Y),s=s.slice(0,Y));var D=s.indexOf("?");if(D!==-1?(this.search=s.substr(D),this.query=s.substr(D+1),e&&(this.query=Sh.parse(this.query)),s=s.slice(0,D)):e&&(this.search="",this.query={}),s&&(this.pathname=s),ga[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var L=this.pathname||"",K=this.search||"";this.path=L+K}return this.href=this.format(),this};function LS(t){return Pn.isString(t)&&(t=xc(t)),t instanceof Tn?t.format():Tn.prototype.format.call(t)}Tn.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&Pn.isObject(this.query)&&Object.keys(this.query).length&&(o=Sh.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||ga[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),a=a.replace("#","%23"),e+i+r+a+n};function MS(t,e){return xc(t,!1,!0).resolve(e)}Tn.prototype.resolve=function(t){return this.resolveObject(xc(t,!1,!0)).format()};Tn.prototype.resolveObject=function(t){if(Pn.isString(t)){var e=new Tn;e.parse(t,!1,!0),t=e}for(var r=new Tn,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var l=a[s];l!=="protocol"&&(r[l]=t[l])}return ga[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!ga[t.protocol]){for(var u=Object.keys(t),c=0;c<u.length;c++){var f=u[c];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!Ph[t.protocol]){for(var b=(t.pathname||"").split("/");b.length&&!(t.host=b.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),b[0]!==""&&b.unshift(""),b.length<2&&b.unshift(""),r.pathname=b.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var h=r.pathname||"",d=r.search||"";r.path=h+d}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var p=r.pathname&&r.pathname.charAt(0)==="/",v=t.host||t.pathname&&t.pathname.charAt(0)==="/",m=v||p||r.host&&t.pathname,y=m,g=r.pathname&&r.pathname.split("/")||[],b=t.pathname&&t.pathname.split("/")||[],T=r.protocol&&!ga[r.protocol];if(T&&(r.hostname="",r.port=null,r.host&&(g[0]===""?g[0]=r.host:g.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(b[0]===""?b[0]=t.host:b.unshift(t.host)),t.host=null),m=m&&(b[0]===""||g[0]==="")),v)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,g=b;else if(b.length)g||(g=[]),g.pop(),g=g.concat(b),r.search=t.search,r.query=t.query;else if(!Pn.isNullOrUndefined(t.search)){if(T){r.hostname=r.host=g.shift();var w=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return r.search=t.search,r.query=t.query,(!Pn.isNull(r.pathname)||!Pn.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!g.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=g.slice(-1)[0],R=(r.host||t.host||g.length>1)&&(x==="."||x==="..")||x==="",I=0,C=g.length;C>=0;C--)x=g[C],x==="."?g.splice(C,1):x===".."?(g.splice(C,1),I++):I&&(g.splice(C,1),I--);if(!m&&!y)for(;I--;I)g.unshift("..");m&&g[0]!==""&&(!g[0]||g[0].charAt(0)!=="/")&&g.unshift(""),R&&g.join("/").substr(-1)!=="/"&&g.push("");var S=g[0]===""||g[0]&&g[0].charAt(0)==="/";if(T){r.hostname=r.host=S?"":g.length?g.shift():"";var w=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return m=m||r.host&&g.length,m&&!S&&g.unshift(""),g.length?r.pathname=g.join("/"):(r.pathname=null,r.path=null),(!Pn.isNull(r.pathname)||!Pn.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r};Tn.prototype.parseHost=function(){var t=this.host,e=NS.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};/*!
* @pixi/utils - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/utils is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var sa={parse:ES,format:CS,resolve:IS};Ft.RETINA_PREFIX=/@([0-9\.]+)x/;Ft.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Rm=!1,Nm="6.4.2";function BS(t){var e;if(!Rm){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=[`
%c %c %c PixiJS `+Nm+" - \u2730 "+t+` \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665
`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=globalThis.console).log.apply(e,r)}else globalThis.console&&globalThis.console.log("PixiJS "+Nm+" - "+t+" - http://www.pixijs.com/");Rm=!0}}var tf;function kS(){return typeof tf=="undefined"&&(tf=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:Ft.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!globalThis.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),n=r.getContext("webgl",e)||r.getContext("experimental-webgl",e),i=!!(n&&n.getContextAttributes().stencil);if(n){var o=n.getExtension("WEBGL_lose_context");o&&o.loseContext()}return n=null,i}catch{return!1}}()),tf}var GS="#f0f8ff",DS="#faebd7",HS="#00ffff",VS="#7fffd4",$S="#f0ffff",jS="#f5f5dc",XS="#ffe4c4",zS="#000000",WS="#ffebcd",YS="#0000ff",KS="#8a2be2",ZS="#a52a2a",qS="#deb887",JS="#5f9ea0",QS="#7fff00",tA="#d2691e",eA="#ff7f50",rA="#6495ed",nA="#fff8dc",iA="#dc143c",oA="#00ffff",aA="#00008b",sA="#008b8b",lA="#b8860b",uA="#a9a9a9",cA="#006400",fA="#a9a9a9",hA="#bdb76b",dA="#8b008b",pA="#556b2f",vA="#ff8c00",mA="#9932cc",gA="#8b0000",yA="#e9967a",bA="#8fbc8f",_A="#483d8b",xA="#2f4f4f",TA="#2f4f4f",wA="#00ced1",EA="#9400d3",IA="#ff1493",CA="#00bfff",RA="#696969",NA="#696969",PA="#1e90ff",SA="#b22222",AA="#fffaf0",OA="#228b22",UA="#ff00ff",FA="#dcdcdc",LA="#f8f8ff",MA="#daa520",BA="#ffd700",kA="#808080",GA="#008000",DA="#adff2f",HA="#808080",VA="#f0fff0",$A="#ff69b4",jA="#cd5c5c",XA="#4b0082",zA="#fffff0",WA="#f0e68c",YA="#fff0f5",KA="#e6e6fa",ZA="#7cfc00",qA="#fffacd",JA="#add8e6",QA="#f08080",tO="#e0ffff",eO="#fafad2",rO="#d3d3d3",nO="#90ee90",iO="#d3d3d3",oO="#ffb6c1",aO="#ffa07a",sO="#20b2aa",lO="#87cefa",uO="#778899",cO="#778899",fO="#b0c4de",hO="#ffffe0",dO="#00ff00",pO="#32cd32",vO="#faf0e6",mO="#ff00ff",gO="#800000",yO="#66cdaa",bO="#0000cd",_O="#ba55d3",xO="#9370db",TO="#3cb371",wO="#7b68ee",EO="#00fa9a",IO="#48d1cc",CO="#c71585",RO="#191970",NO="#f5fffa",PO="#ffe4e1",SO="#ffe4b5",AO="#ffdead",OO="#000080",UO="#fdf5e6",FO="#808000",LO="#6b8e23",MO="#ffa500",BO="#ff4500",kO="#da70d6",GO="#eee8aa",DO="#98fb98",HO="#afeeee",VO="#db7093",$O="#ffefd5",jO="#ffdab9",XO="#cd853f",zO="#ffc0cb",WO="#dda0dd",YO="#b0e0e6",KO="#800080",ZO="#663399",qO="#ff0000",JO="#bc8f8f",QO="#4169e1",t3="#8b4513",e3="#fa8072",r3="#f4a460",n3="#2e8b57",i3="#fff5ee",o3="#a0522d",a3="#c0c0c0",s3="#87ceeb",l3="#6a5acd",u3="#708090",c3="#708090",f3="#fffafa",h3="#00ff7f",d3="#4682b4",p3="#d2b48c",v3="#008080",m3="#d8bfd8",g3="#ff6347",y3="#40e0d0",b3="#ee82ee",_3="#f5deb3",x3="#ffffff",T3="#f5f5f5",w3="#ffff00",E3="#9acd32",I3={aliceblue:GS,antiquewhite:DS,aqua:HS,aquamarine:VS,azure:$S,beige:jS,bisque:XS,black:zS,blanchedalmond:WS,blue:YS,blueviolet:KS,brown:ZS,burlywood:qS,cadetblue:JS,chartreuse:QS,chocolate:tA,coral:eA,cornflowerblue:rA,cornsilk:nA,crimson:iA,cyan:oA,darkblue:aA,darkcyan:sA,darkgoldenrod:lA,darkgray:uA,darkgreen:cA,darkgrey:fA,darkkhaki:hA,darkmagenta:dA,darkolivegreen:pA,darkorange:vA,darkorchid:mA,darkred:gA,darksalmon:yA,darkseagreen:bA,darkslateblue:_A,darkslategray:xA,darkslategrey:TA,darkturquoise:wA,darkviolet:EA,deeppink:IA,deepskyblue:CA,dimgray:RA,dimgrey:NA,dodgerblue:PA,firebrick:SA,floralwhite:AA,forestgreen:OA,fuchsia:UA,gainsboro:FA,ghostwhite:LA,goldenrod:MA,gold:BA,gray:kA,green:GA,greenyellow:DA,grey:HA,honeydew:VA,hotpink:$A,indianred:jA,indigo:XA,ivory:zA,khaki:WA,lavenderblush:YA,lavender:KA,lawngreen:ZA,lemonchiffon:qA,lightblue:JA,lightcoral:QA,lightcyan:tO,lightgoldenrodyellow:eO,lightgray:rO,lightgreen:nO,lightgrey:iO,lightpink:oO,lightsalmon:aO,lightseagreen:sO,lightskyblue:lO,lightslategray:uO,lightslategrey:cO,lightsteelblue:fO,lightyellow:hO,lime:dO,limegreen:pO,linen:vO,magenta:mO,maroon:gO,mediumaquamarine:yO,mediumblue:bO,mediumorchid:_O,mediumpurple:xO,mediumseagreen:TO,mediumslateblue:wO,mediumspringgreen:EO,mediumturquoise:IO,mediumvioletred:CO,midnightblue:RO,mintcream:NO,mistyrose:PO,moccasin:SO,navajowhite:AO,navy:OO,oldlace:UO,olive:FO,olivedrab:LO,orange:MO,orangered:BO,orchid:kO,palegoldenrod:GO,palegreen:DO,paleturquoise:HO,palevioletred:VO,papayawhip:$O,peachpuff:jO,peru:XO,pink:zO,plum:WO,powderblue:YO,purple:KO,rebeccapurple:ZO,red:qO,rosybrown:JO,royalblue:QO,saddlebrown:t3,salmon:e3,sandybrown:r3,seagreen:n3,seashell:i3,sienna:o3,silver:a3,skyblue:s3,slateblue:l3,slategray:u3,slategrey:c3,snow:f3,springgreen:h3,steelblue:d3,tan:p3,teal:v3,thistle:m3,tomato:g3,turquoise:y3,violet:b3,wheat:_3,white:x3,whitesmoke:T3,yellow:w3,yellowgreen:E3};function Na(t,e){return e===void 0&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(t&255)/255,e}function y1(t){var e=t.toString(16);return e="000000".substring(0,6-e.length)+e,"#"+e}function b1(t){return typeof t=="string"&&(t=I3[t.toLowerCase()]||t,t[0]==="#"&&(t=t.slice(1))),parseInt(t,16)}function C3(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[Ut.NORMAL_NPM]=Ut.NORMAL,t[Ut.ADD_NPM]=Ut.ADD,t[Ut.SCREEN_NPM]=Ut.SCREEN,e[Ut.NORMAL]=Ut.NORMAL_NPM,e[Ut.ADD]=Ut.ADD_NPM,e[Ut.SCREEN]=Ut.SCREEN_NPM;var n=[];return n.push(e),n.push(t),n}var _1=C3();function x1(t,e){return _1[e?1:0][t]}function R3(t,e,r,n){return r=r||new Float32Array(4),n||n===void 0?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function dp(t,e){if(e===1)return(e*255<<24)+t;if(e===0)return 0;var r=t>>16&255,n=t>>8&255,i=t&255;return r=r*e+.5|0,n=n*e+.5|0,i=i*e+.5|0,(e*255<<24)+(r<<16)+(n<<8)+i}function T1(t,e,r,n){return r=r||new Float32Array(4),r[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(t&255)/255,(n||n===void 0)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function N3(t,e){e===void 0&&(e=null);var r=t*6;if(e=e||new Uint16Array(r),e.length!==r)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+r);for(var n=0,i=0;n<r;n+=6,i+=4)e[n+0]=i+0,e[n+1]=i+1,e[n+2]=i+2,e[n+3]=i+0,e[n+4]=i+2,e[n+5]=i+3;return e}function w1(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function $u(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function Pm(t){return!(t&t-1)&&!!t}function Sm(t){var e=(t>65535?1:0)<<4;t>>>=e;var r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function ui(t,e,r){var n=t.length,i;if(!(e>=n||r===0)){r=e+r>n?n-e:r;var o=n-r;for(i=e;i<o;++i)t[i]=t[i+r];t.length=o}}function la(t){return t===0?0:t<0?-1:1}var P3=0;function Oo(){return++P3}var Am={};function Ds(t,e,r){if(r===void 0&&(r=3),!Am[e]){var n=new Error().stack;typeof n=="undefined"?console.warn("PixiJS Deprecation Warning: ",e+`
Deprecated since v`+t):(n=n.split(`
`).splice(r).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`+t),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+`
Deprecated since v`+t),console.warn(n))),Am[e]=!0}}var Om={},ti=Object.create(null),oo=Object.create(null),Um=function(){function t(e,r,n){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||Ft.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(e,r){this.canvas.width=Math.round(e*this.resolution),this.canvas.height=Math.round(r*this.resolution)},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=Math.round(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=Math.round(e)},enumerable:!1,configurable:!0}),t}();function S3(t){var e=t.width,r=t.height,n=t.getContext("2d"),i=n.getImageData(0,0,e,r),o=i.data,a=o.length,s={top:null,left:null,right:null,bottom:null},l=null,u,c,f;for(u=0;u<a;u+=4)o[u+3]!==0&&(c=u/4%e,f=~~(u/4/e),s.top===null&&(s.top=f),(s.left===null||c<s.left)&&(s.left=c),(s.right===null||s.right<c)&&(s.right=c+1),(s.bottom===null||s.bottom<f)&&(s.bottom=f));return s.top!==null&&(e=s.right-s.left,r=s.bottom-s.top+1,l=n.getImageData(s.left,s.top,e,r)),{height:r,width:e,data:l}}var Ll;function A3(t,e){if(e===void 0&&(e=globalThis.location),t.indexOf("data:")===0)return"";e=e||globalThis.location,Ll||(Ll=document.createElement("a")),Ll.href=t;var r=sa.parse(Ll.href),n=!r.port&&e.port===""||r.port===e.port;return r.hostname!==e.hostname||!n||r.protocol!==e.protocol?"anonymous":""}function ju(t,e){var r=Ft.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):e!==void 0?e:1}/*!
* @pixi/runner - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/runner is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var wr=function(){function t(e){this.items=[],this._name=e,this._aliasCount=0}return t.prototype.emit=function(e,r,n,i,o,a,s,l){if(arguments.length>8)throw new Error("max arguments reached");var u=this,c=u.name,f=u.items;this._aliasCount++;for(var h=0,d=f.length;h<d;h++)f[h][c](e,r,n,i,o,a,s,l);return f===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},t.prototype.remove=function(e){var r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this},t.prototype.contains=function(e){return this.items.indexOf(e)!==-1},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(wr.prototype,{dispatch:{value:wr.prototype.emit},run:{value:wr.prototype.emit}});/*!
* @pixi/ticker - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/ticker is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/Ft.TARGET_FPMS=.06;var vi;(function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"})(vi||(vi={}));var ef=function(){function t(e,r,n,i){r===void 0&&(r=null),n===void 0&&(n=0),i===void 0&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}return t.prototype.match=function(e,r){return r===void 0&&(r=null),this.fn===e&&this.context===r},t.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r},t.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},t.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var r=this.next;return this.next=e?null:r,this.previous=null,r},t}(),gr=function(){function t(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ef(null,null,1/0),this.deltaMS=1/Ft.TARGET_FPMS,this.elapsedMS=1/Ft.TARGET_FPMS,this._tick=function(r){e._requestId=null,e.started&&(e.update(r),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(e,r,n){return n===void 0&&(n=vi.NORMAL),this._addListener(new ef(e,r,n))},t.prototype.addOnce=function(e,r,n){return n===void 0&&(n=vi.NORMAL),this._addListener(new ef(e,r,n,!0))},t.prototype._addListener=function(e){var r=this._head.next,n=this._head;if(!r)e.connect(n);else{for(;r;){if(e.priority>r.priority){e.connect(n);break}n=r,r=r.next}e.previous||e.connect(n)}return this._startIfPossible(),this},t.prototype.remove=function(e,r){for(var n=this._head.next;n;)n.match(e,r)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var e=0,r=this._head;r=r.next;)e++;return e},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(e){e===void 0&&(e=performance.now());var r;if(e>this.lastTime){if(r=this.elapsedMS=e-this.lastTime,r>this._maxElapsedMS&&(r=this._maxElapsedMS),r*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=e-n%this._minElapsedMS}this.deltaMS=r,this.deltaTime=this.deltaMS*Ft.TARGET_FPMS;for(var i=this._head,o=i.next;o;)o=o.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(e){var r=Math.min(this.maxFPS,e),n=Math.min(Math.max(0,r)/1e3,Ft.TARGET_FPMS);this._maxElapsedMS=1/n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(e){if(e===0)this._minElapsedMS=0;else{var r=Math.max(this.minFPS,e);this._minElapsedMS=1/(r/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!1,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!1,configurable:!0}),t}(),O3=function(){function t(){}return t.init=function(e){var r=this;e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set:function(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,vi.LOW)},get:function(){return this._ticker}}),this.stop=function(){r._ticker.stop()},this.start=function(){r._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?gr.shared:new gr,e.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var e=this._ticker;this.ticker=null,e.destroy()}},t}();/*!
* @pixi/math - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/math is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Xu=Math.PI*2,E1=180/Math.PI,I1=Math.PI/180,Ye;(function(t){t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC"})(Ye||(Ye={}));var _e=function(){function t(e,r){e===void 0&&(e=0),r===void 0&&(r=0),this.x=0,this.y=0,this.x=e,this.y=r}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(e){return this.set(e.x,e.y),this},t.prototype.copyTo=function(e){return e.set(this.x,this.y),e},t.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},t.prototype.set=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=e),this.x=e,this.y=r,this},t.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},t}(),Ml=[new _e,new _e,new _e,new _e],fe=function(){function t(e,r,n,i){e===void 0&&(e=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Ye.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},t.prototype.copyTo=function(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},t.prototype.contains=function(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height},t.prototype.intersects=function(e,r){if(!r){var n=this.x<e.x?e.x:this.x,i=this.right>e.right?e.right:this.right;if(i<=n)return!1;var o=this.y<e.y?e.y:this.y,a=this.bottom>e.bottom?e.bottom:this.bottom;return a>o}var s=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=s||c<=u)return!1;var f=Ml[0].set(e.left,e.top),h=Ml[1].set(e.left,e.bottom),d=Ml[2].set(e.right,e.top),p=Ml[3].set(e.right,e.bottom);if(d.x<=f.x||h.y<=f.y)return!1;var v=Math.sign(r.a*r.d-r.b*r.c);if(v===0||(r.apply(f,f),r.apply(h,h),r.apply(d,d),r.apply(p,p),Math.max(f.x,h.x,d.x,p.x)<=s||Math.min(f.x,h.x,d.x,p.x)>=l||Math.max(f.y,h.y,d.y,p.y)<=u||Math.min(f.y,h.y,d.y,p.y)>=c))return!1;var m=v*(h.y-f.y),y=v*(f.x-h.x),g=m*s+y*u,b=m*l+y*u,T=m*s+y*c,w=m*l+y*c;if(Math.max(g,b,T,w)<=m*f.x+y*f.y||Math.min(g,b,T,w)>=m*p.x+y*p.y)return!1;var x=v*(f.y-d.y),R=v*(d.x-f.x),I=x*s+R*u,C=x*l+R*u,S=x*s+R*c,L=x*l+R*c;return!(Math.max(I,C,S,L)<=x*f.x+R*f.y||Math.min(I,C,S,L)>=x*p.x+R*p.y)},t.prototype.pad=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=e),this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this},t.prototype.fit=function(e){var r=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),o=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this},t.prototype.ceil=function(e,r){e===void 0&&(e=1),r===void 0&&(r=.001);var n=Math.ceil((this.x+this.width-r)*e)/e,i=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=n-this.x,this.height=i-this.y,this},t.prototype.enlarge=function(e){var r=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),o=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this},t.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},t}(),U3=function(){function t(e,r,n){e===void 0&&(e=0),r===void 0&&(r=0),n===void 0&&(n=0),this.x=e,this.y=r,this.radius=n,this.type=Ye.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(e,r){if(this.radius<=0)return!1;var n=this.radius*this.radius,i=this.x-e,o=this.y-r;return i*=i,o*=o,i+o<=n},t.prototype.getBounds=function(){return new fe(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},t.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},t}(),F3=function(){function t(e,r,n,i){e===void 0&&(e=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=e,this.y=r,this.width=n,this.height=i,this.type=Ye.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(e,r){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1},t.prototype.getBounds=function(){return new fe(this.x-this.width,this.y-this.height,this.width,this.height)},t.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},t}(),bu=function(){function t(){for(var e=arguments,r=[],n=0;n<arguments.length;n++)r[n]=e[n];var i=Array.isArray(r[0])?r[0]:r;if(typeof i[0]!="number"){for(var o=[],a=0,s=i.length;a<s;a++)o.push(i[a].x,i[a].y);i=o}this.points=i,this.type=Ye.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=this.points.slice(),r=new t(e);return r.closeStroke=this.closeStroke,r},t.prototype.contains=function(e,r){for(var n=!1,i=this.points.length/2,o=0,a=i-1;o<i;a=o++){var s=this.points[o*2],l=this.points[o*2+1],u=this.points[a*2],c=this.points[a*2+1],f=l>r!=c>r&&e<(u-s)*((r-l)/(c-l))+s;f&&(n=!n)}return n},t.prototype.toString=function(){return"[@pixi/math:Polygon"+("closeStroke="+this.closeStroke)+("points="+this.points.reduce(function(e,r){return e+", "+r},"")+"]")},t}(),L3=function(){function t(e,r,n,i,o){e===void 0&&(e=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),o===void 0&&(o=20),this.x=e,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Ye.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var i=e-(this.x+n),o=r-(this.y+n),a=n*n;if(i*i+o*o<=a||(i=e-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=e-(this.x+n),i*i+o*o<=a))return!0}return!1},t.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+("width="+this.width+" height="+this.height+" radius="+this.radius+"]")},t}(),ua=function(){function t(e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=0),this._x=n,this._y=i,this.cb=e,this.scope=r}return t.prototype.clone=function(e,r){return e===void 0&&(e=this.cb),r===void 0&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=e),(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(e){return e.set(this._x,this._y),e},t.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},t.prototype.toString=function(){return"[@pixi/math:ObservablePoint x="+0+" y="+0+" scope="+this.scope+"]"},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),or=function(){function t(e,r,n,i,o,a){e===void 0&&(e=1),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}return t.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},t.prototype.set=function(e,r,n,i,o,a){return this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this},t.prototype.toArray=function(e,r){this.array||(this.array=new Float32Array(9));var n=r||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(e,r){r=r||new _e;var n=e.x,i=e.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r},t.prototype.applyInverse=function(e,r){r=r||new _e;var n=1/(this.a*this.d+this.c*-this.b),i=e.x,o=e.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r},t.prototype.translate=function(e,r){return this.tx+=e,this.ty+=r,this},t.prototype.scale=function(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this},t.prototype.rotate=function(e){var r=Math.cos(e),n=Math.sin(e),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this},t.prototype.append=function(e){var r=this.a,n=this.b,i=this.c,o=this.d;return this.a=e.a*r+e.b*i,this.b=e.a*n+e.b*o,this.c=e.c*r+e.d*i,this.d=e.c*n+e.d*o,this.tx=e.tx*r+e.ty*i+this.tx,this.ty=e.tx*n+e.ty*o+this.ty,this},t.prototype.setTransform=function(e,r,n,i,o,a,s,l,u){return this.a=Math.cos(s+u)*o,this.b=Math.sin(s+u)*o,this.c=-Math.sin(s-l)*a,this.d=Math.cos(s-l)*a,this.tx=e-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this},t.prototype.prepend=function(e){var r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,i=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this},t.prototype.decompose=function(e){var r=this.a,n=this.b,i=this.c,o=this.d,a=e.pivot,s=-Math.atan2(-i,o),l=Math.atan2(n,r),u=Math.abs(s+l);return u<1e-5||Math.abs(Xu-u)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=s,e.skew.y=l),e.scale.x=Math.sqrt(r*r+n*n),e.scale.y=Math.sqrt(i*i+o*o),e.position.x=this.tx+(a.x*r+a.y*i),e.position.y=this.ty+(a.x*n+a.y*o),e},t.prototype.invert=function(){var e=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=e*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(e*this.ty-r*o)/a,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},t.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),ho=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],po=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vo=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],mo=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ah=[],C1=[],Bl=Math.sign;function M3(){for(var t=0;t<16;t++){var e=[];Ah.push(e);for(var r=0;r<16;r++)for(var n=Bl(ho[t]*ho[r]+vo[t]*po[r]),i=Bl(po[t]*ho[r]+mo[t]*po[r]),o=Bl(ho[t]*vo[r]+vo[t]*mo[r]),a=Bl(po[t]*vo[r]+mo[t]*mo[r]),s=0;s<16;s++)if(ho[s]===n&&po[s]===i&&vo[s]===o&&mo[s]===a){e.push(s);break}}for(var t=0;t<16;t++){var l=new or;l.set(ho[t],po[t],vo[t],mo[t],0,0),C1.push(l)}}M3();var Ve={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return ho[t]},uY:function(t){return po[t]},vX:function(t){return vo[t]},vY:function(t){return mo[t]},inv:function(t){return t&8?t&15:-t&7},add:function(t,e){return Ah[t][e]},sub:function(t,e){return Ah[t][Ve.inv(e)]},rotate180:function(t){return t^4},isVertical:function(t){return(t&3)===2},byDirection:function(t,e){return Math.abs(t)*2<=Math.abs(e)?e>=0?Ve.S:Ve.N:Math.abs(e)*2<=Math.abs(t)?t>0?Ve.E:Ve.W:e>0?t>0?Ve.SE:Ve.SW:t>0?Ve.NE:Ve.NW},matrixAppendRotationInv:function(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n=0);var i=C1[Ve.inv(e)];i.tx=r,i.ty=n,t.append(i)}},pp=function(){function t(){this.worldTransform=new or,this.localTransform=new or,this.position=new ua(this.onChange,this,0,0),this.scale=new ua(this.onChange,this,1,1),this.pivot=new ua(this.onChange,this,0,0),this.skew=new ua(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},t.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(e){var r=this.localTransform;if(this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,i=this.worldTransform;i.a=r.a*n.a+r.b*n.c,i.b=r.a*n.b+r.b*n.d,i.c=r.c*n.a+r.d*n.c,i.d=r.c*n.b+r.d*n.d,i.tx=r.tx*n.a+r.ty*n.c+n.tx,i.ty=r.tx*n.b+r.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},t.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();/*!
* @pixi/core - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/core is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/Ft.PREFER_ENV=Un.any?di.WEBGL:di.WEBGL2;Ft.STRICT_TEXTURE_CACHE=!1;var Oh=[];function R1(t,e){if(!t)return null;var r="";if(typeof t=="string"){var n=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);n&&(r=n[1].toLowerCase())}for(var i=Oh.length-1;i>=0;--i){var o=Oh[i];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Uh=function(t,e){return Uh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Uh(t,e)};function Fe(t,e){Uh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Fh=function(){return Fh=Object.assign||function(e){for(var r=arguments,n,i=1,o=arguments.length;i<o;i++){n=r[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Fh.apply(this,arguments)};function B3(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&(r[n[i]]=t[n[i]]);return r}var Hs=function(){function t(e,r){e===void 0&&(e=0),r===void 0&&(r=0),this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new wr("setRealSize"),this.onUpdate=new wr("update"),this.onError=new wr("onError")}return t.prototype.bind=function(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)},t.prototype.resize=function(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(e,r,n){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){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)},t.test=function(e,r){return!1},t}(),ul=function(t){Fe(e,t);function e(r,n){var i=this,o=n||{},a=o.width,s=o.height;if(!a||!s)throw new Error("BufferResource width or height invalid");return i=t.call(this,a,s)||this,i.data=r,i}return e.prototype.upload=function(r,n,i){var o=r.gl;o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===En.UNPACK);var a=n.realWidth,s=n.realHeight;return i.width===a&&i.height===s?o.texSubImage2D(n.target,0,0,0,a,s,n.format,i.type,this.data):(i.width=a,i.height=s,o.texImage2D(n.target,0,i.internalFormat,a,s,0,n.format,i.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(r){return r instanceof Float32Array||r instanceof Uint8Array||r instanceof Uint32Array},e}(Hs),k3={scaleMode:ii.NEAREST,format:pt.RGBA,alphaMode:En.NPM},ge=function(t){Fe(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=null);var i=t.call(this)||this;n=n||{};var o=n.alphaMode,a=n.mipmap,s=n.anisotropicLevel,l=n.scaleMode,u=n.width,c=n.height,f=n.wrapMode,h=n.format,d=n.type,p=n.target,v=n.resolution,m=n.resourceOptions;return r&&!(r instanceof Hs)&&(r=R1(r,m),r.internal=!0),i.resolution=v||Ft.RESOLUTION,i.width=Math.round((u||0)*i.resolution)/i.resolution,i.height=Math.round((c||0)*i.resolution)/i.resolution,i._mipmap=a!==void 0?a:Ft.MIPMAP_TEXTURES,i.anisotropicLevel=s!==void 0?s:Ft.ANISOTROPIC_LEVEL,i._wrapMode=f||Ft.WRAP_MODE,i._scaleMode=l!==void 0?l:Ft.SCALE_MODE,i.format=h||pt.RGBA,i.type=d||Mt.UNSIGNED_BYTE,i.target=p||No.TEXTURE_2D,i.alphaMode=o!==void 0?o:En.UNPACK,i.uid=Oo(),i.touched=0,i.isPowerOfTwo=!1,i._refreshPOT(),i._glTextures={},i.dirtyId=0,i.dirtyStyleId=0,i.cacheId=null,i.valid=u>0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(r),i}return Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(r,n){var i;return r!==void 0&&r!==this.scaleMode&&(this.scaleMode=r,i=!0),n!==void 0&&n!==this.mipmap&&(this.mipmap=n,i=!0),i&&this.dirtyStyleId++,this},e.prototype.setSize=function(r,n,i){return i=i||this.resolution,this.setRealSize(r*i,n*i,i)},e.prototype.setRealSize=function(r,n,i){return this.resolution=i||this.resolution,this.width=Math.round(r)/this.resolution,this.height=Math.round(n)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=Pm(this.realWidth)&&Pm(this.realHeight)},e.prototype.setResolution=function(r){var n=this.resolution;return n===r?this:(this.resolution=r,this.valid&&(this.width=Math.round(this.width*n)/r,this.height=Math.round(this.height*n)/r,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(r){if(this.resource===r)return this;if(this.resource)throw new Error("Resource can be set only once");return r.bind(this),this.resource=r,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(r){this.emit("error",this,r)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete oo[this.cacheId],delete ti[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(r,n,i){i===void 0&&(i=Ft.STRICT_TEXTURE_CACHE);var o=typeof r=="string",a=null;if(o)a=r;else{if(!r._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";r._pixiId=s+"_"+Oo()}a=r._pixiId}var l=oo[a];if(o&&i&&!l)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return l||(l=new e(r,n),l.cacheId=a,e.addToCache(l,a)),l},e.fromBuffer=function(r,n,i,o){r=r||new Float32Array(n*i*4);var a=new ul(r,{width:n,height:i}),s=r instanceof Float32Array?Mt.FLOAT:Mt.UNSIGNED_BYTE;return new e(a,Object.assign(k3,o||{width:n,height:i,type:s}))},e.addToCache=function(r,n){n&&(r.textureCacheIds.indexOf(n)===-1&&r.textureCacheIds.push(n),oo[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),oo[n]=r)},e.removeFromCache=function(r){if(typeof r=="string"){var n=oo[r];if(n){var i=n.textureCacheIds.indexOf(r);return i>-1&&n.textureCacheIds.splice(i,1),delete oo[r],n}}else if(r&&r.textureCacheIds){for(var o=0;o<r.textureCacheIds.length;++o)delete oo[r.textureCacheIds[o]];return r.textureCacheIds.length=0,r}return null},e._globalBatch=0,e}(Fa),N1=function(t){Fe(e,t);function e(r,n){var i=this,o=n||{},a=o.width,s=o.height;i=t.call(this,a,s)||this,i.items=[],i.itemDirtyIds=[];for(var l=0;l<r;l++){var u=new ge;i.items.push(u),i.itemDirtyIds.push(-2)}return i.length=r,i._load=null,i.baseTexture=null,i}return e.prototype.initFromArray=function(r,n){for(var i=0;i<this.length;i++)!r[i]||(r[i].castToBaseTexture?this.addBaseTextureAt(r[i].castToBaseTexture(),i):r[i]instanceof Hs?this.addResourceAt(r[i],i):this.addResourceAt(R1(r[i],n),i))},e.prototype.dispose=function(){for(var r=0,n=this.length;r<n;r++)this.items[r].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(r,n){if(!this.items[n])throw new Error("Index "+n+" is out of bounds");return r.valid&&!this.valid&&this.resize(r.width,r.height),this.items[n].setResource(r),this},e.prototype.bind=function(r){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");t.prototype.bind.call(this,r);for(var n=0;n<this.length;n++)this.items[n].parentTextureArray=r,this.items[n].on("update",r.update,r)},e.prototype.unbind=function(r){t.prototype.unbind.call(this,r);for(var n=0;n<this.length;n++)this.items[n].parentTextureArray=null,this.items[n].off("update",r.update,r)},e.prototype.load=function(){var r=this;if(this._load)return this._load;var n=this.items.map(function(o){return o.resource}).filter(function(o){return o}),i=n.map(function(o){return o.load()});return this._load=Promise.all(i).then(function(){var o=r.items[0],a=o.realWidth,s=o.realHeight;return r.resize(a,s),Promise.resolve(r)}),this._load},e}(Hs),G3=function(t){Fe(e,t);function e(r,n){var i=this,o=n||{},a=o.width,s=o.height,l,u;return Array.isArray(r)?(l=r,u=r.length):u=r,i=t.call(this,u,{width:a,height:s})||this,l&&i.initFromArray(l,n),i}return e.prototype.addBaseTextureAt=function(r,n){if(r.resource)this.addResourceAt(r.resource,n);else throw new Error("ArrayResource does not support RenderTexture");return this},e.prototype.bind=function(r){t.prototype.bind.call(this,r),r.target=No.TEXTURE_2D_ARRAY},e.prototype.upload=function(r,n,i){var o=this,a=o.length,s=o.itemDirtyIds,l=o.items,u=r.gl;i.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,a,0,n.format,i.type,null);for(var c=0;c<a;c++){var f=l[c];s[c]<f.dirtyId&&(s[c]=f.dirtyId,f.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,c,f.resource.width,f.resource.height,1,n.format,i.type,f.resource.source))}return!0},e}(N1),Wi=function(t){Fe(e,t);function e(r){var n=this,i=r,o=i.naturalWidth||i.videoWidth||i.width,a=i.naturalHeight||i.videoHeight||i.height;return n=t.call(this,o,a)||this,n.source=r,n.noSubImage=!1,n}return e.crossOrigin=function(r,n,i){i===void 0&&n.indexOf("data:")!==0?r.crossOrigin=A3(n):i!==!1&&(r.crossOrigin=typeof i=="string"?i:"anonymous")},e.prototype.upload=function(r,n,i,o){var a=r.gl,s=n.realWidth,l=n.realHeight;if(o=o||this.source,o instanceof HTMLImageElement){if(!o.complete||o.naturalWidth===0)return!1}else if(o instanceof HTMLVideoElement&&o.readyState<=1)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===En.UNPACK),!this.noSubImage&&n.target===a.TEXTURE_2D&&i.width===s&&i.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,n.format,i.type,o):(i.width=s,i.height=l,a.texImage2D(n.target,0,i.internalFormat,n.format,i.type,o)),!0},e.prototype.update=function(){if(!this.destroyed){var r=this.source,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;this.resize(n,i),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(Hs),P1=function(t){Fe(e,t);function e(r){return t.call(this,r)||this}return e.test=function(r){var n=globalThis.OffscreenCanvas;return n&&r instanceof n?!0:globalThis.HTMLCanvasElement&&r instanceof HTMLCanvasElement},e}(Wi),D3=function(t){Fe(e,t);function e(r,n){var i=this,o=n||{},a=o.width,s=o.height,l=o.autoLoad,u=o.linkBaseTexture;if(r&&r.length!==e.SIDES)throw new Error("Invalid length. Got "+r.length+", expected 6");i=t.call(this,6,{width:a,height:s})||this;for(var c=0;c<e.SIDES;c++)i.items[c].target=No.TEXTURE_CUBE_MAP_POSITIVE_X+c;return i.linkBaseTexture=u!==!1,r&&i.initFromArray(r,n),l!==!1&&i.load(),i}return e.prototype.bind=function(r){t.prototype.bind.call(this,r),r.target=No.TEXTURE_CUBE_MAP},e.prototype.addBaseTextureAt=function(r,n,i){if(!this.items[n])throw new Error("Index "+n+" is out of bounds");if(!this.linkBaseTexture||r.parentTextureArray||Object.keys(r._glTextures).length>0)if(r.resource)this.addResourceAt(r.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=No.TEXTURE_CUBE_MAP_POSITIVE_X+n,r.parentTextureArray=this.baseTexture,this.items[n]=r;return r.valid&&!this.valid&&this.resize(r.realWidth,r.realHeight),this.items[n]=r,this},e.prototype.upload=function(r,n,i){for(var o=this.itemDirtyIds,a=0;a<e.SIDES;a++){var s=this.items[a];o[a]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(r,s,i),o[a]=s.dirtyId):o[a]<-1&&(r.gl.texImage2D(s.target,0,i.internalFormat,n.realWidth,n.realHeight,0,n.format,i.type,null),o[a]=-1))}return!0},e.test=function(r){return Array.isArray(r)&&r.length===e.SIDES},e.SIDES=6,e}(N1),S1=function(t){Fe(e,t);function e(r,n){var i=this;if(n=n||{},!(r instanceof HTMLImageElement)){var o=new Image;Wi.crossOrigin(o,r,n.crossorigin),o.src=r,r=o}return i=t.call(this,r)||this,!r.complete&&!!i._width&&!!i._height&&(i._width=0,i._height=0),i.url=r.src,i._process=null,i.preserveBitmap=!1,i.createBitmap=(n.createBitmap!==void 0?n.createBitmap:Ft.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,i.alphaMode=typeof n.alphaMode=="number"?n.alphaMode:null,i.bitmap=null,i._load=null,n.autoLoad!==!1&&i.load(),i}return e.prototype.load=function(r){var n=this;return this._load?this._load:(r!==void 0&&(this.createBitmap=r),this._load=new Promise(function(i,o){var a=n.source;n.url=a.src;var s=function(){n.destroyed||(a.onload=null,a.onerror=null,n.resize(a.width,a.height),n._load=null,n.createBitmap?i(n.process()):i(n))};a.complete&&a.src?s():(a.onload=s,a.onerror=function(l){o(l),n.onError.emit(l)})}),this._load)},e.prototype.process=function(){var r=this,n=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);var i=globalThis.createImageBitmap,o=!n.crossOrigin||n.crossOrigin==="anonymous";return this._process=fetch(n.src,{mode:o?"cors":"no-cors"}).then(function(a){return a.blob()}).then(function(a){return i(a,0,0,n.width,n.height,{premultiplyAlpha:r.alphaMode===En.UNPACK?"premultiply":"none"})}).then(function(a){return r.destroyed?Promise.reject():(r.bitmap=a,r.update(),r._process=null,Promise.resolve(r))}),this._process},e.prototype.upload=function(r,n,i){if(typeof this.alphaMode=="number"&&(n.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,r,n,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,r,n,i,this.bitmap),!this.preserveBitmap){var o=!0,a=n._glTextures;for(var s in a){var l=a[s];if(l!==i&&l.dirtyId!==n.dirtyId){o=!1;break}}o&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e.test=function(r){return typeof r=="string"||r instanceof HTMLImageElement},e}(Wi),H3=function(t){Fe(e,t);function e(r,n){var i=this;return n=n||{},i=t.call(this,document.createElement("canvas"))||this,i._width=0,i._height=0,i.svg=r,i.scale=n.scale||1,i._overrideWidth=n.width,i._overrideHeight=n.height,i._resolve=null,i._crossorigin=n.crossorigin,i._load=null,n.autoLoad!==!1&&i.load(),i}return e.prototype.load=function(){var r=this;return this._load?this._load:(this._load=new Promise(function(n){if(r._resolve=function(){r.resize(r.source.width,r.source.height),n(r)},e.SVG_XML.test(r.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");r.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(r.svg)))}r._loadSvg()}),this._load)},e.prototype._loadSvg=function(){var r=this,n=new Image;Wi.crossOrigin(n,this.svg,this._crossorigin),n.src=this.svg,n.onerror=function(i){!r._resolve||(n.onerror=null,r.onError.emit(i))},n.onload=function(){if(!!r._resolve){var i=n.width,o=n.height;if(!i||!o)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var a=i*r.scale,s=o*r.scale;(r._overrideWidth||r._overrideHeight)&&(a=r._overrideWidth||r._overrideHeight/o*i,s=r._overrideHeight||r._overrideWidth/i*o),a=Math.round(a),s=Math.round(s);var l=r.source;l.width=a,l.height=s,l._pixiId="canvas_"+Oo(),l.getContext("2d").drawImage(n,0,0,i,o,0,0,a,s),r._resolve(),r._resolve=null}}},e.getSize=function(r){var n=e.SVG_SIZE.exec(r),i={};return n&&(i[n[1]]=Math.round(parseFloat(n[3])),i[n[5]]=Math.round(parseFloat(n[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(r,n){return n==="svg"||typeof r=="string"&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(r)||typeof r=="string"&&e.SVG_XML.test(r)},e.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(Wi),V3=function(t){Fe(e,t);function e(r,n){var i=this;if(n=n||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);var a=r[0].src||r[0];Wi.crossOrigin(o,a,n.crossorigin);for(var s=0;s<r.length;++s){var l=document.createElement("source"),u=r[s],c=u.src,f=u.mime;c=c||r[s];var h=c.split("?").shift().toLowerCase(),d=h.slice(h.lastIndexOf(".")+1);f=f||e.MIME_TYPES[d]||"video/"+d,l.src=c,l.type=f,o.appendChild(l)}r=o}return i=t.call(this,r)||this,i.noSubImage=!0,i._autoUpdate=!0,i._isConnectedToTicker=!1,i._updateFPS=n.updateFPS||0,i._msToNextUpdate=0,i.autoPlay=n.autoPlay!==!1,i._load=null,i._resolve=null,i._onCanPlay=i._onCanPlay.bind(i),i._onError=i._onError.bind(i),n.autoLoad!==!1&&i.load(),i}return e.prototype.update=function(r){if(!this.destroyed){var n=gr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-n),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var r=this;if(this._load)return this._load;var n=this.source;return(n.readyState===n.HAVE_ENOUGH_DATA||n.readyState===n.HAVE_FUTURE_DATA)&&n.width&&n.height&&(n.complete=!0),n.addEventListener("play",this._onPlayStart.bind(this)),n.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(n.addEventListener("canplay",this._onCanPlay),n.addEventListener("canplaythrough",this._onCanPlay),n.addEventListener("error",this._onError,!0)),this._load=new Promise(function(i){r.valid?i(r):(r._resolve=i,n.load())}),this._load},e.prototype._onError=function(r){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(r)},e.prototype._isSourcePlaying=function(){var r=this.source;return r.currentTime>0&&r.paused===!1&&r.ended===!1&&r.readyState>2},e.prototype._isSourceReady=function(){var r=this.source;return r.readyState===3||r.readyState===4},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(gr.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(gr.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(r.videoWidth,r.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(gr.shared.remove(this.update,this),this._isConnectedToTicker=!1);var r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(gr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(gr.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(r){r!==this._updateFPS&&(this._updateFPS=r)},enumerable:!1,configurable:!0}),e.test=function(r,n){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(Wi),$3=function(t){Fe(e,t);function e(r){return t.call(this,r)||this}return e.test=function(r){return!!globalThis.createImageBitmap&&r instanceof ImageBitmap},e}(Wi);Oh.push(S1,$3,P1,V3,H3,ul,D3,G3);var j3=function(t){Fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.upload=function(r,n,i){var o=r.gl;o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===En.UNPACK);var a=n.realWidth,s=n.realHeight;return i.width===a&&i.height===s?o.texSubImage2D(n.target,0,0,0,a,s,n.format,i.type,this.data):(i.width=a,i.height=s,o.texImage2D(n.target,0,i.internalFormat,a,s,0,n.format,i.type,this.data)),!0},e}(ul),Lh=function(){function t(e,r){this.width=Math.round(e||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new wr("disposeFramebuffer"),this.multisample=ur.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(e,r){return e===void 0&&(e=0),this.colorTextures[e]=r||new ge(null,{scaleMode:ii.NEAREST,resolution:1,mipmap:pi.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new ge(new j3(null,{width:this.width,height:this.height}),{scaleMode:ii.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:pi.OFF,format:pt.DEPTH_COMPONENT,type:Mt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(var n=0;n<this.colorTextures.length;n++){var i=this.colorTextures[n],o=i.resolution;i.setSize(e/o,r/o)}if(this.depthTexture){var o=this.depthTexture.resolution;this.depthTexture.setSize(e/o,r/o)}}},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},t}(),A1=function(t){Fe(e,t);function e(r){r===void 0&&(r={});var n=this;if(typeof r=="number"){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];r={width:i,height:o,scaleMode:a,resolution:s}}return r.width=r.width||100,r.height=r.height||100,r.multisample=r.multisample!==void 0?r.multisample:ur.NONE,n=t.call(this,null,r)||this,n.mipmap=pi.OFF,n.valid=!0,n.clearColor=[0,0,0,0],n.framebuffer=new Lh(n.realWidth,n.realHeight).addColorTexture(0,n),n.framebuffer.multisample=r.multisample,n.maskStack=[],n.filterStack=[{}],n}return e.prototype.resize=function(r,n){this.framebuffer.resize(r*this.resolution,n*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(ge),O1=function(){function t(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return t.prototype.set=function(e,r,n){var i=r.width,o=r.height;if(n){var a=e.width/2/i,s=e.height/2/o,l=e.x/i+a,u=e.y/o+s;n=Ve.add(n,Ve.NW),this.x0=l+a*Ve.uX(n),this.y0=u+s*Ve.uY(n),n=Ve.add(n,2),this.x1=l+a*Ve.uX(n),this.y1=u+s*Ve.uY(n),n=Ve.add(n,2),this.x2=l+a*Ve.uX(n),this.y2=u+s*Ve.uY(n),n=Ve.add(n,2),this.x3=l+a*Ve.uX(n),this.y3=u+s*Ve.uY(n)}else this.x0=e.x/i,this.y0=e.y/o,this.x1=(e.x+e.width)/i,this.y1=e.y/o,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/o,this.x3=e.x/i,this.y3=(e.y+e.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},t.prototype.toString=function(){return"[@pixi/core:TextureUvs "+("x0="+this.x0+" y0="+this.y0+" ")+("x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" ")+("y2="+this.y2+" x3="+this.x3+" y3="+this.y3)+"]"},t}(),Fm=new O1;function kl(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}var Wt=function(t){Fe(e,t);function e(r,n,i,o,a,s){var l=t.call(this)||this;if(l.noFrame=!1,n||(l.noFrame=!0,n=new fe(0,0,1,1)),r instanceof e&&(r=r.baseTexture),l.baseTexture=r,l._frame=n,l.trim=o,l.valid=!1,l._uvs=Fm,l.uvMatrix=null,l.orig=i||n,l._rotate=Number(a||0),a===!0)l._rotate=2;else if(l._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return l.defaultAnchor=s?new _e(s.x,s.y):new _e(0,0),l._updateID=0,l.textureCacheIds=[],r.valid?l.noFrame?r.valid&&l.onBaseTextureUpdated(r):l.frame=n:r.once("loaded",l.onBaseTextureUpdated,l),l.noFrame&&r.on("update",l.onBaseTextureUpdated,l),l}return e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(r){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=r.width,this._frame.height=r.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(r){if(this.baseTexture){if(r){var n=this.baseTexture.resource;n&&n.url&&ti[n.url]&&e.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){var r=this._frame.clone(),n=this._frame===this.orig?r:this.orig.clone(),i=new e(this.baseTexture,!this.noFrame&&r,n,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(i._frame=r),i},e.prototype.updateUvs=function(){this._uvs===Fm&&(this._uvs=new O1),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(r,n,i){n===void 0&&(n={}),i===void 0&&(i=Ft.STRICT_TEXTURE_CACHE);var o=typeof r=="string",a=null;if(o)a=r;else if(r instanceof ge){if(!r.cacheId){var s=n&&n.pixiIdPrefix||"pixiid";r.cacheId=s+"-"+Oo(),ge.addToCache(r,r.cacheId)}a=r.cacheId}else{if(!r._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";r._pixiId=s+"_"+Oo()}a=r._pixiId}var l=ti[a];if(o&&i&&!l)throw new Error('The cacheId "'+a+'" does not exist in TextureCache.');return!l&&!(r instanceof ge)?(n.resolution||(n.resolution=ju(r)),l=new e(new ge(r,n)),l.baseTexture.cacheId=a,ge.addToCache(l.baseTexture,a),e.addToCache(l,a)):!l&&r instanceof ge&&(l=new e(r),e.addToCache(l,a)),l},e.fromURL=function(r,n){var i=Object.assign({autoLoad:!1},n==null?void 0:n.resourceOptions),o=e.from(r,Object.assign({resourceOptions:i},n),!1),a=o.baseTexture.resource;return o.baseTexture.valid?Promise.resolve(o):a.load().then(function(){return Promise.resolve(o)})},e.fromBuffer=function(r,n,i,o){return new e(ge.fromBuffer(r,n,i,o))},e.fromLoader=function(r,n,i,o){var a=new ge(r,Object.assign({scaleMode:Ft.SCALE_MODE,resolution:ju(n)},o)),s=a.resource;s instanceof S1&&(s.url=n);var l=new e(a);return i||(i=n),ge.addToCache(l.baseTexture,i),e.addToCache(l,i),i!==n&&(ge.addToCache(l.baseTexture,n),e.addToCache(l,n)),l.baseTexture.valid?Promise.resolve(l):new Promise(function(u){l.baseTexture.once("loaded",function(){return u(l)})})},e.addToCache=function(r,n){n&&(r.textureCacheIds.indexOf(n)===-1&&r.textureCacheIds.push(n),ti[n]&&console.warn("Texture added to the cache with an id ["+n+"] that already had an entry"),ti[n]=r)},e.removeFromCache=function(r){if(typeof r=="string"){var n=ti[r];if(n){var i=n.textureCacheIds.indexOf(r);return i>-1&&n.textureCacheIds.splice(i,1),delete ti[r],n}}else if(r&&r.textureCacheIds){for(var o=0;o<r.textureCacheIds.length;++o)ti[r.textureCacheIds[o]]===r&&delete ti[r.textureCacheIds[o]];return r.textureCacheIds.length=0,r}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(r){this._frame=r,this.noFrame=!1;var n=r.x,i=r.y,o=r.width,a=r.height,s=n+o>this.baseTexture.width,l=i+a>this.baseTexture.height;if(s||l){var u=s&&l?"and":"or",c="X: "+n+" + "+o+" = "+(n+o)+" > "+this.baseTexture.width,f="Y: "+i+" + "+a+" = "+(i+a)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+u+" "+f))}this.valid=o&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=r),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(r){this._rotate=r,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(e,"EMPTY",{get:function(){return e._EMPTY||(e._EMPTY=new e(new ge),kl(e._EMPTY),kl(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=document.createElement("canvas"),n=r.getContext("2d");r.width=16,r.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),e._WHITE=new e(new ge(new P1(r))),kl(e._WHITE),kl(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(Fa),Uo=function(t){Fe(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(r){this.framebuffer.multisample=r},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n,i){i===void 0&&(i=!0);var o=this.baseTexture.resolution,a=Math.round(r*o)/o,s=Math.round(n*o)/o;this.valid=a>0&&s>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(a,s),this.updateUvs()},e.prototype.setResolution=function(r){var n=this.baseTexture;n.resolution!==r&&(n.setResolution(r),this.resize(n.width,n.height,!1))},e.create=function(r){for(var n=arguments,i=[],o=1;o<arguments.length;o++)i[o-1]=n[o];return typeof r=="number"&&(Ds("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),r={width:r,height:i[0],scaleMode:i[1],resolution:i[2]}),new e(new A1(r))},e}(Wt),X3=function(){function t(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(e,r,n){n===void 0&&(n=ur.NONE);var i=new A1(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new Uo(i)},t.prototype.getOptimalTexture=function(e,r,n,i){n===void 0&&(n=1),i===void 0&&(i=ur.NONE);var o;e=Math.ceil(e*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=$u(e),r=$u(r),o=((e&65535)<<16|r&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);var a=this.texturePool[o].pop();return a||(a=this.createTexture(e,r,i)),a.filterPoolKey=o,a.setResolution(n),a},t.prototype.getFilterTexture=function(e,r,n){var i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||ur.NONE);return i.filterFrame=e.filterFrame,i},t.prototype.returnTexture=function(e){var r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)},t.prototype.returnFilterTexture=function(e){this.returnTexture(e)},t.prototype.clear=function(e){if(e=e!==!1,e)for(var r in this.texturePool){var n=this.texturePool[r];if(n)for(var i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}},t.prototype.setScreenSize=function(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(var r in this.texturePool)if(Number(r)<0){var n=this.texturePool[r];if(n)for(var i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}},t.SCREEN_KEY=-1,t}(),Lm=function(){function t(e,r,n,i,o,a,s){r===void 0&&(r=0),n===void 0&&(n=!1),i===void 0&&(i=Mt.FLOAT),this.buffer=e,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=a,this.instance=s}return t.prototype.destroy=function(){this.buffer=null},t.from=function(e,r,n,i,o){return new t(e,r,n,i,o)},t}(),z3=0,hr=function(){function t(e,r,n){r===void 0&&(r=!0),n===void 0&&(n=!1),this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=z3++,this.disposeRunner=new wr("disposeBuffer")}return t.prototype.update=function(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(t.prototype,"index",{get:function(){return this.type===Dn.ELEMENT_ARRAY_BUFFER},set:function(e){this.type=e?Dn.ELEMENT_ARRAY_BUFFER:Dn.ARRAY_BUFFER},enumerable:!1,configurable:!0}),t.from=function(e){return e instanceof Array&&(e=new Float32Array(e)),new t(e)},t}(),W3={Float32Array,Uint32Array,Int32Array,Uint8Array};function Y3(t,e){for(var r=0,n=0,i={},o=0;o<t.length;o++)n+=e[o],r+=t[o].length;for(var a=new ArrayBuffer(r*4),s=null,l=0,o=0;o<t.length;o++){var u=e[o],c=t[o],f=w1(c);i[f]||(i[f]=new W3[f](a)),s=i[f];for(var h=0;h<c.length;h++){var d=(h/u|0)*n+l,p=h%u;s[d+p]=c[h]}l+=u}return new Float32Array(a)}var Mm={5126:4,5123:2,5121:1},K3=0,Z3={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},cl=function(){function t(e,r){e===void 0&&(e=[]),r===void 0&&(r={}),this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=K3++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new wr("disposeGeometry"),this.refCount=0}return t.prototype.addAttribute=function(e,r,n,i,o,a,s,l){if(n===void 0&&(n=0),i===void 0&&(i=!1),l===void 0&&(l=!1),!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof hr||(r instanceof Array&&(r=new Float32Array(r)),r=new hr(r));var u=e.split("|");if(u.length>1){for(var c=0;c<u.length;c++)this.addAttribute(u[c],r,n,i,o);return this}var f=this.buffers.indexOf(r);return f===-1&&(this.buffers.push(r),f=this.buffers.length-1),this.attributes[e]=new Lm(f,n,i,o,a,s,l),this.instanced=this.instanced||l,this},t.prototype.getAttribute=function(e){return this.attributes[e]},t.prototype.getBuffer=function(e){return this.buffers[this.getAttribute(e).buffer]},t.prototype.addIndex=function(e){return e instanceof hr||(e instanceof Array&&(e=new Uint16Array(e)),e=new hr(e)),e.type=Dn.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.indexOf(e)===-1&&this.buffers.push(e),this},t.prototype.getIndex=function(){return this.indexBuffer},t.prototype.interleave=function(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;var e=[],r=[],n=new hr,i;for(i in this.attributes){var o=this.attributes[i],a=this.buffers[o.buffer];e.push(a.data),r.push(o.size*Mm[o.type]/4),o.buffer=0}for(n.data=Y3(e,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},t.prototype.getSize=function(){for(var e in this.attributes){var r=this.attributes[e],n=this.buffers[r.buffer];return n.data.length/(r.stride/4||r.size)}return 0},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},t.prototype.clone=function(){for(var e=new t,r=0;r<this.buffers.length;r++)e.buffers[r]=new hr(this.buffers[r].data.slice(0));for(var r in this.attributes){var n=this.attributes[r];e.attributes[r]=new Lm(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Dn.ELEMENT_ARRAY_BUFFER),e},t.merge=function(e){for(var r=new t,n=[],i=[],o=[],a,s=0;s<e.length;s++){a=e[s];for(var l=0;l<a.buffers.length;l++)i[l]=i[l]||0,i[l]+=a.buffers[l].data.length,o[l]=0}for(var s=0;s<a.buffers.length;s++)n[s]=new Z3[w1(a.buffers[s].data)](i[s]),r.buffers[s]=new hr(n[s]);for(var s=0;s<e.length;s++){a=e[s];for(var l=0;l<a.buffers.length;l++)n[l].set(a.buffers[l].data,o[l]),o[l]+=a.buffers[l].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=Dn.ELEMENT_ARRAY_BUFFER;for(var u=0,c=0,f=0,h=0,s=0;s<a.buffers.length;s++)if(a.buffers[s]!==a.indexBuffer){h=s;break}for(var s in a.attributes){var d=a.attributes[s];(d.buffer|0)===h&&(c+=d.size*Mm[d.type]/4)}for(var s=0;s<e.length;s++){for(var p=e[s].indexBuffer.data,l=0;l<p.length;l++)r.indexBuffer.data[l+f]+=u;u+=e[s].buffers[h].data.length/c,f+=p.length}}return r},t}(),q3=function(t){Fe(e,t);function e(){var r=t.call(this)||this;return r.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),r}return e}(cl),U1=function(t){Fe(e,t);function e(){var r=t.call(this)||this;return r.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),r.uvs=new Float32Array([0,0,1,0,1,1,0,1]),r.vertexBuffer=new hr(r.vertices),r.uvBuffer=new hr(r.uvs),r.addAttribute("aVertexPosition",r.vertexBuffer).addAttribute("aTextureCoord",r.uvBuffer).addIndex([0,1,2,0,2,3]),r}return e.prototype.map=function(r,n){var i=0,o=0;return this.uvs[0]=i,this.uvs[1]=o,this.uvs[2]=i+n.width/r.width,this.uvs[3]=o,this.uvs[4]=i+n.width/r.width,this.uvs[5]=o+n.height/r.height,this.uvs[6]=i,this.uvs[7]=o+n.height/r.height,i=n.x,o=n.y,this.vertices[0]=i,this.vertices[1]=o,this.vertices[2]=i+n.width,this.vertices[3]=o,this.vertices[4]=i+n.width,this.vertices[5]=o+n.height,this.vertices[6]=i,this.vertices[7]=o+n.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(cl),J3=0,Po=function(){function t(e,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=J3++,this.static=!!r,this.ubo=!!n,e instanceof hr?(this.buffer=e,this.buffer.type=Dn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new hr(new Float32Array(1)),this.buffer.type=Dn.UNIFORM_BUFFER,this.autoManage=!0))}return t.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},t.prototype.add=function(e,r,n){if(!this.ubo)this.uniforms[e]=new t(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")},t.from=function(e,r,n){return new t(e,r,n)},t.uboFrom=function(e,r){return new t(e,r!=null?r:!0,!0)},t}(),Q3=function(){function t(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=ur.NONE,this.sourceFrame=new fe,this.destinationFrame=new fe,this.bindingSourceFrame=new fe,this.bindingDestinationFrame=new fe,this.filters=[],this.transform=null}return t.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},t}(),Gl=[new _e,new _e,new _e,new _e],rf=new or,t4=function(){function t(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new X3,this.texturePool.setScreenSize(e.view),this.statePool=[],this.quad=new q3,this.quadUv=new U1,this.tempRect=new fe,this.activeState={},this.globalUniforms=new Po({outputFrame:new fe,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return t.prototype.push=function(e,r){for(var n,i,o=this.renderer,a=this.defaultFilterStack,s=this.statePool.pop()||new Q3,l=this.renderer.renderTexture,u=r[0].resolution,c=r[0].multisample,f=r[0].padding,h=r[0].autoFit,d=(n=r[0].legacy)!==null&&n!==void 0?n:!0,p=1;p<r.length;p++){var v=r[p];u=Math.min(u,v.resolution),c=Math.min(c,v.multisample),f=this.useMaxPadding?Math.max(f,v.padding):f+v.padding,h=h&&v.autoFit,d=d||((i=v.legacy)!==null&&i!==void 0?i:!0)}a.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),a.push(s),s.resolution=u,s.multisample=c,s.legacy=d,s.target=e,s.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),s.sourceFrame.pad(f);var m=this.tempRect.copyFrom(l.sourceFrame);o.projection.transform&&this.transformAABB(rf.copyFrom(o.projection.transform).invert(),m),h?(s.sourceFrame.fit(m),(s.sourceFrame.width<=0||s.sourceFrame.height<=0)&&(s.sourceFrame.width=0,s.sourceFrame.height=0)):s.sourceFrame.intersects(m)||(s.sourceFrame.width=0,s.sourceFrame.height=0),this.roundFrame(s.sourceFrame,l.current?l.current.resolution:o.resolution,l.sourceFrame,l.destinationFrame,o.projection.transform),s.renderTexture=this.getOptimalFilterTexture(s.sourceFrame.width,s.sourceFrame.height,u,c),s.filters=r,s.destinationFrame.width=s.renderTexture.width,s.destinationFrame.height=s.renderTexture.height;var y=this.tempRect;y.x=0,y.y=0,y.width=s.sourceFrame.width,y.height=s.sourceFrame.height,s.renderTexture.filterFrame=s.sourceFrame,s.bindingSourceFrame.copyFrom(l.sourceFrame),s.bindingDestinationFrame.copyFrom(l.destinationFrame),s.transform=o.projection.transform,o.projection.transform=null,l.bind(s.renderTexture,s.sourceFrame,y),o.framebuffer.clear(0,0,0,0)},t.prototype.pop=function(){var e=this.defaultFilterStack,r=e.pop(),n=r.filters;this.activeState=r;var i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;var o=i.inputSize,a=i.inputPixel,s=i.inputClamp;if(o[0]=r.destinationFrame.width,o[1]=r.destinationFrame.height,o[2]=1/o[0],o[3]=1/o[1],a[0]=Math.round(o[0]*r.resolution),a[1]=Math.round(o[1]*r.resolution),a[2]=1/a[0],a[3]=1/a[1],s[0]=.5*a[2],s[1]=.5*a[3],s[2]=r.sourceFrame.width*o[2]-.5*a[2],s[3]=r.sourceFrame.height*o[3]-.5*a[3],r.legacy){var l=i.filterArea;l[0]=r.destinationFrame.width,l[1]=r.destinationFrame.height,l[2]=r.sourceFrame.x,l[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var u=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,u.renderTexture,Si.BLEND,r),this.returnFilterTexture(r.renderTexture);else{var c=r.renderTexture,f=this.getOptimalFilterTexture(c.width,c.height,r.resolution);f.filterFrame=c.filterFrame;var h=0;for(h=0;h<n.length-1;++h){h===1&&r.multisample>1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[h].apply(this,c,f,Si.CLEAR,r);var d=c;c=f,f=d}n[h].apply(this,c,u.renderTexture,Si.BLEND,r),h>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)},t.prototype.bindAndClear=function(e,r){r===void 0&&(r=Si.CLEAR);var n=this.renderer,i=n.renderTexture,o=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=o.stateId&1||this.forceClear;(r===Si.CLEAR||r===Si.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(e,r,n,i){var o=this.renderer;o.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(_n.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(_n.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(e,r){var n=this.activeState,i=n.sourceFrame,o=n.destinationFrame,a=r._texture.orig,s=e.set(o.width,0,0,o.height,i.x,i.y),l=r.worldTransform.copyTo(or.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/a.width,1/a.height),s.translate(r.anchor.x,r.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(e,r,n,i){return n===void 0&&(n=1),i===void 0&&(i=ur.NONE),this.texturePool.getOptimalTexture(e,r,n,i)},t.prototype.getFilterTexture=function(e,r,n){if(typeof e=="number"){var i=e;e=r,r=i}e=e||this.activeState.renderTexture;var o=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||ur.NONE);return o.filterFrame=e.filterFrame,o},t.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(e,r){var n=Gl[0],i=Gl[1],o=Gl[2],a=Gl[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),a.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(o,o),e.apply(a,a);var s=Math.min(n.x,i.x,o.x,a.x),l=Math.min(n.y,i.y,o.y,a.y),u=Math.max(n.x,i.x,o.x,a.x),c=Math.max(n.y,i.y,o.y,a.y);r.x=s,r.y=l,r.width=u-s,r.height=c-l},t.prototype.roundFrame=function(e,r,n,i,o){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(o){var a=o.a,s=o.b,l=o.c,u=o.d;if((Math.abs(s)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(u)>1e-4))return}o=o?rf.copyFrom(o):rf.identity(),o.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(o,e),e.ceil(r),this.transformAABB(o.invert(),e)}},t}(),Tc=function(){function t(e){this.renderer=e}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(e){},t}(),e4=function(){function t(e){this.renderer=e,this.emptyRenderer=new Tc(e),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(e,r){for(var n=this.renderer.texture.boundTextures,i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)},t.prototype.boundArray=function(e,r,n,i){for(var o=e.elements,a=e.ids,s=e.count,l=0,u=0;u<s;u++){var c=o[u],f=c._batchLocation;if(f>=0&&f<i&&r[f]===c){a[u]=f;continue}for(;l<i;){var h=r[l];if(h&&h._batchEnabled===n&&h._batchLocation===l){l++;continue}a[u]=l,c._batchLocation=l,r[l]=c;break}}},t.prototype.destroy=function(){this.renderer=null},t}(),Bm=0,r4=function(){function t(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),e.view.addEventListener("webglcontextlost",this.handleContextLost,!1),e.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(t.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),t.prototype.contextChange=function(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=Bm++,e.isContextLost()&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").restoreContext()},t.prototype.initFromContext=function(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=Bm++,this.renderer.runners.contextChange.emit(e)},t.prototype.initFromOptions=function(e){var r=this.createContext(this.renderer.view,e);this.initFromContext(r)},t.prototype.createContext=function(e,r){var n;if(Ft.PREFER_ENV>=di.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var e=this.gl,r={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")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),loseContext:e.getExtension("WEBGL_lose_context"),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_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(e){e.preventDefault()},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(e){var r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(),n4=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ur.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),i4=new fe,o4=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new Lh(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new fe,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),this.renderer.context.webGLVersion===1){var r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Ft.PREFER_ENV===di.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=function(i){return r.drawBuffersWEBGL(i)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},t.prototype.bind=function(e,r,n){n===void 0&&(n=0);var i=this.gl;if(e){var o=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,o.mipLevel=n),o.dirtyId!==e.dirtyId&&(o.dirtyId=e.dirtyId,o.dirtyFormat!==e.dirtyFormat?(o.dirtyFormat=e.dirtyFormat,o.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):o.dirtySize!==e.dirtySize&&(o.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var a=0;a<e.colorTextures.length;a++){var s=e.colorTextures[a];this.renderer.texture.unbind(s.parentTextureArray||s)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){var l=r.width>>n,u=r.height>>n,c=l/r.width;this.setViewport(r.x*c,r.y*c,l,u)}else{var l=e.width>>n,u=e.height>>n;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},t.prototype.setViewport=function(e,r,n,i){var o=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(o.width!==n||o.height!==i||o.x!==e||o.y!==r)&&(o.x=e,o.y=r,o.width=n,o.height=i,this.gl.viewport(e,r,n,i))},Object.defineProperty(t.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,r,n,i,o){o===void 0&&(o=Hu.COLOR|Hu.DEPTH);var a=this.gl;a.clearColor(e,r,n,i),a.clear(o)},t.prototype.initFramebuffer=function(e){var r=this.gl,n=new n4(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},t.prototype.resizeFramebuffer=function(e){var r=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.RGBA8,e.width,e.height)),n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));var i=e.colorTextures,o=i.length;r.drawBuffers||(o=Math.min(o,1));for(var a=0;a<o;a++){var s=i[a],l=s.parentTextureArray||s;this.renderer.texture.bind(l,0)}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)},t.prototype.updateFramebuffer=function(e,r){var n=this.gl,i=e.glFramebuffers[this.CONTEXT_UID],o=e.colorTextures,a=o.length;n.drawBuffers||(a=Math.min(a,1)),i.multisample>1&&this.canMultisampleFramebuffer(e)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],l=0;l<a;l++){var u=o[l],c=u.parentTextureArray||u;this.renderer.texture.bind(c,0),!(l===0&&i.msaaBuffer)&&(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+l,u.target,c._glTextures[this.CONTEXT_UID].texture,r),s.push(n.COLOR_ATTACHMENT0+l))}if(s.length>1&&n.drawBuffers(s),e.depthTexture){var f=this.writeDepthTexture;if(f){var h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},t.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},t.prototype.detectSamples=function(e){var r=this.msaaSamples,n=ur.NONE;if(e<=1||r===null)return n;for(var i=0;i<r.length;i++)if(r[i]<=e){n=r[i];break}return n===1&&(n=ur.NONE),n},t.prototype.blit=function(e,r,n){var i=this,o=i.current,a=i.renderer,s=i.gl,l=i.CONTEXT_UID;if(a.context.webGLVersion===2&&!!o){var u=o.glFramebuffers[l];if(!!u){if(!e){if(!u.msaaBuffer)return;var c=o.colorTextures[0];if(!c)return;u.blitFramebuffer||(u.blitFramebuffer=new Lh(o.width,o.height),u.blitFramebuffer.addColorTexture(0,c)),e=u.blitFramebuffer,e.colorTextures[0]!==c&&(e.colorTextures[0]=c,e.dirtyId++,e.dirtyFormat++),(e.width!==o.width||e.height!==o.height)&&(e.width=o.width,e.height=o.height,e.dirtyId++,e.dirtySize++)}r||(r=i4,r.width=o.width,r.height=o.height),n||(n=r);var f=r.width===n.width&&r.height===n.height;this.bind(e),s.bindFramebuffer(s.READ_FRAMEBUFFER,u.framebuffer),s.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,s.COLOR_BUFFER_BIT,f?s.NEAREST:s.LINEAR)}}},t.prototype.disposeFramebuffer=function(e,r){var n=e.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!!n){delete e.glFramebuffers[this.CONTEXT_UID];var o=this.managedFramebuffers.indexOf(e);o>=0&&this.managedFramebuffers.splice(o,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(e){var r=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n<r.length;n++)this.disposeFramebuffer(r[n],e)},t.prototype.forceStencil=function(){var e=this.current;if(!!e){var r=e.glFramebuffers[this.CONTEXT_UID];if(!(!r||r.stencil)){e.stencil=!0;var n=e.width,i=e.height,o=this.gl,a=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,a),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=a,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,a)}}},t.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new fe},t.prototype.destroy=function(){this.renderer=null},t}(),nf={5126:4,5123:2,5121:1},a4=function(){function t(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return t.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){var n=this.renderer.context.extensions.vertexArrayObject;Ft.PREFER_ENV===di.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=function(){return n.createVertexArrayOES()},e.bindVertexArray=function(o){return n.bindVertexArrayOES(o)},e.deleteVertexArray=function(o){return n.deleteVertexArrayOES(o)}):(this.hasVao=!1,e.createVertexArray=function(){return null},e.bindVertexArray=function(){return null},e.deleteVertexArray=function(){return null})}if(r.webGLVersion!==2){var i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=function(o,a){return i.vertexAttribDivisorANGLE(o,a)},e.drawElementsInstanced=function(o,a,s,l,u){return i.drawElementsInstancedANGLE(o,a,s,l,u)},e.drawArraysInstanced=function(o,a,s,l){return i.drawArraysInstancedANGLE(o,a,s,l)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex},t.prototype.bind=function(e,r){r=r||this.renderer.shader.shader;var n=this.gl,i=e.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);var a=i[r.program.id]||this.initGeometryVao(e,r,o);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?n.bindVertexArray(a):this.activateVao(e,r.program)),this.updateBuffers()},t.prototype.reset=function(){this.unbind()},t.prototype.updateBuffers=function(){for(var e=this._activeGeometry,r=this.renderer.buffer,n=0;n<e.buffers.length;n++){var i=e.buffers[n];r.update(i)}},t.prototype.checkCompatibility=function(e,r){var n=e.attributes,i=r.attributeData;for(var o in i)if(!n[o])throw new Error('shader and geometry incompatible, geometry missing the "'+o+'" attribute')},t.prototype.getSignature=function(e,r){var n=e.attributes,i=r.attributeData,o=["g",e.id];for(var a in n)i[a]&&o.push(a,i[a].location);return o.join("-")},t.prototype.initGeometryVao=function(e,r,n){n===void 0&&(n=!0);var i=this.gl,o=this.CONTEXT_UID,a=this.renderer.buffer,s=r.program;s.glPrograms[o]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,s);var l=this.getSignature(e,s),u=e.glVertexArrayObjects[this.CONTEXT_UID],c=u[l];if(c)return u[s.id]=c,c;var f=e.buffers,h=e.attributes,d={},p={};for(var v in f)d[v]=0,p[v]=0;for(var v in h)!h[v].size&&s.attributeData[v]?h[v].size=s.attributeData[v].size:h[v].size||console.warn("PIXI Geometry attribute '"+v+"' size cannot be determined (likely the bound shader does not have the attribute)"),d[h[v].buffer]+=h[v].size*nf[h[v].type];for(var v in h){var m=h[v],y=m.size;m.stride===void 0&&(d[m.buffer]===y*nf[m.type]?m.stride=0:m.stride=d[m.buffer]),m.start===void 0&&(m.start=p[m.buffer],p[m.buffer]+=y*nf[m.type])}c=i.createVertexArray(),i.bindVertexArray(c);for(var g=0;g<f.length;g++){var b=f[g];a.bind(b),n&&b._glBuffers[o].refCount++}return this.activateVao(e,s),this._activeVao=c,u[s.id]=c,u[l]=c,c},t.prototype.disposeGeometry=function(e,r){var n;if(!!this.managedGeometries[e.id]){delete this.managedGeometries[e.id];var i=e.glVertexArrayObjects[this.CONTEXT_UID],o=this.gl,a=e.buffers,s=(n=this.renderer)===null||n===void 0?void 0:n.buffer;if(e.disposeRunner.remove(this),!!i){if(s)for(var l=0;l<a.length;l++){var u=a[l]._glBuffers[this.CONTEXT_UID];u&&(u.refCount--,u.refCount===0&&!r&&s.dispose(a[l],r))}if(!r){for(var c in i)if(c[0]==="g"){var f=i[c];this._activeVao===f&&this.unbind(),o.deleteVertexArray(f)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}},t.prototype.disposeAll=function(e){for(var r=Object.keys(this.managedGeometries),n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],e)},t.prototype.activateVao=function(e,r){var n=this.gl,i=this.CONTEXT_UID,o=this.renderer.buffer,a=e.buffers,s=e.attributes;e.indexBuffer&&o.bind(e.indexBuffer);var l=null;for(var u in s){var c=s[u],f=a[c.buffer],h=f._glBuffers[i];if(r.attributeData[u]){l!==h&&(o.bind(f),l=h);var d=r.attributeData[u].location;if(n.enableVertexAttribArray(d),n.vertexAttribPointer(d,c.size,c.type||n.FLOAT,c.normalized,c.stride,c.start),c.instance)if(this.hasInstance)n.vertexAttribDivisor(d,1);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}},t.prototype.draw=function(e,r,n,i){var o=this.gl,a=this._activeGeometry;if(a.indexBuffer){var s=a.indexBuffer.data.BYTES_PER_ELEMENT,l=s===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;s===2||s===4&&this.canUseUInt32ElementIndex?a.instanced?o.drawElementsInstanced(e,r||a.indexBuffer.data.length,l,(n||0)*s,i||1):o.drawElements(e,r||a.indexBuffer.data.length,l,(n||0)*s):console.warn("unsupported index buffer type: uint32")}else a.instanced?o.drawArraysInstanced(e,n,r||a.getSize(),i||1):o.drawArrays(e,n,r||a.getSize());return this},t.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},t.prototype.destroy=function(){this.renderer=null},t}(),s4=function(){function t(e){e===void 0&&(e=null),this.type=Tr.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Ft.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(t.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=Tr.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},t.prototype.copyCountersOrReset=function(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},t}();function km(t,e,r){var n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}function Gm(t,e){var r=t.getShaderSource(e).split(`
`).map(function(u,c){return c+": "+u}),n=t.getShaderInfoLog(e),i=n.split(`
`),o={},a=i.map(function(u){return parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(u){return u&&!o[u]?(o[u]=!0,!0):!1}),s=[""];a.forEach(function(u){r[u-1]="%c"+r[u-1]+"%c",s.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var l=r.join(`
`);s[0]=l,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,s),console.groupEnd()}function l4(t,e,r,n){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||Gm(t,r),t.getShaderParameter(n,t.COMPILE_STATUS)||Gm(t,n),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}function of(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}function F1(t,e){switch(t){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 of(2*e);case"bvec3":return of(3*e);case"bvec4":return of(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}var L1={},ja=L1;function u4(){if(ja===L1||ja&&ja.isContextLost()){var t=document.createElement("canvas"),e=void 0;Ft.PREFER_ENV>=di.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),ja=e}return ja}var Dl;function c4(){if(!Dl){Dl=Fn.MEDIUM;var t=u4();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Dl=e.precision?Fn.HIGH:Fn.MEDIUM}}return Dl}function Dm(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===Fn.HIGH&&r!==Fn.HIGH&&(n=Fn.MEDIUM),"precision "+n+` float;
`+t}else if(r!==Fn.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var f4={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 M1(t){return f4[t]}var Hl=null,Hm={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 B1(t,e){if(!Hl){var r=Object.keys(Hm);Hl={};for(var n=0;n<r.length;++n){var i=r[n];Hl[t[i]]=Hm[i]}}return Hl[e]}var ya=[{test:function(t){return t.type==="float"&&t.size===1},code:function(t){return`
if(uv["`+t+'"] !== ud["'+t+`"].value)
{
ud["`+t+'"].value = uv["'+t+`"]
gl.uniform1f(ud["`+t+'"].location, uv["'+t+`"])
}
`}},{test:function(t){return(t.type==="sampler2D"||t.type==="samplerCube"||t.type==="sampler2DArray")&&t.size===1&&!t.isArray},code:function(t){return`t = syncData.textureCount++;
renderer.texture.bind(uv["`+t+`"], t);
if(ud["`+t+`"].value !== t)
{
ud["`+t+`"].value = t;
gl.uniform1i(ud["`+t+`"].location, t);
; // eslint-disable-line max-len
}`}},{test:function(t,e){return t.type==="mat3"&&t.size===1&&e.a!==void 0},code:function(t){return`
gl.uniformMatrix3fv(ud["`+t+'"].location, false, uv["'+t+`"].toArray(true));
`},codeUbo:function(t){return`
var `+t+"_matrix = uv."+t+`.toArray(true);
data[offset] = `+t+`_matrix[0];
data[offset+1] = `+t+`_matrix[1];
data[offset+2] = `+t+`_matrix[2];
data[offset + 4] = `+t+`_matrix[3];
data[offset + 5] = `+t+`_matrix[4];
data[offset + 6] = `+t+`_matrix[5];
data[offset + 8] = `+t+`_matrix[6];
data[offset + 9] = `+t+`_matrix[7];
data[offset + 10] = `+t+`_matrix[8];
`}},{test:function(t,e){return t.type==="vec2"&&t.size===1&&e.x!==void 0},code:function(t){return`
cv = ud["`+t+`"].value;
v = uv["`+t+`"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["`+t+`"].location, v.x, v.y);
}`},codeUbo:function(t){return`
v = uv.`+t+`;
data[offset] = v.x;
data[offset+1] = v.y;
`}},{test:function(t){return t.type==="vec2"&&t.size===1},code:function(t){return`
cv = ud["`+t+`"].value;
v = uv["`+t+`"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["`+t+`"].location, v[0], v[1]);
}
`}},{test:function(t,e){return t.type==="vec4"&&t.size===1&&e.width!==void 0},code:function(t){return`
cv = ud["`+t+`"].value;
v = uv["`+t+`"];
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
{
cv[0] = v.x;
cv[1] = v.y;
cv[2] = v.width;
cv[3] = v.height;
gl.uniform4f(ud["`+t+`"].location, v.x, v.y, v.width, v.height)
}`},codeUbo:function(t){return`
v = uv.`+t+`;
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`}},{test:function(t){return t.type==="vec4"&&t.size===1},code:function(t){return`
cv = ud["`+t+`"].value;
v = uv["`+t+`"];
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(ud["`+t+`"].location, v[0], v[1], v[2], v[3])
}`}}],h4={float:`
if (cv !== v)
{
cu.value = v;
gl.uniform1f(location, v);
}`,vec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(location, v[0], v[1])
}`,vec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3f(location, v[0], v[1], v[2])
}`,vec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
}`,int:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,ivec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,ivec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,ivec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,uint:`
if (cv !== v)
{
cu.value = v;
gl.uniform1ui(location, v);
}`,uvec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2ui(location, v[0], v[1]);
}`,uvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3ui(location, v[0], v[1], v[2]);
}`,uvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
}`,bool:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,bvec2:`
if (cv[0] != v[0] || cv[1] != v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,bvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,bvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},d4={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 p4(t,e){var r,n=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(var i in t.uniforms){var o=e[i];if(!o){!((r=t.uniforms[i])===null||r===void 0)&&r.group&&(t.uniforms[i].ubo?n.push(`
renderer.shader.syncUniformBufferGroup(uv.`+i+", '"+i+`');
`):n.push(`
renderer.shader.syncUniformGroup(uv.`+i+`, syncData);
`));continue}for(var a=t.uniforms[i],s=!1,l=0;l<ya.length;l++)if(ya[l].test(o,a)){n.push(ya[l].code(i,a)),s=!0;break}if(!s){var u=o.size===1?h4:d4,c=u[o.type].replace("location",'ud["'+i+'"].location');n.push(`
cu = ud["`+i+`"];
cv = cu.value;
v = uv["`+i+`"];
`+c+";")}}return new Function("ud","uv","renderer","syncData",n.join(`
`))}var v4=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function m4(t){for(var e="",r=0;r<t;++r)r>0&&(e+=`
else `),r<t-1&&(e+="if(test == "+r+".0){}");return e}function g4(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var r=e.createShader(e.FRAGMENT_SHADER);;){var n=v4.replace(/%forloop%/gi,m4(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}var Xa;function y4(){if(typeof Xa=="boolean")return Xa;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");Xa=t({a:"b"},"a","b")===!0}catch{Xa=!1}return Xa}var b4=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`,_4=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`,x4=0,Vl={},fl=function(){function t(e,r,n){n===void 0&&(n="pixi-shader"),this.id=x4++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(n=n.replace(/\s+/g,"-"),Vl[n]?(Vl[n]++,n+="-"+Vl[n]):Vl[n]=1,this.vertexSrc="#define SHADER_NAME "+n+`
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+n+`
`+this.fragmentSrc,this.vertexSrc=Dm(this.vertexSrc,Ft.PRECISION_VERTEX,Fn.HIGH),this.fragmentSrc=Dm(this.fragmentSrc,Ft.PRECISION_FRAGMENT,c4())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(t,"defaultVertexSrc",{get:function(){return _4},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return b4},enumerable:!1,configurable:!0}),t.from=function(e,r,n){var i=e+r,o=Om[i];return o||(Om[i]=o=new t(e,r,n)),o},t}(),Di=function(){function t(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof Po?this.uniformGroup=r:this.uniformGroup=new Po(r):this.uniformGroup=new Po({})}return t.prototype.checkUniformExists=function(e,r){if(r.uniforms[e])return!0;for(var n in r.uniforms){var i=r.uniforms[n];if(i.group&&this.checkUniformExists(e,i))return!0}return!1},t.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(t.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),t.from=function(e,r,n){var i=fl.from(e,r);return new t(i,n)},t}(),af=0,sf=1,lf=2,uf=3,cf=4,ff=5,Do=function(){function t(){this.data=0,this.blendMode=Ut.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(t.prototype,"blend",{get:function(){return!!(this.data&1<<af)},set:function(e){!!(this.data&1<<af)!==e&&(this.data^=1<<af)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsets",{get:function(){return!!(this.data&1<<sf)},set:function(e){!!(this.data&1<<sf)!==e&&(this.data^=1<<sf)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"culling",{get:function(){return!!(this.data&1<<lf)},set:function(e){!!(this.data&1<<lf)!==e&&(this.data^=1<<lf)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTest",{get:function(){return!!(this.data&1<<uf)},set:function(e){!!(this.data&1<<uf)!==e&&(this.data^=1<<uf)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthMask",{get:function(){return!!(this.data&1<<ff)},set:function(e){!!(this.data&1<<ff)!==e&&(this.data^=1<<ff)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clockwiseFrontFace",{get:function(){return!!(this.data&1<<cf)},set:function(e){!!(this.data&1<<cf)!==e&&(this.data^=1<<cf)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this._blendMode},set:function(e){this.blend=e!==Ut.NONE,this._blendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(e){this.offsets=!!e,this._polygonOffset=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[@pixi/core:State "+("blendMode="+this.blendMode+" ")+("clockwiseFrontFace="+this.clockwiseFrontFace+" ")+("culling="+this.culling+" ")+("depthMask="+this.depthMask+" ")+("polygonOffset="+this.polygonOffset)+"]"},t.for2d=function(){var e=new t;return e.depthTest=!1,e.blend=!0,e},t}(),T4=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`,w4=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`,Zi=function(t){Fe(e,t);function e(r,n,i){var o=this,a=fl.from(r||e.defaultVertexSrc,n||e.defaultFragmentSrc);return o=t.call(this,a,i)||this,o.padding=0,o.resolution=Ft.FILTER_RESOLUTION,o.multisample=Ft.FILTER_MULTISAMPLE,o.enabled=!0,o.autoFit=!0,o.state=new Do,o}return e.prototype.apply=function(r,n,i,o,a){r.applyFilter(this,n,i,o)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._resolution=r},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultVertexSrc",{get:function(){return T4},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return w4},enumerable:!1,configurable:!0}),e}(Di),E4=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;
varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`,I4=`varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform sampler2D mask;
uniform float alpha;
uniform float npmAlpha;
uniform vec4 maskClamp;
void main(void)
{
float clip = step(3.5,
step(maskClamp.x, vMaskCoord.x) +
step(maskClamp.y, vMaskCoord.y) +
step(vMaskCoord.x, maskClamp.z) +
step(vMaskCoord.y, maskClamp.w));
vec4 original = texture2D(uSampler, vTextureCoord);
vec4 masky = texture2D(mask, vMaskCoord);
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
original *= (alphaMul * masky.r * alpha * clip);
gl_FragColor = original;
}
`,Vm=new or,vp=function(){function t(e,r){this._texture=e,this.mapCoord=new or,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r=="undefined"?.5:r,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(e,r){r===void 0&&(r=e);for(var n=this.mapCoord,i=0;i<e.length;i+=2){var o=e[i],a=e[i+1];r[i]=o*n.a+a*n.c+n.tx,r[i+1]=o*n.b+a*n.d+n.ty}return r},t.prototype.update=function(e){var r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;var n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);var i=r.orig,o=r.trim;o&&(Vm.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(Vm));var a=r.baseTexture,s=this.uClampFrame,l=this.clampMargin/a.resolution,u=this.clampOffset;return s[0]=(r._frame.x+l+u)/a.width,s[1]=(r._frame.y+l+u)/a.height,s[2]=(r._frame.x+r._frame.width-l+u)/a.width,s[3]=(r._frame.y+r._frame.height-l+u)/a.height,this.uClampOffset[0]=u/a.realWidth,this.uClampOffset[1]=u/a.realHeight,this.isSimple=r._frame.width===a.width&&r._frame.height===a.height&&r.rotate===0,!0},t}(),C4=function(t){Fe(e,t);function e(r,n,i){var o=this,a=null;return typeof r!="string"&&n===void 0&&i===void 0&&(a=r,r=void 0,n=void 0,i=void 0),o=t.call(this,r||E4,n||I4,i)||this,o.maskSprite=a,o.maskMatrix=new or,o}return Object.defineProperty(e.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(r){this._maskSprite=r,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),e.prototype.apply=function(r,n,i,o){var a=this._maskSprite,s=a._texture;!s.valid||(s.uvMatrix||(s.uvMatrix=new vp(s,0)),s.uvMatrix.update(),this.uniforms.npmAlpha=s.baseTexture.alphaMode?0:1,this.uniforms.mask=s,this.uniforms.otherMatrix=r.calculateSpriteMatrix(this.maskMatrix,a).prepend(s.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=s.uvMatrix.uClampFrame,r.applyFilter(this,n,i,o))},e}(Zi),R4=function(){function t(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t.prototype.setMaskStack=function(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)},t.prototype.push=function(e,r){var n=r;if(!n.isMaskData){var i=this.maskDataPool.pop()||new s4;i.pooled=!0,i.maskObject=r,n=i}var o=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(o),n.autoDetect&&this.detect(n),n._target=e,n.type!==Tr.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Tr.SCISSOR:this.renderer.scissor.push(n);break;case Tr.STENCIL:this.renderer.stencil.push(n);break;case Tr.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break}n.type===Tr.SPRITE&&this.maskStack.push(n)},t.prototype.pop=function(e){var r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case Tr.SCISSOR:this.renderer.scissor.pop();break;case Tr.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Tr.SPRITE:this.popSpriteMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){var n=this.maskStack[this.maskStack.length-1];n.type===Tr.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}},t.prototype.detect=function(e){var r=e.maskObject;r.isSprite?e.type=Tr.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Tr.SCISSOR:e.type=Tr.STENCIL},t.prototype.pushSpriteMask=function(e){var r,n,i=e.maskObject,o=e._target,a=e._filters;a||(a=this.alphaMaskPool[this.alphaMaskIndex],a||(a=this.alphaMaskPool[this.alphaMaskIndex]=[new C4]));var s=this.renderer,l=s.renderTexture,u,c;if(l.current){var f=l.current;u=e.resolution||f.resolution,c=(r=e.multisample)!==null&&r!==void 0?r:f.multisample}else u=e.resolution||s.resolution,c=(n=e.multisample)!==null&&n!==void 0?n:s.multisample;a[0].resolution=u,a[0].multisample=c,a[0].maskSprite=i;var h=o.filterArea;o.filterArea=i.getBounds(!0),s.filter.push(o,a),o.filterArea=h,e._filters||this.alphaMaskIndex++},t.prototype.popSpriteMask=function(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},t.prototype.destroy=function(){this.renderer=null},t}(),k1=function(){function t(e){this.renderer=e,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(e){var r=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),$m=new or,N4=function(t){Fe(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=WebGLRenderingContext.SCISSOR_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0},e.prototype.calcScissorRect=function(r){if(!r._scissorRectLocal){var n=r._scissorRect,i=r.maskObject,o=this.renderer,a=o.renderTexture;i.renderable=!0;var s=i.getBounds();this.roundFrameToPixels(s,a.current?a.current.resolution:o.resolution,a.sourceFrame,a.destinationFrame,o.projection.transform),i.renderable=!1,n&&s.fit(n),r._scissorRectLocal=s}},e.isMatrixRotated=function(r){if(!r)return!1;var n=r.a,i=r.b,o=r.c,a=r.d;return(Math.abs(i)>1e-4||Math.abs(o)>1e-4)&&(Math.abs(n)>1e-4||Math.abs(a)>1e-4)},e.prototype.testScissor=function(r){var n=r.maskObject;if(!n.isFastRect||!n.isFastRect()||e.isMatrixRotated(n.worldTransform)||e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);var i=r._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(r,n,i,o,a){e.isMatrixRotated(a)||(a=a?$m.copyFrom(a):$m.identity(),a.translate(-i.x,-i.y).scale(o.width/i.width,o.height/i.height).translate(o.x,o.y),this.renderer.filter.transformAABB(a,r),r.fit(o),r.x=Math.round(r.x*n),r.y=Math.round(r.y*n),r.width=Math.round(r.width*n),r.height=Math.round(r.height*n))},e.prototype.push=function(r){r._scissorRectLocal||this.calcScissorRect(r);var n=this.renderer.gl;r._scissorRect||n.enable(n.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(){var r=this.renderer.gl;this.getStackLength()>0?this._useCurrent():r.disable(r.SCISSOR_TEST)},e.prototype._useCurrent=function(){var r=this.maskStack[this.maskStack.length-1]._scissorRect,n;this.renderer.renderTexture.current?n=r.y:n=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,n,r.width,r.height)},e}(k1),P4=function(t){Fe(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._stencilCounter:0},e.prototype.push=function(r){var n=r.maskObject,i=this.renderer.gl,o=r._stencilCounter;o===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),r._stencilCounter++,i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.EQUAL,o,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;this.getStackLength()===0?n.disable(n.STENCIL_TEST):(n.colorMask(!1,!1,!1,!1),n.stencilOp(n.KEEP,n.KEEP,n.DECR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var r=this.renderer.gl;r.colorMask(!0,!0,!0,!0),r.stencilFunc(r.EQUAL,this.getStackLength(),4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)},e}(k1),S4=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new or,this.transform=null}return t.prototype.update=function(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);var o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(e,r,n,i){var o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d},t.prototype.setTransform=function(e){},t.prototype.destroy=function(){this.renderer=null},t}(),ao=new fe,za=new fe,A4=function(){function t(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new fe,this.destinationFrame=new fe,this.viewportFrame=new fe}return t.prototype.bind=function(e,r,n){e===void 0&&(e=null);var i=this.renderer;this.current=e;var o,a,s;e?(o=e.baseTexture,s=o.resolution,r||(ao.width=e.frame.width,ao.height=e.frame.height,r=ao),n||(za.x=e.frame.x,za.y=e.frame.y,za.width=r.width,za.height=r.height,n=za),a=o.framebuffer):(s=i.resolution,r||(ao.width=i.screen.width,ao.height=i.screen.height,r=ao),n||(n=ao,n.width=r.width,n.height=r.height));var l=this.viewportFrame;l.x=n.x*s,l.y=n.y*s,l.width=n.width*s,l.height=n.height*s,e||(l.y=i.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(n,r,s,!a),e?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)},t.prototype.clear=function(e,r){this.current?e=e||this.current.baseTexture.clearColor:e=e||this.clearColor;var n=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,o=n.width!==i.width||n.height!==i.height;if(o){var a=this.viewportFrame,s=a.x,l=a.y,u=a.width,c=a.height;s=Math.round(s),l=Math.round(l),u=Math.round(u),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,l,u,c)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],r),o&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function O4(t,e,r,n,i){r.buffer.update(i)}var U4={float:`
data[offset] = v;
`,vec2:`
data[offset] = v[0];
data[offset+1] = v[1];
`,vec3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
`,vec4:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset+3] = v[3];
`,mat2:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+4] = v[2];
data[offset+5] = v[3];
`,mat3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset + 4] = v[3];
data[offset + 5] = v[4];
data[offset + 6] = v[5];
data[offset + 8] = v[6];
data[offset + 9] = v[7];
data[offset + 10] = v[8];
`,mat4:`
for(var i = 0; i < 16; i++)
{
data[offset + i] = v[i];
}
`},G1={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:16*2,mat3:16*3,mat4:16*4};function F4(t){for(var e=t.map(function(l){return{data:l,offset:0,dataLen:0,dirty:0}}),r=0,n=0,i=0,o=0;o<e.length;o++){var a=e[o];if(r=G1[a.data.type],a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.dataLen=r,n%r!==0&&n<16){var s=n%r%16;n+=s,i+=s}n+r>16?(i=Math.ceil(i/16)*16,a.offset=i,i+=r,n=r):(a.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function L4(t,e){var r=[];for(var n in t)e[n]&&r.push(e[n]);return r.sort(function(i,o){return i.index-o.index}),r}function M4(t,e){if(!t.autoManage)return{size:0,syncFunc:O4};for(var r=L4(t.uniforms,e),n=F4(r),i=n.uboElements,o=n.size,a=[`
var v = null;
var v2 = null;
var cv = null;
var t = 0;
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`],s=0;s<i.length;s++){for(var l=i[s],u=t.uniforms[l.data.name],c=l.data.name,f=!1,h=0;h<ya.length;h++){var d=ya[h];if(d.codeUbo&&d.test(l.data,u)){a.push("offset = "+l.offset/4+";",ya[h].codeUbo(l.data.name,u)),f=!0;break}}if(!f)if(l.data.size>1){var p=M1(l.data.type),v=Math.max(G1[l.data.type]/16,1),m=p/v,y=(4-m%4)%4;a.push(`
cv = ud.`+c+`.value;
v = uv.`+c+`;
offset = `+l.offset/4+`;
t = 0;
for(var i=0; i < `+l.data.size*v+`; i++)
{
for(var j = 0; j < `+m+`; j++)
{
data[offset++] = v[t++];
}
offset += `+y+`;
}
`)}else{var g=U4[l.data.type];a.push(`
cv = ud.`+c+`.value;
v = uv.`+c+`;
offset = `+l.offset/4+`;
`+g+`;
`)}}return a.push(`
renderer.buffer.update(buffer);
`),{size:o,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
`))}}var B4=function(){function t(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function k4(t,e){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<n;i++){var o=e.getActiveAttrib(t,i);if(o.name.indexOf("gl_")!==0){var a=B1(e,o.type),s={type:a,name:o.name,size:M1(a),location:e.getAttribLocation(t,o.name)};r[o.name]=s}}return r}function G4(t,e){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<n;i++){var o=e.getActiveUniform(t,i),a=o.name.replace(/\[.*?\]$/,""),s=!!o.name.match(/\[.*?\]$/),l=B1(e,o.type);r[a]={name:a,index:i,type:l,size:o.size,isArray:s,value:F1(l,o.size)}}return r}function D4(t,e){var r=km(t,t.VERTEX_SHADER,e.vertexSrc),n=km(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();if(t.attachShader(i,r),t.attachShader(i,n),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||l4(t,i,r,n),e.attributeData=k4(i,t),e.uniformData=G4(i,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){var o=Object.keys(e.attributeData);o.sort(function(c,f){return c>f?1:-1});for(var a=0;a<o.length;a++)e.attributeData[o[a]].location=a,t.bindAttribLocation(i,a,o[a]);t.linkProgram(i)}t.deleteShader(r),t.deleteShader(n);var s={};for(var a in e.uniformData){var l=e.uniformData[a];s[a]={location:t.getUniformLocation(i,a),value:F1(l.type,l.size)}}var u=new B4(i,s);return u}var H4=0,$l={textureCount:0,uboCount:0},V4=function(){function t(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=H4++}return t.prototype.systemCheck=function(){if(!y4())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},t.prototype.contextChange=function(e){this.gl=e,this.reset()},t.prototype.bind=function(e,r){e.uniforms.globals=this.renderer.globalUniforms;var n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||($l.textureCount=0,$l.uboCount=0,this.syncUniformGroup(e.uniformGroup,$l)),i},t.prototype.setUniforms=function(e){var r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)},t.prototype.syncUniformGroup=function(e,r){var n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))},t.prototype.syncUniforms=function(e,r,n){var i=e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e);i(r.uniformData,e.uniforms,this.renderer,n)},t.prototype.createSyncGroups=function(e){var r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=p4(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]},t.prototype.syncUniformBufferGroup=function(e,r){var n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;var i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,$l,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])},t.prototype.createSyncBufferGroup=function(e,r,n){var i=this.renderer.gl;this.renderer.buffer.bind(e.buffer);var o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;var a=this.getSignature(e,this.shader.program.uniformData,"ubo"),s=this._uboCache[a];if(s||(s=this._uboCache[a]=M4(e,this.shader.program.uniformData)),e.autoManage){var l=new Float32Array(s.size/4);e.buffer.update(l)}return r.uniformGroups[e.id]=s.syncFunc,r.uniformGroups[e.id]},t.prototype.getSignature=function(e,r,n){var i=e.uniforms,o=[n+"-"];for(var a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")},t.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},t.prototype.generateProgram=function(e){var r=this.gl,n=e.program,i=D4(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i},t.prototype.reset=function(){this.program=null,this.shader=null},t.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},t}();function $4(t,e){return e===void 0&&(e=[]),e[Ut.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.ADD]=[t.ONE,t.ONE],e[Ut.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.NONE]=[0,0],e[Ut.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[Ut.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ut.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[Ut.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[Ut.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Ut.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[Ut.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[Ut.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[Ut.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[Ut.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Ut.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}var j4=0,X4=1,z4=2,W4=3,Y4=4,K4=5,Z4=function(){function t(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Ut.NONE,this._blendEq=!1,this.map=[],this.map[j4]=this.setBlend,this.map[X4]=this.setOffset,this.map[z4]=this.setCullFace,this.map[W4]=this.setDepthTest,this.map[Y4]=this.setFrontFace,this.map[K4]=this.setDepthMask,this.checks=[],this.defaultState=new Do,this.defaultState.blend=!0}return t.prototype.contextChange=function(e){this.gl=e,this.blendModes=$4(e),this.set(this.defaultState),this.reset()},t.prototype.set=function(e){if(e=e||this.defaultState,this.stateId!==e.data){for(var r=this.stateId^e.data,n=0;r;)r&1&&this.map[n].call(this,!!(e.data&1<<n)),r=r>>1,n++;this.stateId=e.data}for(var n=0;n<this.checks.length;n++)this.checks[n](this,e)},t.prototype.forceState=function(e){e=e||this.defaultState;for(var r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(var r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data},t.prototype.setBlend=function(e){this.updateCheck(t.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)},t.prototype.setOffset=function(e){this.updateCheck(t.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},t.prototype.setDepthTest=function(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)},t.prototype.setDepthMask=function(e){this.gl.depthMask(e)},t.prototype.setCullFace=function(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)},t.prototype.setFrontFace=function(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])},t.prototype.setBlendMode=function(e){if(e!==this.blendMode){this.blendMode=e;var r=this.blendModes[e],n=this.gl;r.length===2?n.blendFunc(r[0],r[1]):n.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,n.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,n.blendEquationSeparate(n.FUNC_ADD,n.FUNC_ADD))}},t.prototype.setPolygonOffset=function(e,r){this.gl.polygonOffset(e,r)},t.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},t.prototype.updateCheck=function(e,r){var n=this.checks.indexOf(e);r&&n===-1?this.checks.push(e):!r&&n!==-1&&this.checks.splice(n,1)},t.checkBlendMode=function(e,r){e.setBlendMode(r.blendMode)},t.checkPolygonOffset=function(e,r){e.setPolygonOffset(1,r.polygonOffset)},t.prototype.destroy=function(){this.gl=null},t}(),q4=function(){function t(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Ft.GC_MAX_IDLE,this.checkCountMax=Ft.GC_MAX_CHECK_COUNT,this.mode=Ft.GC_MODE}return t.prototype.postrender=function(){!this.renderer.renderingToScreen||(this.count++,this.mode!==wh.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var e=this.renderer.texture,r=e.managedTextures,n=!1,i=0;i<r.length;i++){var o=r[i];!o.framebuffer&&this.count-o.touched>this.maxIdle&&(e.destroyTexture(o,!0),r[i]=null,n=!0)}if(n){for(var a=0,i=0;i<r.length;i++)r[i]!==null&&(r[a++]=r[i]);r.length=a}},t.prototype.unload=function(e){var r=this.renderer.texture,n=e._texture;n&&!n.framebuffer&&r.destroyTexture(n);for(var i=e.children.length-1;i>=0;i--)this.unload(e.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();function J4(t){var e,r,n,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,T,w,x,R;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?R=(e={},e[Mt.UNSIGNED_BYTE]=(r={},r[pt.RGBA]=t.RGBA8,r[pt.RGB]=t.RGB8,r[pt.RG]=t.RG8,r[pt.RED]=t.R8,r[pt.RGBA_INTEGER]=t.RGBA8UI,r[pt.RGB_INTEGER]=t.RGB8UI,r[pt.RG_INTEGER]=t.RG8UI,r[pt.RED_INTEGER]=t.R8UI,r[pt.ALPHA]=t.ALPHA,r[pt.LUMINANCE]=t.LUMINANCE,r[pt.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[Mt.BYTE]=(n={},n[pt.RGBA]=t.RGBA8_SNORM,n[pt.RGB]=t.RGB8_SNORM,n[pt.RG]=t.RG8_SNORM,n[pt.RED]=t.R8_SNORM,n[pt.RGBA_INTEGER]=t.RGBA8I,n[pt.RGB_INTEGER]=t.RGB8I,n[pt.RG_INTEGER]=t.RG8I,n[pt.RED_INTEGER]=t.R8I,n),e[Mt.UNSIGNED_SHORT]=(i={},i[pt.RGBA_INTEGER]=t.RGBA16UI,i[pt.RGB_INTEGER]=t.RGB16UI,i[pt.RG_INTEGER]=t.RG16UI,i[pt.RED_INTEGER]=t.R16UI,i[pt.DEPTH_COMPONENT]=t.DEPTH_COMPONENT16,i),e[Mt.SHORT]=(o={},o[pt.RGBA_INTEGER]=t.RGBA16I,o[pt.RGB_INTEGER]=t.RGB16I,o[pt.RG_INTEGER]=t.RG16I,o[pt.RED_INTEGER]=t.R16I,o),e[Mt.UNSIGNED_INT]=(a={},a[pt.RGBA_INTEGER]=t.RGBA32UI,a[pt.RGB_INTEGER]=t.RGB32UI,a[pt.RG_INTEGER]=t.RG32UI,a[pt.RED_INTEGER]=t.R32UI,a[pt.DEPTH_COMPONENT]=t.DEPTH_COMPONENT24,a),e[Mt.INT]=(s={},s[pt.RGBA_INTEGER]=t.RGBA32I,s[pt.RGB_INTEGER]=t.RGB32I,s[pt.RG_INTEGER]=t.RG32I,s[pt.RED_INTEGER]=t.R32I,s),e[Mt.FLOAT]=(l={},l[pt.RGBA]=t.RGBA32F,l[pt.RGB]=t.RGB32F,l[pt.RG]=t.RG32F,l[pt.RED]=t.R32F,l[pt.DEPTH_COMPONENT]=t.DEPTH_COMPONENT32F,l),e[Mt.HALF_FLOAT]=(u={},u[pt.RGBA]=t.RGBA16F,u[pt.RGB]=t.RGB16F,u[pt.RG]=t.RG16F,u[pt.RED]=t.R16F,u),e[Mt.UNSIGNED_SHORT_5_6_5]=(c={},c[pt.RGB]=t.RGB565,c),e[Mt.UNSIGNED_SHORT_4_4_4_4]=(f={},f[pt.RGBA]=t.RGBA4,f),e[Mt.UNSIGNED_SHORT_5_5_5_1]=(h={},h[pt.RGBA]=t.RGB5_A1,h),e[Mt.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[pt.RGBA]=t.RGB10_A2,d[pt.RGBA_INTEGER]=t.RGB10_A2UI,d),e[Mt.UNSIGNED_INT_10F_11F_11F_REV]=(p={},p[pt.RGB]=t.R11F_G11F_B10F,p),e[Mt.UNSIGNED_INT_5_9_9_9_REV]=(v={},v[pt.RGB]=t.RGB9_E5,v),e[Mt.UNSIGNED_INT_24_8]=(m={},m[pt.DEPTH_STENCIL]=t.DEPTH24_STENCIL8,m),e[Mt.FLOAT_32_UNSIGNED_INT_24_8_REV]=(y={},y[pt.DEPTH_STENCIL]=t.DEPTH32F_STENCIL8,y),e):R=(g={},g[Mt.UNSIGNED_BYTE]=(b={},b[pt.RGBA]=t.RGBA,b[pt.RGB]=t.RGB,b[pt.ALPHA]=t.ALPHA,b[pt.LUMINANCE]=t.LUMINANCE,b[pt.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,b),g[Mt.UNSIGNED_SHORT_5_6_5]=(T={},T[pt.RGB]=t.RGB,T),g[Mt.UNSIGNED_SHORT_4_4_4_4]=(w={},w[pt.RGBA]=t.RGBA,w),g[Mt.UNSIGNED_SHORT_5_5_5_1]=(x={},x[pt.RGBA]=t.RGBA,x),g),R}var hf=function(){function t(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Mt.UNSIGNED_BYTE,this.internalFormat=pt.RGBA,this.samplerType=0}return t}(),Q4=function(){function t(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new ge,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=J4(e);var r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(var n=0;n<r;n++)this.boundTextures[n]=null;this.emptyTextures={};var i=new hf(e.createTexture());e.bindTexture(e.TEXTURE_2D,i.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=i,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new hf(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(var n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(var n=0;n<this.boundTextures.length;n++)this.bind(null,n)},t.prototype.bind=function(e,r){r===void 0&&(r=0);var n=this.gl;if(e=e==null?void 0:e.castToBaseTexture(),e&&e.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;var i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null},t.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture},t.prototype.unbind=function(e){var r=this,n=r.gl,i=r.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var o=0;o<i.length;o++)i[o]===this.unknownTexture&&this.bind(null,o)}for(var o=0;o<i.length;o++)i[o]===e&&(this.currentLocation!==o&&(n.activeTexture(n.TEXTURE0+o),this.currentLocation=o),n.bindTexture(e.target,this.emptyTextures[e.target].texture),i[o]=null)},t.prototype.ensureSamplerType=function(e){var r=this,n=r.boundTextures,i=r.hasIntegerTextures,o=r.CONTEXT_UID;if(!!i)for(var a=e-1;a>=0;--a){var s=n[a];if(s){var l=s._glTextures[o];l.samplerType!==Vu.FLOAT&&this.renderer.texture.unbind(s)}}},t.prototype.initTexture=function(e){var r=new hf(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r},t.prototype.initTextureType=function(e,r){var n,i;r.internalFormat=(i=(n=this.internalFormats[e.type])===null||n===void 0?void 0:n[e.format])!==null&&i!==void 0?i:e.format,this.webGLVersion===2&&e.type===Mt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type},t.prototype.updateTexture=function(e){var r=e._glTextures[this.CONTEXT_UID];if(!!r){var n=this.renderer;if(this.initTextureType(e,r),e.resource&&e.resource.upload(n,e,r))r.samplerType!==Vu.FLOAT&&(this.hasIntegerTextures=!0);else{var i=e.realWidth,o=e.realHeight,a=n.gl;(r.width!==i||r.height!==o||r.dirtyId<0)&&(r.width=i,r.height=o,a.texImage2D(e.target,0,r.internalFormat,i,o,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}},t.prototype.destroyTexture=function(e,r){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){var i=this.managedTextures.indexOf(e);i!==-1&&ui(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(e){var r=e._glTextures[this.CONTEXT_UID];!r||((e.mipmap===pi.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=li.CLAMP:r.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},t.prototype.setStyle=function(e,r){var n=this.gl;if(r.mipmap&&e.mipmap!==pi.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ii.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===ii.LINEAR){var o=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ii.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===ii.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),df=new or,tU=function(t){Fe(e,t);function e(r,n){r===void 0&&(r=Ls.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},Ft.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new fe(0,0,n.width,n.height),i.view=n.view||document.createElement("canvas"),i.resolution=n.resolution||Ft.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(Ds("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return e.prototype.initPlugins=function(r){for(var n in r)this.plugins[n]=new r[n](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n){this.view.width=Math.round(r*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,o=this.view.height/this.resolution;this.screen.width=i,this.screen.height=o,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=o+"px"),this.emit("resize",i,o)},e.prototype.generateTexture=function(r,n,i,o){n===void 0&&(n={}),typeof n=="number"&&(Ds("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:o});var a=n.region,s=B3(n,["region"]);o=a||r.getLocalBounds(null,!0),o.width===0&&(o.width=1),o.height===0&&(o.height=1);var l=Uo.create(Fh({width:o.width,height:o.height},s));return df.tx=-o.x,df.ty=-o.y,this.render(r,{renderTexture:l,clear:!1,transform:df,skipUpdateTransform:!!r.parent}),l},e.prototype.destroy=function(r){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;r&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=Ls.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(r){this._backgroundColor=r,this._backgroundColorString=y1(r),Na(r,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(r){this._backgroundColorRgba[3]=r},enumerable:!1,configurable:!0}),e}(Fa),eU=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),rU=function(){function t(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,o=e._glBuffers[i]||this.createGLBuffer(e);n.bindBuffer(e.type,o.buffer)},t.prototype.bindBufferBase=function(e,r){var n=this,i=n.gl,o=n.CONTEXT_UID;if(this.boundBufferBases[r]!==e){var a=e._glBuffers[o]||this.createGLBuffer(e);this.boundBufferBases[r]=e,i.bindBufferBase(i.UNIFORM_BUFFER,r,a.buffer)}},t.prototype.bindBufferRange=function(e,r,n){var i=this,o=i.gl,a=i.CONTEXT_UID;n=n||0;var s=e._glBuffers[a]||this.createGLBuffer(e);o.bindBufferRange(o.UNIFORM_BUFFER,r||0,s.buffer,n*256,256)},t.prototype.update=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,o=e._glBuffers[i];if(e._updateID!==o.updateID)if(o.updateID=e._updateID,n.bindBuffer(e.type,o.buffer),o.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;o.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},t.prototype.dispose=function(e,r){if(!!this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(e){for(var r=Object.keys(this.managedBuffers),n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)},t.prototype.createGLBuffer=function(e){var r=this,n=r.CONTEXT_UID,i=r.gl;return e._glBuffers[n]=new eU(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[n]},t}(),qi=function(t){Fe(e,t);function e(r){var n=t.call(this,Ls.WEBGL,r)||this;return r=n.options,n.gl=null,n.CONTEXT_UID=0,n.runners={destroy:new wr("destroy"),contextChange:new wr("contextChange"),reset:new wr("reset"),update:new wr("update"),postrender:new wr("postrender"),prerender:new wr("prerender"),resize:new wr("resize")},n.runners.contextChange.add(n),n.globalUniforms=new Po({projectionMatrix:new or},!0),n.addSystem(R4,"mask").addSystem(r4,"context").addSystem(Z4,"state").addSystem(V4,"shader").addSystem(Q4,"texture").addSystem(rU,"buffer").addSystem(a4,"geometry").addSystem(o4,"framebuffer").addSystem(N4,"scissor").addSystem(P4,"stencil").addSystem(S4,"projection").addSystem(q4,"textureGC").addSystem(t4,"filter").addSystem(A4,"renderTexture").addSystem(e4,"batch"),n.initPlugins(e.__plugins),n.multisample=void 0,r.context?n.context.initFromContext(r.context):n.context.initFromOptions({alpha:!!n.useContextAlpha,antialias:r.antialias,premultipliedAlpha:n.useContextAlpha&&n.useContextAlpha!=="notMultiplied",stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:n.options.powerPreference}),n.renderingToScreen=!0,BS(n.context.webGLVersion===2?"WebGL 2":"WebGL 1"),n.resize(n.options.width,n.options.height),n}return e.create=function(r){if(kS())return new e(r);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.contextChange=function(){var r=this.gl,n;if(this.context.webGLVersion===1){var i=r.getParameter(r.FRAMEBUFFER_BINDING);r.bindFramebuffer(r.FRAMEBUFFER,null),n=r.getParameter(r.SAMPLES),r.bindFramebuffer(r.FRAMEBUFFER,i)}else{var i=r.getParameter(r.DRAW_FRAMEBUFFER_BINDING);r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),n=r.getParameter(r.SAMPLES),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,i)}n>=ur.HIGH?this.multisample=ur.HIGH:n>=ur.MEDIUM?this.multisample=ur.MEDIUM:n>=ur.LOW?this.multisample=ur.LOW:this.multisample=ur.NONE},e.prototype.addSystem=function(r,n){var i=new r(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var o in this.runners)this.runners[o].add(i);return this},e.prototype.render=function(r,n){var i,o,a,s;if(n&&(n instanceof Uo?(Ds("6.0.0","Renderer#render arguments changed, use options instead."),i=n,o=arguments[2],a=arguments[3],s=arguments[4]):(i=n.renderTexture,o=n.clear,a=n.transform,s=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=a,!this.context.isLost){if(i||(this._lastObjectRendered=r),!s){var l=r.enableTempParent();r.updateTransform(),r.disableTempParent(l)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(o!==void 0?o:this.clearBeforeRender)&&this.renderTexture.clear(),r.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(r,n,i,o){n===void 0&&(n={});var a=t.prototype.generateTexture.call(this,r,n,i,o);return this.framebuffer.blit(),a},e.prototype.resize=function(r,n){t.prototype.resize.call(this,r,n),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(r){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,r),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return Ds("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(r,n){e.__plugins=e.__plugins||{},e.__plugins[r]=n},e}(tU);function nU(t){return qi.create(t)}var iU=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,oU=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`,aU=iU,D1=oU,Mh=function(){function t(){this.texArray=null,this.blend=0,this.type=_n.TRIANGLES,this.start=0,this.size=0,this.data=null}return t}(),Bh=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var e=0;e<this.count;e++)this.elements[e]=null;this.count=0},t}(),kh=function(){function t(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(t.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),t.prototype.view=function(e){return this[e+"View"]},t.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},t.sizeOf=function(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(e+" isn't a valid view type")}},t}(),sU=function(t){Fe(e,t);function e(r){var n=t.call(this,r)||this;return n.shaderGenerator=null,n.geometryClass=null,n.vertexSize=null,n.state=Do.for2d(),n.size=Ft.SPRITE_BATCH_SIZE*4,n._vertexCount=0,n._indexCount=0,n._bufferedElements=[],n._bufferedTextures=[],n._bufferSize=0,n._shader=null,n._packedGeometries=[],n._packedGeometryPoolSize=2,n._flushId=0,n._aBuffers={},n._iBuffers={},n.MAX_TEXTURES=1,n.renderer.on("prerender",n.onPrerender,n),r.runners.contextChange.add(n),n._dcIndex=0,n._aIndex=0,n._iIndex=0,n._attributeBuffer=null,n._indexBuffer=null,n._tempBoundTextures=[],n}return e.prototype.contextChange=function(){var r=this.renderer.gl;Ft.PREFER_ENV===di.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),Ft.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=g4(this.MAX_TEXTURES,r)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var n=0;n<this._packedGeometryPoolSize;n++)this._packedGeometries[n]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){for(var r=e._drawCallPool,n=e._textureArrayPool,i=this.size/4,o=Math.floor(i/this.MAX_TEXTURES)+1;r.length<i;)r.push(new Mh);for(;n.length<o;)n.push(new Bh);for(var a=0;a<this.MAX_TEXTURES;a++)this._tempBoundTextures[a]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(r){!r._texture.valid||(this._vertexCount+r.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)},e.prototype.buildTexturesAndDrawCalls=function(){var r=this,n=r._bufferedTextures,i=r.MAX_TEXTURES,o=e._textureArrayPool,a=this.renderer.batch,s=this._tempBoundTextures,l=this.renderer.textureGC.count,u=++ge._globalBatch,c=0,f=o[0],h=0;a.copyBoundTextures(s,i);for(var d=0;d<this._bufferSize;++d){var p=n[d];n[d]=null,p._batchEnabled!==u&&(f.count>=i&&(a.boundArray(f,s,u,i),this.buildDrawCalls(f,h,d),h=d,f=o[++c],++u),p._batchEnabled=u,p.touched=l,f.elements[f.count++]=p)}f.count>0&&(a.boundArray(f,s,u,i),this.buildDrawCalls(f,h,this._bufferSize),++c,++u);for(var d=0;d<s.length;d++)s[d]=null;ge._globalBatch=u},e.prototype.buildDrawCalls=function(r,n,i){var o=this,a=o._bufferedElements,s=o._attributeBuffer,l=o._indexBuffer,u=o.vertexSize,c=e._drawCallPool,f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=c[f];p.start=this._iIndex,p.texArray=r;for(var v=n;v<i;++v){var m=a[v],y=m._texture.baseTexture,g=_1[y.alphaMode?1:0][m.blendMode];a[v]=null,n<v&&p.blend!==g&&(p.size=d-p.start,n=v,p=c[++f],p.texArray=r,p.start=d),this.packInterleavedGeometry(m,s,l,h,d),h+=m.vertexData.length/2*u,d+=m.indices.length,p.blend=g}n<i&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d},e.prototype.bindAndClearTexArray=function(r){for(var n=this.renderer.texture,i=0;i<r.count;i++)n.bind(r.elements[i],r.ids[i]),r.elements[i]=null;r.count=0},e.prototype.updateGeometry=function(){var r=this,n=r._packedGeometries,i=r._attributeBuffer,o=r._indexBuffer;Ft.CAN_UPLOAD_SAME_BUFFER?(n[this._flushId]._buffer.update(i.rawBinaryData),n[this._flushId]._indexBuffer.update(o),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,n[this._flushId]=new this.geometryClass),n[this._flushId]._buffer.update(i.rawBinaryData),n[this._flushId]._indexBuffer.update(o),this.renderer.geometry.bind(n[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var r=this._dcIndex,n=this.renderer,i=n.gl,o=n.state,a=e._drawCallPool,s=null,l=0;l<r;l++){var u=a[l],c=u.texArray,f=u.type,h=u.size,d=u.start,p=u.blend;s!==c&&(s=c,this.bindAndClearTexArray(c)),this.state.blendMode=p,o.set(this.state),i.drawElements(f,h,i.UNSIGNED_SHORT,d*2)}},e.prototype.flush=function(){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)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),Ft.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var r=0;r<this._packedGeometryPoolSize;r++)this._packedGeometries[r]&&this._packedGeometries[r].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(r){var n=$u(Math.ceil(r/8)),i=Sm(n),o=n*8;this._aBuffers.length<=i&&(this._iBuffers.length=i+1);var a=this._aBuffers[o];return a||(this._aBuffers[o]=a=new kh(o*this.vertexSize*4)),a},e.prototype.getIndexBuffer=function(r){var n=$u(Math.ceil(r/12)),i=Sm(n),o=n*12;this._iBuffers.length<=i&&(this._iBuffers.length=i+1);var a=this._iBuffers[i];return a||(this._iBuffers[i]=a=new Uint16Array(o)),a},e.prototype.packInterleavedGeometry=function(r,n,i,o,a){for(var s=n.uint32View,l=n.float32View,u=o/this.vertexSize,c=r.uvs,f=r.indices,h=r.vertexData,d=r._texture.baseTexture._batchLocation,p=Math.min(r.worldAlpha,1),v=p<1&&r._texture.baseTexture.alphaMode?dp(r._tintRGB,p):r._tintRGB+(p*255<<24),m=0;m<h.length;m+=2)l[o++]=h[m],l[o++]=h[m+1],l[o++]=c[m],l[o++]=c[m+1],s[o++]=v,l[o++]=d;for(var m=0;m<f.length;m++)i[a++]=u+f[m]},e._drawCallPool=[],e._textureArrayPool=[],e}(Tc),lU=function(){function t(e,r){if(this.vertexSrc=e,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},r.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(r.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return t.prototype.generateShader=function(e){if(!this.programCache[e]){for(var r=new Int32Array(e),n=0;n<e;n++)r[n]=n;this.defaultGroupCache[e]=Po.from({uSamplers:r},!0);var i=this.fragTemplate;i=i.replace(/%count%/gi,""+e),i=i.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new fl(this.vertexSrc,i)}var o={tint:new Float32Array([1,1,1,1]),translationMatrix:new or,default:this.defaultGroupCache[e]};return new Di(this.programCache[e],o)},t.prototype.generateSampleSrc=function(e){var r="";r+=`
`,r+=`
`;for(var n=0;n<e;n++)n>0&&(r+=`
else `),n<e-1&&(r+="if(vTextureId < "+n+".5)"),r+=`
{`,r+=`
color = texture2D(uSamplers[`+n+"], vTextureCoord);",r+=`
}`;return r+=`
`,r+=`
`,r},t}(),H1=function(t){Fe(e,t);function e(r){r===void 0&&(r=!1);var n=t.call(this)||this;return n._buffer=new hr(null,r,!1),n._indexBuffer=new hr(null,r,!0),n.addAttribute("aVertexPosition",n._buffer,2,!1,Mt.FLOAT).addAttribute("aTextureCoord",n._buffer,2,!1,Mt.FLOAT).addAttribute("aColor",n._buffer,4,!0,Mt.UNSIGNED_BYTE).addAttribute("aTextureId",n._buffer,1,!0,Mt.FLOAT).addIndex(n._indexBuffer),n}return e}(cl),jm=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute float aTextureId;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform vec4 tint;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
void main(void){
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vTextureId = aTextureId;
vColor = aColor * tint;
}
`,Xm=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`,uU=function(){function t(){}return t.create=function(e){var r=Object.assign({vertex:jm,fragment:Xm,geometryClass:H1,vertexSize:6},e),n=r.vertex,i=r.fragment,o=r.vertexSize,a=r.geometryClass;return function(s){Fe(l,s);function l(u){var c=s.call(this,u)||this;return c.shaderGenerator=new lU(n,i),c.geometryClass=a,c.vertexSize=o,c}return l}(sU)},Object.defineProperty(t,"defaultVertexSrc",{get:function(){return jm},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentTemplate",{get:function(){return Xm},enumerable:!1,configurable:!0}),t}(),cU=uU.create();/*!
* @pixi/display - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/display is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/Ft.SORTABLE_CHILDREN=!1;var Vs=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?fe.EMPTY:(e=e||new fe(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},t.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},t.prototype.addPointMatrix=function(e,r){var n=e.a,i=e.b,o=e.c,a=e.d,s=e.tx,l=e.ty,u=n*r.x+o*r.y+s,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},t.prototype.addQuad=function(e){var r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=e[0],s=e[1];r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[2],s=e[3],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[4],s=e[5],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[6],s=e[7],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o},t.prototype.addFrame=function(e,r,n,i,o){this.addFrameMatrix(e.worldTransform,r,n,i,o)},t.prototype.addFrameMatrix=function(e,r,n,i,o){var a=e.a,s=e.b,l=e.c,u=e.d,c=e.tx,f=e.ty,h=this.minX,d=this.minY,p=this.maxX,v=this.maxY,m=a*r+l*n+c,y=s*r+u*n+f;h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*i+l*n+c,y=s*i+u*n+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*r+l*o+c,y=s*r+u*o+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*i+l*o+c,y=s*i+u*o+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,this.minX=h,this.minY=d,this.maxX=p,this.maxY=v},t.prototype.addVertexData=function(e,r,n){for(var i=this.minX,o=this.minY,a=this.maxX,s=this.maxY,l=r;l<n;l+=2){var u=e[l],c=e[l+1];i=u<i?u:i,o=c<o?c:o,a=u>a?u:a,s=c>s?c:s}this.minX=i,this.minY=o,this.maxX=a,this.maxY=s},t.prototype.addVertices=function(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)},t.prototype.addVerticesMatrix=function(e,r,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=o);for(var s=e.a,l=e.b,u=e.c,c=e.d,f=e.tx,h=e.ty,d=this.minX,p=this.minY,v=this.maxX,m=this.maxY,y=n;y<i;y+=2){var g=r[y],b=r[y+1],T=s*g+u*b+f,w=c*b+l*g+h;d=Math.min(d,T-o),v=Math.max(v,T+o),p=Math.min(p,w-a),m=Math.max(m,w+a)}this.minX=d,this.minY=p,this.maxX=v,this.maxY=m},t.prototype.addBounds=function(e){var r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>o?e.maxY:o},t.prototype.addBoundsMask=function(e,r){var n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,o=e.maxX<r.maxX?e.maxX:r.maxX,a=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=o&&i<=a){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=n<s?n:s,this.minY=i<l?i:l,this.maxX=o>u?o:u,this.maxY=a>c?a:c}},t.prototype.addBoundsMatrix=function(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)},t.prototype.addBoundsArea=function(e,r){var n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,o=e.maxX<r.x+r.width?e.maxX:r.x+r.width,a=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=o&&i<=a){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=n<s?n:s,this.minY=i<l?i:l,this.maxX=o>u?o:u,this.maxY=a>c?a:c}},t.prototype.pad=function(e,r){e===void 0&&(e=0),r===void 0&&(r=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)},t.prototype.addFramePad=function(e,r,n,i,o,a){e-=o,r-=a,n+=o,i+=a,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i},t}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Gh=function(t,e){return Gh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Gh(t,e)};function mp(t,e){Gh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ar=function(t){mp(e,t);function e(){var r=t.call(this)||this;return r.tempDisplayObjectParent=null,r.transform=new pp,r.alpha=1,r.visible=!0,r.renderable=!0,r.cullable=!1,r.cullArea=null,r.parent=null,r.worldAlpha=1,r._lastSortedIndex=0,r._zIndex=0,r.filterArea=null,r.filters=null,r._enabledFilters=null,r._bounds=new Vs,r._localBounds=null,r._boundsID=0,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._maskRefCount=0,r._destroyed=!1,r.isSprite=!1,r.isMask=!1,r}return e.mixin=function(r){for(var n=Object.keys(r),i=0;i<n.length;++i){var o=n[i];Object.defineProperty(e.prototype,o,Object.getOwnPropertyDescriptor(r,o))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(r,n){return r||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),n||(this._boundsRect||(this._boundsRect=new fe),n=this._boundsRect),this._bounds.getRectangle(n)},e.prototype.getLocalBounds=function(r){r||(this._localBoundsRect||(this._localBoundsRect=new fe),r=this._localBoundsRect),this._localBounds||(this._localBounds=new Vs);var n=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var o=this._bounds,a=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,r);return this.parent=i,this.transform=n,this._bounds=o,this._bounds.updateID+=this._boundsID-a,s},e.prototype.toGlobal=function(r,n,i){return i===void 0&&(i=!1),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(r,n)},e.prototype.toLocal=function(r,n,i,o){return n&&(r=n.toGlobal(r,i,o)),o||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(r,i)},e.prototype.setParent=function(r){if(!r||!r.addChild)throw new Error("setParent: Argument must be a Container");return r.addChild(this),r},e.prototype.setTransform=function(r,n,i,o,a,s,l,u,c){return r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=1),a===void 0&&(a=0),s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0),this.position.x=r,this.position.y=n,this.scale.x=i||1,this.scale.y=o||1,this.rotation=a,this.skew.x=s,this.skew.y=l,this.pivot.x=u,this.pivot.y=c,this},e.prototype.destroy=function(r){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new V1),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var r=this.parent;return this.parent=this._tempDisplayObjectParent,r},e.prototype.disableTempParent=function(r){this.parent=r},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(r){this.transform.position.x=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(r){this.transform.position.y=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(r){this.transform.position.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(r){this.transform.scale.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(r){this.transform.pivot.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(r){this.transform.skew.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(r){this.transform.rotation=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*E1},set:function(r){this.transform.rotation=r*I1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(r){this._zIndex=r,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var r=this;do{if(!r.visible)return!1;r=r.parent}while(r);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(r){if(this._mask!==r){if(this._mask){var n=this._mask.maskObject||this._mask;n._maskRefCount--,n._maskRefCount===0&&(n.renderable=!0,n.isMask=!1)}if(this._mask=r,this._mask){var n=this._mask.maskObject||this._mask;n._maskRefCount===0&&(n.renderable=!1,n.isMask=!0),n._maskRefCount++}}},enumerable:!1,configurable:!0}),e}(Fa),V1=function(t){mp(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.sortDirty=null,r}return e}(ar);ar.prototype.displayObjectUpdateTransform=ar.prototype.updateTransform;/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var zm;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(zm||(zm={}));var Wm;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(Wm||(Wm={}));var Ym;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(Ym||(Ym={}));var Km;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(Km||(Km={}));var Zm;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Zm||(Zm={}));var qm;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(qm||(qm={}));var Jm;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Jm||(Jm={}));var Qm;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(Qm||(Qm={}));var tg;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(tg||(tg={}));var eg;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(eg||(eg={}));var rg;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(rg||(rg={}));var ng;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(ng||(ng={}));var ig;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(ig||(ig={}));var og;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(og||(og={}));var ag;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(ag||(ag={}));var sg;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(sg||(sg={}));var Dh;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(Dh||(Dh={}));var lg;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(lg||(lg={}));var ug;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(ug||(ug={}));function fU(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}var jn=function(t){mp(e,t);function e(){var r=t.call(this)||this;return r.children=[],r.sortableChildren=Ft.SORTABLE_CHILDREN,r.sortDirty=!1,r}return e.prototype.onChildrenChange=function(r){},e.prototype.addChild=function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];if(n.length>1)for(var o=0;o<n.length;o++)this.addChild(n[o]);else{var a=n[0];a.parent&&a.parent.removeChild(a),a.parent=this,this.sortDirty=!0,a.transform._parentID=-1,this.children.push(a),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",a,this,this.children.length-1),a.emit("added",this)}return n[0]},e.prototype.addChildAt=function(r,n){if(n<0||n>this.children.length)throw new Error(r+"addChildAt: The index "+n+" supplied is out of bounds "+this.children.length);return r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.splice(n,0,r),this._boundsID++,this.onChildrenChange(n),r.emit("added",this),this.emit("childAdded",r,this,n),r},e.prototype.swapChildren=function(r,n){if(r!==n){var i=this.getChildIndex(r),o=this.getChildIndex(n);this.children[i]=n,this.children[o]=r,this.onChildrenChange(i<o?i:o)}},e.prototype.getChildIndex=function(r){var n=this.children.indexOf(r);if(n===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return n},e.prototype.setChildIndex=function(r,n){if(n<0||n>=this.children.length)throw new Error("The index "+n+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(r);ui(this.children,i,1),this.children.splice(n,0,r),this.onChildrenChange(n)},e.prototype.getChildAt=function(r){if(r<0||r>=this.children.length)throw new Error("getChildAt: Index ("+r+") does not exist.");return this.children[r]},e.prototype.removeChild=function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];if(n.length>1)for(var o=0;o<n.length;o++)this.removeChild(n[o]);else{var a=n[0],s=this.children.indexOf(a);if(s===-1)return null;a.parent=null,a.transform._parentID=-1,ui(this.children,s,1),this._boundsID++,this.onChildrenChange(s),a.emit("removed",this),this.emit("childRemoved",a,this,s)}return n[0]},e.prototype.removeChildAt=function(r){var n=this.getChildAt(r);return n.parent=null,n.transform._parentID=-1,ui(this.children,r,1),this._boundsID++,this.onChildrenChange(r),n.emit("removed",this),this.emit("childRemoved",n,this,r),n},e.prototype.removeChildren=function(r,n){r===void 0&&(r=0),n===void 0&&(n=this.children.length);var i=r,o=n,a=o-i,s;if(a>0&&a<=o){s=this.children.splice(i,a);for(var l=0;l<s.length;++l)s[l].parent=null,s[l].transform&&(s[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(r);for(var l=0;l<s.length;++l)s[l].emit("removed",this),this.emit("childRemoved",s[l],this,l);return s}else if(a===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var r=!1,n=0,i=this.children.length;n<i;++n){var o=this.children[n];o._lastSortedIndex=n,!r&&o.zIndex!==0&&(r=!0)}r&&this.children.length>1&&this.children.sort(fU),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var r=0,n=this.children.length;r<n;++r){var i=this.children[r];i.visible&&i.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var r=0;r<this.children.length;r++){var n=this.children[r];if(!(!n.visible||!n.renderable))if(n.calculateBounds(),n._mask){var i=n._mask.maskObject||n._mask;i.calculateBounds(),this._bounds.addBoundsMask(n._bounds,i._bounds)}else n.filterArea?this._bounds.addBoundsArea(n._bounds,n.filterArea):this._bounds.addBounds(n._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(r,n){n===void 0&&(n=!1);var i=t.prototype.getLocalBounds.call(this,r);if(!n)for(var o=0,a=this.children.length;o<a;++o){var s=this.children[o];s.visible&&s.updateTransform()}return i},e.prototype._calculateBounds=function(){},e.prototype._renderWithCulling=function(r){var n=r.renderTexture.sourceFrame;if(n.width>0&&n.height>0){var i,o;if(this.cullArea?(i=this.cullArea,o=this.worldTransform):this._render!==e.prototype._render&&(i=this.getBounds(!0)),i&&n.intersects(i,o))this._render(r);else if(this.cullArea)return;for(var a=0,s=this.children.length;a<s;++a){var l=this.children[a],u=l.cullable;l.cullable=u||!this.cullArea,l.render(r),l.cullable=u}}},e.prototype.render=function(r){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(r);else if(this.cullable)this._renderWithCulling(r);else{this._render(r);for(var n=0,i=this.children.length;n<i;++n)this.children[n].render(r)}},e.prototype.renderAdvanced=function(r){var n=this.filters,i=this._mask;if(n){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var o=0;o<n.length;o++)n[o].enabled&&this._enabledFilters.push(n[o])}var a=n&&this._enabledFilters&&this._enabledFilters.length||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==Dh.NONE));if(a&&r.batch.flush(),n&&this._enabledFilters&&this._enabledFilters.length&&r.filter.push(this,this._enabledFilters),i&&r.mask.push(this,this._mask),this.cullable)this._renderWithCulling(r);else{this._render(r);for(var o=0,s=this.children.length;o<s;++o)this.children[o].render(r)}a&&r.batch.flush(),i&&r.mask.pop(this),n&&this._enabledFilters&&this._enabledFilters.length&&r.filter.pop()},e.prototype._render=function(r){},e.prototype.destroy=function(r){t.prototype.destroy.call(this),this.sortDirty=!1;var n=typeof r=="boolean"?r:r&&r.children,i=this.removeChildren(0,this.children.length);if(n)for(var o=0;o<i.length;++o)i[o].destroy(r)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(r){var n=this.getLocalBounds().width;n!==0?this.scale.x=r/n:this.scale.x=1,this._width=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(r){var n=this.getLocalBounds().height;n!==0?this.scale.y=r/n:this.scale.y=1,this._height=r},enumerable:!1,configurable:!0}),e}(ar);jn.prototype.containerUpdateTransform=jn.prototype.updateTransform;/*!
* @pixi/sprite - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/sprite is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Hh=function(t,e){return Hh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Hh(t,e)};function hU(t,e){Hh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Wa=new _e,dU=new Uint16Array([0,1,2,0,2,3]),La=function(t){hU(e,t);function e(r){var n=t.call(this)||this;return n._anchor=new ua(n._onAnchorUpdate,n,r?r.defaultAnchor.x:0,r?r.defaultAnchor.y:0),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=Ut.NORMAL,n._cachedTint=16777215,n.uvs=null,n.texture=r||Wt.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.indices=dU,n.pluginName="batch",n.isSprite=!0,n._roundPixels=Ft.ROUND_PIXELS,n}return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=la(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=la(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var r=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===r._updateID)){this._textureID!==r._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=r._updateID;var n=this.transform.worldTransform,i=n.a,o=n.b,a=n.c,s=n.d,l=n.tx,u=n.ty,c=this.vertexData,f=r.trim,h=r.orig,d=this._anchor,p=0,v=0,m=0,y=0;if(f?(v=f.x-d._x*h.width,p=v+f.width,y=f.y-d._y*h.height,m=y+f.height):(v=-d._x*h.width,p=v+h.width,y=-d._y*h.height,m=y+h.height),c[0]=i*v+a*y+l,c[1]=s*y+o*v+u,c[2]=i*p+a*y+l,c[3]=s*y+o*p+u,c[4]=i*p+a*m+l,c[5]=s*m+o*p+u,c[6]=i*v+a*m+l,c[7]=s*m+o*v+u,this._roundPixels)for(var g=Ft.RESOLUTION,b=0;b<c.length;++b)c[b]=Math.round((c[b]*g|0)/g)}},e.prototype.calculateTrimmedVertices=function(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var r=this._texture,n=this.vertexTrimmedData,i=r.orig,o=this._anchor,a=this.transform.worldTransform,s=a.a,l=a.b,u=a.c,c=a.d,f=a.tx,h=a.ty,d=-o._x*i.width,p=d+i.width,v=-o._y*i.height,m=v+i.height;n[0]=s*d+u*v+f,n[1]=c*v+l*d+h,n[2]=s*p+u*v+f,n[3]=c*v+l*p+h,n[4]=s*p+u*m+f,n[5]=c*m+l*p+h,n[6]=s*d+u*m+f,n[7]=c*m+l*d+h},e.prototype._render=function(r){this.calculateVertices(),r.batch.setObjectRenderer(r.plugins[this.pluginName]),r.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var r=this._texture.trim,n=this._texture.orig;!r||r.width===n.width&&r.height===n.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(r){return this.children.length===0?(this._localBounds||(this._localBounds=new Vs),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),r||(this._localBoundsRect||(this._localBoundsRect=new fe),r=this._localBoundsRect),this._localBounds.getRectangle(r)):t.prototype.getLocalBounds.call(this,r)},e.prototype.containsPoint=function(r){this.worldTransform.applyInverse(r,Wa);var n=this._texture.orig.width,i=this._texture.orig.height,o=-n*this.anchor.x,a=0;return Wa.x>=o&&Wa.x<o+n&&(a=-i*this.anchor.y,Wa.y>=a&&Wa.y<a+i)},e.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null;var n=typeof r=="boolean"?r:r&&r.texture;if(n){var i=typeof r=="boolean"?r:r&&r.baseTexture;this._texture.destroy(!!i)}this._texture=null},e.from=function(r,n){var i=r instanceof Wt?r:Wt.from(r,n);return new e(i)},Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(r){var n=la(this.scale.x)||1;this.scale.x=n*r/this._texture.orig.width,this._width=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(r){var n=la(this.scale.y)||1;this.scale.y=n*r/this._texture.orig.height,this._height=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(r){this._anchor.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,this._tintRGB=(r>>16)+(r&65280)+((r&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(r){this._texture!==r&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=r||Wt.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,r&&(r.baseTexture.valid?this._onTextureUpdate():r.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(jn);/*!
* @pixi/particle-emitter - v5.0.7
* Compiled Fri, 27 May 2022 02:00:12 UTC
*
* @pixi/particle-emitter is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/class Ln{constructor(e,r,n){this.value=e,this.time=r,this.next=null,this.isStepped=!1,n?this.ease=typeof n=="function"?n:X1(n):this.ease=null}static createList(e){if("list"in e){const n=e.list;let i;const{value:o,time:a}=n[0],s=i=new Ln(typeof o=="string"?jl(o):o,a,e.ease);if(n.length>2||n.length===2&&n[1].value!==o)for(let l=1;l<n.length;++l){const{value:u,time:c}=n[l];i.next=new Ln(typeof u=="string"?jl(u):u,c),i=i.next}return s.isStepped=!!e.isStepped,s}const r=new Ln(typeof e.start=="string"?jl(e.start):e.start,0);return e.end!==e.start&&(r.next=new Ln(typeof e.end=="string"?jl(e.end):e.end,1)),r}}let $s=Wt.from;const An=Math.PI/180;function ci(t,e){if(!t)return;const r=Math.sin(t),n=Math.cos(t),i=e.x*n-e.y*r,o=e.x*r+e.y*n;e.x=i,e.y=o}function wc(t,e,r){return t<<16|e<<8|r}function $1(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function pU(t){const e=1/$1(t);t.x*=e,t.y*=e}function j1(t,e){t.x*=e,t.y*=e}function jl(t,e){e||(e={}),t.charAt(0)==="#"?t=t.substr(1):t.indexOf("0x")===0&&(t=t.substr(2));let r;return t.length===8&&(r=t.substr(0,2),t=t.substr(2)),e.r=parseInt(t.substr(0,2),16),e.g=parseInt(t.substr(2,2),16),e.b=parseInt(t.substr(4,2),16),r&&(e.a=parseInt(r,16)),e}function X1(t){const e=t.length,r=1/e;return function(n){const i=e*n|0,o=(n-i*r)*e,a=t[i]||t[e-1];return a.s+o*(2*(1-o)*(a.cp-a.s)+o*(a.e-a.s))}}function vU(t){return t?(t=t.toUpperCase().replace(/ /g,"_"),Ut[t]||Ut.NORMAL):Ut.NORMAL}class pf extends La{constructor(e){super(),this.prevChild=this.nextChild=null,this.emitter=e,this.config={},this.anchor.x=this.anchor.y=.5,this.maxLife=0,this.age=0,this.agePercent=0,this.oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.kill=this.kill}init(e){this.maxLife=e,this.age=this.agePercent=0,this.rotation=0,this.position.x=this.position.y=0,this.scale.x=this.scale.y=1,this.tint=16777215,this.alpha=1,this.oneOverLife=1/this.maxLife,this.visible=!0}kill(){this.emitter.recycle(this)}destroy(){this.parent&&this.parent.removeChild(this),this.emitter=this.next=this.prev=null,super.destroy()}}var Ue;(function(t){t[t.Spawn=0]="Spawn",t[t.Normal=2]="Normal",t[t.Late=5]="Late"})(Ue||(Ue={}));const vf=gr.shared,so=Symbol("Position particle per emitter position");class Ce{constructor(e,r){this.initBehaviors=[],this.updateBehaviors=[],this.recycleBehaviors=[],this.minLifetime=0,this.maxLifetime=0,this.customEase=null,this._frequency=1,this.spawnChance=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=new _e,this.particlesPerWave=1,this.rotation=0,this.ownerPos=new _e,this._prevEmitterPos=new _e,this._prevPosIsValid=!1,this._posChanged=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._autoUpdate=!1,this._destroyWhenComplete=!1,this._completeCallback=null,this.parent=e,r&&this.init(r),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}static registerBehavior(e){Ce.knownBehaviors[e.type]=e}get frequency(){return this._frequency}set frequency(e){typeof e=="number"&&e>0?this._frequency=e:this._frequency=1}get parent(){return this._parent}set parent(e){this.cleanup(),this._parent=e}init(e){if(!e)return;this.cleanup(),this._origConfig=e,this.minLifetime=e.lifetime.min,this.maxLifetime=e.lifetime.max,e.ease?this.customEase=typeof e.ease=="function"?e.ease:X1(e.ease):this.customEase=null,this.particlesPerWave=1,e.particlesPerWave&&e.particlesPerWave>1&&(this.particlesPerWave=e.particlesPerWave),this.frequency=e.frequency,this.spawnChance=typeof e.spawnChance=="number"&&e.spawnChance>0?e.spawnChance:1,this.emitterLifetime=e.emitterLifetime||-1,this.maxParticles=e.maxParticles>0?e.maxParticles:1e3,this.addAtBack=!!e.addAtBack,this.rotation=0,this.ownerPos.set(0),e.pos?this.spawnPos.copyFrom(e.pos):this.spawnPos.set(0),this._prevEmitterPos.copyFrom(this.spawnPos),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=e.emit===void 0?!0:!!e.emit,this.autoUpdate=!!e.autoUpdate;const r=e.behaviors.map(n=>{const i=Ce.knownBehaviors[n.type];return i?new i(n.config):(console.error(`Unknown behavior: ${n.type}`),null)}).filter(n=>!!n);r.push(so),r.sort((n,i)=>n===so?i.order===Ue.Spawn?1:-1:i===so?n.order===Ue.Spawn?-1:1:n.order-i.order),this.initBehaviors=r.slice(),this.updateBehaviors=r.filter(n=>n!==so&&n.updateParticle),this.recycleBehaviors=r.filter(n=>n!==so&&n.recycleParticle)}getBehavior(e){return Ce.knownBehaviors[e]&&this.initBehaviors.find(r=>r instanceof Ce.knownBehaviors[e])||null}fillPool(e){for(;e>0;--e){const r=new pf(this);r.next=this._poolFirst,this._poolFirst=r}}recycle(e,r=!1){for(let n=0;n<this.recycleBehaviors.length;++n)this.recycleBehaviors[n].recycleParticle(e,!r);e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next),e===this._activeParticlesLast&&(this._activeParticlesLast=e.prev),e===this._activeParticlesFirst&&(this._activeParticlesFirst=e.next),e.prev=null,e.next=this._poolFirst,this._poolFirst=e,e.parent&&e.parent.removeChild(e),--this.particleCount}rotate(e){if(this.rotation===e)return;const r=e-this.rotation;this.rotation=e,ci(r,this.spawnPos),this._posChanged=!0}updateSpawnPos(e,r){this._posChanged=!0,this.spawnPos.x=e,this.spawnPos.y=r}updateOwnerPos(e,r){this._posChanged=!0,this.ownerPos.x=e,this.ownerPos.y=r}resetPositionTracking(){this._prevPosIsValid=!1}get emit(){return this._emit}set emit(e){this._emit=!!e,this._emitterLife=this.emitterLifetime}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){this._autoUpdate&&!e?vf.remove(this.update,this):!this._autoUpdate&&e&&vf.add(this.update,this),this._autoUpdate=!!e}playOnceAndDestroy(e){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=e}playOnce(e){this.emit=!0,this._completeCallback=e}update(e){if(this._autoUpdate&&(e=vf.elapsedMS*.001),!this._parent)return;for(let a=this._activeParticlesFirst,s;a;a=s)if(s=a.next,a.age+=e,a.age>a.maxLife||a.age<0)this.recycle(a);else{let l=a.age*a.oneOverLife;this.customEase&&(this.customEase.length===4?l=this.customEase(l,0,1,1):l=this.customEase(l)),a.agePercent=l;for(let u=0;u<this.updateBehaviors.length;++u)if(this.updateBehaviors[u].updateParticle(a,e)){this.recycle(a);break}}let r,n;this._prevPosIsValid&&(r=this._prevEmitterPos.x,n=this._prevEmitterPos.y);const i=this.ownerPos.x+this.spawnPos.x,o=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=e<0?0:e;this._spawnTimer<=0;){if(this._emitterLife>=0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles){this._spawnTimer+=this._frequency;continue}let a,s;if(this._prevPosIsValid&&this._posChanged){const c=1+this._spawnTimer/e;a=(i-r)*c+r,s=(o-n)*c+n}else a=i,s=o;let l=null,u=null;for(let c=Math.min(this.particlesPerWave,this.maxParticles-this.particleCount),f=0;f<c;++f){if(this.spawnChance<1&&Math.random()>=this.spawnChance)continue;let h;if(this.minLifetime===this.maxLifetime?h=this.minLifetime:h=Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer>=h)continue;let d;this._poolFirst?(d=this._poolFirst,this._poolFirst=this._poolFirst.next,d.next=null):d=new pf(this),d.init(h),this.addAtBack?this._parent.addChildAt(d,0):this._parent.addChild(d),l?(u.next=d,d.prev=u,u=d):u=l=d,++this.particleCount}if(l){this._activeParticlesLast?(this._activeParticlesLast.next=l,l.prev=this._activeParticlesLast,this._activeParticlesLast=u):(this._activeParticlesFirst=l,this._activeParticlesLast=u);for(let c=0;c<this.initBehaviors.length;++c){const f=this.initBehaviors[c];if(f===so)for(let h=l,d;h;h=d){d=h.next,this.rotation!==0&&(ci(this.rotation,h.position),h.rotation+=this.rotation),h.position.x+=a,h.position.y+=s,h.age+=-this._spawnTimer;let p=h.age*h.oneOverLife;this.customEase&&(this.customEase.length===4?p=this.customEase(p,0,1,1):p=this.customEase(p)),h.agePercent=p}else f.initParticles(l)}for(let c=l,f;c;c=f){f=c.next;for(let h=0;h<this.updateBehaviors.length;++h)if(this.updateBehaviors[h].updateParticle(c,-this._spawnTimer)){this.recycle(c);break}}}this._spawnTimer+=this._frequency}if(this._posChanged&&(this._prevEmitterPos.x=i,this._prevEmitterPos.y=o,this._prevPosIsValid=!0,this._posChanged=!1),!this._emit&&!this._activeParticlesFirst){if(this._completeCallback){const a=this._completeCallback;this._completeCallback=null,a()}this._destroyWhenComplete&&this.destroy()}}emitNow(){const e=this.ownerPos.x+this.spawnPos.x,r=this.ownerPos.y+this.spawnPos.y;let n=null,i=null;for(let o=Math.min(this.particlesPerWave,this.maxParticles-this.particleCount),a=0;a<o;++a){if(this.spawnChance<1&&Math.random()>=this.spawnChance)continue;let s;this._poolFirst?(s=this._poolFirst,this._poolFirst=this._poolFirst.next,s.next=null):s=new pf(this);let l;this.minLifetime===this.maxLifetime?l=this.minLifetime:l=Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,s.init(l),this.addAtBack?this._parent.addChildAt(s,0):this._parent.addChild(s),n?(i.next=s,s.prev=i,i=s):i=n=s,++this.particleCount}if(n){this._activeParticlesLast?(this._activeParticlesLast.next=n,n.prev=this._activeParticlesLast,this._activeParticlesLast=i):(this._activeParticlesFirst=n,this._activeParticlesLast=i);for(let o=0;o<this.initBehaviors.length;++o){const a=this.initBehaviors[o];if(a===so)for(let s=n,l;s;s=l)l=s.next,this.rotation!==0&&(ci(this.rotation,s.position),s.rotation+=this.rotation),s.position.x+=e,s.position.y+=r;else a.initParticles(n)}}}cleanup(){let e,r;for(e=this._activeParticlesFirst;e;e=r)r=e.next,this.recycle(e,!0);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0}get destroyed(){return!(this._parent&&this.initBehaviors.length)}destroy(){this.autoUpdate=!1,this.cleanup();let e;for(let r=this._poolFirst;r;r=e)e=r.next,r.destroy();this._poolFirst=this._parent=this.spawnPos=this.ownerPos=this.customEase=this._completeCallback=null,this.initBehaviors.length=this.updateBehaviors.length=this.recycleBehaviors.length=0}}Ce.knownBehaviors={};class gp{constructor(e){this.x=e.x,this.y=e.y,this.w=e.w,this.h=e.h}getRandPos(e){e.x=Math.random()*this.w+this.x,e.y=Math.random()*this.h+this.y}}gp.type="rect";gp.editorConfig=null;class Ec{constructor(e){this.x=e.x||0,this.y=e.y||0,this.radius=e.radius,this.innerRadius=e.innerRadius||0,this.rotation=!!e.affectRotation}getRandPos(e){this.innerRadius!==this.radius?e.x=Math.random()*(this.radius-this.innerRadius)+this.innerRadius:e.x=this.radius,e.y=0;const r=Math.random()*Math.PI*2;this.rotation&&(e.rotation+=r),ci(r,e.position),e.position.x+=this.x,e.position.y+=this.y}}Ec.type="torus";Ec.editorConfig=null;class yp{constructor(e){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(e)}init(e){if(!e||!e.length)this.segments.push({p1:{x:0,y:0},p2:{x:0,y:0},l:0});else if(Array.isArray(e[0]))for(let r=0;r<e.length;++r){const n=e[r];let i=n[0];for(let o=1;o<n.length;++o){const a=n[o];this.segments.push({p1:i,p2:a,l:0}),i=a}}else{let r=e[0];for(let n=1;n<e.length;++n){const i=e[n];this.segments.push({p1:r,p2:i,l:0}),r=i}}for(let r=0;r<this.segments.length;++r){const{p1:n,p2:i}=this.segments[r],o=Math.sqrt((i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y));this.segments[r].l=o,this.totalLength+=o,this.countingLengths.push(this.totalLength)}}getRandPos(e){const r=Math.random()*this.totalLength;let n,i;if(this.segments.length===1)n=this.segments[0],i=r;else for(let s=0;s<this.countingLengths.length;++s)if(r<this.countingLengths[s]){n=this.segments[s],i=s===0?r:r-this.countingLengths[s-1];break}i/=n.l||1;const{p1:o,p2:a}=n;e.x=o.x+i*(a.x-o.x),e.y=o.y+i*(a.y-o.y)}}yp.type="polygonalChain";yp.editorConfig=null;class bp{constructor(e){var r;this.order=Ue.Late,this.minStart=e.minStart,this.maxStart=e.maxStart,this.accel=e.accel,this.rotate=!!e.rotate,this.maxSpeed=(r=e.maxSpeed)!==null&&r!==void 0?r:0}initParticles(e){let r=e;for(;r;){const n=Math.random()*(this.maxStart-this.minStart)+this.minStart;r.config.velocity?r.config.velocity.set(n,0):r.config.velocity=new _e(n,0),ci(r.rotation,r.config.velocity),r=r.next}}updateParticle(e,r){const n=e.config.velocity,i=n.x,o=n.y;if(n.x+=this.accel.x*r,n.y+=this.accel.y*r,this.maxSpeed){const a=$1(n);a>this.maxSpeed&&j1(n,this.maxSpeed/a)}e.x+=(i+n.x)/2*r,e.y+=(o+n.y)/2*r,this.rotate&&(e.rotation=Math.atan2(n.y,n.x))}}bp.type="moveAcceleration";bp.editorConfig=null;function mU(t){return this.ease&&(t=this.ease(t)),(this.first.next.value-this.first.value)*t+this.first.value}function gU(t){this.ease&&(t=this.ease(t));const e=this.first.value,r=this.first.next.value,n=(r.r-e.r)*t+e.r,i=(r.g-e.g)*t+e.g,o=(r.b-e.b)*t+e.b;return wc(n,i,o)}function yU(t){this.ease&&(t=this.ease(t));let e=this.first,r=e.next;for(;t>r.time;)e=r,r=r.next;return t=(t-e.time)/(r.time-e.time),(r.value-e.value)*t+e.value}function bU(t){this.ease&&(t=this.ease(t));let e=this.first,r=e.next;for(;t>r.time;)e=r,r=r.next;t=(t-e.time)/(r.time-e.time);const n=e.value,i=r.value,o=(i.r-n.r)*t+n.r,a=(i.g-n.g)*t+n.g,s=(i.b-n.b)*t+n.b;return wc(o,a,s)}function _U(t){this.ease&&(t=this.ease(t));let e=this.first;for(;e.next&&t>e.next.time;)e=e.next;return e.value}function xU(t){this.ease&&(t=this.ease(t));let e=this.first;for(;e.next&&t>e.next.time;)e=e.next;const r=e.value;return wc(r.r,r.g,r.b)}class hl{constructor(e=!1){this.first=null,this.isColor=!!e,this.interpolate=null,this.ease=null}reset(e){this.first=e,e.next&&e.next.time>=1?this.interpolate=this.isColor?gU:mU:e.isStepped?this.interpolate=this.isColor?xU:_U:this.interpolate=this.isColor?bU:yU,this.ease=this.first.ease}}class _p{constructor(e){this.order=Ue.Normal,this.list=new hl(!1),this.list.reset(Ln.createList(e.alpha))}initParticles(e){let r=e;for(;r;)r.alpha=this.list.first.value,r=r.next}updateParticle(e){e.alpha=this.list.interpolate(e.agePercent)}}_p.type="alpha";_p.editorConfig=null;class xp{constructor(e){this.order=Ue.Normal,this.value=e.alpha}initParticles(e){let r=e;for(;r;)r.alpha=this.value,r=r.next}}xp.type="alphaStatic";xp.editorConfig=null;function z1(t){const e=[];for(let r=0;r<t.length;++r){let n=t[r];if(typeof n=="string")e.push($s(n));else if(n instanceof Wt)e.push(n);else{let i=n.count||1;for(typeof n.texture=="string"?n=$s(n.texture):n=n.texture;i>0;--i)e.push(n)}}return e}class Tp{constructor(e){this.order=Ue.Normal,this.anims=[];for(let r=0;r<e.anims.length;++r){const n=e.anims[r],i=z1(n.textures),o=n.framerate<0?-1:n.framerate>0?n.framerate:60,a={textures:i,duration:o>0?i.length/o:0,framerate:o,loop:o>0?!!n.loop:!1};this.anims.push(a)}}initParticles(e){let r=e;for(;r;){const n=Math.floor(Math.random()*this.anims.length),i=r.config.anim=this.anims[n];r.texture=i.textures[0],r.config.animElapsed=0,i.framerate===-1?(r.config.animDuration=r.maxLife,r.config.animFramerate=i.textures.length/r.maxLife):(r.config.animDuration=i.duration,r.config.animFramerate=i.framerate),r=r.next}}updateParticle(e,r){const n=e.config,i=n.anim;n.animElapsed+=r,n.animElapsed>=n.animDuration&&(n.anim.loop?n.animElapsed=n.animElapsed%n.animDuration:n.animElapsed=n.animDuration-1e-6);const o=n.animElapsed*n.animFramerate+1e-7|0;e.texture=i.textures[o]||i.textures[i.textures.length-1]||Wt.EMPTY}}Tp.type="animatedRandom";Tp.editorConfig=null;class wp{constructor(e){this.order=Ue.Normal;const r=e.anim,n=z1(r.textures),i=r.framerate<0?-1:r.framerate>0?r.framerate:60;this.anim={textures:n,duration:i>0?n.length/i:0,framerate:i,loop:i>0?!!r.loop:!1}}initParticles(e){let r=e;const n=this.anim;for(;r;)r.texture=n.textures[0],r.config.animElapsed=0,n.framerate===-1?(r.config.animDuration=r.maxLife,r.config.animFramerate=n.textures.length/r.maxLife):(r.config.animDuration=n.duration,r.config.animFramerate=n.framerate),r=r.next}updateParticle(e,r){const n=this.anim,i=e.config;i.animElapsed+=r,i.animElapsed>=i.animDuration&&(n.loop?i.animElapsed=i.animElapsed%i.animDuration:i.animElapsed=i.animDuration-1e-6);const o=i.animElapsed*i.animFramerate+1e-7|0;e.texture=n.textures[o]||n.textures[n.textures.length-1]||Wt.EMPTY}}wp.type="animatedSingle";wp.editorConfig=null;class Ep{constructor(e){this.order=Ue.Normal,this.value=e.blendMode}initParticles(e){let r=e;for(;r;)r.blendMode=vU(this.value),r=r.next}}Ep.type="blendMode";Ep.editorConfig=null;class Ip{constructor(e){this.order=Ue.Spawn,this.spacing=e.spacing*An,this.start=e.start*An,this.distance=e.distance}initParticles(e){let r=0,n=e;for(;n;){let i;this.spacing?i=this.start+this.spacing*r:i=Math.random()*Math.PI*2,n.rotation=i,this.distance&&(n.position.x=this.distance,ci(i,n.position)),n=n.next,++r}}}Ip.type="spawnBurst";Ip.editorConfig=null;class Cp{constructor(e){this.order=Ue.Normal,this.list=new hl(!0),this.list.reset(Ln.createList(e.color))}initParticles(e){let r=e;const n=this.list.first.value,i=wc(n.r,n.g,n.b);for(;r;)r.tint=i,r=r.next}updateParticle(e){e.tint=this.list.interpolate(e.agePercent)}}Cp.type="color";Cp.editorConfig=null;class Rp{constructor(e){this.order=Ue.Normal;let r=e.color;r.charAt(0)==="#"?r=r.substr(1):r.indexOf("0x")===0&&(r=r.substr(2)),this.value=parseInt(r,16)}initParticles(e){let r=e;for(;r;)r.tint=this.value,r=r.next}}Rp.type="colorStatic";Rp.editorConfig=null;class Np{constructor(e){this.order=Ue.Normal,this.index=0,this.textures=e.textures.map(r=>typeof r=="string"?$s(r):r)}initParticles(e){let r=e;for(;r;)r.texture=this.textures[this.index],++this.index>=this.textures.length&&(this.index=0),r=r.next}}Np.type="textureOrdered";Np.editorConfig=null;const Xo=new _e,W1=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2","abs","acos","acosh","asin","asinh","atan","atanh","atan2","cbrt","ceil","cos","cosh","exp","expm1","floor","fround","hypot","log","log1p","log10","log2","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh"],TU=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(W1).join("|"),"g");function wU(t){const e=t.match(TU);for(let r=e.length-1;r>=0;--r)W1.indexOf(e[r])>=0&&(e[r]=`Math.${e[r]}`);return t=e.join(""),new Function("x",`return ${t};`)}class Pp{constructor(e){var r;if(this.order=Ue.Late,e.path)if(typeof e.path=="function")this.path=e.path;else try{this.path=wU(e.path)}catch{this.path=null}else this.path=n=>n;this.list=new hl(!1),this.list.reset(Ln.createList(e.speed)),this.minMult=(r=e.minMult)!==null&&r!==void 0?r:1}initParticles(e){let r=e;for(;r;){r.config.initRotation=r.rotation,r.config.initPosition?r.config.initPosition.copyFrom(r.position):r.config.initPosition=new _e(r.x,r.y),r.config.movement=0;const n=Math.random()*(1-this.minMult)+this.minMult;r.config.speedMult=n,r=r.next}}updateParticle(e,r){const n=this.list.interpolate(e.agePercent)*e.config.speedMult;e.config.movement+=n*r,Xo.x=e.config.movement,Xo.y=this.path(Xo.x),ci(e.config.initRotation,Xo),e.position.x=e.config.initPosition.x+Xo.x,e.position.y=e.config.initPosition.y+Xo.y}}Pp.type="movePath";Pp.editorConfig=null;class Sp{constructor(){this.order=Ue.Spawn}initParticles(e){}}Sp.type="spawnPoint";Sp.editorConfig=null;class Ap{constructor(e){this.order=Ue.Normal,this.textures=e.textures.map(r=>typeof r=="string"?$s(r):r)}initParticles(e){let r=e;for(;r;){const n=Math.floor(Math.random()*this.textures.length);r.texture=this.textures[n],r=r.next}}}Ap.type="textureRandom";Ap.editorConfig=null;class Op{constructor(e){this.order=Ue.Normal,this.minStart=e.minStart*An,this.maxStart=e.maxStart*An,this.minSpeed=e.minSpeed*An,this.maxSpeed=e.maxSpeed*An,this.accel=e.accel*An}initParticles(e){let r=e;for(;r;)this.minStart===this.maxStart?r.rotation+=this.maxStart:r.rotation+=Math.random()*(this.maxStart-this.minStart)+this.minStart,r.config.rotSpeed=Math.random()*(this.maxSpeed-this.minSpeed)+this.minSpeed,r=r.next}updateParticle(e,r){if(this.accel){const n=e.config.rotSpeed;e.config.rotSpeed+=this.accel*r,e.rotation+=(e.config.rotSpeed+n)/2*r}else e.rotation+=e.config.rotSpeed*r}}Op.type="rotation";Op.editorConfig=null;class Up{constructor(e){this.order=Ue.Normal,this.min=e.min*An,this.max=e.max*An}initParticles(e){let r=e;for(;r;)this.min===this.max?r.rotation+=this.max:r.rotation+=Math.random()*(this.max-this.min)+this.min,r=r.next}}Up.type="rotationStatic";Up.editorConfig=null;class Fp{constructor(e){this.order=Ue.Late+1,this.rotation=(e.rotation||0)*An}initParticles(e){let r=e;for(;r;)r.rotation=this.rotation,r=r.next}}Fp.type="noRotation";Fp.editorConfig=null;class Lp{constructor(e){var r;this.order=Ue.Normal,this.list=new hl(!1),this.list.reset(Ln.createList(e.scale)),this.minMult=(r=e.minMult)!==null&&r!==void 0?r:1}initParticles(e){let r=e;for(;r;){const n=Math.random()*(1-this.minMult)+this.minMult;r.config.scaleMult=n,r.scale.x=r.scale.y=this.list.first.value*n,r=r.next}}updateParticle(e){e.scale.x=e.scale.y=this.list.interpolate(e.agePercent)*e.config.scaleMult}}Lp.type="scale";Lp.editorConfig=null;class Mp{constructor(e){this.order=Ue.Normal,this.min=e.min,this.max=e.max}initParticles(e){let r=e;for(;r;){const n=Math.random()*(this.max-this.min)+this.min;r.scale.x=r.scale.y=n,r=r.next}}}Mp.type="scaleStatic";Mp.editorConfig=null;class In{constructor(e){this.order=Ue.Spawn;const r=In.shapes[e.type];if(!r)throw new Error(`No shape found with type '${e.type}'`);this.shape=new r(e.data)}static registerShape(e,r){In.shapes[r||e.type]=e}initParticles(e){let r=e;for(;r;)this.shape.getRandPos(r),r=r.next}}In.type="spawnShape";In.editorConfig=null;In.shapes={};In.registerShape(yp);In.registerShape(gp);In.registerShape(Ec);In.registerShape(Ec,"circle");class Bp{constructor(e){this.order=Ue.Normal,this.texture=typeof e.texture=="string"?$s(e.texture):e.texture}initParticles(e){let r=e;for(;r;)r.texture=this.texture,r=r.next}}Bp.type="textureSingle";Bp.editorConfig=null;class kp{constructor(e){var r;this.order=Ue.Late,this.list=new hl(!1),this.list.reset(Ln.createList(e.speed)),this.minMult=(r=e.minMult)!==null&&r!==void 0?r:1}initParticles(e){let r=e;for(;r;){const n=Math.random()*(1-this.minMult)+this.minMult;r.config.speedMult=n,r.config.velocity?r.config.velocity.set(this.list.first.value*n,0):r.config.velocity=new _e(this.list.first.value*n,0),ci(r.rotation,r.config.velocity),r=r.next}}updateParticle(e,r){const n=this.list.interpolate(e.agePercent)*e.config.speedMult,i=e.config.velocity;pU(i),j1(i,n),e.x+=i.x*r,e.y+=i.y*r}}kp.type="moveSpeed";kp.editorConfig=null;class Gp{constructor(e){this.order=Ue.Late,this.min=e.min,this.max=e.max}initParticles(e){let r=e;for(;r;){const n=Math.random()*(this.max-this.min)+this.min;r.config.velocity?r.config.velocity.set(n,0):r.config.velocity=new _e(n,0),ci(r.rotation,r.config.velocity),r=r.next}}updateParticle(e,r){const n=e.config.velocity;e.x+=n.x*r,e.y+=n.y*r}}Gp.type="moveSpeedStatic";Gp.editorConfig=null;function EU(t,e){var r,n,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,T,w,x;if("behaviors"in t)return t;const R={lifetime:t.lifetime,ease:t.ease,particlesPerWave:t.particlesPerWave,frequency:t.frequency,spawnChance:t.spawnChance,emitterLifetime:t.emitterLifetime,maxParticles:t.maxParticles,addAtBack:t.addAtBack,pos:t.pos,emit:t.emit,autoUpdate:t.autoUpdate,behaviors:[]};if(t.alpha)if("start"in t.alpha)if(t.alpha.start===t.alpha.end)t.alpha.start!==1&&R.behaviors.push({type:"alphaStatic",config:{alpha:t.alpha.start}});else{const I={list:[{time:0,value:t.alpha.start},{time:1,value:t.alpha.end}]};R.behaviors.push({type:"alpha",config:{alpha:I}})}else t.alpha.list.length===1?t.alpha.list[0].value!==1&&R.behaviors.push({type:"alphaStatic",config:{alpha:t.alpha.list[0].value}}):R.behaviors.push({type:"alpha",config:{alpha:t.alpha}});if(t.acceleration&&(t.acceleration.x||t.acceleration.y)){let I,C;"start"in t.speed?(I=t.speed.start*((r=t.speed.minimumSpeedMultiplier)!==null&&r!==void 0?r:1),C=t.speed.start):(I=t.speed.list[0].value*((n=t.minimumSpeedMultiplier)!==null&&n!==void 0?n:1),C=t.speed.list[0].value),R.behaviors.push({type:"moveAcceleration",config:{accel:t.acceleration,minStart:I,maxStart:C,rotate:!t.noRotation,maxSpeed:t.maxSpeed}})}else if(!((i=t.extraData)===null||i===void 0)&&i.path){let I,C;"start"in t.speed?(C=(o=t.speed.minimumSpeedMultiplier)!==null&&o!==void 0?o:1,t.speed.start===t.speed.end?I={list:[{time:0,value:t.speed.start}]}:I={list:[{time:0,value:t.speed.start},{time:1,value:t.speed.end}]}):(I=t.speed,C=(a=t.minimumSpeedMultiplier)!==null&&a!==void 0?a:1),R.behaviors.push({type:"movePath",config:{path:t.extraData.path,speed:I,minMult:C}})}else if(t.speed)if("start"in t.speed)if(t.speed.start===t.speed.end)R.behaviors.push({type:"moveSpeedStatic",config:{min:t.speed.start*((s=t.speed.minimumSpeedMultiplier)!==null&&s!==void 0?s:1),max:t.speed.start}});else{const I={list:[{time:0,value:t.speed.start},{time:1,value:t.speed.end}]};R.behaviors.push({type:"moveSpeed",config:{speed:I,minMult:t.speed.minimumSpeedMultiplier}})}else t.speed.list.length===1?R.behaviors.push({type:"moveSpeedStatic",config:{min:t.speed.list[0].value*((l=t.minimumSpeedMultiplier)!==null&&l!==void 0?l:1),max:t.speed.list[0].value}}):R.behaviors.push({type:"moveSpeed",config:{speed:t.speed,minMult:(u=t.minimumSpeedMultiplier)!==null&&u!==void 0?u:1}});if(t.scale)if("start"in t.scale){const I=(c=t.scale.minimumScaleMultiplier)!==null&&c!==void 0?c:1;if(t.scale.start===t.scale.end)R.behaviors.push({type:"scaleStatic",config:{min:t.scale.start*I,max:t.scale.start}});else{const C={list:[{time:0,value:t.scale.start},{time:1,value:t.scale.end}]};R.behaviors.push({type:"scale",config:{scale:C,minMult:I}})}}else if(t.scale.list.length===1){const I=(f=t.minimumScaleMultiplier)!==null&&f!==void 0?f:1,C=t.scale.list[0].value;R.behaviors.push({type:"scaleStatic",config:{min:C*I,max:C}})}else R.behaviors.push({type:"scale",config:{scale:t.scale,minMult:(h=t.minimumScaleMultiplier)!==null&&h!==void 0?h:1}});if(t.color)if("start"in t.color)if(t.color.start===t.color.end)t.color.start!=="ffffff"&&R.behaviors.push({type:"colorStatic",config:{color:t.color.start}});else{const I={list:[{time:0,value:t.color.start},{time:1,value:t.color.end}]};R.behaviors.push({type:"color",config:{color:I}})}else t.color.list.length===1?t.color.list[0].value!=="ffffff"&&R.behaviors.push({type:"colorStatic",config:{color:t.color.list[0].value}}):R.behaviors.push({type:"color",config:{color:t.color}});if(t.rotationAcceleration||((d=t.rotationSpeed)===null||d===void 0?void 0:d.min)||((p=t.rotationSpeed)===null||p===void 0?void 0:p.max)?R.behaviors.push({type:"rotation",config:{accel:t.rotationAcceleration||0,minSpeed:((v=t.rotationSpeed)===null||v===void 0?void 0:v.min)||0,maxSpeed:((m=t.rotationSpeed)===null||m===void 0?void 0:m.max)||0,minStart:((y=t.startRotation)===null||y===void 0?void 0:y.min)||0,maxStart:((g=t.startRotation)===null||g===void 0?void 0:g.max)||0}}):(((b=t.startRotation)===null||b===void 0?void 0:b.min)||((T=t.startRotation)===null||T===void 0?void 0:T.max))&&R.behaviors.push({type:"rotationStatic",config:{min:((w=t.startRotation)===null||w===void 0?void 0:w.min)||0,max:((x=t.startRotation)===null||x===void 0?void 0:x.max)||0}}),t.noRotation&&R.behaviors.push({type:"noRotation",config:{}}),t.blendMode&&t.blendMode!=="normal"&&R.behaviors.push({type:"blendMode",config:{blendMode:t.blendMode}}),Array.isArray(e)&&typeof e[0]!="string"&&"framerate"in e[0]){for(let I=0;I<e.length;++I)e[I].framerate==="matchLife"&&(e[I].framerate=-1);R.behaviors.push({type:"animatedRandom",config:{anims:e}})}else typeof e!="string"&&"framerate"in e?(e.framerate==="matchLife"&&(e.framerate=-1),R.behaviors.push({type:"animatedSingle",config:{anim:e}})):t.orderedArt&&Array.isArray(e)?R.behaviors.push({type:"textureOrdered",config:{textures:e}}):Array.isArray(e)?R.behaviors.push({type:"textureRandom",config:{textures:e}}):R.behaviors.push({type:"textureSingle",config:{texture:e}});if(t.spawnType==="burst")R.behaviors.push({type:"spawnBurst",config:{start:t.angleStart||0,spacing:t.particleSpacing,distance:0}});else if(t.spawnType==="point")R.behaviors.push({type:"spawnPoint",config:{}});else{let I;t.spawnType==="ring"?I={type:"torus",data:{x:t.spawnCircle.x,y:t.spawnCircle.y,radius:t.spawnCircle.r,innerRadius:t.spawnCircle.minR,affectRotation:!0}}:t.spawnType==="circle"?I={type:"torus",data:{x:t.spawnCircle.x,y:t.spawnCircle.y,radius:t.spawnCircle.r,innerRadius:0,affectRotation:!1}}:t.spawnType==="rect"?I={type:"rect",data:t.spawnRect}:t.spawnType==="polygonalChain"&&(I={type:"polygonalChain",data:t.spawnPolygon}),I&&R.behaviors.push({type:"spawnShape",config:I})}return R}Ce.registerBehavior(bp);Ce.registerBehavior(_p);Ce.registerBehavior(xp);Ce.registerBehavior(Tp);Ce.registerBehavior(wp);Ce.registerBehavior(Ep);Ce.registerBehavior(Ip);Ce.registerBehavior(Cp);Ce.registerBehavior(Rp);Ce.registerBehavior(Np);Ce.registerBehavior(Pp);Ce.registerBehavior(Sp);Ce.registerBehavior(Ap);Ce.registerBehavior(Op);Ce.registerBehavior(Up);Ce.registerBehavior(Fp);Ce.registerBehavior(Lp);Ce.registerBehavior(Mp);Ce.registerBehavior(In);Ce.registerBehavior(Bp);Ce.registerBehavior(kp);Ce.registerBehavior(Gp);function IU(t){var e=this.constructor;return this.then(function(r){return e.resolve(t()).then(function(){return r})},function(r){return e.resolve(t()).then(function(){return e.reject(r)})})}function CU(t){var e=this;return new e(function(r,n){if(!(t&&typeof t.length!="undefined"))return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(t);if(i.length===0)return r([]);var o=i.length;function a(l,u){if(u&&(typeof u=="object"||typeof u=="function")){var c=u.then;if(typeof c=="function"){c.call(u,function(f){a(l,f)},function(f){i[l]={status:"rejected",reason:f},--o===0&&r(i)});return}}i[l]={status:"fulfilled",value:u},--o===0&&r(i)}for(var s=0;s<i.length;s++)a(s,i[s])})}var RU=setTimeout;function Y1(t){return Boolean(t&&typeof t.length!="undefined")}function NU(){}function PU(t,e){return function(){t.apply(e,arguments)}}function tr(t){if(!(this instanceof tr))throw new TypeError("Promises must be constructed via new");if(typeof t!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Z1(t,this)}function K1(t,e){for(;t._state===3;)t=t._value;if(t._state===0){t._deferreds.push(e);return}t._handled=!0,tr._immediateFn(function(){var r=t._state===1?e.onFulfilled:e.onRejected;if(r===null){(t._state===1?Vh:js)(e.promise,t._value);return}var n;try{n=r(t._value)}catch(i){js(e.promise,i);return}Vh(e.promise,n)})}function Vh(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var r=e.then;if(e instanceof tr){t._state=3,t._value=e,$h(t);return}else if(typeof r=="function"){Z1(PU(r,e),t);return}}t._state=1,t._value=e,$h(t)}catch(n){js(t,n)}}function js(t,e){t._state=2,t._value=e,$h(t)}function $h(t){t._state===2&&t._deferreds.length===0&&tr._immediateFn(function(){t._handled||tr._unhandledRejectionFn(t._value)});for(var e=0,r=t._deferreds.length;e<r;e++)K1(t,t._deferreds[e]);t._deferreds=null}function SU(t,e,r){this.onFulfilled=typeof t=="function"?t:null,this.onRejected=typeof e=="function"?e:null,this.promise=r}function Z1(t,e){var r=!1;try{t(function(n){r||(r=!0,Vh(e,n))},function(n){r||(r=!0,js(e,n))})}catch(n){if(r)return;r=!0,js(e,n)}}tr.prototype.catch=function(t){return this.then(null,t)};tr.prototype.then=function(t,e){var r=new this.constructor(NU);return K1(this,new SU(t,e,r)),r};tr.prototype.finally=IU;tr.all=function(t){return new tr(function(e,r){if(!Y1(t))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(t);if(n.length===0)return e([]);var i=n.length;function o(s,l){try{if(l&&(typeof l=="object"||typeof l=="function")){var u=l.then;if(typeof u=="function"){u.call(l,function(c){o(s,c)},r);return}}n[s]=l,--i===0&&e(n)}catch(c){r(c)}}for(var a=0;a<n.length;a++)o(a,n[a])})};tr.allSettled=CU;tr.resolve=function(t){return t&&typeof t=="object"&&t.constructor===tr?t:new tr(function(e){e(t)})};tr.reject=function(t){return new tr(function(e,r){r(t)})};tr.race=function(t){return new tr(function(e,r){if(!Y1(t))return r(new TypeError("Promise.race accepts an array"));for(var n=0,i=t.length;n<i;n++)tr.resolve(t[n]).then(e,r)})};tr._immediateFn=typeof setImmediate=="function"&&function(t){setImmediate(t)}||function(t){RU(t,0)};tr._unhandledRejectionFn=function(e){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var cg=Object.getOwnPropertySymbols,AU=Object.prototype.hasOwnProperty,OU=Object.prototype.propertyIsEnumerable;function UU(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function FU(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(o){return e[o]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var LU=FU()?Object.assign:function(t,e){for(var r,n=UU(t),i,o=1;o<arguments.length;o++){r=Object(arguments[o]);for(var a in r)AU.call(r,a)&&(n[a]=r[a]);if(cg){i=cg(r);for(var s=0;s<i.length;s++)OU.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n};/*!
* @pixi/polyfill - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/polyfill is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/typeof globalThis=="undefined"&&(typeof self!="undefined"?self.globalThis=self:typeof global!="undefined"&&(global.globalThis=global));globalThis.Promise||(globalThis.Promise=tr);Object.assign||(Object.assign=LU);var MU=16;Date.now&&Date.prototype.getTime||(Date.now=function(){return new Date().getTime()});if(!(globalThis.performance&&globalThis.performance.now)){var BU=Date.now();globalThis.performance||(globalThis.performance={}),globalThis.performance.now=function(){return Date.now()-BU}}var mf=Date.now(),fg=["ms","moz","webkit","o"];for(var gf=0;gf<fg.length&&!globalThis.requestAnimationFrame;++gf){var yf=fg[gf];globalThis.requestAnimationFrame=globalThis[yf+"RequestAnimationFrame"],globalThis.cancelAnimationFrame=globalThis[yf+"CancelAnimationFrame"]||globalThis[yf+"CancelRequestAnimationFrame"]}globalThis.requestAnimationFrame||(globalThis.requestAnimationFrame=function(t){if(typeof t!="function")throw new TypeError(t+"is not a function");var e=Date.now(),r=MU+mf-e;return r<0&&(r=0),mf=e,globalThis.self.setTimeout(function(){mf=Date.now(),t(performance.now())},r)});globalThis.cancelAnimationFrame||(globalThis.cancelAnimationFrame=function(t){return clearTimeout(t)});Math.sign||(Math.sign=function(e){return e=Number(e),e===0||isNaN(e)?e:e>0?1:-1});Number.isInteger||(Number.isInteger=function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e});globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array);globalThis.Float32Array||(globalThis.Float32Array=Array);globalThis.Uint32Array||(globalThis.Uint32Array=Array);globalThis.Uint16Array||(globalThis.Uint16Array=Array);globalThis.Uint8Array||(globalThis.Uint8Array=Array);globalThis.Int32Array||(globalThis.Int32Array=Array);/*!
* @pixi/accessibility - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/accessibility is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var kU={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};ar.mixin(kU);var GU=9,Xl=100,DU=0,HU=0,hg=2,dg=1,VU=-1e3,$U=-1e3,jU=2,XU=function(){function t(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Un.tablet||Un.phone)&&this.createTouchHook();var r=document.createElement("div");r.style.width=Xl+"px",r.style.height=Xl+"px",r.style.position="absolute",r.style.top=DU+"px",r.style.left=HU+"px",r.style.zIndex=hg.toString(),this.div=r,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var e=this,r=document.createElement("button");r.style.width=dg+"px",r.style.height=dg+"px",r.style.position="absolute",r.style.top=VU+"px",r.style.left=$U+"px",r.style.zIndex=jU.toString(),r.style.backgroundColor="#FF0000",r.title="select to enable accessibility for this content",r.addEventListener("focus",function(){e._isMobileAccessibility=!0,e.activate(),e.destroyTouchHook()}),document.body.appendChild(r),this._hookDiv=r},t.prototype.destroyTouchHook=function(){!this._hookDiv||(document.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)===null||e===void 0||e.appendChild(this.div))},t.prototype.deactivate=function(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)===null||e===void 0||e.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(e){if(!(!e.visible||!e.accessibleChildren)){e.accessible&&e.interactive&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);var r=e.children;if(r)for(var n=0;n<r.length;n++)this.updateAccessibleObjects(r[n])}},t.prototype.update=function(){var e=performance.now();if(!(Un.android.device&&e<this.androidUpdateCount)&&(this.androidUpdateCount=e+this.androidUpdateFrequency,!!this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var r=this.renderer.view.getBoundingClientRect(),n=r.left,i=r.top,o=r.width,a=r.height,s=this.renderer,l=s.width,u=s.height,c=s.resolution,f=o/l*c,h=a/u*c,d=this.div;d.style.left=n+"px",d.style.top=i+"px",d.style.width=l+"px",d.style.height=u+"px";for(var p=0;p<this.children.length;p++){var v=this.children[p];if(v.renderId!==this.renderId)v._accessibleActive=!1,ui(this.children,p,1),this.div.removeChild(v._accessibleDiv),this.pool.push(v._accessibleDiv),v._accessibleDiv=null,p--;else{d=v._accessibleDiv;var m=v.hitArea,y=v.worldTransform;v.hitArea?(d.style.left=(y.tx+m.x*y.a)*f+"px",d.style.top=(y.ty+m.y*y.d)*h+"px",d.style.width=m.width*y.a*f+"px",d.style.height=m.height*y.d*h+"px"):(m=v.getBounds(),this.capHitArea(m),d.style.left=m.x*f+"px",d.style.top=m.y*h+"px",d.style.width=m.width*f+"px",d.style.height=m.height*h+"px",d.title!==v.accessibleTitle&&v.accessibleTitle!==null&&(d.title=v.accessibleTitle),d.getAttribute("aria-label")!==v.accessibleHint&&v.accessibleHint!==null&&d.setAttribute("aria-label",v.accessibleHint)),(v.accessibleTitle!==d.title||v.tabIndex!==d.tabIndex)&&(d.title=v.accessibleTitle,d.tabIndex=v.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}},t.prototype.updateDebugHTML=function(e){e.innerHTML="type: "+e.type+"</br> title : "+e.title+"</br> tabIndex: "+e.tabIndex},t.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);var r=this.renderer,n=r.width,i=r.height;e.x+e.width>n&&(e.width=n-e.x),e.y+e.height>i&&(e.height=i-e.y)},t.prototype.addChild=function(e){var r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=Xl+"px",r.style.height=Xl+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=hg.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title="displayObject "+e.tabIndex),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},t.prototype._onClick=function(e){var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"click",i),r.dispatchEvent(n,"pointertap",i),r.dispatchEvent(n,"tap",i)},t.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseover",i)},t.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseout",i)},t.prototype._onKeyDown=function(e){e.keyCode===GU&&this.activate()},t.prototype._onMouseMove=function(e){e.movementX===0&&e.movementY===0||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();/*!
* @pixi/interaction - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/interaction is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var pg=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new _e,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)},t.prototype.copyEvent=function(e){"isPrimary"in e&&e.isPrimary&&(this.isPrimary=!0),this.button="button"in e&&e.button;var r="buttons"in e&&e.buttons;this.buttons=Number.isInteger(r)?r:"which"in e&&e.which,this.width="width"in e&&e.width,this.height="height"in e&&e.height,this.tiltX="tiltX"in e&&e.tiltX,this.tiltY="tiltY"in e&&e.tiltY,this.pointerType="pointerType"in e&&e.pointerType,this.pressure="pressure"in e&&e.pressure,this.rotationAngle="rotationAngle"in e&&e.rotationAngle,this.twist="twist"in e&&e.twist||0,this.tangentialPressure="tangentialPressure"in e&&e.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var jh=function(t,e){return jh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},jh(t,e)};function zU(t,e){jh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var WU=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),bf=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(e,r){r?this._flags=this._flags|e:this._flags=this._flags&~e},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return(this._flags&t.FLAGS.OVER)!==0},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return(this._flags&t.FLAGS.RIGHT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return(this._flags&t.FLAGS.LEFT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1<<0,LEFT_DOWN:1<<1,RIGHT_DOWN:1<<2}),t}(),YU=function(){function t(){this._tempPoint=new _e}return t.prototype.recursiveFindHit=function(e,r,n,i,o){if(!r||!r.visible)return!1;var a=e.data.global;o=r.interactive||o;var s=!1,l=o,u=!0;if(r.hitArea?(i&&(r.worldTransform.applyInverse(a,this._tempPoint),r.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(i=!1,u=!1)),l=!1):r._mask&&i&&(r._mask.containsPoint&&r._mask.containsPoint(a)||(i=!1)),u&&r.interactiveChildren&&r.children)for(var c=r.children,f=c.length-1;f>=0;f--){var h=c[f],d=this.recursiveFindHit(e,h,n,i,l);if(d){if(!h.parent)continue;l=!1,d&&(e.target&&(i=!1),s=!0)}}return o&&(i&&!e.target&&!r.hitArea&&r.containsPoint&&r.containsPoint(a)&&(s=!0),r.interactive&&(s&&!e.target&&(e.target=r),n&&n(e,r,!!s))),s},t.prototype.findHit=function(e,r,n,i){this.recursiveFindHit(e,r,n,i,!1)},t}(),KU={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(t){t?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};ar.mixin(KU);var zl=1,Wl={target:null,data:{global:null}},ZU=function(t){zU(e,t);function e(r,n){var i=t.call(this)||this;return n=n||{},i.renderer=r,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new pg,i.mouse.identifier=zl,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[zl]=i.mouse,i.interactionDataPool=[],i.eventData=new WU,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new YU,i._tempDisplayObject=new V1,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(r){this._useSystemTicker=r,r?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(r,n){return Wl.target=null,Wl.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Wl,n,null,!0),Wl.target},e.prototype.setTargetElement=function(r,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=r,this.resolution=n,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(gr.system.add(this.tickerUpdate,this,vi.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){!this.tickerAdded||(gr.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(r){this._deltaTime+=r,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())},e.prototype.update=function(){if(!!this.interactionDOMElement){if(this._didMove){this._didMove=!1;return}this.cursor=null;for(var r in this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(r)){var n=this.activeInteractionData[r];if(n.originalEvent&&n.pointerType!=="touch"){var i=this.configureInteractionEventForDOMEvent(this.eventData,n.originalEvent,n);this.processInteractive(i,this.lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(r){r=r||"default";var n=!0;if(globalThis.OffscreenCanvas&&this.interactionDOMElement instanceof OffscreenCanvas&&(n=!1),this.currentCursorMode!==r){this.currentCursorMode=r;var i=this.cursorStyles[r];if(i)switch(typeof i){case"string":n&&(this.interactionDOMElement.style.cursor=i);break;case"function":i(r);break;case"object":n&&Object.assign(this.interactionDOMElement.style,i);break}else n&&typeof r=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,r)&&(this.interactionDOMElement.style.cursor=r)}},e.prototype.dispatchEvent=function(r,n,i){(!i.stopPropagationHint||r===i.stopsPropagatingAt)&&(i.currentTarget=r,i.type=n,r.emit(n,i),r[n]&&r[n](i))},e.prototype.delayDispatchEvent=function(r,n,i){this.delayedEvents.push({displayObject:r,eventString:n,eventData:i})},e.prototype.mapPositionToPoint=function(r,n,i){var o;this.interactionDOMElement.parentElement?o=this.interactionDOMElement.getBoundingClientRect():o={x:0,y:0,width:this.interactionDOMElement.width,height:this.interactionDOMElement.height,left:0,top:0};var a=1/this.resolution;r.x=(n-o.left)*(this.interactionDOMElement.width/o.width)*a,r.y=(i-o.top)*(this.interactionDOMElement.height/o.height)*a},e.prototype.processInteractive=function(r,n,i,o){var a=this.search.findHit(r,n,i,o),s=this.delayedEvents;if(!s.length)return a;r.stopPropagationHint=!1;var l=s.length;this.delayedEvents=[];for(var u=0;u<l;u++){var c=s[u],f=c.displayObject,h=c.eventString,d=c.eventData;d.stopsPropagatingAt===f&&(d.stopPropagationHint=!0),this.dispatchEvent(f,h,d)}return a},e.prototype.onPointerDown=function(r){if(!(this.supportsTouchEvents&&r.pointerType==="touch")){var n=this.normalizeToPointerData(r);if(this.autoPreventDefault&&n[0].isNormalized){var i=r.cancelable||!("cancelable"in r);i&&r.preventDefault()}for(var o=n.length,a=0;a<o;a++){var s=n[a],l=this.getInteractionDataForPointerId(s),u=this.configureInteractionEventForDOMEvent(this.eventData,s,l);if(u.data.originalEvent=r,this.processInteractive(u,this.lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",u),s.pointerType==="touch")this.emit("touchstart",u);else if(s.pointerType==="mouse"||s.pointerType==="pen"){var c=s.button===2;this.emit(c?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(r,n,i){var o=r.data,a=r.data.identifier;if(i){if(n.trackedPointers[a]||(n.trackedPointers[a]=new bf(a)),this.dispatchEvent(n,"pointerdown",r),o.pointerType==="touch")this.dispatchEvent(n,"touchstart",r);else if(o.pointerType==="mouse"||o.pointerType==="pen"){var s=o.button===2;s?n.trackedPointers[a].rightDown=!0:n.trackedPointers[a].leftDown=!0,this.dispatchEvent(n,s?"rightdown":"mousedown",r)}}},e.prototype.onPointerComplete=function(r,n,i){for(var o=this.normalizeToPointerData(r),a=o.length,s=r.target!==this.interactionDOMElement?"outside":"",l=0;l<a;l++){var u=o[l],c=this.getInteractionDataForPointerId(u),f=this.configureInteractionEventForDOMEvent(this.eventData,u,c);if(f.data.originalEvent=r,this.processInteractive(f,this.lastObjectRendered,i,n||!s),this.emit(n?"pointercancel":"pointerup"+s,f),u.pointerType==="mouse"||u.pointerType==="pen"){var h=u.button===2;this.emit(h?"rightup"+s:"mouseup"+s,f)}else u.pointerType==="touch"&&(this.emit(n?"touchcancel":"touchend"+s,f),this.releaseInteractionDataForPointerId(u.pointerId))}},e.prototype.onPointerCancel=function(r){this.supportsTouchEvents&&r.pointerType==="touch"||this.onPointerComplete(r,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(r,n){var i=r.data,o=r.data.identifier;n.trackedPointers[o]!==void 0&&(delete n.trackedPointers[o],this.dispatchEvent(n,"pointercancel",r),i.pointerType==="touch"&&this.dispatchEvent(n,"touchcancel",r))},e.prototype.onPointerUp=function(r){this.supportsTouchEvents&&r.pointerType==="touch"||this.onPointerComplete(r,!1,this.processPointerUp)},e.prototype.processPointerUp=function(r,n,i){var o=r.data,a=r.data.identifier,s=n.trackedPointers[a],l=o.pointerType==="touch",u=o.pointerType==="mouse"||o.pointerType==="pen",c=!1;if(u){var f=o.button===2,h=bf.FLAGS,d=f?h.RIGHT_DOWN:h.LEFT_DOWN,p=s!==void 0&&s.flags&d;i?(this.dispatchEvent(n,f?"rightup":"mouseup",r),p&&(this.dispatchEvent(n,f?"rightclick":"click",r),c=!0)):p&&this.dispatchEvent(n,f?"rightupoutside":"mouseupoutside",r),s&&(f?s.rightDown=!1:s.leftDown=!1)}i?(this.dispatchEvent(n,"pointerup",r),l&&this.dispatchEvent(n,"touchend",r),s&&((!u||c)&&this.dispatchEvent(n,"pointertap",r),l&&(this.dispatchEvent(n,"tap",r),s.over=!1))):s&&(this.dispatchEvent(n,"pointerupoutside",r),l&&this.dispatchEvent(n,"touchendoutside",r)),s&&s.none&&delete n.trackedPointers[a]},e.prototype.onPointerMove=function(r){if(!(this.supportsTouchEvents&&r.pointerType==="touch")){var n=this.normalizeToPointerData(r);(n[0].pointerType==="mouse"||n[0].pointerType==="pen")&&(this._didMove=!0,this.cursor=null);for(var i=n.length,o=0;o<i;o++){var a=n[o],s=this.getInteractionDataForPointerId(a),l=this.configureInteractionEventForDOMEvent(this.eventData,a,s);l.data.originalEvent=r,this.processInteractive(l,this.lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",l),a.pointerType==="touch"&&this.emit("touchmove",l),(a.pointerType==="mouse"||a.pointerType==="pen")&&this.emit("mousemove",l)}n[0].pointerType==="mouse"&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(r,n,i){var o=r.data,a=o.pointerType==="touch",s=o.pointerType==="mouse"||o.pointerType==="pen";s&&this.processPointerOverOut(r,n,i),(!this.moveWhenInside||i)&&(this.dispatchEvent(n,"pointermove",r),a&&this.dispatchEvent(n,"touchmove",r),s&&this.dispatchEvent(n,"mousemove",r))},e.prototype.onPointerOut=function(r){if(!(this.supportsTouchEvents&&r.pointerType==="touch")){var n=this.normalizeToPointerData(r),i=n[0];i.pointerType==="mouse"&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=i,this.processInteractive(a,this.lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",a),i.pointerType==="mouse"||i.pointerType==="pen"?this.emit("mouseout",a):this.releaseInteractionDataForPointerId(o.identifier)}},e.prototype.processPointerOverOut=function(r,n,i){var o=r.data,a=r.data.identifier,s=o.pointerType==="mouse"||o.pointerType==="pen",l=n.trackedPointers[a];i&&!l&&(l=n.trackedPointers[a]=new bf(a)),l!==void 0&&(i&&this.mouseOverRenderer?(l.over||(l.over=!0,this.delayDispatchEvent(n,"pointerover",r),s&&this.delayDispatchEvent(n,"mouseover",r)),s&&this.cursor===null&&(this.cursor=n.cursor)):l.over&&(l.over=!1,this.dispatchEvent(n,"pointerout",this.eventData),s&&this.dispatchEvent(n,"mouseout",r),l.none&&delete n.trackedPointers[a]))},e.prototype.onPointerOver=function(r){var n=this.normalizeToPointerData(r),i=n[0],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=i,i.pointerType==="mouse"&&(this.mouseOverRenderer=!0),this.emit("pointerover",a),(i.pointerType==="mouse"||i.pointerType==="pen")&&this.emit("mouseover",a)},e.prototype.getInteractionDataForPointerId=function(r){var n=r.pointerId,i;return n===zl||r.pointerType==="mouse"?i=this.mouse:this.activeInteractionData[n]?i=this.activeInteractionData[n]:(i=this.interactionDataPool.pop()||new pg,i.identifier=n,this.activeInteractionData[n]=i),i.copyEvent(r),i},e.prototype.releaseInteractionDataForPointerId=function(r){var n=this.activeInteractionData[r];n&&(delete this.activeInteractionData[r],n.reset(),this.interactionDataPool.push(n))},e.prototype.configureInteractionEventForDOMEvent=function(r,n,i){return r.data=i,this.mapPositionToPoint(i.global,n.clientX,n.clientY),n.pointerType==="touch"&&(n.globalX=i.global.x,n.globalY=i.global.y),i.originalEvent=n,r.reset(),r},e.prototype.normalizeToPointerData=function(r){var n=[];if(this.supportsTouchEvents&&r instanceof TouchEvent)for(var i=0,o=r.changedTouches.length;i<o;i++){var a=r.changedTouches[i];typeof a.button=="undefined"&&(a.button=r.touches.length?1:0),typeof a.buttons=="undefined"&&(a.buttons=r.touches.length?1:0),typeof a.isPrimary=="undefined"&&(a.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof a.width=="undefined"&&(a.width=a.radiusX||1),typeof a.height=="undefined"&&(a.height=a.radiusY||1),typeof a.tiltX=="undefined"&&(a.tiltX=0),typeof a.tiltY=="undefined"&&(a.tiltY=0),typeof a.pointerType=="undefined"&&(a.pointerType="touch"),typeof a.pointerId=="undefined"&&(a.pointerId=a.identifier||0),typeof a.pressure=="undefined"&&(a.pressure=a.force||.5),typeof a.twist=="undefined"&&(a.twist=0),typeof a.tangentialPressure=="undefined"&&(a.tangentialPressure=0),typeof a.layerX=="undefined"&&(a.layerX=a.offsetX=a.clientX),typeof a.layerY=="undefined"&&(a.layerY=a.offsetY=a.clientY),a.isNormalized=!0,n.push(a)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){var s=r;typeof s.isPrimary=="undefined"&&(s.isPrimary=!0),typeof s.width=="undefined"&&(s.width=1),typeof s.height=="undefined"&&(s.height=1),typeof s.tiltX=="undefined"&&(s.tiltX=0),typeof s.tiltY=="undefined"&&(s.tiltY=0),typeof s.pointerType=="undefined"&&(s.pointerType="mouse"),typeof s.pointerId=="undefined"&&(s.pointerId=zl),typeof s.pressure=="undefined"&&(s.pressure=.5),typeof s.twist=="undefined"&&(s.twist=0),typeof s.tangentialPressure=="undefined"&&(s.tangentialPressure=0),s.isNormalized=!0,n.push(s)}else n.push(r);return n},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e}(Fa);/*!
* @pixi/app - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/app is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Ic=function(){function t(e){var r=this;this.stage=new jn,e=Object.assign({forceCanvas:!1},e),this.renderer=nU(e),t._plugins.forEach(function(n){n.init.call(r,e)})}return t.registerPlugin=function(e){t._plugins.push(e)},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var n=this,i=t._plugins.slice(0);i.reverse(),i.forEach(function(o){o.destroy.call(n)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}(),qU=function(){function t(){}return t.init=function(e){var r=this;Object.defineProperty(this,"resizeTo",{set:function(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){!r._resizeTo||(r.cancelResize(),r._resizeId=requestAnimationFrame(function(){return r.resize()}))},this.cancelResize=function(){r._resizeId&&(cancelAnimationFrame(r._resizeId),r._resizeId=null)},this.resize=function(){if(!!r._resizeTo){r.cancelResize();var n,i;if(r._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{var o=r._resizeTo,a=o.clientWidth,s=o.clientHeight;n=a,i=s}r.renderer.resize(n,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},t.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t}();Ic.registerPlugin(qU);/*!
* @pixi/extract - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/extract is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var _f=/iPhone/i,vg=/iPod/i,mg=/iPad/i,gg=/\biOS-universal(?:.+)Mac\b/i,xf=/\bAndroid(?:.+)Mobile\b/i,yg=/Android/i,zo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Yl=/Silk/i,qn=/Windows Phone/i,bg=/\bWindows(?:.+)ARM\b/i,_g=/BlackBerry/i,xg=/BB10/i,Tg=/Opera Mini/i,wg=/\b(CriOS|Chrome)(?:.+)Mobile/i,Eg=/Mobile(?:.+)Firefox\b/i,Ig=function(t){return typeof t!="undefined"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream=="undefined"};function JU(t){return function(e){return e.test(t)}}function QU(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator!="undefined"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]!="undefined"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]!="undefined"&&(r=n[0]);var i=JU(r),o={apple:{phone:i(_f)&&!i(qn),ipod:i(vg),tablet:!i(_f)&&(i(mg)||Ig(e))&&!i(qn),universal:i(gg),device:(i(_f)||i(vg)||i(mg)||i(gg)||Ig(e))&&!i(qn)},amazon:{phone:i(zo),tablet:!i(zo)&&i(Yl),device:i(zo)||i(Yl)},android:{phone:!i(qn)&&i(zo)||!i(qn)&&i(xf),tablet:!i(qn)&&!i(zo)&&!i(xf)&&(i(Yl)||i(yg)),device:!i(qn)&&(i(zo)||i(Yl)||i(xf)||i(yg))||i(/\bokhttp\b/i)},windows:{phone:i(qn),tablet:i(bg),device:i(qn)||i(bg)},other:{blackberry:i(_g),blackberry10:i(xg),opera:i(Tg),firefox:i(Eg),chrome:i(wg),device:i(_g)||i(xg)||i(Tg)||i(Eg)||i(wg)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}/*!
* @pixi/settings - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var ca=QU(globalThis.navigator);function t5(t){var e=!0;if(ca.tablet||ca.phone){if(ca.apple.device){var r=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(r){var n=parseInt(r[1],10);n<11&&(e=!1)}}if(ca.android.device){var r=navigator.userAgent.match(/Android\s([0-9.]*)/);if(r){var n=parseInt(r[1],10);n<7&&(e=!1)}}}return e?t:4}function e5(){return!ca.apple.device}/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Cg;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(Cg||(Cg={}));var Rg;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(Rg||(Rg={}));var Ng;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(Ng||(Ng={}));var Pg;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(Pg||(Pg={}));var Sg;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Sg||(Sg={}));var Ag;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Ag||(Ag={}));var Og;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Og||(Og={}));var Ug;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(Ug||(Ug={}));var Fg;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(Fg||(Fg={}));var Xh;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(Xh||(Xh={}));var zh;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(zh||(zh={}));var Wh;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(Wh||(Wh={}));var Lg;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Lg||(Lg={}));var Mg;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(Mg||(Mg={}));var Yh;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(Yh||(Yh={}));var ws;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(ws||(ws={}));var Bg;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(Bg||(Bg={}));var Kh;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(Kh||(Kh={}));var kg;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(kg||(kg={}));var q1={MIPMAP_TEXTURES:Wh.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Kh.NONE,SPRITE_MAX_TEXTURES:t5(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:Yh.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:zh.CLAMP,SCALE_MODE:Xh.LINEAR,PRECISION_VERTEX:ws.HIGH,PRECISION_FRAGMENT:ca.apple.device?ws.HIGH:ws.MEDIUM,CAN_UPLOAD_SAME_BUFFER:e5(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};/*!
* @pixi/display - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/display is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/q1.SORTABLE_CHILDREN=!1;var Gg=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?fe.EMPTY:(e=e||new fe(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},t.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},t.prototype.addPointMatrix=function(e,r){var n=e.a,i=e.b,o=e.c,a=e.d,s=e.tx,l=e.ty,u=n*r.x+o*r.y+s,c=i*r.x+a*r.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},t.prototype.addQuad=function(e){var r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=e[0],s=e[1];r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[2],s=e[3],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[4],s=e[5],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,a=e[6],s=e[7],r=a<r?a:r,n=s<n?s:n,i=a>i?a:i,o=s>o?s:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o},t.prototype.addFrame=function(e,r,n,i,o){this.addFrameMatrix(e.worldTransform,r,n,i,o)},t.prototype.addFrameMatrix=function(e,r,n,i,o){var a=e.a,s=e.b,l=e.c,u=e.d,c=e.tx,f=e.ty,h=this.minX,d=this.minY,p=this.maxX,v=this.maxY,m=a*r+l*n+c,y=s*r+u*n+f;h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*i+l*n+c,y=s*i+u*n+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*r+l*o+c,y=s*r+u*o+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,m=a*i+l*o+c,y=s*i+u*o+f,h=m<h?m:h,d=y<d?y:d,p=m>p?m:p,v=y>v?y:v,this.minX=h,this.minY=d,this.maxX=p,this.maxY=v},t.prototype.addVertexData=function(e,r,n){for(var i=this.minX,o=this.minY,a=this.maxX,s=this.maxY,l=r;l<n;l+=2){var u=e[l],c=e[l+1];i=u<i?u:i,o=c<o?c:o,a=u>a?u:a,s=c>s?c:s}this.minX=i,this.minY=o,this.maxX=a,this.maxY=s},t.prototype.addVertices=function(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)},t.prototype.addVerticesMatrix=function(e,r,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=o);for(var s=e.a,l=e.b,u=e.c,c=e.d,f=e.tx,h=e.ty,d=this.minX,p=this.minY,v=this.maxX,m=this.maxY,y=n;y<i;y+=2){var g=r[y],b=r[y+1],T=s*g+u*b+f,w=c*b+l*g+h;d=Math.min(d,T-o),v=Math.max(v,T+o),p=Math.min(p,w-a),m=Math.max(m,w+a)}this.minX=d,this.minY=p,this.maxX=v,this.maxY=m},t.prototype.addBounds=function(e){var r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>o?e.maxY:o},t.prototype.addBoundsMask=function(e,r){var n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,o=e.maxX<r.maxX?e.maxX:r.maxX,a=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=o&&i<=a){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=n<s?n:s,this.minY=i<l?i:l,this.maxX=o>u?o:u,this.maxY=a>c?a:c}},t.prototype.addBoundsMatrix=function(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)},t.prototype.addBoundsArea=function(e,r){var n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,o=e.maxX<r.x+r.width?e.maxX:r.x+r.width,a=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=o&&i<=a){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=n<s?n:s,this.minY=i<l?i:l,this.maxX=o>u?o:u,this.maxY=a>c?a:c}},t.prototype.pad=function(e,r){e===void 0&&(e=0),r===void 0&&(r=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)},t.prototype.addFramePad=function(e,r,n,i,o,a){e-=o,r-=a,n+=o,i+=a,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i},t}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Zh=function(t,e){return Zh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Zh(t,e)};function Dp(t,e){Zh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Xs=function(t){Dp(e,t);function e(){var r=t.call(this)||this;return r.tempDisplayObjectParent=null,r.transform=new pp,r.alpha=1,r.visible=!0,r.renderable=!0,r.cullable=!1,r.cullArea=null,r.parent=null,r.worldAlpha=1,r._lastSortedIndex=0,r._zIndex=0,r.filterArea=null,r.filters=null,r._enabledFilters=null,r._bounds=new Gg,r._localBounds=null,r._boundsID=0,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._maskRefCount=0,r._destroyed=!1,r.isSprite=!1,r.isMask=!1,r}return e.mixin=function(r){for(var n=Object.keys(r),i=0;i<n.length;++i){var o=n[i];Object.defineProperty(e.prototype,o,Object.getOwnPropertyDescriptor(r,o))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(r,n){return r||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),n||(this._boundsRect||(this._boundsRect=new fe),n=this._boundsRect),this._bounds.getRectangle(n)},e.prototype.getLocalBounds=function(r){r||(this._localBoundsRect||(this._localBoundsRect=new fe),r=this._localBoundsRect),this._localBounds||(this._localBounds=new Gg);var n=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var o=this._bounds,a=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,r);return this.parent=i,this.transform=n,this._bounds=o,this._bounds.updateID+=this._boundsID-a,s},e.prototype.toGlobal=function(r,n,i){return i===void 0&&(i=!1),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(r,n)},e.prototype.toLocal=function(r,n,i,o){return n&&(r=n.toGlobal(r,i,o)),o||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(r,i)},e.prototype.setParent=function(r){if(!r||!r.addChild)throw new Error("setParent: Argument must be a Container");return r.addChild(this),r},e.prototype.setTransform=function(r,n,i,o,a,s,l,u,c){return r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=1),a===void 0&&(a=0),s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0),this.position.x=r,this.position.y=n,this.scale.x=i||1,this.scale.y=o||1,this.rotation=a,this.skew.x=s,this.skew.y=l,this.pivot.x=u,this.pivot.y=c,this},e.prototype.destroy=function(r){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new r5),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var r=this.parent;return this.parent=this._tempDisplayObjectParent,r},e.prototype.disableTempParent=function(r){this.parent=r},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(r){this.transform.position.x=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(r){this.transform.position.y=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(r){this.transform.position.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(r){this.transform.scale.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(r){this.transform.pivot.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(r){this.transform.skew.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(r){this.transform.rotation=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*E1},set:function(r){this.transform.rotation=r*I1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(r){this._zIndex=r,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var r=this;do{if(!r.visible)return!1;r=r.parent}while(r);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(r){if(this._mask!==r){if(this._mask){var n=this._mask.maskObject||this._mask;n._maskRefCount--,n._maskRefCount===0&&(n.renderable=!0,n.isMask=!1)}if(this._mask=r,this._mask){var n=this._mask.maskObject||this._mask;n._maskRefCount===0&&(n.renderable=!1,n.isMask=!0),n._maskRefCount++}}},enumerable:!1,configurable:!0}),e}(Fa),r5=function(t){Dp(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.sortDirty=null,r}return e}(Xs);Xs.prototype.displayObjectUpdateTransform=Xs.prototype.updateTransform;/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Dg;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(Dg||(Dg={}));var Hg;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(Hg||(Hg={}));var Vg;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(Vg||(Vg={}));var $g;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})($g||($g={}));var jg;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(jg||(jg={}));var Xg;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Xg||(Xg={}));var zg;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(zg||(zg={}));var Wg;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(Wg||(Wg={}));var Yg;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(Yg||(Yg={}));var Kg;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(Kg||(Kg={}));var Zg;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Zg||(Zg={}));var qg;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(qg||(qg={}));var Jg;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Jg||(Jg={}));var Qg;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(Qg||(Qg={}));var t0;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(t0||(t0={}));var e0;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(e0||(e0={}));var qh;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(qh||(qh={}));var r0;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(r0||(r0={}));var n0;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(n0||(n0={}));function n5(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}var i0=function(t){Dp(e,t);function e(){var r=t.call(this)||this;return r.children=[],r.sortableChildren=q1.SORTABLE_CHILDREN,r.sortDirty=!1,r}return e.prototype.onChildrenChange=function(r){},e.prototype.addChild=function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];if(n.length>1)for(var o=0;o<n.length;o++)this.addChild(n[o]);else{var a=n[0];a.parent&&a.parent.removeChild(a),a.parent=this,this.sortDirty=!0,a.transform._parentID=-1,this.children.push(a),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",a,this,this.children.length-1),a.emit("added",this)}return n[0]},e.prototype.addChildAt=function(r,n){if(n<0||n>this.children.length)throw new Error(r+"addChildAt: The index "+n+" supplied is out of bounds "+this.children.length);return r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.splice(n,0,r),this._boundsID++,this.onChildrenChange(n),r.emit("added",this),this.emit("childAdded",r,this,n),r},e.prototype.swapChildren=function(r,n){if(r!==n){var i=this.getChildIndex(r),o=this.getChildIndex(n);this.children[i]=n,this.children[o]=r,this.onChildrenChange(i<o?i:o)}},e.prototype.getChildIndex=function(r){var n=this.children.indexOf(r);if(n===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return n},e.prototype.setChildIndex=function(r,n){if(n<0||n>=this.children.length)throw new Error("The index "+n+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(r);ui(this.children,i,1),this.children.splice(n,0,r),this.onChildrenChange(n)},e.prototype.getChildAt=function(r){if(r<0||r>=this.children.length)throw new Error("getChildAt: Index ("+r+") does not exist.");return this.children[r]},e.prototype.removeChild=function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];if(n.length>1)for(var o=0;o<n.length;o++)this.removeChild(n[o]);else{var a=n[0],s=this.children.indexOf(a);if(s===-1)return null;a.parent=null,a.transform._parentID=-1,ui(this.children,s,1),this._boundsID++,this.onChildrenChange(s),a.emit("removed",this),this.emit("childRemoved",a,this,s)}return n[0]},e.prototype.removeChildAt=function(r){var n=this.getChildAt(r);return n.parent=null,n.transform._parentID=-1,ui(this.children,r,1),this._boundsID++,this.onChildrenChange(r),n.emit("removed",this),this.emit("childRemoved",n,this,r),n},e.prototype.removeChildren=function(r,n){r===void 0&&(r=0),n===void 0&&(n=this.children.length);var i=r,o=n,a=o-i,s;if(a>0&&a<=o){s=this.children.splice(i,a);for(var l=0;l<s.length;++l)s[l].parent=null,s[l].transform&&(s[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(r);for(var l=0;l<s.length;++l)s[l].emit("removed",this),this.emit("childRemoved",s[l],this,l);return s}else if(a===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var r=!1,n=0,i=this.children.length;n<i;++n){var o=this.children[n];o._lastSortedIndex=n,!r&&o.zIndex!==0&&(r=!0)}r&&this.children.length>1&&this.children.sort(n5),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var r=0,n=this.children.length;r<n;++r){var i=this.children[r];i.visible&&i.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var r=0;r<this.children.length;r++){var n=this.children[r];if(!(!n.visible||!n.renderable))if(n.calculateBounds(),n._mask){var i=n._mask.maskObject||n._mask;i.calculateBounds(),this._bounds.addBoundsMask(n._bounds,i._bounds)}else n.filterArea?this._bounds.addBoundsArea(n._bounds,n.filterArea):this._bounds.addBounds(n._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(r,n){n===void 0&&(n=!1);var i=t.prototype.getLocalBounds.call(this,r);if(!n)for(var o=0,a=this.children.length;o<a;++o){var s=this.children[o];s.visible&&s.updateTransform()}return i},e.prototype._calculateBounds=function(){},e.prototype._renderWithCulling=function(r){var n=r.renderTexture.sourceFrame;if(n.width>0&&n.height>0){var i,o;if(this.cullArea?(i=this.cullArea,o=this.worldTransform):this._render!==e.prototype._render&&(i=this.getBounds(!0)),i&&n.intersects(i,o))this._render(r);else if(this.cullArea)return;for(var a=0,s=this.children.length;a<s;++a){var l=this.children[a],u=l.cullable;l.cullable=u||!this.cullArea,l.render(r),l.cullable=u}}},e.prototype.render=function(r){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(r);else if(this.cullable)this._renderWithCulling(r);else{this._render(r);for(var n=0,i=this.children.length;n<i;++n)this.children[n].render(r)}},e.prototype.renderAdvanced=function(r){var n=this.filters,i=this._mask;if(n){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var o=0;o<n.length;o++)n[o].enabled&&this._enabledFilters.push(n[o])}var a=n&&this._enabledFilters&&this._enabledFilters.length||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==qh.NONE));if(a&&r.batch.flush(),n&&this._enabledFilters&&this._enabledFilters.length&&r.filter.push(this,this._enabledFilters),i&&r.mask.push(this,this._mask),this.cullable)this._renderWithCulling(r);else{this._render(r);for(var o=0,s=this.children.length;o<s;++o)this.children[o].render(r)}a&&r.batch.flush(),i&&r.mask.pop(this),n&&this._enabledFilters&&this._enabledFilters.length&&r.filter.pop()},e.prototype._render=function(r){},e.prototype.destroy=function(r){t.prototype.destroy.call(this),this.sortDirty=!1;var n=typeof r=="boolean"?r:r&&r.children,i=this.removeChildren(0,this.children.length);if(n)for(var o=0;o<i.length;++o)i[o].destroy(r)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(r){var n=this.getLocalBounds().width;n!==0?this.scale.x=r/n:this.scale.x=1,this._width=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(r){var n=this.getLocalBounds().height;n!==0?this.scale.y=r/n:this.scale.y=1,this._height=r},enumerable:!1,configurable:!0}),e}(Xs);i0.prototype.containerUpdateTransform=i0.prototype.updateTransform;var Tf=new fe,o0=4,i5=function(){function t(e){this.renderer=e}return t.prototype.image=function(e,r,n){var i=new Image;return i.src=this.base64(e,r,n),i},t.prototype.base64=function(e,r,n){return this.canvas(e).toDataURL(r,n)},t.prototype.canvas=function(e){var r=this.renderer,n,i,o=!1,a,s=!1;e&&(e instanceof Uo?a=e:(a=this.renderer.generateTexture(e),s=!0)),a?(n=a.baseTexture.resolution,i=a.frame,o=!1,r.renderTexture.bind(a)):(n=this.renderer.resolution,o=!0,i=Tf,i.width=this.renderer.width,i.height=this.renderer.height,r.renderTexture.bind(null));var l=Math.floor(i.width*n+1e-4),u=Math.floor(i.height*n+1e-4),c=new Um(l,u,1),f=new Uint8Array(o0*l*u),h=r.gl;h.readPixels(i.x*n,i.y*n,l,u,h.RGBA,h.UNSIGNED_BYTE,f);var d=c.context.getImageData(0,0,l,u);if(t.arrayPostDivide(f,d.data),c.context.putImageData(d,0,0),o){var p=new Um(c.width,c.height,1);p.context.scale(1,-1),p.context.drawImage(c.canvas,0,-u),c.destroy(),c=p}return s&&a.destroy(!0),c.canvas},t.prototype.pixels=function(e,r){var n=this.renderer,i,o,a,s=!1;e&&(e instanceof Uo?a=e:e instanceof Xs&&(a=this.renderer.generateTexture(e),s=!0)),a?r?(i=r.resolution,o=a.frame,n.renderTexture.bind(a)):(i=a.baseTexture.resolution,o=a.frame,n.renderTexture.bind(a)):r?(i=r.resolution,o=Tf,o.width=r.width,o.height=r.height,n.renderTexture.bind(null)):(i=n.resolution,o=Tf,o.width=n.width,o.height=n.height,n.renderTexture.bind(null));var l=o.width*i,u=o.height*i,c=new Uint8Array(o0*l*u),f=n.gl;return f.readPixels(o.x*i,o.y*i,l,u,f.RGBA,f.UNSIGNED_BYTE,c),s&&a.destroy(!0),t.arrayPostDivide(c,c),c},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(e,r){for(var n=0;n<e.length;n+=4){var i=r[n+3]=e[n+3];i!==0?(r[n]=Math.round(Math.min(e[n]*255/i,255)),r[n+1]=Math.round(Math.min(e[n+1]*255/i,255)),r[n+2]=Math.round(Math.min(e[n+2]*255/i,255))):(r[n]=e[n],r[n+1]=e[n+1],r[n+2]=e[n+2])}},t}();/*!
* @pixi/loaders - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/loaders is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Kl=function(){function t(e,r,n){r===void 0&&(r=!1),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return t.prototype.detach=function(){return this._owner===null?!1:(this._owner.detach(this),!0)},t}();function a0(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var ni=function(){function t(){this._head=this._tail=void 0}return t.prototype.handlers=function(e){e===void 0&&(e=!1);var r=this._head;if(e)return!!r;for(var n=[];r;)n.push(r),r=r._next;return n},t.prototype.has=function(e){if(!(e instanceof Kl))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return e._owner===this},t.prototype.dispatch=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++)r[n]=e[n];var i=this._head;if(!i)return!1;for(;i;)i._once&&this.detach(i),i._fn.apply(i._thisArg,r),i=i._next;return!0},t.prototype.add=function(e,r){if(r===void 0&&(r=null),typeof e!="function")throw new Error("MiniSignal#add(): First arg must be a Function.");return a0(this,new Kl(e,!1,r))},t.prototype.once=function(e,r){if(r===void 0&&(r=null),typeof e!="function")throw new Error("MiniSignal#once(): First arg must be a Function.");return a0(this,new Kl(e,!0,r))},t.prototype.detach=function(e){if(!(e instanceof Kl))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return e._owner!==this?this:(e._prev&&(e._prev._next=e._next),e._next&&(e._next._prev=e._prev),e===this._head?(this._head=e._next,e._next===null&&(this._tail=null)):e===this._tail&&(this._tail=e._prev,this._tail._next=null),e._owner=null,this)},t.prototype.detachAll=function(){var e=this._head;if(!e)return this;for(this._head=this._tail=null;e;)e._owner=null,e=e._next;return this},t}();function J1(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},n=r.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[r.key[o]]=n[o]||"";return i[r.q.name]={},i[r.key[12]].replace(r.q.parser,function(a,s,l){s&&(i[r.q.name][s]=l)}),i}var wf,Zl=null,o5=0,s0=200,a5=204,s5=1223,l5=2;function l0(){}function u0(t,e,r){e&&e.indexOf(".")===0&&(e=e.substring(1)),e&&(t[e]=r)}function Ef(t){return t.toString().replace("object ","")}var Qe=function(){function t(e,r,n){if(this._dequeue=l0,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,typeof e!="string"||typeof r!="string")throw new Error("Both name and url are required for constructing a resource.");n=n||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,r.indexOf("data:")===0),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=n.crossOrigin===!0?"anonymous":n.crossOrigin,this.timeout=n.timeout||0,this.loadType=n.loadType||this._determineLoadType(),this.xhrType=n.xhrType,this.metadata=n.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=l0,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new ni,this.onProgress=new ni,this.onComplete=new ni,this.onAfterMiddleware=new ni}return t.setExtensionLoadType=function(e,r){u0(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){u0(t._xhrTypeMap,e,r)},Object.defineProperty(t.prototype,"isDataUrl",{get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isComplete",{get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)},enumerable:!1,configurable:!0}),t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var r=this;if(!this.isLoading){if(this.isComplete){e&&setTimeout(function(){return e(r)},1);return}else e&&this.onComplete.once(e);switch(this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),(this.crossOrigin===!1||typeof this.crossOrigin!="string")&&(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:typeof wf=="undefined"&&(wf=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),wf&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},t.prototype._hasFlag=function(e){return(this._flags&e)!==0},t.prototype._setFlag=function(e,r){this._flags=r?this._flags|e:this._flags&~e},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(e){this.metadata.loadElement?this.data=this.metadata.loadElement:e==="image"&&typeof globalThis.Image!="undefined"?this.data=new Image:this.data=document.createElement(e),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(e){if(this.metadata.loadElement?this.data=this.metadata.loadElement:e==="audio"&&typeof globalThis.Audio!="undefined"?this.data=new Audio:this.data=document.createElement(e),this.data===null){this.abort("Unsupported element: "+e);return}if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var r=this.metadata.mimeType,n=0;n<this.url.length;++n)this.data.appendChild(this._createSource(e,this.url[n],Array.isArray(r)?r[n]:r));else{var r=this.metadata.mimeType;this.data.appendChild(this._createSource(e,this.url,Array.isArray(r)?r[0]:r))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadXhr=function(){typeof this.xhrType!="string"&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;this.crossOrigin==="use-credentials"&&(e.withCredentials=!0),e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){typeof this.xhrType!="string"&&(this.xhrType=this._determineXhrType());var e=this.xhr=new globalThis.XDomainRequest;e.timeout=this.timeout||5e3,e.onerror=this._boundXhrOnError,e.ontimeout=this._boundXhrOnTimeout,e.onprogress=this._boundOnProgress,e.onload=this._boundXhrOnLoad,e.open("GET",this.url,!0),setTimeout(function(){return e.send()},1)},t.prototype._createSource=function(e,r,n){n||(n=e+"/"+this._getExtension(r));var i=document.createElement("source");return i.src=r,i.type=n,i},t.prototype._onError=function(e){this.abort("Failed to load element using: "+e.target.nodeName)},t.prototype._onProgress=function(e){e&&e.lengthComputable&&this.onProgress.dispatch(this,e.loaded/e.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var e=this.xhr;this.abort(Ef(e)+" Request failed. Status: "+e.status+', text: "'+e.statusText+'"')},t.prototype._xhrOnTimeout=function(){var e=this.xhr;this.abort(Ef(e)+" Request timed out.")},t.prototype._xhrOnAbort=function(){var e=this.xhr;this.abort(Ef(e)+" Request was aborted by the user.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",n=typeof e.status=="undefined"?s0:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType=="undefined")&&(r=e.responseText),n===o5&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=s0:n===s5&&(n=a5);var i=n/100|0;if(i===l5)if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(s){this.abort("Error trying to parse loaded json: "+s);return}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var o=new DOMParser;this.data=o.parseFromString(r,"text/xml")}else{var a=document.createElement("div");a.innerHTML=r,this.data=a}this.type=t.TYPE.XML}catch(s){this.abort("Error trying to parse loaded xml: "+s);return}else this.data=e.response||r;else{this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);return}this.complete()},t.prototype._determineCrossOrigin=function(e,r){if(e.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";r=r||globalThis.location,Zl||(Zl=document.createElement("a")),Zl.href=e;var n=J1(Zl.href,{strictMode:!0}),i=!n.port&&r.port===""||n.port===r.port,o=n.protocol?n.protocol+":":"";return n.host!==r.hostname||!i||o!==r.protocol?"anonymous":""},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(e){e===void 0&&(e=this.url);var r="";if(this.isDataUrl){var n=e.indexOf("/");r=e.substring(n+1,e.indexOf(";",n))}else{var i=e.indexOf("?"),o=e.indexOf("#"),a=Math.min(i>-1?i:e.length,o>-1?o:e.length);e=e.substring(0,a),r=e.substring(e.lastIndexOf(".")+1)}return r.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();(function(t){(function(e){e[e.NONE=0]="NONE",e[e.DATA_URL=1]="DATA_URL",e[e.COMPLETE=2]="COMPLETE",e[e.LOADING=4]="LOADING"})(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.JSON=1]="JSON",e[e.XML=2]="XML",e[e.IMAGE=3]="IMAGE",e[e.AUDIO=4]="AUDIO",e[e.VIDEO=5]="VIDEO",e[e.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(e){e[e.XHR=1]="XHR",e[e.IMAGE=2]="IMAGE",e[e.AUDIO=3]="AUDIO",e[e.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(e){e.DEFAULT="text",e.BUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(Qe||(Qe={}));function lo(){}function u5(t){return function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];if(t===null)throw new Error("Callback was already called.");var o=t;t=null,o.apply(this,n)}}var c5=function(){function t(e,r){this.data=e,this.callback=r}return t}(),If=function(){function t(e,r){var n=this;if(r===void 0&&(r=1),this.workers=0,this.saturated=lo,this.unsaturated=lo,this.empty=lo,this.drain=lo,this.error=lo,this.started=!1,this.paused=!1,this._tasks=[],this._insert=function(i,o,a){if(a&&typeof a!="function")throw new Error("task callback must be a function");if(n.started=!0,i==null&&n.idle()){setTimeout(function(){return n.drain()},1);return}var s=new c5(i,typeof a=="function"?a:lo);o?n._tasks.unshift(s):n._tasks.push(s),setTimeout(n.process,1)},this.process=function(){for(;!n.paused&&n.workers<n.concurrency&&n._tasks.length;){var i=n._tasks.shift();n._tasks.length===0&&n.empty(),n.workers+=1,n.workers===n.concurrency&&n.saturated(),n._worker(i.data,u5(n._next(i)))}},this._worker=e,r===0)throw new Error("Concurrency must not be zero");this.concurrency=r,this.buffer=r/4}return t.prototype._next=function(e){var r=this;return function(){for(var n=arguments,i=[],o=0;o<arguments.length;o++)i[o]=n[o];r.workers-=1,e.callback.apply(e,i),i[0]!=null&&r.error(i[0],e.data),r.workers<=r.concurrency-r.buffer&&r.unsaturated(),r.idle()&&r.drain(),r.process()}},t.prototype.push=function(e,r){this._insert(e,!1,r)},t.prototype.kill=function(){this.workers=0,this.drain=lo,this.started=!1,this._tasks=[]},t.prototype.unshift=function(e,r){this._insert(e,!0,r)},t.prototype.length=function(){return this._tasks.length},t.prototype.running=function(){return this.workers},t.prototype.idle=function(){return this._tasks.length+this.workers===0},t.prototype.pause=function(){this.paused!==!0&&(this.paused=!0)},t.prototype.resume=function(){if(this.paused!==!1){this.paused=!1;for(var e=1;e<=this.concurrency;e++)this.process()}},t.eachSeries=function(e,r,n,i){var o=0,a=e.length;function s(l){if(l||o===a){n&&n(l);return}i?setTimeout(function(){r(e[o++],s)},1):r(e[o++],s)}s()},t.queue=function(e,r){return new t(e,r)},t}(),Cf=100,f5=/(#[\w-]+)?$/,Xn=function(){function t(e,r){var n=this;e===void 0&&(e=""),r===void 0&&(r=10),this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(l,u){return n._loadResource(l,u)},this.resources={},this.baseUrl=e,this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(l,u){return n._loadResource(l,u)},this._queue=If.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new ni,this.onError=new ni,this.onLoad=new ni,this.onStart=new ni,this.onComplete=new ni;for(var i=0;i<t._plugins.length;++i){var o=t._plugins[i],a=o.pre,s=o.use;a&&this.pre(a),s&&this.use(s)}this._protected=!1}return t.prototype._add=function(e,r,n,i){if(this.loading&&(!n||!n.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[e])throw new Error('Resource named "'+e+'" already exists.');if(r=this._prepareUrl(r),this.resources[e]=new Qe(e,r,n),typeof i=="function"&&this.resources[e].onAfterMiddleware.once(i),this.loading){for(var o=n.parentResource,a=[],s=0;s<o.children.length;++s)o.children[s].isComplete||a.push(o.children[s]);var l=o.progressChunk*(a.length+1),u=l/(a.length+2);o.children.push(this.resources[e]),o.progressChunk=u;for(var s=0;s<a.length;++s)a[s].progressChunk=u;this.resources[e].progressChunk=u}return this._queue.push(this.resources[e]),this},t.prototype.pre=function(e){return this._beforeMiddleware.push(e),this},t.prototype.use=function(e){return this._afterMiddleware.push(e),this},t.prototype.reset=function(){this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause();for(var e in this.resources){var r=this.resources[e];r._onLoadBinding&&r._onLoadBinding.detach(),r.isLoading&&r.abort("loader reset")}return this.resources={},this},t.prototype.load=function(e){if(typeof e=="function"&&this.onComplete.once(e),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var r=this._queue._tasks.length,n=Cf/r,i=0;i<this._queue._tasks.length;++i)this._queue._tasks[i].data.progressChunk=n;this._onStart(),this._queue.resume()}return this},Object.defineProperty(t.prototype,"concurrency",{get:function(){return this._queue.concurrency},set:function(e){this._queue.concurrency=e},enumerable:!1,configurable:!0}),t.prototype._prepareUrl=function(e){var r=J1(e,{strictMode:!0}),n;if(r.protocol||!r.path||e.indexOf("//")===0?n=e:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&e.charAt(0)!=="/"?n=this.baseUrl+"/"+e:n=this.baseUrl+e,this.defaultQueryString){var i=f5.exec(n)[0];n=n.slice(0,n.length-i.length),n.indexOf("?")!==-1?n+="&"+this.defaultQueryString:n+="?"+this.defaultQueryString,n+=i}return n},t.prototype._loadResource=function(e,r){var n=this;e._dequeue=r,If.eachSeries(this._beforeMiddleware,function(i,o){i.call(n,e,function(){o(e.isComplete?{}:null)})},function(){e.isComplete?n._onLoad(e):(e._onLoadBinding=e.onComplete.once(n._onLoad,n),e.load())},!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=Cf,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(e){var r=this;e._onLoadBinding=null,this._resourcesParsing.push(e),e._dequeue(),If.eachSeries(this._afterMiddleware,function(n,i){n.call(r,e,i)},function(){e.onAfterMiddleware.dispatch(e),r.progress=Math.min(Cf,r.progress+e.progressChunk),r.onProgress.dispatch(r,e),e.error?r.onError.dispatch(e.error,r,e):r.onLoad.dispatch(r,e),r._resourcesParsing.splice(r._resourcesParsing.indexOf(e),1),r._queue.idle()&&r._resourcesParsing.length===0&&r._onComplete()},!0)},t.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(t,"shared",{get:function(){var e=t._shared;return e||(e=new t,e._protected=!0,t._shared=e),e},enumerable:!1,configurable:!0}),t.registerPlugin=function(e){return t._plugins.push(e),e.add&&e.add(),t},t._plugins=[],t}();Xn.prototype.add=function(e,r,n,i){if(Array.isArray(e)){for(var o=0;o<e.length;++o)this.add(e[o]);return this}if(typeof e=="object"&&(n=e,i=r||n.callback||n.onComplete,r=n.url,e=n.name||n.key||n.url),typeof r!="string"&&(i=n,n=r,r=e),typeof r!="string")throw new Error("No url passed to add resource to loader.");return typeof n=="function"&&(i=n,n=null),this._add(e,r,n,i)};var h5=function(){function t(){}return t.init=function(e){e=Object.assign({sharedLoader:!1},e),this.loader=e.sharedLoader?Xn.shared:new Xn},t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t}(),d5=function(){function t(){}return t.add=function(){Qe.setExtensionLoadType("svg",Qe.LOAD_TYPE.XHR),Qe.setExtensionXhrType("svg",Qe.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,r){if(e.data&&(e.type===Qe.TYPE.IMAGE||e.extension==="svg")){var n=e.data,i=e.url,o=e.name,a=e.metadata;Wt.fromLoader(n,i,o,a).then(function(s){e.texture=s,r()}).catch(r)}else r()},t}(),p5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function v5(t){for(var e="",r=0;r<t.length;){for(var n=[0,0,0],i=[0,0,0,0],o=0;o<n.length;++o)r<t.length?n[o]=t.charCodeAt(r++)&255:n[o]=0;i[0]=n[0]>>2,i[1]=(n[0]&3)<<4|n[1]>>4,i[2]=(n[1]&15)<<2|n[2]>>6,i[3]=n[2]&63;var a=r-(t.length-1);switch(a){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64;break}for(var o=0;o<i.length;++o)e+=p5.charAt(i[o])}return e}function m5(t,e){if(!t.data){e();return}if(t.xhr&&t.xhrType===Qe.XHR_RESPONSE_TYPE.BLOB){if(!self.Blob||typeof t.data=="string"){var r=t.xhr.getResponseHeader("content-type");if(r&&r.indexOf("image")===0){t.data=new Image,t.data.src="data:"+r+";base64,"+v5(t.xhr.responseText),t.type=Qe.TYPE.IMAGE,t.data.onload=function(){t.data.onload=null,e()};return}}else if(t.data.type.indexOf("image")===0){var n=globalThis.URL||globalThis.webkitURL,i=n.createObjectURL(t.data);t.blob=t.data,t.data=new Image,t.data.src=i,t.type=Qe.TYPE.IMAGE,t.data.onload=function(){n.revokeObjectURL(i),t.data.onload=null,e()};return}}e()}Xn.registerPlugin({use:m5});Xn.registerPlugin(d5);/*!
* @pixi/compressed-textures - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/compressed-textures is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Se,ee;(function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",t[t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"})(ee||(ee={}));var zu=(Se={},Se[ee.COMPRESSED_RGB_S3TC_DXT1_EXT]=.5,Se[ee.COMPRESSED_RGBA_S3TC_DXT1_EXT]=.5,Se[ee.COMPRESSED_RGBA_S3TC_DXT3_EXT]=1,Se[ee.COMPRESSED_RGBA_S3TC_DXT5_EXT]=1,Se[ee.COMPRESSED_SRGB_S3TC_DXT1_EXT]=.5,Se[ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]=.5,Se[ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]=1,Se[ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]=1,Se[ee.COMPRESSED_R11_EAC]=.5,Se[ee.COMPRESSED_SIGNED_R11_EAC]=.5,Se[ee.COMPRESSED_RG11_EAC]=1,Se[ee.COMPRESSED_SIGNED_RG11_EAC]=1,Se[ee.COMPRESSED_RGB8_ETC2]=.5,Se[ee.COMPRESSED_RGBA8_ETC2_EAC]=1,Se[ee.COMPRESSED_SRGB8_ETC2]=.5,Se[ee.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]=1,Se[ee.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Se[ee.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Se[ee.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]=.5,Se[ee.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]=.5,Se[ee.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]=.25,Se[ee.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]=.25,Se[ee.COMPRESSED_RGB_ETC1_WEBGL]=.5,Se[ee.COMPRESSED_RGB_ATC_WEBGL]=.5,Se[ee.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]=1,Se[ee.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]=1,Se);/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Jh=function(t,e){return Jh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Jh(t,e)};function Q1(t,e){Jh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function g5(t,e,r,n){return new(r||(r=Promise))(function(i,o){function a(u){try{l(n.next(u))}catch(c){o(c)}}function s(u){try{l(n.throw(u))}catch(c){o(c)}}function l(u){u.done?i(u.value):new r(function(c){c(u.value)}).then(a,s)}l((n=n.apply(t,e||[])).next())})}function y5(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(c){u=[6,c],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var b5=function(t){Q1(e,t);function e(r,n){n===void 0&&(n={width:1,height:1,autoLoad:!0});var i=this,o,a;return typeof r=="string"?(o=r,a=new Uint8Array):(o=null,a=r),i=t.call(this,a,n)||this,i.origin=o,i.buffer=a?new kh(a):null,i.origin&&n.autoLoad!==!1&&i.load(),a&&a.length&&(i.loaded=!0,i.onBlobLoaded(i.buffer.rawBinaryData)),i}return e.prototype.onBlobLoaded=function(r){},e.prototype.load=function(){return g5(this,void 0,Promise,function(){var r,n,i;return y5(this,function(o){switch(o.label){case 0:return[4,fetch(this.origin)];case 1:return r=o.sent(),[4,r.blob()];case 2:return n=o.sent(),[4,n.arrayBuffer()];case 3:return i=o.sent(),this.data=new Uint32Array(i),this.buffer=new kh(i),this.loaded=!0,this.onBlobLoaded(i),this.update(),[2,this]}})})},e}(ul),Qh=function(t){Q1(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.format=n.format,i.levels=n.levels||1,i._width=n.width,i._height=n.height,i._extension=e._formatToExtension(i.format),(n.levelBuffers||i.buffer)&&(i._levelBuffers=n.levelBuffers||e._createLevelBuffers(r instanceof Uint8Array?r:i.buffer.uint8View,i.format,i.levels,4,4,i.width,i.height)),i}return e.prototype.upload=function(r,n,i){var o=r.gl,a=r.context.extensions[this._extension];if(!a)throw new Error(this._extension+" textures are not supported on the current machine");if(!this._levelBuffers)return!1;for(var s=0,l=this.levels;s<l;s++){var u=this._levelBuffers[s],c=u.levelID,f=u.levelWidth,h=u.levelHeight,d=u.levelBuffer;o.compressedTexImage2D(o.TEXTURE_2D,c,this.format,f,h,0,d)}return!0},e.prototype.onBlobLoaded=function(){this._levelBuffers=e._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)},e._formatToExtension=function(r){if(r>=33776&&r<=33779)return"s3tc";if(r>=37488&&r<=37497)return"etc";if(r>=35840&&r<=35843)return"pvrtc";if(r>=36196)return"etc1";if(r>=35986&&r<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(r,n,i,o,a,s,l){for(var u=new Array(i),c=r.byteOffset,f=s,h=l,d=f+o-1&~(o-1),p=h+a-1&~(a-1),v=d*p*zu[n],m=0;m<i;m++)u[m]={levelID:m,levelWidth:i>1?f:d,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(r.buffer,c,v)},c+=v,f=f>>1||1,h=h>>1||1,d=f+o-1&~(o-1),p=h+a-1&~(a-1),v=d*p*zu[n];return u},e}(b5),_5=function(){function t(){}return t.use=function(e,r){var n=e.data,i=this;if(e.type===Qe.TYPE.JSON&&n&&n.cacheID&&n.textures){for(var o=n.textures,a=void 0,s=void 0,l=0,u=o.length;l<u;l++){var c=o[l],f=c.src,h=c.format;if(h||(s=f),t.textureFormats[h]){a=f;break}}if(a=a||s,!a){r(new Error("Cannot load compressed-textures in "+e.url+", make sure you provide a fallback"));return}if(a===e.url){r(new Error("URL of compressed texture cannot be the same as the manifest's URL"));return}var d={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},p=sa.resolve(e.url.replace(i.baseUrl,""),a),v=n.cacheID;i.add(v,p,d,function(m){if(m.error){r(m.error);return}var y=m.texture,g=y===void 0?null:y,b=m.textures,T=b===void 0?{}:b;Object.assign(e,{texture:g,textures:T}),r()})}else r()},Object.defineProperty(t,"textureExtensions",{get:function(){if(!t._textureExtensions){var e=document.createElement("canvas"),r=e.getContext("webgl");if(!r)return console.warn("WebGL not available for compressed textures. Silently failing."),{};var n={s3tc:r.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:r.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:r.getExtension("WEBGL_compressed_texture_etc"),etc1:r.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:r.getExtension("WEBGL_compressed_texture_atc"),astc:r.getExtension("WEBGL_compressed_texture_astc")};t._textureExtensions=n}return t._textureExtensions},enumerable:!1,configurable:!0}),Object.defineProperty(t,"textureFormats",{get:function(){if(!t._textureFormats){var e=t.textureExtensions;t._textureFormats={};for(var r in e){var n=e[r];!n||Object.assign(t._textureFormats,Object.getPrototypeOf(n))}}return t._textureFormats},enumerable:!1,configurable:!0}),t}();function tx(t,e,r){var n={textures:{},texture:null};if(!e)return n;var i=e.map(function(o){return new Wt(new ge(o,Object.assign({mipmap:pi.OFF,alphaMode:En.NO_PREMULTIPLIED_ALPHA},r)))});return i.forEach(function(o,a){var s=o.baseTexture,l=t+"-"+(a+1);ge.addToCache(s,l),Wt.addToCache(o,l),a===0&&(ge.addToCache(s,t),Wt.addToCache(o,t),n.texture=o),n.textures[l]=o}),n}var Ya,un;Qe.setExtensionXhrType("dds",Qe.XHR_RESPONSE_TYPE.BUFFER);var Rf=4,ql=124,x5=32,c0=20,T5=542327876,Jl={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},w5={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Ql={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},fn;(function(t){t[t.DXGI_FORMAT_UNKNOWN=0]="DXGI_FORMAT_UNKNOWN",t[t.DXGI_FORMAT_R32G32B32A32_TYPELESS=1]="DXGI_FORMAT_R32G32B32A32_TYPELESS",t[t.DXGI_FORMAT_R32G32B32A32_FLOAT=2]="DXGI_FORMAT_R32G32B32A32_FLOAT",t[t.DXGI_FORMAT_R32G32B32A32_UINT=3]="DXGI_FORMAT_R32G32B32A32_UINT",t[t.DXGI_FORMAT_R32G32B32A32_SINT=4]="DXGI_FORMAT_R32G32B32A32_SINT",t[t.DXGI_FORMAT_R32G32B32_TYPELESS=5]="DXGI_FORMAT_R32G32B32_TYPELESS",t[t.DXGI_FORMAT_R32G32B32_FLOAT=6]="DXGI_FORMAT_R32G32B32_FLOAT",t[t.DXGI_FORMAT_R32G32B32_UINT=7]="DXGI_FORMAT_R32G32B32_UINT",t[t.DXGI_FORMAT_R32G32B32_SINT=8]="DXGI_FORMAT_R32G32B32_SINT",t[t.DXGI_FORMAT_R16G16B16A16_TYPELESS=9]="DXGI_FORMAT_R16G16B16A16_TYPELESS",t[t.DXGI_FORMAT_R16G16B16A16_FLOAT=10]="DXGI_FORMAT_R16G16B16A16_FLOAT",t[t.DXGI_FORMAT_R16G16B16A16_UNORM=11]="DXGI_FORMAT_R16G16B16A16_UNORM",t[t.DXGI_FORMAT_R16G16B16A16_UINT=12]="DXGI_FORMAT_R16G16B16A16_UINT",t[t.DXGI_FORMAT_R16G16B16A16_SNORM=13]="DXGI_FORMAT_R16G16B16A16_SNORM",t[t.DXGI_FORMAT_R16G16B16A16_SINT=14]="DXGI_FORMAT_R16G16B16A16_SINT",t[t.DXGI_FORMAT_R32G32_TYPELESS=15]="DXGI_FORMAT_R32G32_TYPELESS",t[t.DXGI_FORMAT_R32G32_FLOAT=16]="DXGI_FORMAT_R32G32_FLOAT",t[t.DXGI_FORMAT_R32G32_UINT=17]="DXGI_FORMAT_R32G32_UINT",t[t.DXGI_FORMAT_R32G32_SINT=18]="DXGI_FORMAT_R32G32_SINT",t[t.DXGI_FORMAT_R32G8X24_TYPELESS=19]="DXGI_FORMAT_R32G8X24_TYPELESS",t[t.DXGI_FORMAT_D32_FLOAT_S8X24_UINT=20]="DXGI_FORMAT_D32_FLOAT_S8X24_UINT",t[t.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS=21]="DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS",t[t.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT=22]="DXGI_FORMAT_X32_TYPELESS_G8X24_UINT",t[t.DXGI_FORMAT_R10G10B10A2_TYPELESS=23]="DXGI_FORMAT_R10G10B10A2_TYPELESS",t[t.DXGI_FORMAT_R10G10B10A2_UNORM=24]="DXGI_FORMAT_R10G10B10A2_UNORM",t[t.DXGI_FORMAT_R10G10B10A2_UINT=25]="DXGI_FORMAT_R10G10B10A2_UINT",t[t.DXGI_FORMAT_R11G11B10_FLOAT=26]="DXGI_FORMAT_R11G11B10_FLOAT",t[t.DXGI_FORMAT_R8G8B8A8_TYPELESS=27]="DXGI_FORMAT_R8G8B8A8_TYPELESS",t[t.DXGI_FORMAT_R8G8B8A8_UNORM=28]="DXGI_FORMAT_R8G8B8A8_UNORM",t[t.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB=29]="DXGI_FORMAT_R8G8B8A8_UNORM_SRGB",t[t.DXGI_FORMAT_R8G8B8A8_UINT=30]="DXGI_FORMAT_R8G8B8A8_UINT",t[t.DXGI_FORMAT_R8G8B8A8_SNORM=31]="DXGI_FORMAT_R8G8B8A8_SNORM",t[t.DXGI_FORMAT_R8G8B8A8_SINT=32]="DXGI_FORMAT_R8G8B8A8_SINT",t[t.DXGI_FORMAT_R16G16_TYPELESS=33]="DXGI_FORMAT_R16G16_TYPELESS",t[t.DXGI_FORMAT_R16G16_FLOAT=34]="DXGI_FORMAT_R16G16_FLOAT",t[t.DXGI_FORMAT_R16G16_UNORM=35]="DXGI_FORMAT_R16G16_UNORM",t[t.DXGI_FORMAT_R16G16_UINT=36]="DXGI_FORMAT_R16G16_UINT",t[t.DXGI_FORMAT_R16G16_SNORM=37]="DXGI_FORMAT_R16G16_SNORM",t[t.DXGI_FORMAT_R16G16_SINT=38]="DXGI_FORMAT_R16G16_SINT",t[t.DXGI_FORMAT_R32_TYPELESS=39]="DXGI_FORMAT_R32_TYPELESS",t[t.DXGI_FORMAT_D32_FLOAT=40]="DXGI_FORMAT_D32_FLOAT",t[t.DXGI_FORMAT_R32_FLOAT=41]="DXGI_FORMAT_R32_FLOAT",t[t.DXGI_FORMAT_R32_UINT=42]="DXGI_FORMAT_R32_UINT",t[t.DXGI_FORMAT_R32_SINT=43]="DXGI_FORMAT_R32_SINT",t[t.DXGI_FORMAT_R24G8_TYPELESS=44]="DXGI_FORMAT_R24G8_TYPELESS",t[t.DXGI_FORMAT_D24_UNORM_S8_UINT=45]="DXGI_FORMAT_D24_UNORM_S8_UINT",t[t.DXGI_FORMAT_R24_UNORM_X8_TYPELESS=46]="DXGI_FORMAT_R24_UNORM_X8_TYPELESS",t[t.DXGI_FORMAT_X24_TYPELESS_G8_UINT=47]="DXGI_FORMAT_X24_TYPELESS_G8_UINT",t[t.DXGI_FORMAT_R8G8_TYPELESS=48]="DXGI_FORMAT_R8G8_TYPELESS",t[t.DXGI_FORMAT_R8G8_UNORM=49]="DXGI_FORMAT_R8G8_UNORM",t[t.DXGI_FORMAT_R8G8_UINT=50]="DXGI_FORMAT_R8G8_UINT",t[t.DXGI_FORMAT_R8G8_SNORM=51]="DXGI_FORMAT_R8G8_SNORM",t[t.DXGI_FORMAT_R8G8_SINT=52]="DXGI_FORMAT_R8G8_SINT",t[t.DXGI_FORMAT_R16_TYPELESS=53]="DXGI_FORMAT_R16_TYPELESS",t[t.DXGI_FORMAT_R16_FLOAT=54]="DXGI_FORMAT_R16_FLOAT",t[t.DXGI_FORMAT_D16_UNORM=55]="DXGI_FORMAT_D16_UNORM",t[t.DXGI_FORMAT_R16_UNORM=56]="DXGI_FORMAT_R16_UNORM",t[t.DXGI_FORMAT_R16_UINT=57]="DXGI_FORMAT_R16_UINT",t[t.DXGI_FORMAT_R16_SNORM=58]="DXGI_FORMAT_R16_SNORM",t[t.DXGI_FORMAT_R16_SINT=59]="DXGI_FORMAT_R16_SINT",t[t.DXGI_FORMAT_R8_TYPELESS=60]="DXGI_FORMAT_R8_TYPELESS",t[t.DXGI_FORMAT_R8_UNORM=61]="DXGI_FORMAT_R8_UNORM",t[t.DXGI_FORMAT_R8_UINT=62]="DXGI_FORMAT_R8_UINT",t[t.DXGI_FORMAT_R8_SNORM=63]="DXGI_FORMAT_R8_SNORM",t[t.DXGI_FORMAT_R8_SINT=64]="DXGI_FORMAT_R8_SINT",t[t.DXGI_FORMAT_A8_UNORM=65]="DXGI_FORMAT_A8_UNORM",t[t.DXGI_FORMAT_R1_UNORM=66]="DXGI_FORMAT_R1_UNORM",t[t.DXGI_FORMAT_R9G9B9E5_SHAREDEXP=67]="DXGI_FORMAT_R9G9B9E5_SHAREDEXP",t[t.DXGI_FORMAT_R8G8_B8G8_UNORM=68]="DXGI_FORMAT_R8G8_B8G8_UNORM",t[t.DXGI_FORMAT_G8R8_G8B8_UNORM=69]="DXGI_FORMAT_G8R8_G8B8_UNORM",t[t.DXGI_FORMAT_BC1_TYPELESS=70]="DXGI_FORMAT_BC1_TYPELESS",t[t.DXGI_FORMAT_BC1_UNORM=71]="DXGI_FORMAT_BC1_UNORM",t[t.DXGI_FORMAT_BC1_UNORM_SRGB=72]="DXGI_FORMAT_BC1_UNORM_SRGB",t[t.DXGI_FORMAT_BC2_TYPELESS=73]="DXGI_FORMAT_BC2_TYPELESS",t[t.DXGI_FORMAT_BC2_UNORM=74]="DXGI_FORMAT_BC2_UNORM",t[t.DXGI_FORMAT_BC2_UNORM_SRGB=75]="DXGI_FORMAT_BC2_UNORM_SRGB",t[t.DXGI_FORMAT_BC3_TYPELESS=76]="DXGI_FORMAT_BC3_TYPELESS",t[t.DXGI_FORMAT_BC3_UNORM=77]="DXGI_FORMAT_BC3_UNORM",t[t.DXGI_FORMAT_BC3_UNORM_SRGB=78]="DXGI_FORMAT_BC3_UNORM_SRGB",t[t.DXGI_FORMAT_BC4_TYPELESS=79]="DXGI_FORMAT_BC4_TYPELESS",t[t.DXGI_FORMAT_BC4_UNORM=80]="DXGI_FORMAT_BC4_UNORM",t[t.DXGI_FORMAT_BC4_SNORM=81]="DXGI_FORMAT_BC4_SNORM",t[t.DXGI_FORMAT_BC5_TYPELESS=82]="DXGI_FORMAT_BC5_TYPELESS",t[t.DXGI_FORMAT_BC5_UNORM=83]="DXGI_FORMAT_BC5_UNORM",t[t.DXGI_FORMAT_BC5_SNORM=84]="DXGI_FORMAT_BC5_SNORM",t[t.DXGI_FORMAT_B5G6R5_UNORM=85]="DXGI_FORMAT_B5G6R5_UNORM",t[t.DXGI_FORMAT_B5G5R5A1_UNORM=86]="DXGI_FORMAT_B5G5R5A1_UNORM",t[t.DXGI_FORMAT_B8G8R8A8_UNORM=87]="DXGI_FORMAT_B8G8R8A8_UNORM",t[t.DXGI_FORMAT_B8G8R8X8_UNORM=88]="DXGI_FORMAT_B8G8R8X8_UNORM",t[t.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM=89]="DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM",t[t.DXGI_FORMAT_B8G8R8A8_TYPELESS=90]="DXGI_FORMAT_B8G8R8A8_TYPELESS",t[t.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB=91]="DXGI_FORMAT_B8G8R8A8_UNORM_SRGB",t[t.DXGI_FORMAT_B8G8R8X8_TYPELESS=92]="DXGI_FORMAT_B8G8R8X8_TYPELESS",t[t.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB=93]="DXGI_FORMAT_B8G8R8X8_UNORM_SRGB",t[t.DXGI_FORMAT_BC6H_TYPELESS=94]="DXGI_FORMAT_BC6H_TYPELESS",t[t.DXGI_FORMAT_BC6H_UF16=95]="DXGI_FORMAT_BC6H_UF16",t[t.DXGI_FORMAT_BC6H_SF16=96]="DXGI_FORMAT_BC6H_SF16",t[t.DXGI_FORMAT_BC7_TYPELESS=97]="DXGI_FORMAT_BC7_TYPELESS",t[t.DXGI_FORMAT_BC7_UNORM=98]="DXGI_FORMAT_BC7_UNORM",t[t.DXGI_FORMAT_BC7_UNORM_SRGB=99]="DXGI_FORMAT_BC7_UNORM_SRGB",t[t.DXGI_FORMAT_AYUV=100]="DXGI_FORMAT_AYUV",t[t.DXGI_FORMAT_Y410=101]="DXGI_FORMAT_Y410",t[t.DXGI_FORMAT_Y416=102]="DXGI_FORMAT_Y416",t[t.DXGI_FORMAT_NV12=103]="DXGI_FORMAT_NV12",t[t.DXGI_FORMAT_P010=104]="DXGI_FORMAT_P010",t[t.DXGI_FORMAT_P016=105]="DXGI_FORMAT_P016",t[t.DXGI_FORMAT_420_OPAQUE=106]="DXGI_FORMAT_420_OPAQUE",t[t.DXGI_FORMAT_YUY2=107]="DXGI_FORMAT_YUY2",t[t.DXGI_FORMAT_Y210=108]="DXGI_FORMAT_Y210",t[t.DXGI_FORMAT_Y216=109]="DXGI_FORMAT_Y216",t[t.DXGI_FORMAT_NV11=110]="DXGI_FORMAT_NV11",t[t.DXGI_FORMAT_AI44=111]="DXGI_FORMAT_AI44",t[t.DXGI_FORMAT_IA44=112]="DXGI_FORMAT_IA44",t[t.DXGI_FORMAT_P8=113]="DXGI_FORMAT_P8",t[t.DXGI_FORMAT_A8P8=114]="DXGI_FORMAT_A8P8",t[t.DXGI_FORMAT_B4G4R4A4_UNORM=115]="DXGI_FORMAT_B4G4R4A4_UNORM",t[t.DXGI_FORMAT_P208=116]="DXGI_FORMAT_P208",t[t.DXGI_FORMAT_V208=117]="DXGI_FORMAT_V208",t[t.DXGI_FORMAT_V408=118]="DXGI_FORMAT_V408",t[t.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE=119]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE",t[t.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE=120]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE",t[t.DXGI_FORMAT_FORCE_UINT=121]="DXGI_FORMAT_FORCE_UINT"})(fn||(fn={}));var td;(function(t){t[t.DDS_DIMENSION_TEXTURE1D=2]="DDS_DIMENSION_TEXTURE1D",t[t.DDS_DIMENSION_TEXTURE2D=3]="DDS_DIMENSION_TEXTURE2D",t[t.DDS_DIMENSION_TEXTURE3D=6]="DDS_DIMENSION_TEXTURE3D"})(td||(td={}));var E5=1,I5=2,C5=4,R5=64,N5=512,P5=131072,S5=827611204,A5=861165636,O5=894720068,U5=808540228,F5=4,L5=(Ya={},Ya[S5]=ee.COMPRESSED_RGBA_S3TC_DXT1_EXT,Ya[A5]=ee.COMPRESSED_RGBA_S3TC_DXT3_EXT,Ya[O5]=ee.COMPRESSED_RGBA_S3TC_DXT5_EXT,Ya),M5=(un={},un[fn.DXGI_FORMAT_BC1_TYPELESS]=ee.COMPRESSED_RGBA_S3TC_DXT1_EXT,un[fn.DXGI_FORMAT_BC1_UNORM]=ee.COMPRESSED_RGBA_S3TC_DXT1_EXT,un[fn.DXGI_FORMAT_BC2_TYPELESS]=ee.COMPRESSED_RGBA_S3TC_DXT3_EXT,un[fn.DXGI_FORMAT_BC2_UNORM]=ee.COMPRESSED_RGBA_S3TC_DXT3_EXT,un[fn.DXGI_FORMAT_BC3_TYPELESS]=ee.COMPRESSED_RGBA_S3TC_DXT5_EXT,un[fn.DXGI_FORMAT_BC3_UNORM]=ee.COMPRESSED_RGBA_S3TC_DXT5_EXT,un[fn.DXGI_FORMAT_BC1_UNORM_SRGB]=ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,un[fn.DXGI_FORMAT_BC2_UNORM_SRGB]=ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,un[fn.DXGI_FORMAT_BC3_UNORM_SRGB]=ee.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,un),B5=function(){function t(){}return t.use=function(e,r){if(e.extension==="dds"&&e.data)try{Object.assign(e,tx(e.name||e.url,t.parse(e.data),e.metadata))}catch(n){r(n);return}r()},t.parse=function(e){var r=new Uint32Array(e),n=r[0];if(n!==T5)throw new Error("Invalid DDS file magic word");var i=new Uint32Array(e,0,ql/Uint32Array.BYTES_PER_ELEMENT),o=i[Jl.HEIGHT],a=i[Jl.WIDTH],s=i[Jl.MIPMAP_COUNT],l=new Uint32Array(e,Jl.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,x5/Uint32Array.BYTES_PER_ELEMENT),u=l[E5];if(u&C5){var c=l[w5.FOURCC];if(c!==U5){var f=L5[c],h=Rf+ql,d=new Uint8Array(e,h),p=new Qh(d,{format:f,width:a,height:o,levels:s});return[p]}var v=Rf+ql,m=new Uint32Array(r.buffer,v,c0/Uint32Array.BYTES_PER_ELEMENT),y=m[Ql.DXGI_FORMAT],g=m[Ql.RESOURCE_DIMENSION],b=m[Ql.MISC_FLAG],T=m[Ql.ARRAY_SIZE],w=M5[y];if(w===void 0)throw new Error("DDSLoader cannot parse texture data with DXGI format "+y);if(b===F5)throw new Error("DDSLoader does not support cubemap textures");if(g===td.DDS_DIMENSION_TEXTURE3D)throw new Error("DDSLoader does not supported 3D texture data");var x=new Array,R=Rf+ql+c0;if(T===1)x.push(new Uint8Array(e,R));else{for(var I=zu[w],C=0,S=a,L=o,H=0;H<s;H++){var G=Math.max(1,S+3&-4),k=Math.max(1,L+3&-4),Y=G*k*I;C+=Y,S=S>>>1,L=L>>>1}for(var D=R,H=0;H<T;H++)x.push(new Uint8Array(e,D,C)),D+=C}return x.map(function(K){return new Qh(K,{format:w,width:a,height:o,levels:s})})}throw u&R5?new Error("DDSLoader does not support uncompressed texture data."):u&N5?new Error("DDSLoader does not supported YUV uncompressed texture data."):u&P5?new Error("DDSLoader does not support single-channel (lumninance) texture data!"):u&I5?new Error("DDSLoader does not support single-channel (alpha) texture data!"):new Error("DDSLoader failed to load a texture file due to an unknown reason!")},t}(),Ii,Jn,Ka;Qe.setExtensionXhrType("ktx",Qe.XHR_RESPONSE_TYPE.BUFFER);var f0=[171,75,84,88,32,49,49,187,13,10,26,10],k5=67305985,cn={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Nf=64,h0=(Ii={},Ii[Mt.UNSIGNED_BYTE]=1,Ii[Mt.UNSIGNED_SHORT]=2,Ii[Mt.INT]=4,Ii[Mt.UNSIGNED_INT]=4,Ii[Mt.FLOAT]=4,Ii[Mt.HALF_FLOAT]=8,Ii),G5=(Jn={},Jn[pt.RGBA]=4,Jn[pt.RGB]=3,Jn[pt.RG]=2,Jn[pt.RED]=1,Jn[pt.LUMINANCE]=1,Jn[pt.LUMINANCE_ALPHA]=2,Jn[pt.ALPHA]=1,Jn),D5=(Ka={},Ka[Mt.UNSIGNED_SHORT_4_4_4_4]=2,Ka[Mt.UNSIGNED_SHORT_5_5_5_1]=2,Ka[Mt.UNSIGNED_SHORT_5_6_5]=2,Ka),H5=function(){function t(){}return t.use=function(e,r){if(e.extension==="ktx"&&e.data)try{var n=e.name||e.url,i=t.parse(n,e.data),o=i.compressed,a=i.uncompressed,s=i.kvData;if(o){var l=tx(n,o,e.metadata);if(s&&l.textures)for(var u in l.textures)l.textures[u].baseTexture.ktxKeyValueData=s;Object.assign(e,l)}else if(a){var c={};a.forEach(function(f,h){var d=new Wt(new ge(f.resource,{mipmap:pi.OFF,alphaMode:En.NO_PREMULTIPLIED_ALPHA,type:f.type,format:f.format})),p=n+"-"+(h+1);s&&(d.baseTexture.ktxKeyValueData=s),ge.addToCache(d.baseTexture,p),Wt.addToCache(d,p),h===0&&(c[n]=d,ge.addToCache(d.baseTexture,n),Wt.addToCache(d,n)),c[p]=d}),Object.assign(e,{textures:c})}}catch(f){r(f);return}r()},t.parse=function(e,r){var n=new DataView(r);if(!t.validate(e,n))return null;var i=n.getUint32(cn.ENDIANNESS,!0)===k5,o=n.getUint32(cn.GL_TYPE,i),a=n.getUint32(cn.GL_FORMAT,i),s=n.getUint32(cn.GL_INTERNAL_FORMAT,i),l=n.getUint32(cn.PIXEL_WIDTH,i),u=n.getUint32(cn.PIXEL_HEIGHT,i)||1,c=n.getUint32(cn.PIXEL_DEPTH,i)||1,f=n.getUint32(cn.NUMBER_OF_ARRAY_ELEMENTS,i)||1,h=n.getUint32(cn.NUMBER_OF_FACES,i),d=n.getUint32(cn.NUMBER_OF_MIPMAP_LEVELS,i),p=n.getUint32(cn.BYTES_OF_KEY_VALUE_DATA,i);if(u===0||c!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(f!==1)throw new Error("WebGL does not support array textures");var v=4,m=4,y=l+3&-4,g=u+3&-4,b=new Array(f),T=l*u;o===0&&(T=y*g);var w;if(o!==0?h0[o]?w=h0[o]*G5[a]:w=D5[o]:w=zu[s],w===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var x=t.loadKeyValueData?t.parseKvData(n,p,i):null,R=T*w,I=R,C=l,S=u,L=y,H=g,G=Nf+p,k=0;k<d;k++){for(var Y=n.getUint32(G,i),D=G+4,K=0;K<f;K++){var ht=b[K];ht||(ht=b[K]=new Array(d)),ht[k]={levelID:k,levelWidth:d>1||o!==0?C:L,levelHeight:d>1||o!==0?S:H,levelBuffer:new Uint8Array(r,D,I)},D+=I}G+=Y+4,G=G%4!==0?G+4-G%4:G,C=C>>1||1,S=S>>1||1,L=C+v-1&~(v-1),H=S+m-1&~(m-1),I=L*H*w}return o!==0?{uncompressed:b.map(function(bt){var W=bt[0].levelBuffer,ft=!1;return o===Mt.FLOAT?W=new Float32Array(bt[0].levelBuffer.buffer,bt[0].levelBuffer.byteOffset,bt[0].levelBuffer.byteLength/4):o===Mt.UNSIGNED_INT?(ft=!0,W=new Uint32Array(bt[0].levelBuffer.buffer,bt[0].levelBuffer.byteOffset,bt[0].levelBuffer.byteLength/4)):o===Mt.INT&&(ft=!0,W=new Int32Array(bt[0].levelBuffer.buffer,bt[0].levelBuffer.byteOffset,bt[0].levelBuffer.byteLength/4)),{resource:new ul(W,{width:bt[0].levelWidth,height:bt[0].levelHeight}),type:o,format:ft?t.convertFormatToInteger(a):a}}),kvData:x}:{compressed:b.map(function(bt){return new Qh(null,{format:s,width:l,height:u,levels:d,levelBuffers:bt})}),kvData:x}},t.validate=function(e,r){for(var n=0;n<f0.length;n++)if(r.getUint8(n)!==f0[n])return console.error(e+" is not a valid *.ktx file!"),!1;return!0},t.convertFormatToInteger=function(e){switch(e){case pt.RGBA:return pt.RGBA_INTEGER;case pt.RGB:return pt.RGB_INTEGER;case pt.RG:return pt.RG_INTEGER;case pt.RED:return pt.RED_INTEGER;default:return e}},t.parseKvData=function(e,r,n){for(var i=new Map,o=0;o<r;){var a=e.getUint32(Nf+o,n),s=Nf+o+4,l=3-(a+3)%4;if(a===0||a>r-o){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;u<a&&e.getUint8(s+u)!==0;u++);if(u===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}var c=new TextDecoder().decode(new Uint8Array(e.buffer,s,u)),f=new DataView(e.buffer,s+u+1,a-u-1);i.set(c,f),o+=4+a+l}return i},t.loadKeyValueData=!1,t}();/*!
* @pixi/particle-container - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/particle-container is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var ed=function(t,e){return ed=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ed(t,e)};function ex(t,e){ed(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}(function(t){ex(e,t);function e(r,n,i,o){r===void 0&&(r=1500),i===void 0&&(i=16384),o===void 0&&(o=!1);var a=t.call(this)||this,s=16384;return i>s&&(i=s),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=i,a._buffers=null,a._bufferUpdateIDs=[],a._updateID=0,a.interactiveChildren=!1,a.blendMode=Ut.NORMAL,a.autoResize=o,a.roundPixels=!0,a.baseTexture=null,a.setProperties(n),a._tint=0,a.tintRgb=new Float32Array(4),a.tint=16777215,a}return e.prototype.setProperties=function(r){r&&(this._properties[0]="vertices"in r||"scale"in r?!!r.vertices||!!r.scale:this._properties[0],this._properties[1]="position"in r?!!r.position:this._properties[1],this._properties[2]="rotation"in r?!!r.rotation:this._properties[2],this._properties[3]="uvs"in r?!!r.uvs:this._properties[3],this._properties[4]="tint"in r||"alpha"in r?!!r.tint||!!r.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,Na(r,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(r){var n=this;!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return n.onChildrenChange(0)})),r.batch.setObjectRenderer(r.plugins.particle),r.plugins.particle.render(this))},e.prototype.onChildrenChange=function(r){for(var n=Math.floor(r/this._batchSize);this._bufferUpdateIDs.length<n;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[n]=++this._updateID},e.prototype.dispose=function(){if(this._buffers){for(var r=0;r<this._buffers.length;++r)this._buffers[r].destroy();this._buffers=null}},e.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},e})(jn);var d0=function(){function t(e,r,n){this.geometry=new cl,this.indexBuffer=null,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(var i=0;i<e.length;++i){var o=e[i];o={attributeName:o.attributeName,size:o.size,uploadFunction:o.uploadFunction,type:o.type||Mt.FLOAT,offset:o.offset},r[i]?this.dynamicProperties.push(o):this.staticProperties.push(o)}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()}return t.prototype.initBuffers=function(){var e=this.geometry,r=0;this.indexBuffer=new hr(N3(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(var n=0;n<this.dynamicProperties.length;++n){var i=this.dynamicProperties[n];i.offset=r,r+=i.size,this.dynamicStride+=i.size}var o=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(o),this.dynamicDataUint32=new Uint32Array(o),this.dynamicBuffer=new hr(this.dynamicData,!1,!1);var a=0;this.staticStride=0;for(var n=0;n<this.staticProperties.length;++n){var i=this.staticProperties[n];i.offset=a,a+=i.size,this.staticStride+=i.size}var s=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(s),this.staticDataUint32=new Uint32Array(s),this.staticBuffer=new hr(this.staticData,!0,!1);for(var n=0;n<this.dynamicProperties.length;++n){var i=this.dynamicProperties[n];e.addAttribute(i.attributeName,this.dynamicBuffer,0,i.type===Mt.UNSIGNED_BYTE,i.type,this.dynamicStride*4,i.offset*4)}for(var n=0;n<this.staticProperties.length;++n){var i=this.staticProperties[n];e.addAttribute(i.attributeName,this.staticBuffer,0,i.type===Mt.UNSIGNED_BYTE,i.type,this.staticStride*4,i.offset*4)}},t.prototype.uploadDynamic=function(e,r,n){for(var i=0;i<this.dynamicProperties.length;i++){var o=this.dynamicProperties[i];o.uploadFunction(e,r,n,o.type===Mt.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,o.offset)}this.dynamicBuffer._updateID++},t.prototype.uploadStatic=function(e,r,n){for(var i=0;i<this.staticProperties.length;i++){var o=this.staticProperties[i];o.uploadFunction(e,r,n,o.type===Mt.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,o.offset)}this.staticBuffer._updateID++},t.prototype.destroy=function(){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()},t}(),V5=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
void main(void){
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
gl_FragColor = color;
}`,$5=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute vec2 aPositionCoord;
attribute float aRotation;
uniform mat3 translationMatrix;
uniform vec4 uColor;
varying vec2 vTextureCoord;
varying vec4 vColor;
void main(void){
float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);
float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);
vec2 v = vec2(x, y);
v = v + aPositionCoord;
gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`,j5=function(t){ex(e,t);function e(r){var n=t.call(this,r)||this;return n.shader=null,n.properties=null,n.tempMatrix=new or,n.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:n.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:n.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:n.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:n.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Mt.UNSIGNED_BYTE,uploadFunction:n.uploadTint,offset:0}],n.shader=Di.from($5,V5,{}),n.state=Do.for2d(),n}return e.prototype.render=function(r){var n=r.children,i=r._maxSize,o=r._batchSize,a=this.renderer,s=n.length;if(s!==0){s>i&&!r.autoResize&&(s=i);var l=r._buffers;l||(l=r._buffers=this.generateBuffers(r));var u=n[0]._texture.baseTexture;this.state.blendMode=x1(r.blendMode,u.alphaMode),a.state.set(this.state);var c=a.gl,f=r.worldTransform.copyTo(this.tempMatrix);f.prepend(a.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=f.toArray(!0),this.shader.uniforms.uColor=R3(r.tintRgb,r.worldAlpha,this.shader.uniforms.uColor,u.alphaMode),this.shader.uniforms.uSampler=u,this.renderer.shader.bind(this.shader);for(var h=!1,d=0,p=0;d<s;d+=o,p+=1){var v=s-d;v>o&&(v=o),p>=l.length&&l.push(this._generateOneMoreBuffer(r));var m=l[p];m.uploadDynamic(n,d,v);var y=r._bufferUpdateIDs[p]||0;h=h||m._updateID<y,h&&(m._updateID=r._updateID,m.uploadStatic(n,d,v)),a.geometry.bind(m.geometry),c.drawElements(c.TRIANGLES,v*6,c.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(r){for(var n=[],i=r._maxSize,o=r._batchSize,a=r._properties,s=0;s<i;s+=o)n.push(new d0(this.properties,a,o));return n},e.prototype._generateOneMoreBuffer=function(r){var n=r._batchSize,i=r._properties;return new d0(this.properties,i,n)},e.prototype.uploadVertices=function(r,n,i,o,a,s){for(var l=0,u=0,c=0,f=0,h=0;h<i;++h){var d=r[n+h],p=d._texture,v=d.scale.x,m=d.scale.y,y=p.trim,g=p.orig;y?(u=y.x-d.anchor.x*g.width,l=u+y.width,f=y.y-d.anchor.y*g.height,c=f+y.height):(l=g.width*(1-d.anchor.x),u=g.width*-d.anchor.x,c=g.height*(1-d.anchor.y),f=g.height*-d.anchor.y),o[s]=u*v,o[s+1]=f*m,o[s+a]=l*v,o[s+a+1]=f*m,o[s+a*2]=l*v,o[s+a*2+1]=c*m,o[s+a*3]=u*v,o[s+a*3+1]=c*m,s+=a*4}},e.prototype.uploadPosition=function(r,n,i,o,a,s){for(var l=0;l<i;l++){var u=r[n+l].position;o[s]=u.x,o[s+1]=u.y,o[s+a]=u.x,o[s+a+1]=u.y,o[s+a*2]=u.x,o[s+a*2+1]=u.y,o[s+a*3]=u.x,o[s+a*3+1]=u.y,s+=a*4}},e.prototype.uploadRotation=function(r,n,i,o,a,s){for(var l=0;l<i;l++){var u=r[n+l].rotation;o[s]=u,o[s+a]=u,o[s+a*2]=u,o[s+a*3]=u,s+=a*4}},e.prototype.uploadUvs=function(r,n,i,o,a,s){for(var l=0;l<i;++l){var u=r[n+l]._texture._uvs;u?(o[s]=u.x0,o[s+1]=u.y0,o[s+a]=u.x1,o[s+a+1]=u.y1,o[s+a*2]=u.x2,o[s+a*2+1]=u.y2,o[s+a*3]=u.x3,o[s+a*3+1]=u.y3,s+=a*4):(o[s]=0,o[s+1]=0,o[s+a]=0,o[s+a+1]=0,o[s+a*2]=0,o[s+a*2+1]=0,o[s+a*3]=0,o[s+a*3+1]=0,s+=a*4)}},e.prototype.uploadTint=function(r,n,i,o,a,s){for(var l=0;l<i;++l){var u=r[n+l],c=u._texture.baseTexture.alphaMode>0,f=u.alpha,h=f<1&&c?dp(u._tintRGB,f):u._tintRGB+(f*255<<24);o[s]=h,o[s+a]=h,o[s+a*2]=h,o[s+a*3]=h,s+=a*4}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(Tc);/*!
* @pixi/graphics - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/graphics is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Fi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Fi||(Fi={}));var Li;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Li||(Li={}));var zs={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(e===void 0&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},rx=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var rd=function(t,e){return rd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},rd(t,e)};function Hp(t,e){rd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function p0(t,e){var r,n;e===void 0&&(e=!1);var i=t.length;if(!(i<6)){for(var o=0,a=0,s=t[i-2],l=t[i-1];a<i;a+=2){var u=t[a],c=t[a+1];o+=(u-s)*(c+l),s=u,l=c}if(!e&&o>0||e&&o<=0)for(var f=i/2,a=f+f%2;a<i;a+=2){var h=i-a-2,d=i-a-1,p=a,v=a+1;r=[t[p],t[h]],t[h]=r[0],t[p]=r[1],n=[t[v],t[d]],t[d]=n[0],t[v]=n[1]}}}var nx={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,n=t.holes,i=e.points,o=e.indices;if(r.length>=6){p0(r,!1);for(var a=[],s=0;s<n.length;s++){var l=n[s];p0(l.points,!0),a.push(r.length/2),r=r.concat(l.points)}var u=g1(r,a,2);if(!u)return;for(var c=i.length/2,s=0;s<u.length;s+=3)o.push(u[s]+c),o.push(u[s+1]+c),o.push(u[s+2]+c);for(var s=0;s<r.length;s++)i.push(r[s])}}},Wu={build:function(t){var e=t.points,r,n,i,o,a,s;if(t.type===Ye.CIRC){var l=t.shape;r=l.x,n=l.y,a=s=l.radius,i=o=0}else if(t.type===Ye.ELIP){var u=t.shape;r=u.x,n=u.y,a=u.width,s=u.height,i=o=0}else{var c=t.shape,f=c.width/2,h=c.height/2;r=c.x+f,n=c.y+h,a=s=Math.max(0,Math.min(c.radius,Math.min(f,h))),i=f-a,o=h-s}if(!(a>=0&&s>=0&&i>=0&&o>=0)){e.length=0;return}var d=Math.ceil(2.3*Math.sqrt(a+s)),p=d*8+(i?4:0)+(o?4:0);if(e.length=p,p!==0){if(d===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+o,e[2]=e[4]=r-i,e[5]=e[7]=n-o;return}var v=0,m=d*4+(i?2:0)+2,y=m,g=p;{var b=i+a,T=o,w=r+b,x=r-b,R=n+T;if(e[v++]=w,e[v++]=R,e[--m]=R,e[--m]=x,o){var I=n-T;e[y++]=x,e[y++]=I,e[--g]=I,e[--g]=w}}for(var C=1;C<d;C++){var S=Math.PI/2*(C/d),b=i+Math.cos(S)*a,T=o+Math.sin(S)*s,w=r+b,x=r-b,R=n+T,I=n-T;e[v++]=w,e[v++]=R,e[--m]=R,e[--m]=x,e[y++]=x,e[y++]=I,e[--g]=I,e[--g]=w}{var b=i,T=o+s,w=r+b,x=r-b,R=n+T,I=n-T;e[v++]=w,e[v++]=R,e[--g]=I,e[--g]=w,i&&(e[v++]=x,e[v++]=R,e[--g]=I,e[--g]=x)}}},triangulate:function(t,e){var r=t.points,n=e.points,i=e.indices,o=n.length/2,a=o,s,l;if(t.type!==Ye.RREC){var u=t.shape;s=u.x,l=u.y}else{var c=t.shape;s=c.x+c.width/2,l=c.y+c.height/2}var f=t.matrix;n.push(t.matrix?f.a*s+f.c*l+f.tx:s,t.matrix?f.b*s+f.d*l+f.ty:l),o++,n.push(r[0],r[1]);for(var h=2;h<r.length;h+=2)n.push(r[h],r[h+1]),i.push(o++,a,o);i.push(a+1,a,o)}},X5={build:function(t){var e=t.shape,r=e.x,n=e.y,i=e.width,o=e.height,a=t.points;a.length=0,a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate:function(t,e){var r=t.points,n=e.points,i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}};function Wo(t,e,r){var n=e-t;return t+n*r}function tu(t,e,r,n,i,o,a){a===void 0&&(a=[]);for(var s=20,l=a,u=0,c=0,f=0,h=0,d=0,p=0,v=0,m=0;v<=s;++v)m=v/s,u=Wo(t,r,m),c=Wo(e,n,m),f=Wo(r,i,m),h=Wo(n,o,m),d=Wo(u,f,m),p=Wo(c,h,m),!(v===0&&l[l.length-2]===d&&l[l.length-1]===p)&&l.push(d,p);return l}var z5={build:function(t){if(Yu.nextRoundedRectBehavior){Wu.build(t);return}var e=t.shape,r=t.points,n=e.x,i=e.y,o=e.width,a=e.height,s=Math.max(0,Math.min(e.radius,Math.min(o,a)/2));r.length=0,s?(tu(n,i+s,n,i,n+s,i,r),tu(n+o-s,i,n+o,i,n+o,i+s,r),tu(n+o,i+a-s,n+o,i+a,n+o-s,i+a,r),tu(n+s,i+a,n,i+a,n,i+a-s,r)):r.push(n,i,n+o,i,n+o,i+a,n,i+a)},triangulate:function(t,e){if(Yu.nextRoundedRectBehavior){Wu.triangulate(t,e);return}for(var r=t.points,n=e.points,i=e.indices,o=n.length/2,a=g1(r,null,2),s=0,l=a.length;s<l;s+=3)i.push(a[s]+o),i.push(a[s+1]+o),i.push(a[s+2]+o);for(var s=0,l=r.length;s<l;s++)n.push(r[s],r[++s])}};function v0(t,e,r,n,i,o,a,s){var l=t-r*i,u=e-n*i,c=t+r*o,f=e+n*o,h,d;a?(h=n,d=-r):(h=-n,d=r);var p=l+h,v=u+d,m=c+h,y=f+d;return s.push(p,v),s.push(m,y),2}function Yo(t,e,r,n,i,o,a,s){var l=r-t,u=n-e,c=Math.atan2(l,u),f=Math.atan2(i-t,o-e);s&&c<f?c+=Math.PI*2:!s&&c>f&&(f+=Math.PI*2);var h=c,d=f-c,p=Math.abs(d),v=Math.sqrt(l*l+u*u),m=(15*p*Math.sqrt(v)/Math.PI>>0)+1,y=d/m;if(h+=y,s){a.push(t,e),a.push(r,n);for(var g=1,b=h;g<m;g++,b+=y)a.push(t,e),a.push(t+Math.sin(b)*v,e+Math.cos(b)*v);a.push(t,e),a.push(i,o)}else{a.push(r,n),a.push(t,e);for(var g=1,b=h;g<m;g++,b+=y)a.push(t+Math.sin(b)*v,e+Math.cos(b)*v),a.push(t,e);a.push(i,o),a.push(t,e)}return m*2}function W5(t,e){var r=t.shape,n=t.points||r.points.slice(),i=e.closePointEps;if(n.length!==0){var o=t.lineStyle,a=new _e(n[0],n[1]),s=new _e(n[n.length-2],n[n.length-1]),l=r.type!==Ye.POLY||r.closeStroke,u=Math.abs(a.x-s.x)<i&&Math.abs(a.y-s.y)<i;if(l){n=n.slice(),u&&(n.pop(),n.pop(),s.set(n[n.length-2],n[n.length-1]));var c=(a.x+s.x)*.5,f=(s.y+a.y)*.5;n.unshift(c,f),n.push(c,f)}var h=e.points,d=n.length/2,p=n.length,v=h.length/2,m=o.width/2,y=m*m,g=o.miterLimit*o.miterLimit,b=n[0],T=n[1],w=n[2],x=n[3],R=0,I=0,C=-(T-x),S=b-w,L=0,H=0,G=Math.sqrt(C*C+S*S);C/=G,S/=G,C*=m,S*=m;var k=o.alignment,Y=(1-k)*2,D=k*2;l||(o.cap===Li.ROUND?p+=Yo(b-C*(Y-D)*.5,T-S*(Y-D)*.5,b-C*Y,T-S*Y,b+C*D,T+S*D,h,!0)+2:o.cap===Li.SQUARE&&(p+=v0(b,T,C,S,Y,D,!0,h))),h.push(b-C*Y,T-S*Y),h.push(b+C*D,T+S*D);for(var K=1;K<d-1;++K){b=n[(K-1)*2],T=n[(K-1)*2+1],w=n[K*2],x=n[K*2+1],R=n[(K+1)*2],I=n[(K+1)*2+1],C=-(T-x),S=b-w,G=Math.sqrt(C*C+S*S),C/=G,S/=G,C*=m,S*=m,L=-(x-I),H=w-R,G=Math.sqrt(L*L+H*H),L/=G,H/=G,L*=m,H*=m;var ht=w-b,bt=T-x,W=w-R,ft=I-x,gt=bt*W-ft*ht,_t=gt<0;if(Math.abs(gt)<.1){h.push(w-C*Y,x-S*Y),h.push(w+C*D,x+S*D);continue}var V=(-C+b)*(-S+x)-(-C+w)*(-S+T),Z=(-L+R)*(-H+x)-(-L+w)*(-H+I),lt=(ht*Z-W*V)/gt,ut=(ft*V-bt*Z)/gt,Gt=(lt-w)*(lt-w)+(ut-x)*(ut-x),it=w+(lt-w)*Y,kt=x+(ut-x)*Y,Vt=w-(lt-w)*D,Xt=x-(ut-x)*D,N=Math.min(ht*ht+bt*bt,W*W+ft*ft),A=_t?Y:D,$=N+A*A*y,j=Gt<=$;j?o.join===Fi.BEVEL||Gt/y>g?(_t?(h.push(it,kt),h.push(w+C*D,x+S*D),h.push(it,kt),h.push(w+L*D,x+H*D)):(h.push(w-C*Y,x-S*Y),h.push(Vt,Xt),h.push(w-L*Y,x-H*Y),h.push(Vt,Xt)),p+=2):o.join===Fi.ROUND?_t?(h.push(it,kt),h.push(w+C*D,x+S*D),p+=Yo(w,x,w+C*D,x+S*D,w+L*D,x+H*D,h,!0)+4,h.push(it,kt),h.push(w+L*D,x+H*D)):(h.push(w-C*Y,x-S*Y),h.push(Vt,Xt),p+=Yo(w,x,w-C*Y,x-S*Y,w-L*Y,x-H*Y,h,!1)+4,h.push(w-L*Y,x-H*Y),h.push(Vt,Xt)):(h.push(it,kt),h.push(Vt,Xt)):(h.push(w-C*Y,x-S*Y),h.push(w+C*D,x+S*D),o.join===Fi.ROUND?_t?p+=Yo(w,x,w+C*D,x+S*D,w+L*D,x+H*D,h,!0)+2:p+=Yo(w,x,w-C*Y,x-S*Y,w-L*Y,x-H*Y,h,!1)+2:o.join===Fi.MITER&&Gt/y<=g&&(_t?(h.push(Vt,Xt),h.push(Vt,Xt)):(h.push(it,kt),h.push(it,kt)),p+=2),h.push(w-L*Y,x-H*Y),h.push(w+L*D,x+H*D),p+=2)}b=n[(d-2)*2],T=n[(d-2)*2+1],w=n[(d-1)*2],x=n[(d-1)*2+1],C=-(T-x),S=b-w,G=Math.sqrt(C*C+S*S),C/=G,S/=G,C*=m,S*=m,h.push(w-C*Y,x-S*Y),h.push(w+C*D,x+S*D),l||(o.cap===Li.ROUND?p+=Yo(w-C*(Y-D)*.5,x-S*(Y-D)*.5,w-C*Y,x-S*Y,w+C*D,x+S*D,h,!1)+2:o.cap===Li.SQUARE&&(p+=v0(w,x,C,S,Y,D,!1,h)));for(var q=e.indices,st=zs.epsilon*zs.epsilon,K=v;K<p+v-2;++K)b=h[K*2],T=h[K*2+1],w=h[(K+1)*2],x=h[(K+1)*2+1],R=h[(K+2)*2],I=h[(K+2)*2+1],!(Math.abs(b*(x-I)+w*(I-T)+R*(T-x))<st)&&q.push(K,K+1,K+2)}}function Y5(t,e){var r=0,n=t.shape,i=t.points||n.points,o=n.type!==Ye.POLY||n.closeStroke;if(i.length!==0){var a=e.points,s=e.indices,l=i.length/2,u=a.length/2,c=u;for(a.push(i[0],i[1]),r=1;r<l;r++)a.push(i[r*2],i[r*2+1]),s.push(c,c+1),c++;o&&s.push(c,u)}}function m0(t,e){t.lineStyle.native?Y5(t,e):W5(t,e)}var g0=function(){function t(){}return t.curveTo=function(e,r,n,i,o,a){var s=a[a.length-2],l=a[a.length-1],u=l-r,c=s-e,f=i-r,h=n-e,d=Math.abs(u*h-c*f);if(d<1e-8||o===0)return(a[a.length-2]!==e||a[a.length-1]!==r)&&a.push(e,r),null;var p=u*u+c*c,v=f*f+h*h,m=u*f+c*h,y=o*Math.sqrt(p)/d,g=o*Math.sqrt(v)/d,b=y*m/p,T=g*m/v,w=y*h+g*c,x=y*f+g*u,R=c*(g+b),I=u*(g+b),C=h*(y+T),S=f*(y+T),L=Math.atan2(I-x,R-w),H=Math.atan2(S-x,C-w);return{cx:w+e,cy:x+r,radius:o,startAngle:L,endAngle:H,anticlockwise:c*f>h*u}},t.arc=function(e,r,n,i,o,a,s,l,u){for(var c=s-a,f=zs._segmentsCount(Math.abs(c)*o,Math.ceil(Math.abs(c)/Xu)*40),h=c/(f*2),d=h*2,p=Math.cos(h),v=Math.sin(h),m=f-1,y=m%1/m,g=0;g<=m;++g){var b=g+y*g,T=h+a+d*b,w=Math.cos(T),x=-Math.sin(T);u.push((p*w+v*x)*o+n,(p*-x+v*w)*o+i)}},t}(),K5=function(){function t(){}return t.curveLength=function(e,r,n,i,o,a,s,l){for(var u=10,c=0,f=0,h=0,d=0,p=0,v=0,m=0,y=0,g=0,b=0,T=0,w=e,x=r,R=1;R<=u;++R)f=R/u,h=f*f,d=h*f,p=1-f,v=p*p,m=v*p,y=m*e+3*v*f*n+3*p*h*o+d*s,g=m*r+3*v*f*i+3*p*h*a+d*l,b=w-y,T=x-g,w=y,x=g,c+=Math.sqrt(b*b+T*T);return c},t.curveTo=function(e,r,n,i,o,a,s){var l=s[s.length-2],u=s[s.length-1];s.length-=2;var c=zs._segmentsCount(t.curveLength(l,u,e,r,n,i,o,a)),f=0,h=0,d=0,p=0,v=0;s.push(l,u);for(var m=1,y=0;m<=c;++m)y=m/c,f=1-y,h=f*f,d=h*f,p=y*y,v=p*y,s.push(d*l+3*h*y*e+3*f*p*n+v*o,d*u+3*h*y*r+3*f*p*i+v*a)},t}(),Z5=function(){function t(){}return t.curveLength=function(e,r,n,i,o,a){var s=e-2*n+o,l=r-2*i+a,u=2*n-2*e,c=2*i-2*r,f=4*(s*s+l*l),h=4*(s*u+l*c),d=u*u+c*c,p=2*Math.sqrt(f+h+d),v=Math.sqrt(f),m=2*f*v,y=2*Math.sqrt(d),g=h/v;return(m*p+v*h*(p-y)+(4*d*f-h*h)*Math.log((2*v+g+p)/(g+y)))/(4*m)},t.curveTo=function(e,r,n,i,o){for(var a=o[o.length-2],s=o[o.length-1],l=zs._segmentsCount(t.curveLength(a,s,e,r,n,i)),u=0,c=0,f=1;f<=l;++f){var h=f/l;u=a+(e-a)*h,c=s+(r-s)*h,o.push(u+(e+(n-e)*h-u)*h,c+(r+(i-r)*h-c)*h)}},t}(),q5=function(){function t(){this.reset()}return t.prototype.begin=function(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n},t.prototype.end=function(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),uo,Pf=(uo={},uo[Ye.POLY]=nx,uo[Ye.CIRC]=Wu,uo[Ye.ELIP]=Wu,uo[Ye.RECT]=X5,uo[Ye.RREC]=z5,uo),y0=[],eu=[],b0=function(){function t(e,r,n,i){r===void 0&&(r=null),n===void 0&&(n=null),i===void 0&&(i=null),this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Ko=new _e,J5=new Vs,Q5=function(t){Hp(e,t);function e(){var r=t.call(this)||this;return r.closePointEps=1e-4,r.boundsPadding=0,r.uvsFloat32=null,r.indicesUint16=null,r.batchable=!1,r.points=[],r.colors=[],r.uvs=[],r.indices=[],r.textureIds=[],r.graphicsData=[],r.drawCalls=[],r.batchDirty=-1,r.batches=[],r.dirty=0,r.cacheDirty=-1,r.clearDirty=0,r.shapeIndex=0,r._bounds=new Vs,r.boundsDirty=-1,r}return Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var r=0;r<this.drawCalls.length;r++)this.drawCalls[r].texArray.clear(),eu.push(this.drawCalls[r]);this.drawCalls.length=0;for(var r=0;r<this.batches.length;r++){var n=this.batches[r];n.reset(),y0.push(n)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(r,n,i,o){n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=null);var a=new b0(r,n,i,o);return this.graphicsData.push(a),this.dirty++,this},e.prototype.drawHole=function(r,n){if(n===void 0&&(n=null),!this.graphicsData.length)return null;var i=new b0(r,null,null,n),o=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=o.lineStyle,o.holes.push(i),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(r){for(var n=this.graphicsData,i=0;i<n.length;++i){var o=n[i];if(!!o.fillStyle.visible&&o.shape&&(o.matrix?o.matrix.applyInverse(r,Ko):Ko.copyFrom(r),o.shape.contains(Ko.x,Ko.y))){var a=!1;if(o.holes)for(var s=0;s<o.holes.length;s++){var l=o.holes[s];if(l.shape.contains(Ko.x,Ko.y)){a=!0;break}}if(!a)return!0}}return!1},e.prototype.updateBatches=function(r){if(!this.graphicsData.length){this.batchable=!0;return}if(!!this.validateBatching()){this.cacheDirty=this.dirty;var n=this.uvs,i=this.graphicsData,o=null,a=null;this.batches.length>0&&(o=this.batches[this.batches.length-1],a=o.style);for(var s=this.shapeIndex;s<i.length;s++){this.shapeIndex++;var l=i[s],u=l.fillStyle,c=l.lineStyle,f=Pf[l.type];f.build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(u.visible||c.visible)&&this.processHoles(l.holes);for(var h=0;h<2;h++){var d=h===0?u:c;if(!!d.visible){var p=d.texture.baseTexture,v=this.indices.length,m=this.points.length/2;p.wrapMode=li.REPEAT,h===0?this.processFill(l):this.processLine(l);var y=this.points.length/2-m;y!==0&&(o&&!this._compareStyles(a,d)&&(o.end(v,m),o=null),o||(o=y0.pop()||new q5,o.begin(d,v,m),this.batches.push(o),a=d),this.addUvs(this.points,n,d.texture,m,y,d.matrix))}}}var g=this.indices.length,b=this.points.length/2;if(o&&o.end(g,b),this.batches.length===0){this.batchable=!0;return}if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var T=b>65535&&r;this.indicesUint16=T?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},e.prototype._compareStyles=function(r,n){return!(!r||!n||r.texture.baseTexture!==n.texture.baseTexture||r.color+r.alpha!==n.color+n.alpha||!!r.native!=!!n.native)},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var r=0,n=this.graphicsData.length;r<n;r++){var i=this.graphicsData[r],o=i.fillStyle,a=i.lineStyle;if(o&&!o.texture.baseTexture.valid||a&&!a.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var r=this.batches,n=0,i=r.length;n<i;n++)for(var o=r[n],a=0;a<o.size;a++){var s=o.start+a;this.indicesUint16[s]=this.indicesUint16[s]-o.attribStart}},e.prototype.isBatchable=function(){if(this.points.length>65535*2)return!1;for(var r=this.batches,n=0;n<r.length;n++)if(r[n].style.native)return!1;return this.points.length<e.BATCHABLE_SIZE*2},e.prototype.buildDrawCalls=function(){for(var r=++ge._globalBatch,n=0;n<this.drawCalls.length;n++)this.drawCalls[n].texArray.clear(),eu.push(this.drawCalls[n]);this.drawCalls.length=0;var i=this.colors,o=this.textureIds,a=eu.pop();a||(a=new Mh,a.texArray=new Bh),a.texArray.count=0,a.start=0,a.size=0,a.type=_n.TRIANGLES;var s=0,l=null,u=0,c=!1,f=_n.TRIANGLES,h=0;this.drawCalls.push(a);for(var n=0;n<this.batches.length;n++){var d=this.batches[n],p=8,v=d.style,m=v.texture.baseTexture;c!==!!v.native&&(c=!!v.native,f=c?_n.LINES:_n.TRIANGLES,l=null,s=p,r++),l!==m&&(l=m,m._batchEnabled!==r&&(s===p&&(r++,s=0,a.size>0&&(a=eu.pop(),a||(a=new Mh,a.texArray=new Bh),this.drawCalls.push(a)),a.start=h,a.size=0,a.texArray.count=0,a.type=f),m.touched=1,m._batchEnabled=r,m._batchLocation=s,m.wrapMode=li.REPEAT,a.texArray.elements[a.texArray.count++]=m,s++)),a.size+=d.size,h+=d.size,u=m._batchLocation,this.addColors(i,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(o,u,d.attribSize,d.attribStart)}ge._globalBatch=r,this.packAttributes()},e.prototype.packAttributes=function(){for(var r=this.points,n=this.uvs,i=this.colors,o=this.textureIds,a=new ArrayBuffer(r.length*3*4),s=new Float32Array(a),l=new Uint32Array(a),u=0,c=0;c<r.length/2;c++)s[u++]=r[c*2],s[u++]=r[c*2+1],s[u++]=n[c*2],s[u++]=n[c*2+1],l[u++]=i[c],s[u++]=o[c];this._buffer.update(a),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(r){if(r.holes.length)nx.triangulate(r,this);else{var n=Pf[r.type];n.triangulate(r,this)}},e.prototype.processLine=function(r){m0(r,this);for(var n=0;n<r.holes.length;n++)m0(r.holes[n],this)},e.prototype.processHoles=function(r){for(var n=0;n<r.length;n++){var i=r[n],o=Pf[i.type];o.build(i),i.matrix&&this.transformPoints(i.points,i.matrix)}},e.prototype.calculateBounds=function(){var r=this._bounds,n=J5,i=or.IDENTITY;this._bounds.clear(),n.clear();for(var o=0;o<this.graphicsData.length;o++){var a=this.graphicsData[o],s=a.shape,l=a.type,u=a.lineStyle,c=a.matrix||or.IDENTITY,f=0;if(u&&u.visible&&(f=u.width,l!==Ye.POLY||a.fillStyle.visible?f*=Math.max(0,u.alignment):f*=Math.max(u.alignment,1-u.alignment)),i!==c&&(n.isEmpty()||(r.addBoundsMatrix(n,i),n.clear()),i=c),l===Ye.RECT||l===Ye.RREC){var h=s;n.addFramePad(h.x,h.y,h.x+h.width,h.y+h.height,f,f)}else if(l===Ye.CIRC){var d=s;n.addFramePad(d.x,d.y,d.x,d.y,d.radius+f,d.radius+f)}else if(l===Ye.ELIP){var p=s;n.addFramePad(p.x,p.y,p.x,p.y,p.width+f,p.height+f)}else{var v=s;r.addVerticesMatrix(i,v.points,0,v.points.length,f,f)}}n.isEmpty()||r.addBoundsMatrix(n,i),r.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(r,n){for(var i=0;i<r.length/2;i++){var o=r[i*2],a=r[i*2+1];r[i*2]=n.a*o+n.c*a+n.tx,r[i*2+1]=n.b*o+n.d*a+n.ty}},e.prototype.addColors=function(r,n,i,o,a){a===void 0&&(a=0);var s=(n>>16)+(n&65280)+((n&255)<<16),l=dp(s,i);r.length=Math.max(r.length,a+o);for(var u=0;u<o;u++)r[a+u]=l},e.prototype.addTextureIds=function(r,n,i,o){o===void 0&&(o=0),r.length=Math.max(r.length,o+i);for(var a=0;a<i;a++)r[o+a]=n},e.prototype.addUvs=function(r,n,i,o,a,s){s===void 0&&(s=null);for(var l=0,u=n.length,c=i.frame;l<a;){var f=r[(o+l)*2],h=r[(o+l)*2+1];if(s){var d=s.a*f+s.c*h+s.tx;h=s.b*f+s.d*h+s.ty,f=d}l++,n.push(f/c.width,h/c.height)}var p=i.baseTexture;(c.width<p.width||c.height<p.height)&&this.adjustUvs(n,i,u,a)},e.prototype.adjustUvs=function(r,n,i,o){for(var a=n.baseTexture,s=1e-6,l=i+o*2,u=n.frame,c=u.width/a.width,f=u.height/a.height,h=u.x/u.width,d=u.y/u.height,p=Math.floor(r[i]+s),v=Math.floor(r[i+1]+s),m=i+2;m<l;m+=2)p=Math.min(p,Math.floor(r[m]+s)),v=Math.min(v,Math.floor(r[m+1]+s));h-=p,d-=v;for(var m=i;m<l;m+=2)r[m]=(r[m]+h)*c,r[m+1]=(r[m+1]+d)*f},e.BATCHABLE_SIZE=100,e}(H1),tF=function(t){Hp(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.width=0,r.alignment=.5,r.native=!1,r.cap=Li.BUTT,r.join=Fi.MITER,r.miterLimit=10,r}return e.prototype.clone=function(){var r=new e;return r.color=this.color,r.alpha=this.alpha,r.texture=this.texture,r.matrix=this.matrix,r.visible=this.visible,r.width=this.width,r.alignment=this.alignment,r.native=this.native,r.cap=this.cap,r.join=this.join,r.miterLimit=this.miterLimit,r},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},e}(rx),eF=new Float32Array(3),Sf={},Yu=function(t){Hp(e,t);function e(r){r===void 0&&(r=null);var n=t.call(this)||this;return n.shader=null,n.pluginName="batch",n.currentPath=null,n.batches=[],n.batchTint=-1,n.batchDirty=-1,n.vertexData=null,n._fillStyle=new rx,n._lineStyle=new tF,n._matrix=null,n._holeMode=!1,n.state=Do.for2d(),n._geometry=r||new Q5,n._geometry.refCount++,n._transformID=-1,n.tint=16777215,n.blendMode=Ut.NORMAL,n}return Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return this.finishPoly(),new e(this._geometry)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),e.prototype.lineStyle=function(r,n,i,o,a){return r===void 0&&(r=null),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=.5),a===void 0&&(a=!1),typeof r=="number"&&(r={width:r,color:n,alpha:i,alignment:o,native:a}),this.lineTextureStyle(r)},e.prototype.lineTextureStyle=function(r){r=Object.assign({width:0,texture:Wt.WHITE,color:r&&r.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:Li.BUTT,join:Fi.MITER,miterLimit:10},r),this.currentPath&&this.startPoly();var n=r.width>0&&r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:n},r)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var r=this.currentPath.points,n=this.currentPath.points.length;n>2&&(this.drawShape(this.currentPath),this.currentPath=new bu,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new bu,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(r,n){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=n,this},e.prototype.lineTo=function(r,n){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,o=i[i.length-2],a=i[i.length-1];return(o!==r||a!==n)&&i.push(r,n),this},e.prototype._initCurve=function(r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,n]):this.moveTo(r,n)},e.prototype.quadraticCurveTo=function(r,n,i,o){this._initCurve();var a=this.currentPath.points;return a.length===0&&this.moveTo(0,0),Z5.curveTo(r,n,i,o,a),this},e.prototype.bezierCurveTo=function(r,n,i,o,a,s){return this._initCurve(),K5.curveTo(r,n,i,o,a,s,this.currentPath.points),this},e.prototype.arcTo=function(r,n,i,o,a){this._initCurve(r,n);var s=this.currentPath.points,l=g0.curveTo(r,n,i,o,a,s);if(l){var u=l.cx,c=l.cy,f=l.radius,h=l.startAngle,d=l.endAngle,p=l.anticlockwise;this.arc(u,c,f,h,d,p)}return this},e.prototype.arc=function(r,n,i,o,a,s){if(s===void 0&&(s=!1),o===a)return this;!s&&a<=o?a+=Xu:s&&o<=a&&(o+=Xu);var l=a-o;if(l===0)return this;var u=r+Math.cos(o)*i,c=n+Math.sin(o)*i,f=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){var d=Math.abs(h[h.length-2]-u),p=Math.abs(h[h.length-1]-c);d<f&&p<f||h.push(u,c)}else this.moveTo(u,c),h=this.currentPath.points;return g0.arc(u,c,r,n,i,o,a,s,h),this},e.prototype.beginFill=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=1),this.beginTextureFill({texture:Wt.WHITE,color:r,alpha:n})},e.prototype.beginTextureFill=function(r){r=Object.assign({texture:Wt.WHITE,color:16777215,alpha:1,matrix:null},r),this.currentPath&&this.startPoly();var n=r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:n},r)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(r,n,i,o){return this.drawShape(new fe(r,n,i,o))},e.prototype.drawRoundedRect=function(r,n,i,o,a){return this.drawShape(new L3(r,n,i,o,a))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new U3(r,n,i))},e.prototype.drawEllipse=function(r,n,i,o){return this.drawShape(new F3(r,n,i,o))},e.prototype.drawPolygon=function(){for(var r=arguments,n=[],i=0;i<arguments.length;i++)n[i]=r[i];var o,a=!0,s=n[0];s.points?(a=s.closeStroke,o=s.points):Array.isArray(n[0])?o=n[0]:o=n;var l=new bu(o);return l.closeStroke=a,this.drawShape(l),this},e.prototype.drawShape=function(r){return this._holeMode?this._geometry.drawHole(r,this._matrix):this._geometry.drawShape(r,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){var r=this._geometry.graphicsData;return r.length===1&&r[0].shape.type===Ye.RECT&&!r[0].matrix&&!r[0].holes.length&&!(r[0].lineStyle.visible&&r[0].lineStyle.width)},e.prototype._render=function(r){this.finishPoly();var n=this._geometry,i=r.context.supports.uint32Indices;n.updateBatches(i),n.batchable?(this.batchDirty!==n.batchDirty&&this._populateBatches(),this._renderBatched(r)):(r.batch.flush(),this._renderDirect(r))},e.prototype._populateBatches=function(){var r=this._geometry,n=this.blendMode,i=r.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=r.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(r.points);for(var o=0;o<i;o++){var a=r.batches[o],s=a.style.color,l=new Float32Array(this.vertexData.buffer,a.attribStart*4*2,a.attribSize*2),u=new Float32Array(r.uvsFloat32.buffer,a.attribStart*4*2,a.attribSize*2),c=new Uint16Array(r.indicesUint16.buffer,a.start*2,a.size),f={vertexData:l,blendMode:n,indices:c,uvs:u,_batchRGB:Na(s),_tintRGB:s,_texture:a.style.texture,alpha:a.style.alpha,worldAlpha:1};this.batches[o]=f}},e.prototype._renderBatched=function(r){if(!!this.batches.length){r.batch.setObjectRenderer(r.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var n=0,i=this.batches.length;n<i;n++){var o=this.batches[n];o.worldAlpha=this.worldAlpha*o.alpha,r.plugins[this.pluginName].render(o)}}},e.prototype._renderDirect=function(r){var n=this._resolveDirectShader(r),i=this._geometry,o=this.tint,a=this.worldAlpha,s=n.uniforms,l=i.drawCalls;s.translationMatrix=this.transform.worldTransform,s.tint[0]=(o>>16&255)/255*a,s.tint[1]=(o>>8&255)/255*a,s.tint[2]=(o&255)/255*a,s.tint[3]=a,r.shader.bind(n),r.geometry.bind(i,n),r.state.set(this.state);for(var u=0,c=l.length;u<c;u++)this._renderDrawCallDirect(r,i.drawCalls[u])},e.prototype._renderDrawCallDirect=function(r,n){for(var i=n.texArray,o=n.type,a=n.size,s=n.start,l=i.count,u=0;u<l;u++)r.texture.bind(i.elements[u],u);r.geometry.draw(o,a,s)},e.prototype._resolveDirectShader=function(r){var n=this.shader,i=this.pluginName;if(!n){if(!Sf[i]){for(var o=r.plugins[i].MAX_TEXTURES,a=new Int32Array(o),s=0;s<o;s++)a[s]=s;var l={tint:new Float32Array([1,1,1,1]),translationMatrix:new or,default:Po.from({uSamplers:a},!0)},u=r.plugins[i]._shader.program;Sf[i]=new Di(u,l)}n=Sf[i]}return n},e.prototype._calculateBounds=function(){this.finishPoly();var r=this._geometry;if(!!r.graphicsData.length){var n=r.bounds,i=n.minX,o=n.minY,a=n.maxX,s=n.maxY;this._bounds.addFrame(this.transform,i,o,a,s)}},e.prototype.containsPoint=function(r){return this.worldTransform.applyInverse(r,e._TEMP_POINT),this._geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var r=Na(this.tint,eF),n=0;n<this.batches.length;n++){var i=this.batches[n],o=i._batchRGB,a=r[0]*o[0]*255,s=r[1]*o[1]*255,l=r[2]*o[2]*255,u=(a<<16)+(s<<8)+(l|0);i._tintRGB=(u>>16)+(u&65280)+((u&255)<<16)}}},e.prototype.calculateVertices=function(){var r=this.transform._worldID;if(this._transformID!==r){this._transformID=r;for(var n=this.transform.worldTransform,i=n.a,o=n.b,a=n.c,s=n.d,l=n.tx,u=n.ty,c=this._geometry.points,f=this.vertexData,h=0,d=0;d<c.length;d+=2){var p=c[d],v=c[d+1];f[h++]=i*p+a*v+l,f[h++]=s*v+o*p+u}}},e.prototype.closePath=function(){var r=this.currentPath;return r&&(r.closeStroke=!0,this.finishPoly()),this},e.prototype.setMatrix=function(r){return this._matrix=r,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(r){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,r)},e.nextRoundedRectBehavior=!1,e._TEMP_POINT=new _e,e}(jn);/*!
* @pixi/text - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/text is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var nd=function(t,e){return nd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},nd(t,e)};function rF(t,e){nd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Ws;(function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(Ws||(Ws={}));var Af={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Ws.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},nF=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Pa=function(){function t(e){this.styleID=0,this.reset(),Uf(this,e,e)}return t.prototype.clone=function(){var e={};return Uf(e,this,Af),new t(e)},t.prototype.reset=function(){Uf(this,Af,Af)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){var r=Of(e);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(e){var r=Of(e);this._fill!==r&&(this._fill=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){iF(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(e){this._leading!==e&&(this._leading=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(e){this._padding!==e&&(this._padding=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(e){var r=Of(e);this._stroke!==r&&(this._stroke=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(e){this._trim!==e&&(this._trim=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var e=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(var n=r.length-1;n>=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&nF.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function _0(t){return typeof t=="number"?y1(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Of(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=_0(t[e]);return t}else return _0(t)}function iF(t,e){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}function Uf(t,e,r){for(var n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}var Kn=function(){function t(e,r,n,i,o,a,s,l,u){this.text=e,this.style=r,this.width=n,this.height=i,this.lines=o,this.lineWidths=a,this.lineHeight=s,this.maxLineWidth=l,this.fontProperties=u}return t.measureText=function(e,r,n,i){i===void 0&&(i=t._canvas),n=n==null?r.wordWrap:n;var o=r.toFontString(),a=t.measureFont(o);a.fontSize===0&&(a.fontSize=r.fontSize,a.ascent=r.fontSize);var s=i.getContext("2d");s.font=o;for(var l=n?t.wordWrap(e,r,i):e,u=l.split(/(?:\r\n|\r|\n)/),c=new Array(u.length),f=0,h=0;h<u.length;h++){var d=s.measureText(u[h]).width+(u[h].length-1)*r.letterSpacing;c[h]=d,f=Math.max(f,d)}var p=f+r.strokeThickness;r.dropShadow&&(p+=r.dropShadowDistance);var v=r.lineHeight||a.fontSize+r.strokeThickness,m=Math.max(v,a.fontSize+r.strokeThickness)+(u.length-1)*(v+r.leading);return r.dropShadow&&(m+=r.dropShadowDistance),new t(e,r,p,m,u,c,v+r.leading,f,a)},t.wordWrap=function(e,r,n){n===void 0&&(n=t._canvas);for(var i=n.getContext("2d"),o=0,a="",s="",l=Object.create(null),u=r.letterSpacing,c=r.whiteSpace,f=t.collapseSpaces(c),h=t.collapseNewlines(c),d=!f,p=r.wordWrapWidth+u,v=t.tokenize(e),m=0;m<v.length;m++){var y=v[m];if(t.isNewline(y)){if(!h){s+=t.addLine(a),d=!f,a="",o=0;continue}y=" "}if(f){var g=t.isBreakingSpace(y),b=t.isBreakingSpace(a[a.length-1]);if(g&&b)continue}var T=t.getFromCache(y,u,l,i);if(T>p)if(a!==""&&(s+=t.addLine(a),a="",o=0),t.canBreakWords(y,r.breakWords))for(var w=t.wordWrapSplit(y),x=0;x<w.length;x++){for(var R=w[x],I=1;w[x+I];){var C=w[x+I],S=R[R.length-1];if(!t.canBreakChars(S,C,y,x,r.breakWords))R+=C;else break;I++}x+=R.length-1;var L=t.getFromCache(R,u,l,i);L+o>p&&(s+=t.addLine(a),d=!1,a="",o=0),a+=R,o+=L}else{a.length>0&&(s+=t.addLine(a),a="",o=0);var H=m===v.length-1;s+=t.addLine(y,!H),d=!1,a="",o=0}else T+o>p&&(d=!1,s+=t.addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(y)||d)&&(a+=y,o+=T)}return s+=t.addLine(a,!1),s},t.addLine=function(e,r){return r===void 0&&(r=!0),e=t.trimRight(e),e=r?e+`
`:e,e},t.getFromCache=function(e,r,n,i){var o=n[e];if(typeof o!="number"){var a=e.length*r;o=i.measureText(e).width+a,n[e]=o}return o},t.collapseSpaces=function(e){return e==="normal"||e==="pre-line"},t.collapseNewlines=function(e){return e==="normal"},t.trimRight=function(e){if(typeof e!="string")return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return typeof e!="string"?!1:t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return typeof e!="string"?!1:t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if(typeof e!="string")return r;for(var i=0;i<e.length;i++){var o=e[i],a=e[i+1];if(t.isBreakingSpace(o,a)||t.isNewline(o)){n!==""&&(r.push(n),n=""),r.push(o);continue}n+=o}return n!==""&&r.push(n),r},t.canBreakWords=function(e,r){return r},t.canBreakChars=function(e,r,n,i,o){return!0},t.wordWrapSplit=function(e){return e.split("")},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={ascent:0,descent:0,fontSize:0},n=t._canvas,i=t._context;i.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(t.BASELINE_SYMBOL).width),l=Math.ceil(t.HEIGHT_MULTIPLIER*s);s=s*t.BASELINE_MULTIPLIER|0,n.width=a,n.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var u=i.getImageData(0,0,a,l).data,c=u.length,f=a*4,h=0,d=0,p=!1;for(h=0;h<s;++h){for(var v=0;v<f;v+=4)if(u[d+v]!==255){p=!0;break}if(!p)d+=f;else break}for(r.ascent=s-h,d=c-f,p=!1,h=l;h>s;--h){for(var v=0;v<f;v+=4)if(u[d+v]!==255){p=!0;break}if(!p)d-=f;else break}return r.descent=h-s,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(e){e===void 0&&(e=""),e?delete t._fonts[e]:t._fonts={}},Object.defineProperty(t,"_canvas",{get:function(){if(!t.__canvas){var e=void 0;try{var r=new OffscreenCanvas(0,0),n=r.getContext("2d");if(n&&n.measureText)return t.__canvas=r,r;e=document.createElement("canvas")}catch{e=document.createElement("canvas")}e.width=e.height=10,t.__canvas=e}return t.__canvas},enumerable:!1,configurable:!0}),Object.defineProperty(t,"_context",{get:function(){return t.__context||(t.__context=t._canvas.getContext("2d")),t.__context},enumerable:!1,configurable:!0}),t}();Kn._fonts={};Kn.METRICS_STRING="|\xC9q\xC5";Kn.BASELINE_SYMBOL="M";Kn.BASELINE_MULTIPLIER=1.4;Kn.HEIGHT_MULTIPLIER=2;Kn._newlines=[10,13];Kn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var oF={texture:!0,children:!1,baseTexture:!0},ix=function(t){rF(e,t);function e(r,n,i){var o=this,a=!1;i||(i=document.createElement("canvas"),a=!0),i.width=3,i.height=3;var s=Wt.from(i);return s.orig=new fe,s.trim=new fe,o=t.call(this,s)||this,o._ownCanvas=a,o.canvas=i,o.context=o.canvas.getContext("2d"),o._resolution=Ft.RESOLUTION,o._autoResolution=!0,o._text=null,o._style=null,o._styleListener=null,o._font="",o.text=r,o.style=n,o.localStyleID=-1,o}return e.prototype.updateText=function(r){var n=this._style;if(this.localStyleID!==n.styleID&&(this.dirty=!0,this.localStyleID=n.styleID),!(!this.dirty&&r)){this._font=this._style.toFontString();var i=this.context,o=Kn.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),a=o.width,s=o.height,l=o.lines,u=o.lineHeight,c=o.lineWidths,f=o.maxLineWidth,h=o.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,a)+n.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,s)+n.padding*2)*this._resolution),i.scale(this._resolution,this._resolution),i.clearRect(0,0,this.canvas.width,this.canvas.height),i.font=this._font,i.lineWidth=n.strokeThickness,i.textBaseline=n.textBaseline,i.lineJoin=n.lineJoin,i.miterLimit=n.miterLimit;for(var d,p,v=n.dropShadow?2:1,m=0;m<v;++m){var y=n.dropShadow&&m===0,g=y?Math.ceil(Math.max(1,s)+n.padding*2):0,b=g*this._resolution;if(y){i.fillStyle="black",i.strokeStyle="black";var T=n.dropShadowColor,w=Na(typeof T=="number"?T:b1(T)),x=n.dropShadowBlur*this._resolution,R=n.dropShadowDistance*this._resolution;i.shadowColor="rgba("+w[0]*255+","+w[1]*255+","+w[2]*255+","+n.dropShadowAlpha+")",i.shadowBlur=x,i.shadowOffsetX=Math.cos(n.dropShadowAngle)*R,i.shadowOffsetY=Math.sin(n.dropShadowAngle)*R+b}else i.fillStyle=this._generateFillStyle(n,l,o),i.strokeStyle=n.stroke,i.shadowColor="black",i.shadowBlur=0,i.shadowOffsetX=0,i.shadowOffsetY=0;var I=(u-h.fontSize)/2;(!e.nextLineHeightBehavior||u-h.fontSize<0)&&(I=0);for(var C=0;C<l.length;C++)d=n.strokeThickness/2,p=n.strokeThickness/2+C*u+h.ascent+I,n.align==="right"?d+=f-c[C]:n.align==="center"&&(d+=(f-c[C])/2),n.stroke&&n.strokeThickness&&this.drawLetterSpacing(l[C],d+n.padding,p+n.padding-g,!0),n.fill&&this.drawLetterSpacing(l[C],d+n.padding,p+n.padding-g)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(r,n,i,o){o===void 0&&(o=!1);var a=this._style,s=a.letterSpacing,l=e.experimentalLetterSpacing&&("letterSpacing"in CanvasRenderingContext2D.prototype||"textLetterSpacing"in CanvasRenderingContext2D.prototype);if(s===0||l){l&&(this.context.letterSpacing=s,this.context.textLetterSpacing=s),o?this.context.strokeText(r,n,i):this.context.fillText(r,n,i);return}for(var u=n,c=Array.from?Array.from(r):r.split(""),f=this.context.measureText(r).width,h=0,d=0;d<c.length;++d){var p=c[d];o?this.context.strokeText(p,u,i):this.context.fillText(p,u,i);for(var v="",m=d+1;m<c.length;++m)v+=c[m];h=this.context.measureText(v).width,u+=f-h+s,f=h}},e.prototype.updateTexture=function(){var r=this.canvas;if(this._style.trim){var n=S3(r);n.data&&(r.width=n.width,r.height=n.height,this.context.putImageData(n.data,0,0))}var i=this._texture,o=this._style,a=o.trim?0:o.padding,s=i.baseTexture;i.trim.width=i._frame.width=r.width/this._resolution,i.trim.height=i._frame.height=r.height/this._resolution,i.trim.x=-a,i.trim.y=-a,i.orig.width=i._frame.width-a*2,i.orig.height=i._frame.height-a*2,this._onTextureUpdate(),s.setRealSize(r.width,r.height,this._resolution),i.updateUvs(),this.dirty=!1},e.prototype._render=function(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,r)},e.prototype.updateTransform=function(){this.updateText(!0),t.prototype.updateTransform.call(this)},e.prototype.getBounds=function(r,n){return this.updateText(!0),this._textureID===-1&&(r=!1),t.prototype.getBounds.call(this,r,n)},e.prototype.getLocalBounds=function(r){return this.updateText(!0),t.prototype.getLocalBounds.call(this,r)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._generateFillStyle=function(r,n,i){var o=r.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;var a,s=r.dropShadow?r.dropShadowDistance:0,l=r.padding||0,u=this.canvas.width/this._resolution-s-l*2,c=this.canvas.height/this._resolution-s-l*2,f=o.slice(),h=r.fillGradientStops.slice();if(!h.length)for(var d=f.length+1,p=1;p<d;++p)h.push(p/d);if(f.unshift(o[0]),h.unshift(0),f.push(o[o.length-1]),h.push(1),r.fillGradientType===Ws.LINEAR_VERTICAL){a=this.context.createLinearGradient(u/2,l,u/2,c+l);for(var v=i.fontProperties.fontSize+r.strokeThickness,p=0;p<n.length;p++){var m=i.lineHeight*(p-1)+v,y=i.lineHeight*p,g=y;p>0&&m>y&&(g=(y+m)/2);var b=y+v,T=i.lineHeight*(p+1),w=b;p+1<n.length&&T<b&&(w=(b+T)/2);for(var x=(w-g)/c,R=0;R<f.length;R++){var I=0;typeof h[R]=="number"?I=h[R]:I=R/f.length;var C=Math.min(1,Math.max(0,g/c+I*x));C=Number(C.toFixed(5)),a.addColorStop(C,f[R])}}}else{a=this.context.createLinearGradient(l,c/2,u+l,c/2);for(var S=f.length+1,L=1,p=0;p<f.length;p++){var H=void 0;typeof h[p]=="number"?H=h[p]:H=L/S,a.addColorStop(H,f[p]),L++}}return a},e.prototype.destroy=function(r){typeof r=="boolean"&&(r={children:r}),r=Object.assign({},oF,r),t.prototype.destroy.call(this,r),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(r){this.updateText(!0);var n=la(this.scale.x)||1;this.scale.x=n*r/this._texture.orig.width,this._width=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(r){this.updateText(!0);var n=la(this.scale.y)||1;this.scale.y=n*r/this._texture.orig.height,this._height=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(r){r=r||{},r instanceof Pa?this._style=r:this._style=new Pa(r),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(r){r=String(r==null?"":r),this._text!==r&&(this._text=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)},enumerable:!1,configurable:!0}),e.nextLineHeightBehavior=!1,e.experimentalLetterSpacing=!1,e}(La);/*!
* @pixi/prepare - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/prepare is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/Ft.UPLOADS_PER_FRAME=4;/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var id=function(t,e){return id=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},id(t,e)};function aF(t,e){id(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var sF=function(){function t(e){this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();function lF(t,e){var r=!1;if(t&&t._textures&&t._textures.length){for(var n=0;n<t._textures.length;n++)if(t._textures[n]instanceof Wt){var i=t._textures[n].baseTexture;e.indexOf(i)===-1&&(e.push(i),r=!0)}}return r}function uF(t,e){if(t.baseTexture instanceof ge){var r=t.baseTexture;return e.indexOf(r)===-1&&e.push(r),!0}return!1}function cF(t,e){if(t._texture&&t._texture instanceof Wt){var r=t._texture.baseTexture;return e.indexOf(r)===-1&&e.push(r),!0}return!1}function fF(t,e){return e instanceof ix?(e.updateText(!0),!0):!1}function hF(t,e){if(e instanceof Pa){var r=e.toFontString();return Kn.measureFont(r),!0}return!1}function dF(t,e){if(t instanceof ix){e.indexOf(t.style)===-1&&e.push(t.style),e.indexOf(t)===-1&&e.push(t);var r=t._texture.baseTexture;return e.indexOf(r)===-1&&e.push(r),!0}return!1}function pF(t,e){return t instanceof Pa?(e.indexOf(t)===-1&&e.push(t),!0):!1}var vF=function(){function t(e){var r=this;this.limiter=new sF(Ft.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){!r.queue||r.prepareItems()},this.registerFindHook(dF),this.registerFindHook(pF),this.registerFindHook(lF),this.registerFindHook(uF),this.registerFindHook(cF),this.registerUploadHook(fF),this.registerUploadHook(hF)}return t.prototype.upload=function(e,r){typeof e=="function"&&(r=e,e=null),e&&this.add(e),this.queue.length?(r&&this.completes.push(r),this.ticking||(this.ticking=!0,gr.system.addOnce(this.tick,this,vi.UTILITY))):r&&r()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var e=this.queue[0],r=!1;if(e&&!e._destroyed){for(var n=0,i=this.uploadHooks.length;n<i;n++)if(this.uploadHooks[n](this.uploadHookHelper,e)){this.queue.shift(),r=!0;break}}r||this.queue.shift()}if(this.queue.length)gr.system.addOnce(this.tick,this,vi.UTILITY);else{this.ticking=!1;var o=this.completes.slice(0);this.completes.length=0;for(var n=0,i=o.length;n<i;n++)o[n]()}},t.prototype.registerFindHook=function(e){return e&&this.addHooks.push(e),this},t.prototype.registerUploadHook=function(e){return e&&this.uploadHooks.push(e),this},t.prototype.add=function(e){for(var r=0,n=this.addHooks.length;r<n&&!this.addHooks[r](e,this.queue);r++);if(e instanceof jn)for(var r=e.children.length-1;r>=0;r--)this.add(e.children[r]);return this},t.prototype.destroy=function(){this.ticking&&gr.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function ox(t,e){return e instanceof ge?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function mF(t,e){if(!(e instanceof Yu))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i<n.length;i++){var o=n[i].style.texture;o&&ox(t,o.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function gF(t,e){return t instanceof Yu?(e.push(t),!0):!1}var yF=function(t){aF(e,t);function e(r){var n=t.call(this,r)||this;return n.uploadHookHelper=n.renderer,n.registerFindHook(gF),n.registerUploadHook(ox),n.registerUploadHook(mF),n}return e}(vF);/*!
* @pixi/spritesheet - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/spritesheet is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var bF=function(){function t(e,r,n){n===void 0&&(n=null),this._texture=e instanceof Wt?e:null,this.baseTexture=e instanceof ge?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;var i=this.baseTexture.resource;this.resolution=this._updateResolution(n||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(e){e===void 0&&(e=null);var r=this.data.meta.scale,n=ju(e,null);return n===null&&(n=r!==void 0?parseFloat(r):1),n!==1&&this.baseTexture.setResolution(n),n},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,n=t.BATCH_SIZE;r-e<n&&r<this._frameKeys.length;){var i=this._frameKeys[r],o=this._frames[i],a=o.frame;if(a){var s=null,l=null,u=o.trimmed!==!1&&o.sourceSize?o.sourceSize:o.frame,c=new fe(0,0,Math.floor(u.w)/this.resolution,Math.floor(u.h)/this.resolution);o.rotated?s=new fe(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):s=new fe(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),o.trimmed!==!1&&o.spriteSourceSize&&(l=new fe(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[i]=new Wt(this.baseTexture,s,c,l,o.rotated?2:0,o.anchor),Wt.addToCache(this.textures[i],i)}r++}},t.prototype._processAnimations=function(){var e=this.data.animations||{};for(var r in e){this.animations[r]=[];for(var n=0;n<e[r].length;n++){var i=e[r][n];this.animations[r].push(this.textures[i])}}},t.prototype._parseComplete=function(){var e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())},0)},t.prototype.destroy=function(e){var r;e===void 0&&(e=!1);for(var n in this.textures)this.textures[n].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((r=this._texture)===null||r===void 0||r.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},t.BATCH_SIZE=1e3,t}(),_F=function(){function t(){}return t.use=function(e,r){var n,i,o=this,a=e.name+"_image";if(!e.data||e.type!==Qe.TYPE.JSON||!e.data.frames||o.resources[a]){r();return}var s=(i=(n=e.data)===null||n===void 0?void 0:n.meta)===null||i===void 0?void 0:i.related_multi_packs;if(Array.isArray(s))for(var l=function(p){if(typeof p!="string")return"continue";var v=p.replace(".json",""),m=sa.resolve(e.url.replace(o.baseUrl,""),p);if(o.resources[v]||Object.values(o.resources).some(function(g){return sa.format(sa.parse(g.url))===m}))return"continue";var y={crossOrigin:e.crossOrigin,loadType:Qe.LOAD_TYPE.XHR,xhrType:Qe.XHR_RESPONSE_TYPE.JSON,parentResource:e,metadata:e.metadata};o.add(v,m,y)},u=0,c=s;u<c.length;u++){var f=c[u];l(f)}var h={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},d=t.getResourcePath(e,o.baseUrl);o.add(a,d,h,function(v){if(v.error){r(v.error);return}var m=new bF(v.texture,e.data,e.url);m.parse(function(){e.spritesheet=m,e.textures=m.textures,r()})})},t.getResourcePath=function(e,r){return e.isDataUrl?e.data.meta.image:sa.resolve(e.url.replace(r,""),e.data.meta.image)},t}();/*!
* @pixi/sprite-tiling - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/sprite-tiling is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var od=function(t,e){return od=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},od(t,e)};function ax(t,e){od(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Za=new _e;(function(t){ax(e,t);function e(r,n,i){n===void 0&&(n=100),i===void 0&&(i=100);var o=t.call(this,r)||this;return o.tileTransform=new pp,o._width=n,o._height=i,o.uvMatrix=o.texture.uvMatrix||new vp(r),o.pluginName="tilingSprite",o.uvRespectAnchor=!1,o}return Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(r){this.uvMatrix.clampMargin=r,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(r){this.tileTransform.scale.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(r){this.tileTransform.position.copyFrom(r)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(r){var n=this._texture;!n||!n.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),r.batch.setObjectRenderer(r.plugins[this.pluginName]),r.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var r=this._width*-this._anchor._x,n=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),o=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,r,n,i,o)},e.prototype.getLocalBounds=function(r){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),r||(this._localBoundsRect||(this._localBoundsRect=new fe),r=this._localBoundsRect),this._bounds.getRectangle(r)):t.prototype.getLocalBounds.call(this,r)},e.prototype.containsPoint=function(r){this.worldTransform.applyInverse(r,Za);var n=this._width,i=this._height,o=-n*this.anchor._x;if(Za.x>=o&&Za.x<o+n){var a=-i*this.anchor._y;if(Za.y>=a&&Za.y<a+i)return!0}return!1},e.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this.tileTransform=null,this.uvMatrix=null},e.from=function(r,n){var i=r instanceof Wt?r:Wt.from(r,n);return new e(i,n.width,n.height)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r},enumerable:!1,configurable:!0}),e})(La);var xF=`#version 100
#define SHADER_NAME Tiling-Sprite-Simple-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
void main(void)
{
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`,x0=`#version 100
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,TF=`#version 100
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
#ifdef GL_EXT_shader_texture_lod
vec4 texSample = unclamped == coord
? texture2D(uSampler, coord)
: texture2DLodEXT(uSampler, coord, 0);
#else
vec4 texSample = texture2D(uSampler, coord);
#endif
gl_FragColor = texSample * uColor;
}
`,wF=`#version 300 es
#define SHADER_NAME Tiling-Sprite-300
precision lowp float;
in vec2 aVertexPosition;
in vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
out vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,EF=`#version 300 es
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
in vec2 vTextureCoord;
out vec4 fragmentColor;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0
fragmentColor = texSample * uColor;
}
`,ru=new or,IF=function(t){ax(e,t);function e(r){var n=t.call(this,r)||this;return r.runners.contextChange.add(n),n.quad=new U1,n.state=Do.for2d(),n}return e.prototype.contextChange=function(){var r=this.renderer,n={globals:r.globalUniforms};this.simpleShader=Di.from(x0,xF,n),this.shader=r.context.webGLVersion>1?Di.from(wF,EF,n):Di.from(x0,TF,n)},e.prototype.render=function(r){var n=this.renderer,i=this.quad,o=i.vertices;o[0]=o[6]=r._width*-r.anchor.x,o[1]=o[3]=r._height*-r.anchor.y,o[2]=o[4]=r._width*(1-r.anchor.x),o[5]=o[7]=r._height*(1-r.anchor.y);var a=r.uvRespectAnchor?r.anchor.x:0,s=r.uvRespectAnchor?r.anchor.y:0;o=i.uvs,o[0]=o[6]=-a,o[1]=o[3]=-s,o[2]=o[4]=1-a,o[5]=o[7]=1-s,i.invalidate();var l=r._texture,u=l.baseTexture,c=r.tileTransform.localTransform,f=r.uvMatrix,h=u.isPowerOfTwo&&l.frame.width===u.width&&l.frame.height===u.height;h&&(u._glTextures[n.CONTEXT_UID]?h=u.wrapMode!==li.CLAMP:u.wrapMode===li.CLAMP&&(u.wrapMode=li.REPEAT));var d=h?this.simpleShader:this.shader,p=l.width,v=l.height,m=r._width,y=r._height;ru.set(c.a*p/m,c.b*p/y,c.c*v/m,c.d*v/y,c.tx/m,c.ty/y),ru.invert(),h?ru.prepend(f.mapCoord):(d.uniforms.uMapCoord=f.mapCoord.toArray(!0),d.uniforms.uClampFrame=f.uClampFrame,d.uniforms.uClampOffset=f.uClampOffset),d.uniforms.uTransform=ru.toArray(!0),d.uniforms.uColor=T1(r.tint,r.worldAlpha,d.uniforms.uColor,u.alphaMode),d.uniforms.translationMatrix=r.transform.worldTransform.toArray(!0),d.uniforms.uSampler=l,n.shader.bind(d),n.geometry.bind(i),this.state.blendMode=x1(r.blendMode,u.alphaMode),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(Tc);/*!
* @pixi/mesh - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/mesh is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var ad=function(t,e){return ad=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ad(t,e)};function Vp(t,e){ad(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var CF=function(){function t(e,r){this.uvBuffer=e,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(e){if(!(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}},t}(),Ff=new _e,T0=new bu,Ys=function(t){Vp(e,t);function e(r,n,i,o){o===void 0&&(o=_n.TRIANGLES);var a=t.call(this)||this;return a.geometry=r,a.shader=n,a.state=i||Do.for2d(),a.drawMode=o,a.start=0,a.size=0,a.uvs=null,a.indices=null,a.vertexData=new Float32Array(1),a.vertexDirty=-1,a._transformID=-1,a._roundPixels=Ft.ROUND_PIXELS,a.batchUvs=null,a}return Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(r){this.shader=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(r){this.shader.tint=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(r){this.shader.texture=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){var n=this.geometry.buffers[0].data,i=this.shader;i.batchable&&this.drawMode===_n.TRIANGLES&&n.length<e.BATCHABLE_SIZE*2?this._renderToBatch(r):this._renderDefault(r)},e.prototype._renderDefault=function(r){var n=this.shader;n.alpha=this.worldAlpha,n.update&&n.update(),r.batch.flush(),n.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),r.shader.bind(n),r.state.set(this.state),r.geometry.bind(this.geometry,n),r.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(r){var n=this.geometry,i=this.shader;i.uvMatrix&&(i.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=n.indexBuffer.data,this._tintRGB=i._tintRGB,this._texture=i.texture;var o=this.material.pluginName;r.batch.setObjectRenderer(r.plugins[o]),r.plugins[o].render(this)},e.prototype.calculateVertices=function(){var r=this.geometry,n=r.buffers[0],i=n.data,o=n._updateID;if(!(o===this.vertexDirty&&this._transformID===this.transform._worldID)){this._transformID=this.transform._worldID,this.vertexData.length!==i.length&&(this.vertexData=new Float32Array(i.length));for(var a=this.transform.worldTransform,s=a.a,l=a.b,u=a.c,c=a.d,f=a.tx,h=a.ty,d=this.vertexData,p=0;p<d.length/2;p++){var v=i[p*2],m=i[p*2+1];d[p*2]=s*v+u*m+f,d[p*2+1]=l*v+c*m+h}if(this._roundPixels)for(var y=Ft.RESOLUTION,p=0;p<d.length;++p)d[p]=Math.round((d[p]*y|0)/y);this.vertexDirty=o}},e.prototype.calculateUvs=function(){var r=this.geometry.buffers[1],n=this.shader;n.uvMatrix.isSimple?this.uvs=r.data:(this.batchUvs||(this.batchUvs=new CF(r,n.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(r){if(!this.getBounds().contains(r.x,r.y))return!1;this.worldTransform.applyInverse(r,Ff);for(var n=this.geometry.getBuffer("aVertexPosition").data,i=T0.points,o=this.geometry.getIndex().data,a=o.length,s=this.drawMode===4?3:1,l=0;l+2<a;l+=s){var u=o[l]*2,c=o[l+1]*2,f=o[l+2]*2;if(i[0]=n[u],i[1]=n[u+1],i[2]=n[c],i[3]=n[c+1],i[4]=n[f],i[5]=n[f+1],T0.contains(Ff.x,Ff.y))return!0}return!1},e.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},e.BATCHABLE_SIZE=100,e}(jn),RF=`varying vec2 vTextureCoord;
uniform vec4 uColor;
uniform sampler2D uSampler;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
}
`,NF=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTextureMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`,Ks=function(t){Vp(e,t);function e(r,n){var i=this,o={uSampler:r,alpha:1,uTextureMatrix:or.IDENTITY,uColor:new Float32Array([1,1,1,1])};return n=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},n),n.uniforms&&Object.assign(o,n.uniforms),i=t.call(this,n.program||fl.from(NF,RF),o)||this,i._colorDirty=!1,i.uvMatrix=new vp(r),i.batchable=n.program===void 0,i.pluginName=n.pluginName,i.tint=n.tint,i.alpha=n.alpha,i}return Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(r){this.uniforms.uSampler!==r&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!r.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=r,this.uvMatrix.texture=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){r!==this._alpha&&(this._alpha=r,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){r!==this._tint&&(this._tint=r,this._tintRGB=(r>>16)+(r&65280)+((r&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var r=this.texture.baseTexture;T1(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Di),Cc=function(t){Vp(e,t);function e(r,n,i){var o=t.call(this)||this,a=new hr(r),s=new hr(n,!0),l=new hr(i,!0,!0);return o.addAttribute("aVertexPosition",a,2,!1,Mt.FLOAT).addAttribute("aTextureCoord",s,2,!1,Mt.FLOAT).addIndex(l),o._updateId=-1,o}return Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(cl);/*!
* @pixi/text-bitmap - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/text-bitmap is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var sd=function(t,e){return sd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},sd(t,e)};function PF(t,e){sd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Ku=function(){function t(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}return t}(),SF=function(){function t(){}return t.test=function(e){return typeof e=="string"&&e.indexOf("info face=")===0},t.parse=function(e){var r=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var i in r){var o=r[i].match(/^[a-z]+/gm)[0],a=r[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var l in a){var u=a[l].split("="),c=u[0],f=u[1].replace(/"/gm,""),h=parseFloat(f),d=isNaN(h)?f:h;s[c]=d}n[o].push(s)}var p=new Ku;return n.info.forEach(function(v){return p.info.push({face:v.face,size:parseInt(v.size,10)})}),n.common.forEach(function(v){return p.common.push({lineHeight:parseInt(v.lineHeight,10)})}),n.page.forEach(function(v){return p.page.push({id:parseInt(v.id,10),file:v.file})}),n.char.forEach(function(v){return p.char.push({id:parseInt(v.id,10),page:parseInt(v.page,10),x:parseInt(v.x,10),y:parseInt(v.y,10),width:parseInt(v.width,10),height:parseInt(v.height,10),xoffset:parseInt(v.xoffset,10),yoffset:parseInt(v.yoffset,10),xadvance:parseInt(v.xadvance,10)})}),n.kerning.forEach(function(v){return p.kerning.push({first:parseInt(v.first,10),second:parseInt(v.second,10),amount:parseInt(v.amount,10)})}),n.distanceField.forEach(function(v){return p.distanceField.push({distanceRange:parseInt(v.distanceRange,10),fieldType:v.fieldType})}),p},t}(),ld=function(){function t(){}return t.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&e.getElementsByTagName("info")[0].getAttribute("face")!==null},t.parse=function(e){for(var r=new Ku,n=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),o=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),s=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField"),u=0;u<n.length;u++)r.info.push({face:n[u].getAttribute("face"),size:parseInt(n[u].getAttribute("size"),10)});for(var u=0;u<i.length;u++)r.common.push({lineHeight:parseInt(i[u].getAttribute("lineHeight"),10)});for(var u=0;u<o.length;u++)r.page.push({id:parseInt(o[u].getAttribute("id"),10)||0,file:o[u].getAttribute("file")});for(var u=0;u<a.length;u++){var c=a[u];r.char.push({id:parseInt(c.getAttribute("id"),10),page:parseInt(c.getAttribute("page"),10)||0,x:parseInt(c.getAttribute("x"),10),y:parseInt(c.getAttribute("y"),10),width:parseInt(c.getAttribute("width"),10),height:parseInt(c.getAttribute("height"),10),xoffset:parseInt(c.getAttribute("xoffset"),10),yoffset:parseInt(c.getAttribute("yoffset"),10),xadvance:parseInt(c.getAttribute("xadvance"),10)})}for(var u=0;u<s.length;u++)r.kerning.push({first:parseInt(s[u].getAttribute("first"),10),second:parseInt(s[u].getAttribute("second"),10),amount:parseInt(s[u].getAttribute("amount"),10)});for(var u=0;u<l.length;u++)r.distanceField.push({fieldType:l[u].getAttribute("fieldType"),distanceRange:parseInt(l[u].getAttribute("distanceRange"),10)});return r},t}(),AF=function(){function t(){}return t.test=function(e){if(typeof e=="string"&&e.indexOf("<font>")>-1){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return ld.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return ld.parse(r)},t}(),Lf=[SF,ld,AF];function sx(t){for(var e=0;e<Lf.length;e++)if(Lf[e].test(t))return Lf[e];return null}function OF(t,e,r,n,i,o){var a=r.fill;if(Array.isArray(a)){if(a.length===1)return a[0]}else return a;var s,l=r.dropShadow?r.dropShadowDistance:0,u=r.padding||0,c=t.width/n-l-u*2,f=t.height/n-l-u*2,h=a.slice(),d=r.fillGradientStops.slice();if(!d.length)for(var p=h.length+1,v=1;v<p;++v)d.push(v/p);if(h.unshift(a[0]),d.unshift(0),h.push(a[a.length-1]),d.push(1),r.fillGradientType===Ws.LINEAR_VERTICAL){s=e.createLinearGradient(c/2,u,c/2,f+u);for(var m=0,y=o.fontProperties.fontSize+r.strokeThickness,g=y/f,v=0;v<i.length;v++)for(var b=o.lineHeight*v,T=0;T<h.length;T++){var w=0;typeof d[T]=="number"?w=d[T]:w=T/h.length;var x=b/f+w*g,R=Math.max(m,x);R=Math.min(R,1),s.addColorStop(R,h[T]),m=R}}else{s=e.createLinearGradient(u,f/2,c+u,f/2);for(var I=h.length+1,C=1,v=0;v<h.length;v++){var S=void 0;typeof d[v]=="number"?S=d[v]:S=C/I,s.addColorStop(S,h[v]),C++}}return s}function UF(t,e,r,n,i,o,a){var s=r.text,l=r.fontProperties;e.translate(n,i),e.scale(o,o);var u=a.strokeThickness/2,c=-(a.strokeThickness/2);if(e.font=a.toFontString(),e.lineWidth=a.strokeThickness,e.textBaseline=a.textBaseline,e.lineJoin=a.lineJoin,e.miterLimit=a.miterLimit,e.fillStyle=OF(t,e,a,o,[s],r),e.strokeStyle=a.stroke,a.dropShadow){var f=a.dropShadowColor,h=Na(typeof f=="number"?f:b1(f)),d=a.dropShadowBlur*o,p=a.dropShadowDistance*o;e.shadowColor="rgba("+h[0]*255+","+h[1]*255+","+h[2]*255+","+a.dropShadowAlpha+")",e.shadowBlur=d,e.shadowOffsetX=Math.cos(a.dropShadowAngle)*p,e.shadowOffsetY=Math.sin(a.dropShadowAngle)*p}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;a.stroke&&a.strokeThickness&&e.strokeText(s,u,c+r.lineHeight-l.descent),a.fill&&e.fillText(s,u,c+r.lineHeight-l.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function lx(t){return Array.from?Array.from(t):t.split("")}function FF(t){typeof t=="string"&&(t=[t]);for(var e=[],r=0,n=t.length;r<n;r++){var i=t[r];if(Array.isArray(i)){if(i.length!==2)throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got "+i.length+".");var o=i[0].charCodeAt(0),a=i[1].charCodeAt(0);if(a<o)throw new Error("[BitmapFont]: Invalid character range.");for(var s=o,l=a;s<=l;s++)e.push(String.fromCharCode(s))}else e.push.apply(e,lx(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}function _u(t){return t.codePointAt?t.codePointAt(0):t.charCodeAt(0)}var ra=function(){function t(e,r,n){var i,o,a=e.info[0],s=e.common[0],l=e.page[0],u=e.distanceField[0],c=ju(l.file),f={};this._ownsTextures=n,this.font=a.face,this.size=a.size,this.lineHeight=s.lineHeight/c,this.chars={},this.pageTextures=f;for(var h=0;h<e.page.length;h++){var d=e.page[h],p=d.id,v=d.file;f[p]=r instanceof Array?r[h]:r[v],(u==null?void 0:u.fieldType)&&u.fieldType!=="none"&&(f[p].baseTexture.alphaMode=En.NO_PREMULTIPLIED_ALPHA)}for(var h=0;h<e.char.length;h++){var m=e.char[h],p=m.id,y=m.page,g=e.char[h],b=g.x,T=g.y,w=g.width,x=g.height,R=g.xoffset,I=g.yoffset,C=g.xadvance;b/=c,T/=c,w/=c,x/=c,R/=c,I/=c,C/=c;var S=new fe(b+f[y].frame.x/c,T+f[y].frame.y/c,w,x);this.chars[p]={xOffset:R,yOffset:I,xAdvance:C,kerning:{},texture:new Wt(f[y].baseTexture,S),page:y}}for(var h=0;h<e.kerning.length;h++){var L=e.kerning[h],H=L.first,G=L.second,k=L.amount;H/=c,G/=c,k/=c,this.chars[G]&&(this.chars[G].kerning[H]=k)}this.distanceFieldRange=u==null?void 0:u.distanceRange,this.distanceFieldType=(o=(i=u==null?void 0:u.fieldType)===null||i===void 0?void 0:i.toLowerCase())!==null&&o!==void 0?o:"none"}return t.prototype.destroy=function(){for(var e in this.chars)this.chars[e].texture.destroy(),this.chars[e].texture=null;for(var e in this.pageTextures)this._ownsTextures&&this.pageTextures[e].destroy(!0),this.pageTextures[e]=null;this.chars=null,this.pageTextures=null},t.install=function(e,r,n){var i;if(e instanceof Ku)i=e;else{var o=sx(e);if(!o)throw new Error("Unrecognized data format for font.");i=o.parse(e)}r instanceof Wt&&(r=[r]);var a=new t(i,r,n);return t.available[a.font]=a,a},t.uninstall=function(e){var r=t.available[e];if(!r)throw new Error("No font found named '"+e+"'");r.destroy(),delete t.available[e]},t.from=function(e,r,n){if(!e)throw new Error("[BitmapFont] Property `name` is required.");var i=Object.assign({},t.defaultOptions,n),o=i.chars,a=i.padding,s=i.resolution,l=i.textureWidth,u=i.textureHeight,c=FF(o),f=r instanceof Pa?r:new Pa(r),h=l,d=new Ku;d.info[0]={face:f.fontFamily,size:f.fontSize},d.common[0]={lineHeight:f.fontSize};for(var p=0,v=0,m,y,g,b=0,T=[],w=0;w<c.length;w++){m||(m=document.createElement("canvas"),m.width=l,m.height=u,y=m.getContext("2d"),g=new ge(m,{resolution:s}),T.push(new Wt(g)),d.page.push({id:T.length-1,file:""}));var x=Kn.measureText(c[w],f,!1,m),R=x.width,I=Math.ceil(x.height),C=Math.ceil((f.fontStyle==="italic"?2:1)*R);if(v>=u-I*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+u+"px is "+("too small for "+f.fontSize+"px fonts"));--w,m=null,y=null,g=null,v=0,p=0,b=0;continue}if(b=Math.max(I+x.fontProperties.descent,b),C*s+p>=h){--w,v+=b*s,v=Math.ceil(v),p=0,b=0;continue}UF(m,y,x,p,v,s,f);var S=_u(x.text);d.char.push({id:S,page:T.length-1,x:p/s,y:v/s,width:C,height:I,xoffset:0,yoffset:0,xadvance:Math.ceil(R-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0))}),p+=(C+2*a)*s,p=Math.ceil(p)}for(var w=0,L=c.length;w<L;w++)for(var H=c[w],G=0;G<L;G++){var k=c[G],Y=y.measureText(H).width,D=y.measureText(k).width,K=y.measureText(H+k).width,ht=K-(Y+D);ht&&d.kerning.push({first:_u(H),second:_u(k),amount:ht})}var bt=new t(d,T,!0);return t.available[e]!==void 0&&t.uninstall(e),t.available[e]=bt,bt},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),LF=`// Pixi texture info\r
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
// Tint\r
uniform vec4 uColor;\r
\r
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
uniform float uFWidth;\r
\r
void main(void) {\r
\r
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
\r
// MSDF\r
float median = texColor.r + texColor.g + texColor.b -\r
min(texColor.r, min(texColor.g, texColor.b)) -\r
max(texColor.r, max(texColor.g, texColor.b));\r
// SDF\r
median = min(median, texColor.a);\r
\r
float screenPxDistance = uFWidth * (median - 0.5);\r
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
\r
// NPM Textures, NPM outputs\r
gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r
\r
}\r
`,MF=`// Mesh material default fragment\r
attribute vec2 aVertexPosition;\r
attribute vec2 aTextureCoord;\r
\r
uniform mat3 projectionMatrix;\r
uniform mat3 translationMatrix;\r
uniform mat3 uTextureMatrix;\r
\r
varying vec2 vTextureCoord;\r
\r
void main(void)\r
{\r
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`,BF=[],kF=[],w0=[];(function(t){PF(e,t);function e(r,n){n===void 0&&(n={});var i=t.call(this)||this;i._tint=16777215;var o=Object.assign({},e.styleDefaults,n),a=o.align,s=o.tint,l=o.maxWidth,u=o.letterSpacing,c=o.fontName,f=o.fontSize;if(!ra.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._fontName=c,i._fontSize=f||ra.available[c].size,i.text=r,i._maxWidth=l,i._maxLineHeight=0,i._letterSpacing=u,i._anchor=new ua(function(){i.dirty=!0},i,0,0),i._roundPixels=Ft.ROUND_PIXELS,i.dirty=!0,i._resolution=Ft.RESOLUTION,i._autoResolution=!0,i._textureCache={},i}return e.prototype.updateText=function(){for(var r,n=ra.available[this._fontName],i=this._fontSize/n.size,o=new _e,a=[],s=[],l=[],u=this._text.replace(/(?:\r\n|\r)/g,`
`)||" ",c=lx(u),f=this._maxWidth*n.size/this._fontSize,h=n.distanceFieldType==="none"?BF:kF,d=null,p=0,v=0,m=0,y=-1,g=0,b=0,T=0,w=0,x=0;x<c.length;x++){var R=c[x],I=_u(R);if(/(?:\s)/.test(R)&&(y=x,g=p,w++),R==="\r"||R===`
`){s.push(p),l.push(-1),v=Math.max(v,p),++m,++b,o.x=0,o.y+=n.lineHeight,d=null,w=0;continue}var C=n.chars[I];if(!!C){d&&C.kerning[d]&&(o.x+=C.kerning[d]);var S=w0.pop()||{texture:Wt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new _e};S.texture=C.texture,S.line=m,S.charCode=I,S.position.x=o.x+C.xOffset+this._letterSpacing/2,S.position.y=o.y+C.yOffset,S.prevSpaces=w,a.push(S),p=S.position.x+Math.max(C.xAdvance,C.texture.orig.width),o.x+=C.xAdvance+this._letterSpacing,T=Math.max(T,C.yOffset+C.texture.height),d=I,y!==-1&&f>0&&o.x>f&&(++b,ui(a,1+y-b,1+x-y),x=y,y=-1,s.push(g),l.push(a.length>0?a[a.length-1].prevSpaces:0),v=Math.max(v,g),m++,o.x=0,o.y+=n.lineHeight,d=null,w=0)}}var L=c[c.length-1];L!=="\r"&&L!==`
`&&(/(?:\s)/.test(L)&&(p=g),s.push(p),v=Math.max(v,p),l.push(-1));for(var H=[],x=0;x<=m;x++){var G=0;this._align==="right"?G=v-s[x]:this._align==="center"?G=(v-s[x])/2:this._align==="justify"&&(G=l[x]<0?0:(v-s[x])/l[x]),H.push(G)}for(var k=a.length,Y={},D=[],K=this._activePagesMeshData,x=0;x<K.length;x++)h.push(K[x]);for(var x=0;x<k;x++){var ht=a[x].texture,bt=ht.baseTexture.uid;if(!Y[bt]){var W=h.pop();if(!W){var ft=new Cc,gt=void 0,_t=void 0;n.distanceFieldType==="none"?(gt=new Ks(Wt.EMPTY),_t=Ut.NORMAL):(gt=new Ks(Wt.EMPTY,{program:fl.from(MF,LF),uniforms:{uFWidth:0}}),_t=Ut.NORMAL_NPM);var V=new Ys(ft,gt);V.blendMode=_t,W={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:V,vertices:null,uvs:null,indices:null}}W.index=0,W.indexCount=0,W.vertexCount=0,W.uvsCount=0,W.total=0;var Z=this._textureCache;Z[bt]=Z[bt]||new Wt(ht.baseTexture),W.mesh.texture=Z[bt],W.mesh.tint=this._tint,D.push(W),Y[bt]=W}Y[bt].total++}for(var x=0;x<K.length;x++)D.indexOf(K[x])===-1&&this.removeChild(K[x].mesh);for(var x=0;x<D.length;x++)D[x].mesh.parent!==this&&this.addChild(D[x].mesh);this._activePagesMeshData=D;for(var x in Y){var W=Y[x],lt=W.total;if(!(((r=W.indices)===null||r===void 0?void 0:r.length)>6*lt)||W.vertices.length<Ys.BATCHABLE_SIZE*2)W.vertices=new Float32Array(4*2*lt),W.uvs=new Float32Array(4*2*lt),W.indices=new Uint16Array(6*lt);else for(var ut=W.total,Gt=W.vertices,it=ut*4*2;it<Gt.length;it++)Gt[it]=0;W.mesh.size=6*lt}for(var x=0;x<k;x++){var R=a[x],kt=R.position.x+H[R.line]*(this._align==="justify"?R.prevSpaces:1);this._roundPixels&&(kt=Math.round(kt));var Vt=kt*i,Xt=R.position.y*i,ht=R.texture,N=Y[ht.baseTexture.uid],A=ht.frame,$=ht._uvs,j=N.index++;N.indices[j*6+0]=0+j*4,N.indices[j*6+1]=1+j*4,N.indices[j*6+2]=2+j*4,N.indices[j*6+3]=0+j*4,N.indices[j*6+4]=2+j*4,N.indices[j*6+5]=3+j*4,N.vertices[j*8+0]=Vt,N.vertices[j*8+1]=Xt,N.vertices[j*8+2]=Vt+A.width*i,N.vertices[j*8+3]=Xt,N.vertices[j*8+4]=Vt+A.width*i,N.vertices[j*8+5]=Xt+A.height*i,N.vertices[j*8+6]=Vt,N.vertices[j*8+7]=Xt+A.height*i,N.uvs[j*8+0]=$.x0,N.uvs[j*8+1]=$.y0,N.uvs[j*8+2]=$.x1,N.uvs[j*8+3]=$.y1,N.uvs[j*8+4]=$.x2,N.uvs[j*8+5]=$.y2,N.uvs[j*8+6]=$.x3,N.uvs[j*8+7]=$.y3}this._textWidth=v*i,this._textHeight=(o.y+n.lineHeight)*i;for(var x in Y){var W=Y[x];if(this.anchor.x!==0||this.anchor.y!==0)for(var q=0,st=this._textWidth*this.anchor.x,mt=this._textHeight*this.anchor.y,at=0;at<W.total;at++)W.vertices[q++]-=st,W.vertices[q++]-=mt,W.vertices[q++]-=st,W.vertices[q++]-=mt,W.vertices[q++]-=st,W.vertices[q++]-=mt,W.vertices[q++]-=st,W.vertices[q++]-=mt;this._maxLineHeight=T*i;var ct=W.mesh.geometry.getBuffer("aVertexPosition"),rt=W.mesh.geometry.getBuffer("aTextureCoord"),Et=W.mesh.geometry.getIndex();ct.data=W.vertices,rt.data=W.uvs,Et.data=W.indices,ct.update(),rt.update(),Et.update()}for(var x=0;x<a.length;x++)w0.push(a[x])},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype._render=function(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0);var n=ra.available[this._fontName],i=n.distanceFieldRange,o=n.distanceFieldType,a=n.size;if(o!=="none")for(var s=this.worldTransform,l=s.a,u=s.b,c=s.c,f=s.d,h=Math.sqrt(l*l+u*u),d=Math.sqrt(c*c+f*f),p=(Math.abs(h)+Math.abs(d))/2,v=this._fontSize/a,m=0,y=this._activePagesMeshData;m<y.length;m++){var g=y[m];g.mesh.shader.uniforms.uFWidth=p*i*v*this._resolution}t.prototype._render.call(this,r)},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){if(this._tint!==r){this._tint=r;for(var n=0;n<this._activePagesMeshData.length;n++)this._activePagesMeshData[n].mesh.tint=r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(r){this._align!==r&&(this._align=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(r){if(!ra.available[r])throw new Error('Missing BitmapFont "'+r+'"');this._fontName!==r&&(this._fontName=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(r){this._fontSize!==r&&(this._fontSize=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(r){typeof r=="number"?this._anchor.set(r):this._anchor.copyFrom(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(r){r=String(r==null?"":r),this._text!==r&&(this._text=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(r){this._maxWidth!==r&&(this._maxWidth=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLineHeight",{get:function(){return this.validate(),this._maxLineHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this.validate(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(r){this._letterSpacing!==r&&(this._letterSpacing=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){r!==this._roundPixels&&(this._roundPixels=r,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this.validate(),this._textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)},enumerable:!1,configurable:!0}),e.prototype.destroy=function(r){var n=this._textureCache;for(var i in n){var o=n[i];o.destroy(),delete n[i]}this._textureCache=null,t.prototype.destroy.call(this,r)},e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e})(jn);var GF=function(){function t(){}return t.add=function(){Qe.setExtensionXhrType("fnt",Qe.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,r){var n=sx(e.data);if(!n){r();return}for(var i=t.getBaseUrl(this,e),o=n.parse(e.data),a={},s=function(v){a[v.metadata.pageFile]=v.texture,Object.keys(a).length===o.page.length&&(e.bitmapFont=ra.install(o,a,!0),r())},l=0;l<o.page.length;++l){var u=o.page[l].file,c=i+u,f=!1;for(var h in this.resources){var d=this.resources[h];if(d.url===c){d.metadata.pageFile=u,d.texture?s(d):d.onAfterMiddleware.add(s),f=!0;break}}if(!f){var p={crossOrigin:e.crossOrigin,loadType:Qe.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:u},e.metadata.imageMetadata),parentResource:e};this.add(c,p,s)}}},t.getBaseUrl=function(e,r){var n=r.isDataUrl?"":t.dirname(r.url);return r.isDataUrl&&(n==="."&&(n=""),e.baseUrl&&n&&e.baseUrl.charAt(e.baseUrl.length-1)==="/"&&(n+="/")),n=n.replace(e.baseUrl,""),n&&n.charAt(n.length-1)!=="/"&&(n+="/"),n},t.dirname=function(e){var r=e.replace(/\\/g,"/").replace(/\/$/,"").replace(/\/[^\/]*$/,"");return r===e?".":r===""?"/":r},t}();/*!
* @pixi/filter-alpha - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-alpha is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var ud=function(t,e){return ud=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ud(t,e)};function DF(t,e){ud(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var HF=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float uAlpha;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`;(function(t){DF(e,t);function e(r){r===void 0&&(r=1);var n=t.call(this,aU,HF,{uAlpha:1})||this;return n.alpha=r,n}return Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),e})(Zi);/*!
* @pixi/filter-blur - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-blur is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var cd=function(t,e){return cd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},cd(t,e)};function ux(t,e){cd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var VF=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform float strength;
varying vec2 vBlurTexCoords[%size%];
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vec2 textureCoord = filterTextureCoord();
%blur%
}`;function $F(t,e){var r=Math.ceil(t/2),n=VF,i="",o;e?o="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":o="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var a=0;a<t;a++){var s=o.replace("%index%",a.toString());s=s.replace("%sampleIndex%",a-(r-1)+".0"),i+=s,i+=`
`}return n=n.replace("%blur%",i),n=n.replace("%size%",t.toString()),n}var jF={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]},XF=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);function zF(t){for(var e=jF[t],r=e.length,n=XF,i="",o="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",a,s=0;s<t;s++){var l=o.replace("%index%",s.toString());a=s,s>=r&&(a=t-s-1),l=l.replace("%value%",e[a].toString()),i+=l,i+=`
`}return n=n.replace("%blur%",i),n=n.replace("%size%",t.toString()),n}/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var E0;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(E0||(E0={}));var I0;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(I0||(I0={}));var C0;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(C0||(C0={}));var R0;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(R0||(R0={}));var N0;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(N0||(N0={}));var P0;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(P0||(P0={}));var S0;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(S0||(S0={}));var A0;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(A0||(A0={}));var O0;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(O0||(O0={}));var U0;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(U0||(U0={}));var F0;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(F0||(F0={}));var L0;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(L0||(L0={}));var M0;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(M0||(M0={}));var Zs;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(Zs||(Zs={}));var B0;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(B0||(B0={}));var k0;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(k0||(k0={}));var G0;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(G0||(G0={}));var D0;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(D0||(D0={}));var H0;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(H0||(H0={}));var V0=function(t){ux(e,t);function e(r,n,i,o,a){n===void 0&&(n=8),i===void 0&&(i=4),o===void 0&&(o=Ft.FILTER_RESOLUTION),a===void 0&&(a=5);var s=this,l=$F(a,r),u=zF(a);return s=t.call(this,l,u)||this,s.horizontal=r,s.resolution=o,s._quality=0,s.quality=i,s.blur=n,s}return e.prototype.apply=function(r,n,i,o){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/r.renderer.width*(r.renderer.width/n.width):this.uniforms.strength=1/r.renderer.height*(r.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)r.applyFilter(this,n,i,o);else{var a=r.getFilterTexture(),s=r.renderer,l=n,u=a;this.state.blend=!1,r.applyFilter(this,l,u,Zs.CLEAR);for(var c=1;c<this.passes-1;c++){r.bindAndClear(l,Zs.BLIT),this.uniforms.uSampler=u;var f=u;u=l,l=f,s.shader.bind(this),s.geometry.draw(5)}this.state.blend=!0,r.applyFilter(this,u,i,o),r.returnFilterTexture(a)}},Object.defineProperty(e.prototype,"blur",{get:function(){return this.strength},set:function(r){this.padding=1+Math.abs(r)*2,this.strength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(r){this._quality=r,this.passes=r},enumerable:!1,configurable:!0}),e}(Zi);(function(t){ux(e,t);function e(r,n,i,o){r===void 0&&(r=8),n===void 0&&(n=4),i===void 0&&(i=Ft.FILTER_RESOLUTION),o===void 0&&(o=5);var a=t.call(this)||this;return a.blurXFilter=new V0(!0,r,n,i,o),a.blurYFilter=new V0(!1,r,n,i,o),a.resolution=i,a.quality=n,a.blur=r,a.repeatEdgePixels=!1,a}return e.prototype.apply=function(r,n,i,o){var a=Math.abs(this.blurXFilter.strength),s=Math.abs(this.blurYFilter.strength);if(a&&s){var l=r.getFilterTexture();this.blurXFilter.apply(r,n,l,Zs.CLEAR),this.blurYFilter.apply(r,l,i,o),r.returnFilterTexture(l)}else s?this.blurYFilter.apply(r,n,i,o):this.blurXFilter.apply(r,n,i,o)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=this.blurYFilter.blur=r,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(r){this.blurXFilter.quality=this.blurYFilter.quality=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=r,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(r){this.blurYFilter.blur=r,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(r){this.blurYFilter.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(r){this._repeatEdgePixels=r,this.updatePadding()},enumerable:!1,configurable:!0}),e})(Zi);/*!
* @pixi/filter-color-matrix - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-color-matrix is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var fd=function(t,e){return fd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},fd(t,e)};function WF(t,e){fd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var YF=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
void main(void)
{
vec4 c = texture2D(uSampler, vTextureCoord);
if (uAlpha == 0.0) {
gl_FragColor = c;
return;
}
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (c.a > 0.0) {
c.rgb /= c.a;
}
vec4 result;
result.r = (m[0] * c.r);
result.r += (m[1] * c.g);
result.r += (m[2] * c.b);
result.r += (m[3] * c.a);
result.r += m[4];
result.g = (m[5] * c.r);
result.g += (m[6] * c.g);
result.g += (m[7] * c.b);
result.g += (m[8] * c.a);
result.g += m[9];
result.b = (m[10] * c.r);
result.b += (m[11] * c.g);
result.b += (m[12] * c.b);
result.b += (m[13] * c.a);
result.b += m[14];
result.a = (m[15] * c.r);
result.a += (m[16] * c.g);
result.a += (m[17] * c.b);
result.a += (m[18] * c.a);
result.a += m[19];
vec3 rgb = mix(c.rgb, result.rgb, uAlpha);
// Premultiply alpha again.
rgb *= result.a;
gl_FragColor = vec4(rgb, result.a);
}
`,$0=function(t){WF(e,t);function e(){var r=this,n={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};return r=t.call(this,D1,YF,n)||this,r.alpha=1,r}return e.prototype._loadMatrix=function(r,n){n===void 0&&(n=!1);var i=r;n&&(this._multiply(i,this.uniforms.m,r),i=this._colorMatrix(i)),this.uniforms.m=i},e.prototype._multiply=function(r,n,i){return r[0]=n[0]*i[0]+n[1]*i[5]+n[2]*i[10]+n[3]*i[15],r[1]=n[0]*i[1]+n[1]*i[6]+n[2]*i[11]+n[3]*i[16],r[2]=n[0]*i[2]+n[1]*i[7]+n[2]*i[12]+n[3]*i[17],r[3]=n[0]*i[3]+n[1]*i[8]+n[2]*i[13]+n[3]*i[18],r[4]=n[0]*i[4]+n[1]*i[9]+n[2]*i[14]+n[3]*i[19]+n[4],r[5]=n[5]*i[0]+n[6]*i[5]+n[7]*i[10]+n[8]*i[15],r[6]=n[5]*i[1]+n[6]*i[6]+n[7]*i[11]+n[8]*i[16],r[7]=n[5]*i[2]+n[6]*i[7]+n[7]*i[12]+n[8]*i[17],r[8]=n[5]*i[3]+n[6]*i[8]+n[7]*i[13]+n[8]*i[18],r[9]=n[5]*i[4]+n[6]*i[9]+n[7]*i[14]+n[8]*i[19]+n[9],r[10]=n[10]*i[0]+n[11]*i[5]+n[12]*i[10]+n[13]*i[15],r[11]=n[10]*i[1]+n[11]*i[6]+n[12]*i[11]+n[13]*i[16],r[12]=n[10]*i[2]+n[11]*i[7]+n[12]*i[12]+n[13]*i[17],r[13]=n[10]*i[3]+n[11]*i[8]+n[12]*i[13]+n[13]*i[18],r[14]=n[10]*i[4]+n[11]*i[9]+n[12]*i[14]+n[13]*i[19]+n[14],r[15]=n[15]*i[0]+n[16]*i[5]+n[17]*i[10]+n[18]*i[15],r[16]=n[15]*i[1]+n[16]*i[6]+n[17]*i[11]+n[18]*i[16],r[17]=n[15]*i[2]+n[16]*i[7]+n[17]*i[12]+n[18]*i[17],r[18]=n[15]*i[3]+n[16]*i[8]+n[17]*i[13]+n[18]*i[18],r[19]=n[15]*i[4]+n[16]*i[9]+n[17]*i[14]+n[18]*i[19]+n[19],r},e.prototype._colorMatrix=function(r){var n=new Float32Array(r);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n},e.prototype.brightness=function(r,n){var i=[r,0,0,0,0,0,r,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.tint=function(r,n){var i=r>>16&255,o=r>>8&255,a=r&255,s=[i/255,0,0,0,0,0,o/255,0,0,0,0,0,a/255,0,0,0,0,0,1,0];this._loadMatrix(s,n)},e.prototype.greyscale=function(r,n){var i=[r,r,r,0,0,r,r,r,0,0,r,r,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.blackAndWhite=function(r){var n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.hue=function(r,n){r=(r||0)/180*Math.PI;var i=Math.cos(r),o=Math.sin(r),a=Math.sqrt,s=1/3,l=a(s),u=i+(1-i)*s,c=s*(1-i)-l*o,f=s*(1-i)+l*o,h=s*(1-i)+l*o,d=i+s*(1-i),p=s*(1-i)-l*o,v=s*(1-i)-l*o,m=s*(1-i)+l*o,y=i+s*(1-i),g=[u,c,f,0,0,h,d,p,0,0,v,m,y,0,0,0,0,0,1,0];this._loadMatrix(g,n)},e.prototype.contrast=function(r,n){var i=(r||0)+1,o=-.5*(i-1),a=[i,0,0,0,o,0,i,0,0,o,0,0,i,0,o,0,0,0,1,0];this._loadMatrix(a,n)},e.prototype.saturate=function(r,n){r===void 0&&(r=0);var i=r*2/3+1,o=(i-1)*-.5,a=[i,o,o,0,0,o,i,o,0,0,o,o,i,0,0,0,0,0,1,0];this._loadMatrix(a,n)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(r){var n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.sepia=function(r){var n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.technicolor=function(r){var n=[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(n,r)},e.prototype.polaroid=function(r){var n=[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(n,r)},e.prototype.toBGR=function(r){var n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.kodachrome=function(r){var n=[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(n,r)},e.prototype.browni=function(r){var n=[.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(n,r)},e.prototype.vintage=function(r){var n=[.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(n,r)},e.prototype.colorTone=function(r,n,i,o,a){r=r||.2,n=n||.15,i=i||16770432,o=o||3375104;var s=(i>>16&255)/255,l=(i>>8&255)/255,u=(i&255)/255,c=(o>>16&255)/255,f=(o>>8&255)/255,h=(o&255)/255,d=[.3,.59,.11,0,0,s,l,u,r,0,c,f,h,n,0,s-c,l-f,u-h,0,0];this._loadMatrix(d,a)},e.prototype.night=function(r,n){r=r||.1;var i=[r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.predator=function(r,n){var i=[11.224130630493164*r,-4.794486999511719*r,-2.8746118545532227*r,0*r,.40342438220977783*r,-3.6330697536468506*r,9.193157196044922*r,-2.951810836791992*r,0*r,-1.316135048866272*r,-3.2184197902679443*r,-4.2375030517578125*r,7.476448059082031*r,0*r,.8044459223747253*r,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.lsd=function(r){var n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.reset=function(){var r=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(r,!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(r){this.uniforms.m=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),e}(Zi);$0.prototype.grayscale=$0.prototype.greyscale;/*!
* @pixi/filter-displacement - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-displacement is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var hd=function(t,e){return hd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},hd(t,e)};function KF(t,e){hd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ZF=`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
uniform mat2 rotation;
uniform sampler2D uSampler;
uniform sampler2D mapSampler;
uniform highp vec4 inputSize;
uniform vec4 inputClamp;
void main(void)
{
vec4 map = texture2D(mapSampler, vFilterCoord);
map -= 0.5;
map.xy = scale * inputSize.zw * (rotation * map.xy);
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
}
`,qF=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform mat3 filterMatrix;
varying vec2 vTextureCoord;
varying vec2 vFilterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
}
`;(function(t){KF(e,t);function e(r,n){var i=this,o=new or;return r.renderable=!1,i=t.call(this,qF,ZF,{mapSampler:r._texture,filterMatrix:o,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this,i.maskSprite=r,i.maskMatrix=o,n==null&&(n=20),i.scale=new _e(n,n),i}return e.prototype.apply=function(r,n,i,o){this.uniforms.filterMatrix=r.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var a=this.maskSprite.worldTransform,s=Math.sqrt(a.a*a.a+a.b*a.b),l=Math.sqrt(a.c*a.c+a.d*a.d);s!==0&&l!==0&&(this.uniforms.rotation[0]=a.a/s,this.uniforms.rotation[1]=a.b/s,this.uniforms.rotation[2]=a.c/l,this.uniforms.rotation[3]=a.d/l),r.applyFilter(this,n,i,o)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(r){this.uniforms.mapSampler=r},enumerable:!1,configurable:!0}),e})(Zi);/*!
* @pixi/filter-fxaa - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-fxaa is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var dd=function(t,e){return dd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dd(t,e)};function JF(t,e){dd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var QF=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
void texcoords(vec2 fragCoord, vec2 inverseVP,
out vec2 v_rgbNW, out vec2 v_rgbNE,
out vec2 v_rgbSW, out vec2 v_rgbSE,
out vec2 v_rgbM) {
v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;
v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;
v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;
v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;
v_rgbM = vec2(fragCoord * inverseVP);
}
void main(void) {
gl_Position = filterVertexPosition();
vFragCoord = aVertexPosition * outputFrame.zw;
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
}
`,tL=`varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform sampler2D uSampler;
uniform highp vec4 inputSize;
/**
Basic FXAA implementation based on the code on geeks3d.com with the
modification that the texture2DLod stuff was removed since it's
unsupported by WebGL.
--
From:
https://github.com/mitsuhiko/webgl-meincraft
Copyright (c) 2011 by Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FXAA_REDUCE_MIN
#define FXAA_REDUCE_MIN (1.0/ 128.0)
#endif
#ifndef FXAA_REDUCE_MUL
#define FXAA_REDUCE_MUL (1.0 / 8.0)
#endif
#ifndef FXAA_SPAN_MAX
#define FXAA_SPAN_MAX 8.0
#endif
//optimized version for mobile, where dependent
//texture reads can be a bottleneck
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
vec2 v_rgbNW, vec2 v_rgbNE,
vec2 v_rgbSW, vec2 v_rgbSE,
vec2 v_rgbM) {
vec4 color;
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;
vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;
vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;
vec4 texColor = texture2D(tex, v_rgbM);
vec3 rgbM = texColor.xyz;
vec3 luma = vec3(0.299, 0.587, 0.114);
float lumaNW = dot(rgbNW, luma);
float lumaNE = dot(rgbNE, luma);
float lumaSW = dot(rgbSW, luma);
float lumaSE = dot(rgbSE, luma);
float lumaM = dot(rgbM, luma);
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
mediump vec2 dir;
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
dir * rcpDirMin)) * inverseVP;
vec3 rgbA = 0.5 * (
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
vec3 rgbB = rgbA * 0.5 + 0.25 * (
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
float lumaB = dot(rgbB, luma);
if ((lumaB < lumaMin) || (lumaB > lumaMax))
color = vec4(rgbA, texColor.a);
else
color = vec4(rgbB, texColor.a);
return color;
}
void main() {
vec4 color;
color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
gl_FragColor = color;
}
`;(function(t){JF(e,t);function e(){return t.call(this,QF,tL)||this}return e})(Zi);/*!
* @pixi/filter-noise - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-noise is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var pd=function(t,e){return pd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},pd(t,e)};function eL(t,e){pd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var rL=`precision highp float;
varying vec2 vTextureCoord;
varying vec4 vColor;
uniform float uNoise;
uniform float uSeed;
uniform sampler2D uSampler;
float rand(vec2 co)
{
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
}
void main()
{
vec4 color = texture2D(uSampler, vTextureCoord);
float randomValue = rand(gl_FragCoord.xy * uSeed);
float diff = (randomValue - 0.5) * uNoise;
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (color.a > 0.0) {
color.rgb /= color.a;
}
color.r += diff;
color.g += diff;
color.b += diff;
// Premultiply alpha again.
color.rgb *= color.a;
gl_FragColor = color;
}
`;(function(t){eL(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,D1,rL,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=n,i}return Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(r){this.uniforms.uNoise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(r){this.uniforms.uSeed=r},enumerable:!1,configurable:!0}),e})(Zi);/*!
* @pixi/mixin-cache-as-bitmap - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var j0;(function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"})(j0||(j0={}));var X0;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"})(X0||(X0={}));var z0;(function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"})(z0||(z0={}));var W0;(function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"})(W0||(W0={}));var Y0;(function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Y0||(Y0={}));var K0;(function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(K0||(K0={}));var Z0;(function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Z0||(Z0={}));var q0;(function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"})(q0||(q0={}));var J0;(function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"})(J0||(J0={}));var Q0;(function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"})(Q0||(Q0={}));var ty;(function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(ty||(ty={}));var ey;(function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"})(ey||(ey={}));var ry;(function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(ry||(ry={}));var ny;(function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"})(ny||(ny={}));var iy;(function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"})(iy||(iy={}));var oy;(function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"})(oy||(oy={}));var ay;(function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"})(ay||(ay={}));var vd;(function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"})(vd||(vd={}));var sy;(function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(sy||(sy={}));var cx=new or;ar.prototype._cacheAsBitmap=!1;ar.prototype._cacheData=null;ar.prototype._cacheAsBitmapResolution=null;ar.prototype._cacheAsBitmapMultisample=vd.NONE;var nL=function(){function t(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return t}();Object.defineProperties(ar.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e;t?(this._cacheData||(this._cacheData=new nL),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}});ar.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};ar.prototype._initCachedDisplayObject=function(e){var r;if(!(this._cacheData&&this._cacheData.sprite)){var n=this.alpha;this.alpha=1,e.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var o=this.filters[0].padding;i.pad(o)}i.ceil(Ft.RESOLUTION);var a=e.renderTexture.current,s=e.renderTexture.sourceFrame.clone(),l=e.renderTexture.destinationFrame.clone(),u=e.projection.transform,c=Uo.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:(r=this.cacheAsBitmapMultisample)!==null&&r!==void 0?r:e.multisample}),f="cacheAsBitmap_"+Oo();this._cacheData.textureCacheId=f,ge.addToCache(c.baseTexture,f),Wt.addToCache(c,f);var h=this.transform.localTransform.copyTo(cx).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:c,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=u,e.renderTexture.bind(a,s,l),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new La(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};ar.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};ar.prototype._initCachedDisplayObjectCanvas=function(e){if(!(this._cacheData&&this._cacheData.sprite)){var r=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var i=e.context,o=e._projTransform;r.ceil(Ft.RESOLUTION);var a=Uo.create({width:r.width,height:r.height}),s="cacheAsBitmap_"+Oo();this._cacheData.textureCacheId=s,ge.addToCache(a.baseTexture,s),Wt.addToCache(a,s);var l=cx;this.transform.localTransform.copyTo(l),l.invert(),l.tx-=r.x,l.ty-=r.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:a,clear:!0,transform:l,skipUpdateTransform:!1}),e.context=i,e._projTransform=o,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var u=new La(a);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(r.x/r.width),u.anchor.y=-(r.y/r.height),u.alpha=n,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}};ar.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};ar.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};ar.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,ge.removeFromCache(this._cacheData.textureCacheId),Wt.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};ar.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};/*!
* @pixi/mixin-get-child-by-name - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/mixin-get-child-by-name is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/ar.prototype.name=null;jn.prototype.getChildByName=function(e,r){for(var n=0,i=this.children.length;n<i;n++)if(this.children[n].name===e)return this.children[n];if(r)for(var n=0,i=this.children.length;n<i;n++){var o=this.children[n];if(!!o.getChildByName){var a=this.children[n].getChildByName(e,!0);if(a)return a}}return null};/*!
* @pixi/mixin-get-global-position - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/mixin-get-global-position is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/ar.prototype.getGlobalPosition=function(e,r){return e===void 0&&(e=new _e),r===void 0&&(r=!1),this.parent?this.parent.toGlobal(this.position,e,r):(e.x=this.position.x,e.y=this.position.y),e};/*!
* @pixi/mesh-extras - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/mesh-extras is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var md=function(t,e){return md=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},md(t,e)};function Ma(t,e){md(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var iL=function(t){Ma(e,t);function e(r,n,i,o){r===void 0&&(r=100),n===void 0&&(n=100),i===void 0&&(i=10),o===void 0&&(o=10);var a=t.call(this)||this;return a.segWidth=i,a.segHeight=o,a.width=r,a.height=n,a.build(),a}return e.prototype.build=function(){for(var r=this.segWidth*this.segHeight,n=[],i=[],o=[],a=this.segWidth-1,s=this.segHeight-1,l=this.width/a,u=this.height/s,c=0;c<r;c++){var f=c%this.segWidth,h=c/this.segWidth|0;n.push(f*l,h*u),i.push(f/a,h/s)}for(var d=a*s,c=0;c<d;c++){var p=c%a,v=c/a|0,m=v*this.segWidth+p,y=v*this.segWidth+p+1,g=(v+1)*this.segWidth+p,b=(v+1)*this.segWidth+p+1;o.push(m,y,g,y,b,g)}this.buffers[0].data=new Float32Array(n),this.buffers[1].data=new Float32Array(i),this.indexBuffer.data=new Uint16Array(o),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(Cc),oL=function(t){Ma(e,t);function e(r,n,i){r===void 0&&(r=200),i===void 0&&(i=0);var o=t.call(this,new Float32Array(n.length*4),new Float32Array(n.length*4),new Uint16Array((n.length-1)*6))||this;return o.points=n,o._width=r,o.textureScale=i,o.build(),o}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),e.prototype.build=function(){var r=this.points;if(!!r){var n=this.getBuffer("aVertexPosition"),i=this.getBuffer("aTextureCoord"),o=this.getIndex();if(!(r.length<1)){n.data.length/4!==r.length&&(n.data=new Float32Array(r.length*4),i.data=new Float32Array(r.length*4),o.data=new Uint16Array((r.length-1)*6));var a=i.data,s=o.data;a[0]=0,a[1]=0,a[2]=0,a[3]=1;for(var l=0,u=r[0],c=this._width*this.textureScale,f=r.length,h=0;h<f;h++){var d=h*4;if(this.textureScale>0){var p=u.x-r[h].x,v=u.y-r[h].y,m=Math.sqrt(p*p+v*v);u=r[h],l+=m/c}else l=h/(f-1);a[d]=l,a[d+1]=0,a[d+2]=l,a[d+3]=1}for(var y=0,h=0;h<f-1;h++){var d=h*2;s[y++]=d,s[y++]=d+1,s[y++]=d+2,s[y++]=d+2,s[y++]=d+1,s[y++]=d+3}i.update(),o.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var r=this.points;if(!(r.length<1)){for(var n=r[0],i,o=0,a=0,s=this.buffers[0].data,l=r.length,u=0;u<l;u++){var c=r[u],f=u*4;u<r.length-1?i=r[u+1]:i=c,a=-(i.x-n.x),o=i.y-n.y;var h=Math.sqrt(o*o+a*a),d=this.textureScale>0?this.textureScale*this._width/2:this._width/2;o/=h,a/=h,o*=d,a*=d,s[f]=c.x+o,s[f+1]=c.y+a,s[f+2]=c.x-o,s[f+3]=c.y-a,n=c}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Cc);(function(t){Ma(e,t);function e(r,n,i){i===void 0&&(i=0);var o=this,a=new oL(r.height,n,i),s=new Ks(r);return i>0&&(r.baseTexture.wrapMode=li.REPEAT),o=t.call(this,a,s)||this,o.autoUpdate=!0,o}return e.prototype._render=function(r){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,r)},e})(Ys);var aL=function(t){Ma(e,t);function e(r,n,i){var o=this,a=new iL(r.width,r.height,n,i),s=new Ks(Wt.WHITE);return o=t.call(this,a,s)||this,o.texture=r,o.autoResize=!0,o}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var r=this.geometry,n=this.shader.texture,i=n.width,o=n.height;this.autoResize&&(r.width!==i||r.height!==o)&&(r.width=this.shader.texture.width,r.height=this.shader.texture.height,r.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(r){this.shader.texture!==r&&(this.shader.texture=r,this._textureID=-1,r.baseTexture.valid?this.textureUpdated():r.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,r)},e.prototype.destroy=function(r){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,r)},e}(Ys);(function(t){Ma(e,t);function e(r,n,i,o,a){r===void 0&&(r=Wt.EMPTY);var s=this,l=new Cc(n,i,o);l.getBuffer("aVertexPosition").static=!1;var u=new Ks(r);return s=t.call(this,l,u,null,a)||this,s.autoUpdate=!0,s}return Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,r)},e})(Ys);var nu=10;(function(t){Ma(e,t);function e(r,n,i,o,a){n===void 0&&(n=nu),i===void 0&&(i=nu),o===void 0&&(o=nu),a===void 0&&(a=nu);var s=t.call(this,Wt.WHITE,4,4)||this;return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=o,s._topHeight=i,s._bottomHeight=a,s.texture=r,s}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var r=this.vertices,n=this._getMinScale();r[9]=r[11]=r[13]=r[15]=this._topHeight*n,r[17]=r[19]=r[21]=r[23]=this._height-this._bottomHeight*n,r[25]=r[27]=r[29]=r[31]=this._height},e.prototype.updateVerticalVertices=function(){var r=this.vertices,n=this._getMinScale();r[2]=r[10]=r[18]=r[26]=this._leftWidth*n,r[4]=r[12]=r[20]=r[28]=this._width-this._rightWidth*n,r[6]=r[14]=r[22]=r[30]=this._width},e.prototype._getMinScale=function(){var r=this._leftWidth+this._rightWidth,n=this._width>r?1:this._width/r,i=this._topHeight+this._bottomHeight,o=this._height>i?1:this._height/i,a=Math.min(n,o);return a},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(r){this._leftWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(r){this._rightWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(r){this._topHeight=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(r){this._bottomHeight=r,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var r=this.texture,n=this.geometry.buffers[1].data;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var i=1/this._origWidth,o=1/this._origHeight;n[0]=n[8]=n[16]=n[24]=0,n[1]=n[3]=n[5]=n[7]=0,n[6]=n[14]=n[22]=n[30]=1,n[25]=n[27]=n[29]=n[31]=1,n[2]=n[10]=n[18]=n[26]=i*this._leftWidth,n[4]=n[12]=n[20]=n[28]=1-i*this._rightWidth,n[9]=n[11]=n[13]=n[15]=o*this._topHeight,n[17]=n[19]=n[21]=n[23]=1-o*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e})(aL);/*!
* @pixi/sprite-animated - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/sprite-animated is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var gd=function(t,e){return gd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},gd(t,e)};function sL(t,e){gd(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}(function(t){sL(e,t);function e(r,n){n===void 0&&(n=!0);var i=t.call(this,r[0]instanceof Wt?r[0]:r[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=n,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=r,i}return e.prototype.stop=function(){!this._playing||(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(gr.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(gr.shared.add(this.update,this,vi.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(r){this.stop();var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(r){var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(r){if(!!this._playing){var n=this.animationSpeed*r,i=this.currentFrame;if(this._durations!==null){var o=this._currentTime%1*this._durations[this.currentFrame];for(o+=n/60*1e3;o<0;)this._currentTime--,o+=this._durations[this.currentFrame];var a=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);o>=this._durations[this.currentFrame];)o-=this._durations[this.currentFrame]*a,this._currentTime+=a;this._currentTime+=o/this._durations[this.currentFrame]}else this._currentTime+=n;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<i?this.onLoop():this.animationSpeed<0&&this.currentFrame>i&&this.onLoop()),this.updateTexture())}},e.prototype.updateTexture=function(){var r=this.currentFrame;this._previousFrame!==r&&(this._previousFrame=r,this._texture=this._textures[r],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(r){this.stop(),t.prototype.destroy.call(this,r),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(r){for(var n=[],i=0;i<r.length;++i)n.push(Wt.from(r[i]));return new e(n)},e.fromImages=function(r){for(var n=[],i=0;i<r.length;++i)n.push(Wt.from(r[i]));return new e(n)},Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this._textures},set:function(r){if(r[0]instanceof Wt)this._textures=r,this._durations=null;else{this._textures=[],this._durations=[];for(var n=0;n<r.length;n++)this._textures.push(r[n].texture),this._durations.push(r[n].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFrame",{get:function(){var r=Math.floor(this._currentTime)%this._textures.length;return r<0&&(r+=this._textures.length),r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(gr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(gr.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),e})(La);/*!
* pixi.js - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* pixi.js is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/qi.registerPlugin("accessibility",XU);qi.registerPlugin("extract",i5);qi.registerPlugin("interaction",ZU);qi.registerPlugin("particle",j5);qi.registerPlugin("prepare",yF);qi.registerPlugin("batch",cU);qi.registerPlugin("tilingSprite",IF);Xn.registerPlugin(GF);Xn.registerPlugin(_5);Xn.registerPlugin(B5);Xn.registerPlugin(H5);Xn.registerPlugin(_F);Ic.registerPlugin(O3);Ic.registerPlugin(h5);var lL=Pt({props:{style:nt(String,Object,Array),classes:nt(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(t){const e=It(null),r=new ResizeObserver(o),n=It(null);Wn(()=>{var s;const a=n.value;a!=null&&(r.observe(a),e.value=new Ic({resizeTo:a,backgroundAlpha:0}),(s=n.value)==null||s.appendChild(e.value.view),t.onInit(e.value)),o(),t.onHotReload&&cr(t.onHotReload)}),il(()=>{var a;(a=e.value)==null||a.destroy()});let i=!0;function o(){i&&(i=!1,cr(()=>{var a;n.value!=null&&t.onContainerResized&&(t.onContainerResized(n.value.getBoundingClientRect()),(a=e.value)==null||a.resize()),i=!0}))}return document.fonts.ready.then(o),{unref:E,resizeListener:n}}});function uL(t,e,r,n,i,o){return B(),Q("div",{ref:"resizeListener",class:Qt(["resize-listener",t.unref(t.classes)]),style:ce(t.unref(t.style))},null,6)}var cL=ne(lL,[["render",uL],["__scopeId","data-v-f218157a"]]);const fL=Symbol("Particles");function hL(t){return pr(()=>{var i,o;const e=(i=t==null?void 0:t())!=null?i:{};e.id=Sr("particles-"),e.type=fL,e[ir]=cL,e.app=Gr(null),e.addEmitter=a=>{const s=e;return s.app.value?Promise.resolve(new Ce(s.app.value.stage,a)):new Promise(l=>{r.push({resolve:l,config:a})})};let r=[];function n(a){e.app.value=a,r.forEach(({resolve:s,config:l})=>s(new Ce(a.stage,l))),r=[]}return e.onContainerResized=(o=e.onContainerResized)==null?void 0:o.bind(e),e[fr]=function(){const{id:a,style:s,classes:l,onContainerResized:u,onHotReload:c}=this;return{id:a,style:E(s),classes:l,onContainerResized:u,onHotReload:c,onInit:n}},e})}window.upgradeConfig=EU;const dL=Symbol("Reset");function fx(t){return pr(()=>{const e=t();return e.id=Sr("reset-"),e.type=dL,e.reset=function(){var n;const r=i=>{i&&typeof i=="object"&&(Ss in i?i[Ss].value=i[As]:!(i instanceof O)&&!oe(i)&&Object.values(i).forEach(o=>r(o)))};E(e.thingsToReset).forEach(r),vr.emit("reset",e),(n=e.onReset)==null||n.call(e)},J(e,"thingsToReset"),e})}const iu={};vr.on("removeLayer",t=>{var e;(e=iu[t.id])==null||e.call(iu),iu[t.id]=void 0});const hx=Pt({__name:"Resource",props:{resource:null,color:null},setup(t){const e=t,r=tt(()=>hi(e.resource));return(n,i)=>(B(),Q("h2",{style:ce({color:t.color,"text-shadow":"0px 0px 10px "+t.color})},re(E(r)),5))}}),pL={key:0},vL={key:1},mL=dt(", "),gL=U("br",null,null,-1),yL=U("br",null,null,-1),dx=Pt({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(t){const r=Ae(t),n=ko(r.effectDisplay),i=tt(()=>O.lt(r.resource.value,"1e1000"));return(o,a)=>(B(),Q("div",null,[E(i)?(B(),Q("span",pL,"You have ")):yt("",!0),P(hx,{resource:t.resource,color:t.color||"white"},null,8,["resource","color"]),dt(" "+re(t.resource.displayName),1),E(n)?(B(),Q("span",vL,[mL,(B(),Rt(Te(E(n))))])):yt("",!0),gL,yL]))}});function yd(t,e){return J(e,"display"),J(e,"classes"),J(e,"style"),J(e,"direction"),ve(e,"direction",Ne.Up),J(e,"xoffset"),J(e,"yoffset"),cr(()=>{e.pinnable&&("pinned"in t?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),e.pinnable=!1):t.pinned=e.pinned=nr(!1));const r=t[ir];t[ir]=Me;const n=t[fr].bind(t);t[fr]=function(){const{display:o,classes:a,style:s,direction:l,xoffset:u,yoffset:c,pinned:f}=this;return{element:{[ir]:r,[fr]:n},display:o,classes:a,style:E(s),direction:l,xoffset:u,yoffset:c,pinned:f}}.bind(e)}),e}function bL(t,e,r){const n=nn(t),i=nn(e),o=r==null?void 0:nn(r);return{apply:a=>O.add(a,E(n)),revert:a=>O.sub(a,E(n)),enabled:o,description:e==null?void 0:le(()=>P("div",{class:"modifier-container"},[P("span",{class:"modifier-amount"},[O.gte(E(n),0)?"+":"",je(E(n))]),E(i)?P("span",{class:"modifier-description"},[oi(E(i))]):null]))}}function _L(t,e,r){const n=nn(t),i=nn(e),o=r==null?void 0:nn(r);return{apply:a=>O.times(a,E(n)),revert:a=>O.div(a,E(n)),enabled:o,description:e==null?void 0:le(()=>P("div",{class:"modifier-container"},[P("span",{class:"modifier-amount"},[dt("x"),je(E(n))]),E(i)?P("span",{class:"modifier-description"},[oi(E(i))]):null]))}}function xL(t,e,r){const n=nn(t),i=nn(e),o=r==null?void 0:nn(r);return{apply:a=>O.pow(a,E(n)),revert:a=>O.root(a,E(n)),enabled:o,description:e==null?void 0:le(()=>P("div",{class:"modifier-container"},[P("span",{class:"modifier-amount"},[dt("^"),je(E(n))]),E(i)?P("span",{class:"modifier-description"},[oi(E(i))]):null]))}}function TL(...t){return{apply:e=>t.filter(r=>E(r.enabled)!==!1).reduce((r,n)=>n.apply(r),e),revert:t.every(e=>e.revert!=null)?e=>t.filter(r=>E(r.enabled)!==!1).reduceRight((r,n)=>n.revert(r),e):void 0,enabled:tt(()=>t.filter(e=>E(e.enabled)!==!1).length>0),description:le(()=>P(Ot,null,[t.filter(e=>E(e.enabled)!==!1).map(e=>E(e.description)).filter(e=>e).map(oi)]))}}function wL(t,e,r,n=1,i="",o="Base"){return P("div",null,[P("h3",null,[t,e?P("span",{class:"subtitle"},[dt(" ("),e,dt(")")]):null]),P("br",null,null),P("div",{class:"modifier-container"},[P("span",{class:"modifier-amount"},[je(n),i]),P("span",{class:"modifier-description"},[oi(o)])]),oi(E(r.description)),P("hr",null,null),dt("Total: "),je(r.apply(n)),i])}const EL={class:"field"},IL={key:0,class:"field-title"},CL=["min","max"],RL=Pt({__name:"Slider",props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(t,{emit:e}){const n=Ae(t),i=tt({get(){return String(E(n.modelValue)||0)},set(o){e("update:modelValue",Number(o))}});return(o,a)=>(B(),Q("div",EL,[t.title?(B(),Q("span",IL,re(t.title),1)):yt("",!0),P(Me,{display:`${E(i)}`,class:Qt({fullWidth:!t.title}),direction:E(Ne).Down},{default:Bt(()=>[Oa(U("input",{type:"range","onUpdate:modelValue":a[0]||(a[0]=s=>oe(i)?i.value=s:null),min:t.min,max:t.max},null,8,CL),[[Ea,E(i)]])]),_:1},8,["display","class","direction"])]))}});var NL=ne(RL,[["__scopeId","data-v-1b053b9f"]]);const PL=Pt({__name:"Sticky",setup(t){const e=It("0"),r=new ResizeObserver(i),n=It(null);function i(){let o=n.value;if(o==null)return;let a=0;for(;o.previousSibling;){const s=o.previousSibling;s.dataset&&"vSticky"in s.dataset&&(a+=s.offsetHeight),o=s}e.value=a+"px"}return cr(i),document.fonts.ready.then(i),Wn(()=>{var a;const o=(a=n.value)==null?void 0:a.parentElement;o&&r.observe(o)}),(o,a)=>(B(),Q("div",{class:"sticky",style:ce({top:e.value}),ref_key:"element",ref:n,"data-v-sticky":""},[He(o.$slots,"default",{},void 0,!0)],4))}});var bd=ne(PL,[["__scopeId","data-v-21495571"]]);const SL=Pt({__name:"VerticalRule",props:{height:null},setup(t){return(e,r)=>(B(),Q("div",{class:"vr",style:ce({height:t.height})},null,4))}});var AL=ne(SL,[["__scopeId","data-v-5e0a978a"]]);const OL=Pt({props:{progress:{type:nt(String,Object,Number),required:!0},width:{type:nt(Number),required:!0},height:{type:nt(Number),required:!0},direction:{type:nt(String),required:!0},display:nt(Object,String,Function),visibility:{type:nt(Number),required:!0},style:nt(Object,String,Array),classes:nt(Object),borderStyle:nt(Object,String,Array),textStyle:nt(Object,String,Array),baseStyle:nt(Object,String,Array),fillStyle:nt(Object,String,Array),mark:nt(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Ua,Node:_i},setup(t){const{progress:e,width:r,height:n,direction:i,display:o}=Ae(t),a=tt(()=>{let u=e.value instanceof O?e.value.toNumber():Number(e.value);return(1-Math.min(Math.max(u,0),1))*100}),s=tt(()=>{const u={width:Be(r)+.5+"px",height:Be(n)+.5+"px"};switch(E(i)){case Ne.Up:u.clipPath=`inset(${a.value}% 0% 0% 0%)`,u.width=Be(r)+1+"px";break;case Ne.Down:u.clipPath=`inset(0% 0% ${a.value}% 0%)`,u.width=Be(r)+1+"px";break;case Ne.Right:u.clipPath=`inset(0% ${a.value}% 0% 0%)`;break;case Ne.Left:u.clipPath=`inset(0% 0% 0% ${a.value} + '%)`;break;case Ne.Default:u.clipPath="inset(0% 50% 0% 0%)";break}return u}),l=ko(o);return{normalizedProgress:a,barStyle:s,component:l,unref:E,Visibility:ae}}});function UL(t,e,r,n,i,o){var l,u,c,f,h,d,p;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce([{width:t.unref(t.width)+"px",height:t.unref(t.height)+"px",visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(l=t.unref(t.style))!=null?l:{}]),class:Qt({bar:!0,...t.unref(t.classes)})},[U("div",{class:"overlayTextContainer border",style:ce([{width:t.unref(t.width)+"px",height:t.unref(t.height)+"px"},(u=t.unref(t.borderStyle))!=null?u:{}])},[t.component?(B(),Rt(Te(t.component),{key:0,class:"overlayText",style:ce(t.unref(t.textStyle))},null,8,["style"])):yt("",!0)],4),U("div",{class:"border",style:ce([{width:t.unref(t.width)+"px",height:t.unref(t.height)+"px"},(c=t.unref(t.style))!=null?c:{},(f=t.unref(t.baseStyle))!=null?f:{},(h=t.unref(t.borderStyle))!=null?h:{}])},[U("div",{class:"fill",style:ce([t.barStyle,(d=t.unref(t.style))!=null?d:{},(p=t.unref(t.fillStyle))!=null?p:{}])},null,4)],4),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],6)):yt("",!0)}var FL=ne(OL,[["render",UL],["__scopeId","data-v-04e2c902"]]);const LL=Symbol("Bar");function Mf(t){return pr(()=>{const e=t();return e.id=Sr("bar-"),e.type=LL,e[ir]=FL,J(e,"visibility"),ve(e,"visibility",ae.Visible),J(e,"width"),J(e,"height"),J(e,"direction"),J(e,"style"),J(e,"classes"),J(e,"borderStyle"),J(e,"baseStyle"),J(e,"textStyle"),J(e,"fillStyle"),J(e,"progress"),J(e,"display"),J(e,"mark"),e[fr]=function(){const{progress:r,width:n,height:i,direction:o,display:a,visibility:s,style:l,classes:u,borderStyle:c,textStyle:f,baseStyle:h,fillStyle:d,mark:p,id:v}=this;return{progress:r,width:n,height:i,direction:o,display:a,visibility:s,style:E(l),classes:u,borderStyle:c,textStyle:f,baseStyle:h,fillStyle:d,mark:p,id:v}},e})}const ML=Symbol("Buyable");function BL(t){const e=nr(0);return pr(()=>{var o,a;const r=t();if(r.canPurchase==null&&(r.resource==null||r.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",r),"Cannot create buyable without a canPurchase property or a resource and cost property";r.id=Sr("buyable-"),r.type=ML,r[ir]=s1,r.amount=e,r.canAfford=tt(()=>{const s=r,l=E(s.cost);return s.resource!=null&&l!=null&&O.gte(s.resource.value,l)}),r.canPurchase==null&&(r.canPurchase=tt(()=>E(r.visibility)===ae.Visible&&E(r.canAfford)&&O.lt(r.amount.value,E(r.purchaseLimit)))),r.maxed=tt(()=>O.gte(r.amount.value,E(r.purchaseLimit))),J(r,"classes");const n=r.classes;r.classes=tt(()=>{const s=E(n)||{};return r.maxed.value&&(s.bought=!0),s}),J(r,"canPurchase"),r.canClick=r.canPurchase,r.onClick=r.purchase=(a=(o=r.onClick)!=null?o:r.purchase)!=null?a:function(){var u;const s=r;if(!E(s.canPurchase))return;const l=E(s.cost);s.cost!=null&&s.resource!=null&&(s.resource.value=O.sub(s.resource.value,l),s.amount.value=O.add(s.amount.value,1)),(u=s.onPurchase)==null||u.call(s,l)},J(r,"display");const i=r.display;return r.display=le(()=>{const s=E(i);if(on(s)){const l=te(s);return P(l,null,null)}if(s!=null&&r.cost!=null&&r.resource!=null){const l=r,u=te(s.title||"","h3"),c=te(s.description),f=te(s.effectDisplay||""),h=E(l.purchaseLimit)===O.dInf?P(Ot,null,[dt("Amount: "),Cr(l.amount.value)]):P(Ot,null,[dt("Amount: "),Cr(l.amount.value),dt(" /")," ",Cr(E(l.purchaseLimit))]);return P("span",null,[s.title?P("div",null,[P(u,null,null)]):null,P(c,null,null),P("div",null,[P("br",null,null),h]),s.effectDisplay?P("div",null,[P("br",null,null),dt("Currently: "),P(f,null,null)]):null,l.cost&&!l.maxed.value?P("div",null,[P("br",null,null),dt("Cost: "),je(E(l.cost)||0)," ",r.resource.displayName]):null])}return""}),J(r,"visibility"),ve(r,"visibility",ae.Visible),J(r,"cost"),J(r,"resource"),J(r,"purchaseLimit"),ve(r,"purchaseLimit",O.dInf),J(r,"style"),J(r,"mark"),J(r,"small"),r[fr]=function(){const{display:s,visibility:l,style:u,classes:c,onClick:f,canClick:h,small:d,mark:p,id:v}=this;return{display:s,visibility:l,style:E(u),classes:c,onClick:f,canClick:h,small:d,mark:p,id:v}},r})}var kL=Pt({props:{active:{type:nt(Boolean),required:!0},maxed:{type:nt(Boolean),required:!0},canComplete:{type:nt(Boolean),required:!0},display:nt(String,Object,Function),visibility:{type:nt(Number),required:!0},style:nt(String,Object,Array),classes:nt(Object),completed:{type:nt(Boolean),required:!0},canStart:{type:nt(Boolean),required:!0},mark:nt(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:Ua,Node:_i},setup(t){const{active:e,maxed:r,canComplete:n,display:i}=Ae(t),o=tt(()=>e.value?n.value?"Finish":"Exit Early":r.value?"Completed":"Start"),a=Gr(""),s=tt(()=>{const l=Be(e),u=Be(n);return l?u?EP():fp():{}});return Xe(()=>{const l=Be(i);if(l==null){a.value="";return}if(on(l)){a.value=te(l);return}const u=te(l.title||"","h3"),c=te(l.description,"div"),f=te(l.goal||""),h=te(l.reward||""),d=te(l.effectDisplay||"");a.value=te(le(()=>P("span",null,[l.title?P("div",null,[P(u,null,null)]):null,P(c,null,null),l.goal?P("div",null,[P("br",null,null),dt("Goal: "),P(f,null,null)]):null,l.reward?P("div",null,[P("br",null,null),dt("Reward: "),P(h,null,null)]):null,l.effectDisplay?P("div",null,[dt("Currently: "),P(d,null,null)]):null])))}),{buttonText:o,notifyStyle:s,comp:a,Visibility:ae,unref:E}}});const GL=["disabled"];function DL(t,e,r,n,i,o){var l;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},t.notifyStyle,(l=t.unref(t.style))!=null?l:{}]),class:Qt({feature:!0,challenge:!0,done:t.unref(t.completed),canStart:t.unref(t.canStart)&&!t.unref(t.maxed),maxed:t.unref(t.maxed),...t.unref(t.classes)})},[U("button",{class:"toggleChallenge",onClick:e[0]||(e[0]=(...u)=>t.toggle&&t.toggle(...u)),disabled:!t.unref(t.canStart)||t.unref(t.maxed)},re(t.buttonText),9,GL),t.unref(t.comp)?(B(),Rt(Te(t.unref(t.comp)),{key:0})):yt("",!0),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],6)):yt("",!0)}var HL=ne(kL,[["render",DL],["__scopeId","data-v-4d2947df"]]);const VL=Symbol("ChallengeType");function $L(t){const e=nr(0),r=nr(!1);return pr(()=>{const n=t();if(n.canComplete==null&&(n.resource==null||n.goal==null))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",n),"Cannot create challenge without a canComplete property or a resource and goal property";n.id=Sr("challenge-"),n.type=VL,n[ir]=HL,n.completions=e,n.active=r,n.completed=tt(()=>O.gt(n.completions.value,0)),n.maxed=tt(()=>O.gte(n.completions.value,E(n.completionLimit))),n.toggle=function(){var a,s,l,u,c;const o=n;if(o.active.value){if(E(o.canComplete)&&!o.maxed.value){let f=E(o.canComplete);typeof f=="boolean"&&(f=1),o.completions.value=O.min(O.add(o.completions.value,f),E(o.completionLimit)),(a=o.onComplete)==null||a.call(o)}o.active.value=!1,(s=o.onExit)==null||s.call(o),(l=o.reset)==null||l.reset()}else E(o.canStart)&&E(o.visibility)===ae.Visible&&!o.maxed.value&&((u=o.reset)==null||u.reset(),o.active.value=!0,(c=o.onEnter)==null||c.call(o))},n.complete=function(o){var l,u,c;const a=n;let s=E(a.canComplete);a.active.value&&s!==!1&&(s===!0||O.neq(0,s))&&!a.maxed.value&&(typeof s=="boolean"&&(s=1),a.completions.value=O.min(O.add(a.completions.value,s),E(a.completionLimit)),(l=a.onComplete)==null||l.call(a),o!==!0&&(a.active.value=!1,(u=a.onExit)==null||u.call(a),(c=a.reset)==null||c.reset()))},J(n,"visibility"),ve(n,"visibility",ae.Visible);const i=n.visibility;return n.visibility=tt(()=>Pe.hideChallenges===!0&&E(n.maxed)?ae.None:E(i)),n.canComplete==null&&(n.canComplete=tt(()=>{const o=n;return!o.active.value||o.resource==null||o.goal==null?!1:O.gte(o.resource.value,E(o.goal))})),n.mark==null&&(n.mark=tt(()=>O.gt(E(n.completionLimit),1)&&!!E(n.maxed))),J(n,"canStart"),ve(n,"canStart",!0),J(n,"canComplete"),J(n,"completionLimit"),ve(n,"completionLimit",1),J(n,"mark"),J(n,"goal"),J(n,"classes"),J(n,"style"),J(n,"display"),n.reset!=null&&vr.on("reset",o=>{o===n.reset&&n.active.value&&n.toggle()}),n[fr]=function(){const{active:o,maxed:a,canComplete:s,display:l,visibility:u,style:c,classes:f,completed:h,canStart:d,mark:p,id:v,toggle:m}=this;return{active:o,maxed:a,canComplete:s,display:l,visibility:u,style:E(c),classes:f,completed:h,canStart:d,mark:p,id:v,toggle:m}},n})}vr.on("loadSettings",t=>{ve(t,"hideChallenges",!1)});f_(le(()=>P(Xr,{title:"Hide Maxed Challenges","onUpdate:modelValue":t=>Pe.hideChallenges=t,modelValue:Pe.hideChallenges},null)));const Rc=Sa({}),$p=Symbol("Hotkey");function ly(t){return pr(()=>{const e=t();return e.type=$p,J(e,"enabled"),ve(e,"enabled",!0),J(e,"description"),e})}vr.on("addLayer",t=>{r_(t,$p).forEach(e=>{Rc[e.key]=e})});vr.on("removeLayer",t=>{r_(t,$p).forEach(e=>{Rc[e.key]=void 0})});document.onkeydown=function(t){var n;if(((n=t.target)==null?void 0:n.tagName)==="INPUT"||jp.value&&!wt.keepGoing)return;let e=t.key;t.shiftKey&&(e="shift+"+e),t.ctrlKey&&(e="ctrl+"+e);const r=Rc[e];r&&E(r.enabled)&&(t.preventDefault(),r.onPress())};RE(le(()=>{const t=Object.values(Rc).filter(e=>E(e==null?void 0:e.enabled));return t.length===0?"":P("div",null,[P("br",null,null),P("h4",null,[dt("Hotkeys")]),t.map(e=>P("div",null,[e==null?void 0:e.key,dt(": "),e==null?void 0:e.description]))])}));const jL=Symbol("Links");function XL(t){return pr(()=>{const e=t();return e.type=jL,e[ir]=G_,J(e,"links"),e[fr]=function(){const{links:r}=this;return{links:r}},e})}var zL=Pt({props:{visibility:{type:nt(Number),required:!0},display:{type:nt(String,Object,Function),required:!0},style:nt(String,Object,Array),classes:nt(Object),earned:{type:nt(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:_i},setup(t){const{display:e}=Ae(t),r=Gr("");return Xe(()=>{const n=Be(e);if(n==null){r.value="";return}if(on(n)){r.value=te(n);return}const i=te(n.requirement,"h3"),o=te(n.effectDisplay||"","b"),a=te(n.optionsDisplay||"","span");r.value=te(le(()=>P("span",null,[P(i,null,null),n.effectDisplay?P("div",null,[P(o,null,null)]):null,n.optionsDisplay?P("div",{class:"equal-spaced"},[P(a,null,null)]):null])))}),{comp:r,unref:E,Visibility:ae}}});function WL(t,e,r,n,i,o){var s;const a=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(s=t.unref(t.style))!=null?s:{}]),class:Qt({feature:!0,milestone:!0,done:t.unref(t.earned),...t.unref(t.classes)})},[(B(),Rt(Te(t.unref(t.comp)))),P(a,{id:t.id},null,8,["id"])],6)):yt("",!0)}var YL=ne(zL,[["render",WL],["__scopeId","data-v-f4e8794e"]]);const KL=cp(),ZL=Symbol("Milestone");let Mi;(function(t){t.All="all",t.Configurable="configurable",t.Incomplete="incomplete",t.None="none"})(Mi||(Mi={}));function uy(t){const e=nr(!1);return pr(()=>{var i;const r=(i=t==null?void 0:t())!=null?i:{};r.id=Sr("milestone-"),r.type=ZL,r[ir]=YL,r.earned=e,r.complete=function(){e.value=!0},J(r,"visibility"),ve(r,"visibility",ae.Visible);const n=r.visibility;if(r.visibility=tt(()=>{const o=E(r.display);switch(Pe.msDisplay){default:case Mi.All:return E(n);case Mi.Configurable:return E(r.earned)&&!(o!=null&&typeof o=="object"&&"optionsDisplay"in o)?ae.None:E(n);case Mi.Incomplete:return E(r.earned)?ae.None:E(n);case Mi.None:return ae.None}}),J(r,"style"),J(r,"classes"),J(r,"display"),r[fr]=function(){const{visibility:o,display:a,style:s,classes:l,earned:u,id:c}=this;return{visibility:o,display:a,style:E(s),classes:l,earned:u,id:c}},r.shouldEarn){const o=r;Xe(()=>{var a,s;if(!o.earned.value&&E(o.visibility)===ae.Visible&&((a=o.shouldEarn)==null?void 0:a.call(o))&&(o.earned.value=!0,(s=o.onComplete)==null||s.call(o),o.display)){const l=E(o.display),u=te(on(l)?l:l.requirement);KL(P(Ot,null,[P("h3",null,[dt("Milestone earned!")]),P("div",null,[P(u,null,null)])]))}})}return r})}vr.on("loadSettings",t=>{ve(t,"msDisplay",Mi.All)});const qL=Object.values(Mi).map(t=>({label:e_(t),value:t}));f_(le(()=>P(rp,{title:"Show Milestones",options:qL,"onUpdate:modelValue":t=>Pe.msDisplay=t,modelValue:Pe.msDisplay},null)));const JL=Pt({__name:"Tab",props:{display:null},setup(t){const e=t,{display:r}=Ae(e),n=Ca(r);return(i,o)=>(B(),Rt(Te(E(n))))}}),QL=Symbol("Tab");function ou(t){return pr(()=>{const e=t();return e.id=Sr("tab-"),e.type=QL,e[ir]=JL,e[fr]=function(){const{display:r}=this;return{display:r}},e})}const t6=Pt({props:{visibility:{type:nt(Number),required:!0},display:{type:nt(Object,String,Function),required:!0},style:nt(String,Object,Array),classes:nt(Object),glowColor:nt(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(t,{emit:e}){const{display:r,glowColor:n,floating:i}=Ae(t),o=Ca(r),a=tt(()=>{const l=Be(n);return l?E(i)?fp(l):{boxShadow:`0px 9px 5px -6px ${l}`}:{}});function s(){e("selectTab")}return{selectTab:s,component:o,glowColorStyle:a,unref:E,Visibility:ae}}});function e6(t,e,r,n,i,o){var a;return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("button",{key:0,onClick:e[0]||(e[0]=(...s)=>t.selectTab&&t.selectTab(...s)),class:Qt(["tabButton",{active:t.active,...t.unref(t.classes)}]),style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},t.glowColorStyle,(a=t.unref(t.style))!=null?a:{}])},[(B(),Rt(Te(t.component)))],6)):yt("",!0)}var px=ne(t6,[["render",e6],["__scopeId","data-v-610a2549"]]);const r6=Pt({props:{visibility:{type:nt(Number),required:!0},activeTab:{type:nt(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:nt(Object),required:!0},style:nt(String,Object,Array),classes:nt(Object)},components:{Sticky:bd,TabButton:px},setup(t){const{activeTab:e}=Ae(t),r=tt(()=>gi[Pe.theme].floatingTabs),n=Gr("");Xe(()=>{const s=Be(e);if(s==null){n.value="";return}if(on(s)){n.value=te(s);return}n.value=te(E(s.display))});const i=tt(()=>{const s=Be(e);return on(s)||!s?void 0:E(s.classes)}),o=tt(()=>{const s=Be(e);return on(s)||!s?void 0:E(s.style)});function a(s){const{display:l,style:u,classes:c,glowColor:f,visibility:h}=s;return{display:l,style:E(u),classes:c,glowColor:f,visibility:h}}return{floating:r,tabClasses:i,tabStyle:o,Visibility:ae,component:n,gatherButtonProps:a,unref:E}}});function n6(t,e,r,n,i,o){var l,u;const a=Re("TabButton"),s=Re("Sticky");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("div",{key:0,class:Qt(["tab-family-container",{...t.unref(t.classes),...t.tabClasses}]),style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(l=t.unref(t.style))!=null?l:[],(u=t.tabStyle)!=null?u:[]])},[P(s,{class:"tab-buttons-container"},{default:Bt(()=>[U("div",{class:Qt(["tab-buttons",{floating:t.floating}])},[(B(!0),Q(Ot,null,Hn(t.unref(t.tabs),(c,f)=>(B(),Rt(a,yr({onSelectTab:h=>t.selected.value=f,floating:t.floating,key:f,active:t.unref(c.tab)===t.unref(t.activeTab)},t.gatherButtonProps(c)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1}),t.unref(t.activeTab)?(B(),Rt(Te(t.unref(t.component)),{key:0})):yt("",!0)],6)):yt("",!0)}var i6=ne(r6,[["render",n6],["__scopeId","data-v-51355cc8"]]);const o6=Symbol("TabButton"),a6=Symbol("TabFamily");function cy(t,e){if(Object.keys(t).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const r=nr(Object.keys(t)[0]);return pr(()=>{var o;const n=(o=e==null?void 0:e())!=null?o:{};n.id=Sr("tabFamily-"),n.type=a6,n[ir]=i6,n.tabs=Object.keys(t).reduce((a,s)=>{const l=t[s]();return l.type=o6,l[ir]=px,J(l,"visibility"),ve(l,"visibility",ae.Visible),J(l,"tab"),J(l,"display"),J(l,"classes"),J(l,"style"),J(l,"glowColor"),a[s]=l,a},{}),n.selected=r,n.activeTab=tt(()=>{const a=E(i.tabs);if(r.value in a&&E(a[r.value].visibility)===ae.Visible)return E(a[r.value].tab);const s=Object.values(a).find(l=>E(l.visibility)===ae.Visible);return s?E(s.tab):null}),J(n,"visibility"),ve(n,"visibility",ae.Visible),J(n,"classes"),J(n,"style"),n[fr]=function(){const{visibility:a,activeTab:s,selected:l,tabs:u,style:c,classes:f}=this;return{visibility:a,activeTab:s,selected:l,tabs:u,style:E(c),classes:f}};const i=n;return i})}var s6=Pt({props:{display:{type:nt(String,Object,Function),required:!0},visibility:{type:nt(Number),required:!0},style:nt(String,Object,Array),classes:nt(Object),resource:Object,cost:nt(String,Object,Number),canPurchase:{type:nt(Boolean),required:!0},bought:{type:nt(Boolean),required:!0},mark:nt(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:_i,MarkNode:Ua},setup(t){const{display:e,cost:r}=Ae(t),n=Gr("");return Xe(()=>{const i=Be(e);if(i==null){n.value="";return}if(on(i)){n.value=te(i);return}const o=Be(r),a=te(i.title||"","h3"),s=te(i.description,"div"),l=te(i.effectDisplay||"");n.value=te(le(()=>{var u;return P("span",null,[i.title?P("div",null,[P(a,null,null)]):null,P(s,null,null),i.effectDisplay?P("div",null,[dt("Currently: "),P(l,null,null)]):null,t.resource!=null?P(Ot,null,[P("br",null,null),dt("Cost: "),t.resource&&hi(t.resource,o)," ",(u=t.resource)==null?void 0:u.displayName]):null])}))}),{component:n,unref:E,Visibility:ae}}});const l6=["disabled"];function u6(t,e,r,n,i,o){var l;const a=Re("MarkNode"),s=Re("Node");return t.unref(t.visibility)!==t.Visibility.None?(B(),Q("button",{key:0,style:ce([{visibility:t.unref(t.visibility)===t.Visibility.Hidden?"hidden":void 0},(l=t.unref(t.style))!=null?l:{}]),onClick:e[0]||(e[0]=(...u)=>t.purchase&&t.purchase(...u)),class:Qt({feature:!0,upgrade:!0,can:t.unref(t.canPurchase),locked:!t.unref(t.canPurchase),bought:t.unref(t.bought),...t.unref(t.classes)}),disabled:!t.unref(t.canPurchase)},[t.unref(t.component)?(B(),Rt(Te(t.unref(t.component)),{key:0})):yt("",!0),P(a,{mark:t.unref(t.mark)},null,8,["mark"]),P(s,{id:t.id},null,8,["id"])],14,l6)):yt("",!0)}var c6=ne(s6,[["render",u6],["__scopeId","data-v-7742f590"]]);const f6=Symbol("Upgrade");function au(t){const e=nr(!1);return pr(()=>{const r=t();return r.id=Sr("upgrade-"),r.type=f6,r[ir]=c6,r.canAfford==null&&(r.resource==null||r.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",r),r.bought=e,r.canAfford==null?r.canAfford=tt(()=>{const n=r;return n.resource!=null&&n.cost!=null&&O.gte(n.resource.value,E(n.cost))}):J(r,"canAfford"),r.canPurchase=tt(()=>E(r.visibility)===ae.Visible&&E(r.canAfford)&&!E(r.bought)),r.purchase=function(){var i;const n=r;!E(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=O.sub(n.resource.value,E(n.cost))),e.value=!0,(i=n.onPurchase)==null||i.call(n))},J(r,"visibility"),ve(r,"visibility",ae.Visible),J(r,"classes"),J(r,"style"),J(r,"display"),J(r,"mark"),J(r,"cost"),J(r,"resource"),r[fr]=function(){const{display:n,visibility:i,style:o,classes:a,resource:s,cost:l,canPurchase:u,bought:c,mark:f,id:h,purchase:d}=this;return{display:n,visibility:i,style:E(o),classes:a,resource:s,cost:l,canPurchase:u,bought:c,mark:f,id:h,purchase:d}},r})}function h6(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!wn(t)}const Bf="c",dn=ol(Bf,()=>{const t="#4BDC13",e="Candies",r=Os(0,"lollipops"),n=k_(r),i=nr(!1),o=nr("pointy"),a=nr(10),s=nr(new O(10)),l=tt(()=>O.pow(r.value,.2)),u=tt(()=>O.times(r.value,10)),c=h1(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"})),f=uy(()=>({shouldEarn(){return O.gte(n.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}})),h=uy(()=>({visibility(){return Ga(f.earned.value)},shouldEarn(){return O.gte(n.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:le(()=>P(Ot,null,[P(Xr,{title:"beep","onUpdate:modelValue":it=>i.value=it,modelValue:i.value},null),P(Xr,{title:"boop","onUpdate:modelValue":it=>On.boop.value=it,modelValue:On.boop.value},null)]))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}})),d=[f,h],p=$L(()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder<br>${Cr(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:je(v.value)+"x"}},visibility(){return Ga(O.gt(n.value,0))},goal:20,resource:we.points,onComplete(){console.log("hiii")},onEnter(){we.points.value=0,we.best.value=we.points.value,we.total.value=we.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}})),v=tt(()=>O.add(r.value,1).tetrate(.02)),m=au(()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:r})),y=au(()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${je(g.value)}x`}),cost:1,resource:r,visibility:()=>Ga(m.bought.value)})),g=tt(()=>{let it=O.add(r.value,1).pow(.5);return it.gte("1e20000000")&&(it=it.sqrt().times("1e10000000")),it}),b=au(()=>({visibility(){return Ga(y.bought.value)},canAfford(){return O.lt(we.points.value,7)},onPurchase(){we.points.value=O.add(we.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:this.canAfford?{}:{backgroundColor:"#dd1111"}}})),T=au(()=>({resource:Os(x.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}})),w=[m,y,b],x=BL(()=>({resource:r,cost(){let it=new O(this.amount.value);return it.gte(25)&&(it=it.pow(2).div(25)),O.pow(2,it.pow(1.5)).floor()},display(){return{title:"Exhancers",description:`Adds ${je(R.value)} things and multiplies stuff by ${je(I.value)}.`}},onPurchase(it){s.value=O.add(s.value,it!=null?it:0)},style:{height:"222px"},purchaseLimit:4})),R=tt(()=>O.gte(x.amount.value,0)?O.pow(25,O.pow(x.amount.value,1.1)):O.pow(1/25,O.times(x.amount.value,-1).pow(1.1))),I=tt(()=>O.gte(x.amount.value,0)?O.pow(25,O.pow(x.amount.value,1.1)):O.pow(1/25,O.times(x.amount.value,-1).pow(1.1))),C=nr(!1),S=It(!1),L=Fs(()=>({small:!0,display:"Respec Thingies",onClick(){if(C.value&&!S.value){S.value=!0;return}r.value=O.add(r.value,s.value),x.amount.value=0,we.tree.reset(W)}})),H=Fs(()=>({small:!0,display:"Sell One",onClick(){O.lte(x.amount.value,0)||(x.amount.value=O.sub(x.amount.value,1),r.value=O.add(r.value,x.cost.value),s.value=O.sub(s.value,x.cost.value))}})),G=le(()=>P(hu,null,{default:()=>[P(vs,null,{default:()=>[P(Xr,{title:"Confirm","onUpdate:modelValue":it=>C.value=it,modelValue:C.value},null),hn(L)]}),hn(x),hn(H),P(Ki,{modelValue:S.value,"onUpdate:modelValue":it=>S.value=it},{header:()=>P("h2",null,[dt("Confirm Respec")]),body:()=>P(Ot,null,[dt("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>P("div",{class:"modal-default-footer"},[P("div",{class:"modal-default-flex-grow"},null),P("button",{class:"button modal-default-button",onClick:()=>S.value=!1},[dt("Cancel")]),P("button",{class:"button modal-default-button danger",onClick:()=>{L.onClick(),S.value=!1}},[dt("Respec")])])})]})),k=Mf(()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:Ne.Right,width:300,height:30,progress(){return O.add(we.points.value,1).log(10).div(10).toNumber()},display(){return je(we.points.value)+" / 1e10 points"}})),Y=Mf(()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:Ne.Up,width:50,height:200,progress(){return O.div(we.points.value,100)},display(){return Cr(O.div(we.points.value,1).min(100))+"%"}})),D=Mf(()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:Ne.Up,width:100,height:30,progress(){return O.div(r.value,50)}})),K=HP(()=>({scaling:jP(f1(10,.5),1e100,.5),baseResource:we.points,gainResource:r,roundUpCost:!0,gainModifier:TL(xL(2,"Because I felt like it"),bL(1,"Nice modifier"))})),ht=fx(()=>({thingsToReset:()=>[dn]})),bt=[ly(()=>({key:"c",description:"reset for lollipops or whatever",onPress(){ft.canClick.value&&ft.onClick()}})),ly(()=>({key:"ctrl+c",description:"respec things",onPress(){L.onClick()}}))],W=u1(()=>({layerID:Bf,color:t,reset:ht,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let it=hi(r);return O.gt(x.amount.value,0)&&(it+=`<br><i><br><br><br>${Cr(x.amount.value)} Exhancers</i>`),it},style:{color:"#3325CC",textDecoration:"underline"}}));yd(W,{display:H_(r),pinnable:!0});const ft=l1(()=>({conversion:K,tree:we.tree,treeNode:W,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}));yd(ft,{display:le(()=>wL("Modifiers","",K.gainModifier,K.scaling.currentGain(K))),pinnable:!0,direction:Ne.Down,style:"width: 400px; text-align: left"});const gt=xs(()=>({display:"TH",color:"#6d3678",canClick(){return O.gte(we.points.value,10)},tooltip:"Thanos your points",onClick(){we.points.value=O.div(we.points.value,2),console.log("Thanos'd")},glowColor(){return O.eq(x.amount.value,1)?"orange":""}})),_t=xs(()=>({display:"h",color(){return gi[Pe.theme].variables["--locked"]},tooltip:{display:tt(()=>`Restore your points to ${je(a.value)}`),right:!0},canClick(){return O.lt(we.points.value,a.value)},onClick(){we.points.value=a.value}})),V=xs(()=>({visibility:ae.Hidden})),Z=D_(()=>({nodes(){return[[On.treeNode,W],[gt,V,_t]]},branches(){return[{startNode:On.treeNode,endNode:W,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:W,endNode:gt},{startNode:gt,endNode:_t}]}})),lt=XL(()=>({links:[{startNode:_t,endNode:D,"stroke-width":"5px",stroke:"red",offsetEnd:{x:-50+100*D.progress.value.toNumber(),y:0}}]})),ut=cy({first:()=>({tab:le(()=>P(Ot,null,[hn(...w),hn(T),P("div",null,[dt("confirmed")])])),display:"first"}),second:()=>({tab:On.display,display:"second"})},()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}})),Gt=cy({mainTab:()=>({tab:ou(()=>({display:le(()=>{let it;return P(Ot,null,[P(dx,{resource:r,color:t,effectDisplay:`which are boosting waffles by ${je(l.value)} and increasing the Ice Cream cap by ${je(u.value)}`},null),P(bd,null,h6(it=Ge(ft))?it:{default:()=>[it]}),P(hx,{resource:r,color:t},null),P(Fr,{height:"5px"},null),P("button",{onClick:()=>console.log("yeet")},[dt("'HI'")]),P("div",null,[dt("Name your points!")]),P(sp,{modelValue:o.value,"onUpdate:modelValue":kt=>o.value=kt},null),P(bd,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[dt("I have "),hi(we.points),dt(" "),o.value,dt(" points!")]}),P("hr",null,null),AE(...d),P(Fr,null,null),hn(...w),hn(T),hn(p)])})})),display:"main tab",glowColor(){return m.canPurchase.value||y.canPurchase.value||b.canPurchase.value||p.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:ou(()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:le(()=>P(Ot,null,[Ge(G),P(Fr,null,null),P(vs,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[P(Xr,{"onUpdate:modelValue":it=>i.value=it,modelValue:i.value},null),P(Fr,{width:"30px",height:"10px"},null),P("div",null,[P("span",null,[dt("Beep")])]),P(Fr,null,null),P(AL,{height:"200px"},null)]}),P(Fr,null,null),P("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)]))})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:ou(()=>({display:le(()=>P(Ot,null,[Ge(c),Ge(k),P(Fr,null,null),P(vs,null,{default:()=>[P(hu,{style:"background-color: #555555; padding: 15px"},{default:()=>[P("div",{style:"color: teal"},[dt("Sugar level:")]),P(Fr,null,null),Ge(Y)]}),P(Fr,null,null),P(hu,null,{default:()=>[P("div",null,[dt("idk")]),P(Fr,{width:"0",height:"50px"},null),Ge(D)]})]}),P(Fr,null,null),P("div",null,[dt(`It's jail because "bars"! So funny! Ha ha!`)]),Ge(Z)]))})),display:"jail"}),illuminati:()=>({tab:ou(()=>({display:le(()=>P("div",null,[P("h1",null,[dt(" C O N F I R M E D ")]),P(Fr,null,null),Ge(ut),P("div",null,[dt("Adjust how many points H gives you!")]),P(NL,{"onUpdate:modelValue":it=>a.value=it,modelValue:a.value,min:1,max:30},null)])),style:{backgroundColor:"#3325CC"}})),visibility(){return Ga(b.bought.value)},display:"illuminati"})});return{id:Bf,color:t,name:e,points:r,best:n,beep:i,thingy:o,otherThingy:a,spentOnBuyables:s,waffleBoost:l,icecreamCap:u,coolInfo:c,lollipopMilestones:d,funChallenge:p,funEffect:v,generatorUpgrade:m,lollipopMultiplierUpgrade:y,lollipopMultiplierEffect:g,unlockIlluminatiUpgrade:b,quasiUpgrade:T,exhancers:x,respecBuyables:L,sellExhancer:H,bars:{tallBoi:Y,longBoi:k,flatBoi:D},tree:Z,g:gt,h:_t,spook:V,conversion:K,reset:ht,hotkeys:bt,treeNode:W,resetButton:ft,confirmRespec:C,minWidth:800,tabs:Gt,display:le(()=>P(Ot,null,[Ge(Gt),Ge(lt)]))}}),d6={min:.5,max:1},p6=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],v6=.001,m6=.1,g6=100,y6=!0,b6={x:0,y:0},_6=!1,x6=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:300},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:1},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#ffdfa0"},{time:1,value:"#100f0c"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"rect",data:{x:0,y:0,w:0,h:0}}}];var T6={lifetime:d6,ease:p6,frequency:v6,emitterLifetime:m6,maxParticles:g6,addAtBack:y6,pos:b6,emit:_6,behaviors:x6};const kf="f",On=ol(kf,()=>{const t="#FE0102",e="Farms",r=Os(0,"farm points"),n=nr(!1),i=h1(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}})),o=nr("Start"),a=Fs(()=>({display(){return{title:"Clicky clicky!",description:"Current state:<br>"+o.value}},initialState:"Start",canClick(){return o.value!=="Borkened..."},onClick(p){var v,m,y,g,b,T,w,x;switch(o.value){case"Start":o.value="A new state!";break;case"A new state!":o.value="Keep going!";break;case"Keep going!":o.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const R=p==null?void 0:"touches"in p?p.touches[0]:p,I=Object.assign({},T6,{pos:{x:((v=R==null?void 0:R.clientX)!=null?v:0)-((g=(y=(m=h.boundingRect)==null?void 0:m.value)==null?void 0:y.left)!=null?g:0),y:((b=R==null?void 0:R.clientY)!=null?b:0)-((x=(w=(T=h.boundingRect)==null?void 0:T.value)==null?void 0:w.top)!=null?x:0)}});h.addEmitter(I).then(C=>C.playOnceAndDestroy()),o.value="Borkened...";break;default:o.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(o.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}})),s=Fs(()=>({onClick(){o.value=="Borkened..."&&(o.value="Start")},display(){return o.value=="Borkened..."?"Fix the clickable!":"Does nothing"},small:!0})),l=fx(()=>({thingsToReset:()=>[On]})),u=VP(()=>({scaling:f1(10,.5),baseResource:we.points,gainResource:r,modifyGainAmount:_L(dn.otherThingy)})),c=u1(()=>({layerID:kf,color:t,reset:l,tooltip(){return c.canClick.value?`${hi(r)} ${r.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${hi(we.points)}`},canClick(){return O.gte(we.points.value,10)}}));yd(c,{display:H_(r),pinnable:!0});const f=l1(()=>({conversion:u,tree:we.tree,treeNode:c,display:le(()=>f.conversion.buyMax?P("span",null,[dt("Hi! I'm a "),P("u",null,[dt("weird dinosaur")]),dt(" and I'll give you")," ",P("b",null,[Cr(f.conversion.currentGain.value)]),dt(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",Cr(f.conversion.nextAt.value),dt(" points)")]):P("span",null,[dt("Hi! I'm a "),P("u",null,[dt("weird dinosaur")]),dt(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",Cr(f.conversion.nextAt.value),dt(" points)")]))})),h=hL(()=>({boundingRect:It(null),onContainerResized(p){this.boundingRect.value=p},style:"z-index: 2"})),d=le(()=>P(Ot,null,[Ge(i),P(dx,{resource:r,color:t},null),Ge(f),P("div",null,[dt("You have "),Cr(u.baseResource.value),dt(" points")]),P("div",null,[P("br",null,null),P("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),P("div",null,[dt("Bork Bork!")])]),P(Fr,null,null),hn(s),hn(a),Ge(h)]));return{id:kf,color:t,name:e,points:r,boop:n,coolInfo:i,clickable:a,clickableState:o,reset:l,conversion:u,treeNode:c,resetButton:f,minWidth:650,display:d}});function Gf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!wn(t)}const fy="a",_d=ol(fy,()=>{const t="yellow",e="Achievements",r=Os(0,"achievement power"),n=xs(()=>({display:"A",color:t,tooltip:{display:"Achievements",right:!0},onClick(){we.showAchievements()}})),i=qc(()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:tt(()=>i.earned.value?"You did it!":"How did this happen?"),shouldEarn:()=>!0})),o=qc(()=>({display:"Impossible!",tooltip:tt(()=>o.earned.value?"HOW????":"Mwahahaha!"),style:{color:"#04e050"}})),a=qc(()=>({display:"EIEIO",tooltip:`Get a farm point.
Reward: The dinosaur is now your friend (you can max Farm Points).`,shouldEarn:function(){return O.gte(On.points.value,1)},onComplete(){console.log("Bork bork bork!")}})),s=[i,o,a],l=BP(()=>({rows:2,cols:2,getStartState(c){return c},getStyle(c,f){return{backgroundColor:`#${Number(f)*1234%999999}`}},getTitle(c){let f="";return c==="101"?f="top":c==="102"?f="bottom":c==="201"?f="left":c==="202"&&(f="right"),le(()=>P(Me,yr({display:JSON.stringify(this.cells[c].style)},{[f]:!0}),{default:()=>[P("h3",null,[dt("Gridable #"),c])]}))},getDisplay(c,f){return String(f)},getCanClick(){return O.eq(we.points.value,10)},onClick(c,f){this.cells[c].state=Number(f)+1}})),u=le(()=>{let c,f,h;return P(Ot,null,[P(vs,null,{default:()=>[P(Me,{display:i.tooltip,bottom:!0},Gf(c=Ge(i))?c:{default:()=>[c]}),P(Me,{display:o.tooltip,bottom:!0},Gf(f=Ge(o))?f:{default:()=>[f]}),P(Me,{display:a.tooltip,bottom:!0},Gf(h=Ge(a))?h:{default:()=>[h]})]}),hn(l)])});return{id:fy,color:t,name:e,points:r,achievements:s,grid:l,treeNode:n,display:u}}),we=ol("main",()=>{const t=Os(10),e=k_(t),r=iN(t),n=tt(()=>{if(!dn.generatorUpgrade.bought.value)return new O(0);let l=new O(3.19);return dn.lollipopMultiplierUpgrade.bought.value&&(l=l.times(dn.lollipopMultiplierEffect.value)),l});vr.on("update",l=>{t.value=O.add(t.value,O.times(n.value,l))});const i=sN(t,n),{openModal:o,modal:a}=y_(_d),s=D_(()=>({nodes:[[dn.treeNode],[On.treeNode,dn.spook]],leftSideNodes:[_d.treeNode,dn.h],branches:[{startNode:On.treeNode,endNode:dn.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){t.value=ue(this.resettingNode.value)===ue(dn.treeNode)?0:10,e.value=t.value,r.value=t.value},resetPropagation:EN}));return{name:"Tree",display:le(()=>P(Ot,null,[wt.devSpeed===0?P("div",null,[dt("Game Paused")]):null,wt.devSpeed&&wt.devSpeed!==1?P("div",null,[dt("Dev Speed: "),je(wt.devSpeed),dt("x")]):null,wt.offlineTime?P("div",null,[dt("Offline Time: "),pc(wt.offlineTime)]):null,P("div",null,[O.lt(t.value,"1e1000")?P("span",null,[dt("You have ")]):null,P("h2",null,[je(t.value)]),O.lt(t.value,"1e1e6")?P("span",null,[dt(" points")]):null]),O.gt(n.value,0)?P("div",null,[dt("("),i.value,dt(")")]):null,P(Fr,null,null),P("button",{onClick:o},[dt("open achievements")]),Ge(a),Ge(s),P(nN,{height:"200px",style:"margin: 10px auto; display: block"},null)])),points:t,best:e,total:r,oomps:i,tree:s,showAchievements:o}}),w6=t=>[we,On,dn,_d],jp=tt(()=>O.gt(we.points.value,25));function E6(t,e){}var vx=Object.freeze(Object.defineProperty({__proto__:null,main:we,getInitialLayers:w6,hasWon:jp,fixOldSave:E6},Symbol.toStringTag,{value:"Module"}));const dl=t=>(Cn("data-v-4a50ce42"),t=t(),Rn(),t),I6={class:"game-over-modal-header"},C6=["src","alt"],R6={class:"game-over-modal-title"},N6=dl(()=>U("h2",null,"Congratulations!",-1)),P6={key:0},S6=dl(()=>U("br",null,null,-1)),A6=dl(()=>U("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),O6=dl(()=>U("br",null,null,-1)),U6=["href"],F6=dl(()=>U("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),L6=Pt({__name:"GameOverScreen",setup(t){const{title:e,logo:r,discordName:n,discordLink:i,versionNumber:o,versionTitle:a}=Ie,s=tt(()=>pc(wt.timePlayed)),l=tt(()=>jp.value&&!wt.keepGoing),u=Mr(wt,"autosave");function c(){wt.keepGoing=!0}function f(){To(va())}return(h,d)=>(B(),Rt(Ki,{"model-value":E(l)},{header:Bt(()=>[U("div",I6,[E(r)?(B(),Q("img",{key:0,class:"game-over-modal-logo",src:E(r),alt:E(e)},null,8,C6)):yt("",!0),U("div",R6,[N6,U("h4",null,"You've beaten "+re(E(e))+" v"+re(E(o))+": "+re(E(a)),1)])])]),body:Bt(({shown:p})=>[p?(B(),Q("div",P6,[U("div",null,"It took you "+re(E(s))+" to beat the game.",1),S6,A6,O6,U("div",null,[U("a",{href:E(i),class:"game-over-modal-discord-link"},[F6,dt(" "+re(E(n)),1)],8,U6)]),P(Xr,{title:"Autosave",modelValue:E(u),"onUpdate:modelValue":d[0]||(d[0]=v=>oe(u)?u.value=v:null)},null,8,["modelValue"])])):yt("",!0)]),footer:Bt(()=>[U("div",{class:"game-over-footer"},[U("button",{onClick:c,class:"button"},"Keep Going"),U("button",{onClick:f,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var M6=ne(L6,[["__scopeId","data-v-4a50ce42"]]);const Nc=t=>(Cn("data-v-3de07c06"),t=t(),Rn(),t),B6=Nc(()=>U("div",{class:"nan-modal-header"},[U("h2",null,"NaN value detected!")],-1)),k6={key:0},G6=Nc(()=>U("br",null,null,-1)),D6=["href"],H6=Nc(()=>U("span",{class:"material-icons nan-modal-discord"},"discord",-1)),V6=Nc(()=>U("br",null,null,-1)),$6={class:"nan-footer"},j6=Pt({__name:"NaNScreen",setup(t){const{discordName:e,discordLink:r}=Ie,n=Mr(wt,"autosave"),i=Mr(Le,"hasNaN"),o=It(null),a=tt(()=>{var d;return(d=Le.NaNPath)==null?void 0:d.join(".")}),s=tt(()=>{var d;return(d=Le.NaNPath)==null?void 0:d.slice(-1)[0]}),l=tt(()=>Le.NaNReceiver&&s.value?Le.NaNReceiver[s.value]:null),u=tt({get(){return wt.devSpeed===0},set(d){wt.devSpeed=d?null:0}});function c(){Le.NaNReceiver&&s.value&&(Le.NaNReceiver[s.value]=new O(0),Le.hasNaN=!1)}function f(){Le.NaNReceiver&&s.value&&(Le.NaNReceiver[s.value]=new O(1),Le.hasNaN=!1)}function h(){Le.NaNReceiver&&s.value&&(Le.NaNReceiver[s.value]=new O(NaN),Le.hasNaN=!1)}return(d,p)=>(B(),Q(Ot,null,[P(Ki,yr({modelValue:E(i),"onUpdate:modelValue":p[4]||(p[4]=v=>oe(i)?i.value=v:null)},d.$attrs),{header:Bt(()=>[B6]),body:Bt(()=>[U("div",null,[dt(' Attempted to assign "'+re(E(a))+'" to NaN',1),E(l)?(B(),Q("span",k6,re(" ")+"(previously "+re(E(je)(E(l)))+")",1)):yt("",!0),dt(". Auto-saving has been "+re(E(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),G6,U("div",null,[U("a",{href:E(r),class:"nan-modal-discord-link"},[H6,dt(" "+re(E(e)),1)],8,D6)]),V6,P(Xr,{title:"Autosave",modelValue:E(n),"onUpdate:modelValue":p[0]||(p[0]=v=>oe(n)?n.value=v:null)},null,8,["modelValue"]),E(Ie).enablePausing?(B(),Rt(Xr,{key:0,title:"Pause game",modelValue:E(u),"onUpdate:modelValue":p[1]||(p[1]=v=>oe(u)?u.value=v:null)},null,8,["modelValue"])):yt("",!0)]),footer:Bt(()=>[U("div",$6,[U("button",{onClick:p[2]||(p[2]=v=>{var m;return(m=o.value)==null?void 0:m.open()}),class:"button"},"Open Saves Manager"),U("button",{onClick:c,class:"button"},"Set to 0"),U("button",{onClick:f,class:"button"},"Set to 1"),E(l)&&E(O).neq(E(l),0)&&E(O).neq(E(l),1)?(B(),Q("button",{key:0,onClick:p[3]||(p[3]=v=>i.value=!1),class:"button"}," Set to previous ")):yt("",!0),U("button",{onClick:h,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),P(M_,{ref_key:"savesManager",ref:o},null,512)],64))}});var X6=ne(j6,[["__scopeId","data-v-3de07c06"]]);const z6={key:0,class:"tpsDisplay"},W6={key:0,class:"low"},Y6=Pt({__name:"TPS",setup(t){const e=tt(()=>O.div(Le.lastTenTicks.length,Le.lastTenTicks.reduce((o,a)=>o+a,0))),r=It([]);Xe(()=>{r.value.push(Math.round(e.value.toNumber())),r.value.length>10&&(r.value=r.value.slice(1))});const n=tt(()=>r.value.reduce((o,a)=>O.max(o,a),0)),i=tt(()=>O.sub(e.value,n.value).gt(1));return(o,a)=>E(e).isNan()?yt("",!0):(B(),Q("div",z6,[dt(" TPS: "+re(E(Cr)(E(e)))+" ",1),P(Yi,{name:"fade"},{default:Bt(()=>[E(i)?(B(),Q("span",W6,re(E(Cr)(E(n))),1)):yt("",!0)]),_:1})]))}});var K6=ne(Y6,[["__scopeId","data-v-46a3ed5b"]]);var Z6=Pt({__name:"App",setup(t){const e=Ie.useHeader,r=tt(()=>gi[Pe.theme].variables),n=Mr(Pe,"showTPS"),i=tt(()=>te(le(()=>P(Ot,null,[NE.map(Ge)]))));return(o,a)=>(B(),Q(Ot,null,[U("div",{id:"modal-root",style:ce(E(r))},null,4),U("div",{class:Qt(["app",{useHeader:E(e)}]),style:ce(E(r))},[E(e)?(B(),Rt(B_,{key:0})):yt("",!0),P(JR),E(E(n))?(B(),Rt(K6,{key:1})):yt("",!0),P(M6),P(X6),(B(),Rt(Te(E(i))))],6)],64))}});var q6=ne(Z6,[["__scopeId","data-v-9417972e"]]);try{self["workbox:window:6.5.2"]&&_()}catch{}function xd(t,e){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(i){r(i.data)},t.postMessage(e,[n.port2])})}function J6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Q6(t,e){var r;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=function(i,o){if(i){if(typeof i=="string")return hy(i,o);var a=Object.prototype.toString.call(i).slice(8,-1);return a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set"?Array.from(i):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?hy(i,o):void 0}}(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(r=t[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:6.5.2"]&&_()}catch{}var Df=function(){var t=this;this.promise=new Promise(function(e,r){t.resolve=e,t.reject=r})};function Hf(t,e){var r=location.href;return new URL(t,r).href===new URL(e,r).href}var qa=function(t,e){this.type=t,Object.assign(this,e)};function su(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function tM(){}var eM={type:"SKIP_WAITING"};function dy(t,e){if(!e)return t&&t.then?t.then(tM):Promise.resolve()}var rM=function(t){var e,r;function n(s,l){var u,c;return l===void 0&&(l={}),(u=t.call(this)||this).nn={},u.tn=0,u.rn=new Df,u.en=new Df,u.on=new Df,u.un=0,u.an=new Set,u.cn=function(){var f=u.fn,h=f.installing;u.tn>0||!Hf(h.scriptURL,u.sn.toString())||performance.now()>u.un+6e4?(u.vn=h,f.removeEventListener("updatefound",u.cn)):(u.hn=h,u.an.add(h),u.rn.resolve(h)),++u.tn,h.addEventListener("statechange",u.ln)},u.ln=function(f){var h=u.fn,d=f.target,p=d.state,v=d===u.vn,m={sw:d,isExternal:v,originalEvent:f};!v&&u.mn&&(m.isUpdate=!0),u.dispatchEvent(new qa(p,m)),p==="installed"?u.wn=self.setTimeout(function(){p==="installed"&&h.waiting===d&&u.dispatchEvent(new qa("waiting",m))},200):p==="activating"&&(clearTimeout(u.wn),v||u.en.resolve(d))},u.dn=function(f){var h=u.hn,d=h!==navigator.serviceWorker.controller;u.dispatchEvent(new qa("controlling",{isExternal:d,originalEvent:f,sw:h,isUpdate:u.mn})),d||u.on.resolve(h)},u.gn=(c=function(f){var h=f.data,d=f.ports,p=f.source;return su(u.getSW(),function(){u.an.has(p)&&u.dispatchEvent(new qa("message",{data:h,originalEvent:f,ports:d,sw:p}))})},function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];try{return Promise.resolve(c.apply(this,f))}catch(d){return Promise.reject(d)}}),u.sn=s,u.nn=l,navigator.serviceWorker.addEventListener("message",u.gn),u}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var i,o,a=n.prototype;return a.register=function(s){var l=(s===void 0?{}:s).immediate,u=l!==void 0&&l;try{var c=this;return function(f,h){var d=f();return d&&d.then?d.then(h):h(d)}(function(){if(!u&&document.readyState!=="complete")return dy(new Promise(function(f){return window.addEventListener("load",f)}))},function(){return c.mn=Boolean(navigator.serviceWorker.controller),c.yn=c.pn(),su(c.bn(),function(f){c.fn=f,c.yn&&(c.hn=c.yn,c.en.resolve(c.yn),c.on.resolve(c.yn),c.yn.addEventListener("statechange",c.ln,{once:!0}));var h=c.fn.waiting;return h&&Hf(h.scriptURL,c.sn.toString())&&(c.hn=h,Promise.resolve().then(function(){c.dispatchEvent(new qa("waiting",{sw:h,wasWaitingBeforeRegister:!0}))}).then(function(){})),c.hn&&(c.rn.resolve(c.hn),c.an.add(c.hn)),c.fn.addEventListener("updatefound",c.cn),navigator.serviceWorker.addEventListener("controllerchange",c.dn),c.fn})})}catch(f){return Promise.reject(f)}},a.update=function(){try{return this.fn?dy(this.fn.update()):void 0}catch(s){return Promise.reject(s)}},a.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(s){try{return su(this.getSW(),function(l){return xd(l,s)})}catch(l){return Promise.reject(l)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&xd(this.fn.waiting,eM)},a.pn=function(){var s=navigator.serviceWorker.controller;return s&&Hf(s.scriptURL,this.sn.toString())?s:void 0},a.bn=function(){try{var s=this;return function(l,u){try{var c=l()}catch(f){return u(f)}return c&&c.then?c.then(void 0,u):c}(function(){return su(navigator.serviceWorker.register(s.sn,s.nn),function(l){return s.un=performance.now(),l})},function(l){throw l})}catch(l){return Promise.reject(l)}},i=n,(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&J6(i.prototype,o),n}(function(){function t(){this.Pn=new Map}var e=t.prototype;return e.addEventListener=function(r,n){this.Sn(r).add(n)},e.removeEventListener=function(r,n){this.Sn(r).delete(n)},e.dispatchEvent=function(r){r.target=this;for(var n,i=Q6(this.Sn(r.type));!(n=i()).done;)(0,n.value)(r)},e.Sn=function(r){return this.Pn.has(r)||this.Pn.set(r,new Set),this.Pn.get(r)},t}());function nM(t={}){const{immediate:e=!1,onNeedRefresh:r,onOfflineReady:n,onRegistered:i,onRegisterError:o}=t;let a,s;const l=async(u=!0)=>{u&&(a==null||a.addEventListener("controlling",c=>{c.isUpdate&&window.location.reload()})),s&&s.waiting&&await xd(s.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){a=new rM("/sw.js",{scope:"/",type:"classic"}),a.addEventListener("activated",u=>{u.isUpdate||n==null||n()});{const u=()=>{r==null||r()};a.addEventListener("waiting",u),a.addEventListener("externalwaiting",u)}a.register({immediate:e}).then(u=>{s=u,i==null||i(u)}).catch(u=>{o==null||o(u)})}return l}function iM(t={}){const{immediate:e=!0,onNeedRefresh:r,onOfflineReady:n,onRegistered:i,onRegisterError:o}=t,a=It(!1),s=It(!1);return{updateServiceWorker:nM({immediate:e,onNeedRefresh(){a.value=!0,r==null||r()},onOfflineReady(){s.value=!0,n==null||n()},onRegistered:i,onRegisterError:o}),offlineReady:s,needRefresh:a}}document.title=Ie.title;if(Ie.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await EE();const{globalBus:t,startGameLoop:e}=await xu(()=>Promise.resolve().then(function(){return TE}),void 0),r=window.vue=Yd(q6);t.emit("setupVue",r),r.mount("#app"),cr(()=>{const n=cp(),{updateServiceWorker:i}=iM({onNeedRefresh(){n.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(o){o&&setInterval(o.update,60*60*1e3)}})}),e()});window.projInfo=Ie;