Profectus-Demo/assets/index.d5d1e0a2.js

594 lines
637 KiB
JavaScript
Raw Normal View History

const Ay=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}};Ay();const Oy="modulepreload",Sd={},Py="./",sl=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Py}${r}`,r in Sd)return;Sd[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Oy,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((s,l)=>{o.addEventListener("load",s),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function Ml(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const Fy="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",My=Ml(Fy),Ly="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Uy=Ml(Ly);function Qp(e){return!!e||e===""}function tt(e){if(Ce(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Vt(r)?Dy(r):tt(r);if(i)for(const a in i)t[a]=i[a]}return t}else{if(Vt(e))return e;if(Wt(e))return e}}const By=/;(?![^(]*\))/g,ky=/:(.+)/;function Dy(e){const t={};return e.split(By).forEach(n=>{if(n){const r=n.split(ky);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ze(e){let t="";if(Vt(e))t=e;else if(Ce(e))for(let n=0;n<e.length;n++){const r=ze(e[n]);r&&(t+=r+" ")}else if(Wt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function qp(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Vt(t)&&(e.class=ze(t)),n&&(e.style=tt(n)),e}function Gy(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=pi(e[r],t[r]);return n}function pi(e,t){if(e===t)return!0;let n=Nd(e),r=Nd(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Oa(e),r=Oa(t),n||r)return e===t;if(n=Ce(e),r=Ce(t),n||r)return n&&r?Gy(e,t):!1;if(n=Wt(e),r=Wt(t),n||r){if(!n||!r)return!1;const i=Object.keys(e).length,a=Object.keys(t).length;if(i!==a)return!1;for(const o in e){const s=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(s&&!l||!s&&l||!pi(e[o],t[o]))return!1}}return String(e)===String(t)}function Ll(e,t){return e.findIndex(n=>pi(n,t))}const Je=e=>Vt(e)?e:e==null?"":Ce(e)||Wt(e)&&(e.toString===tv||!De(e.toString))?JSON.stringify(e,ev,2):String(e),ev=(e,t)=>t&&t.__v_isRef?ev(e,t.value):Io(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:io(t)?{[`Set(${t.size})`]:[...t.values()]}:Wt(t)&&!Ce(t)&&!nv(t)?String(t):t,xt={},Eo=[],ur=()=>{},Vy=()=>!1,$y=/^on[^a-z]/,qa=e=>$y.test(e),af=e=>e.startsWith("onUpdate:"),Xt=Object.assign,sf=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},jy=Object.prototype.hasOwnProperty,dt=(e,t)=>jy.call(e,t),Ce=Array.isArray,Io=e=>es(e)==="[object Map]",io=e=>es(e)==="[object Set]",Nd=e=>es(e)==="[object Date]",De=e=>typeof e=="function",Vt=e=>typeof e=="string",Oa=e=>typeof e=="symbol",Wt=e=>e!==null&&typeof e=="object",lf=e=>Wt(e)&&De(e.then)&&De(e.catch),tv=Object.prototype.toString,es=e=>tv.call(e),Hy=e=>es(e).slice(8,-1),nv=e=>es(e)==="[object Object]",uf=e=>Vt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,pa=Ml(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ul=e=>{const
`),i]);else{const a=[`[Vue warn]: ${e}`,...t];i.length&&a.push(`
`,...L0(i)),console.warn(...a)}ao()}function M0(){let e=ma[ma.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function L0(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
`],...U0(n))}),t}function U0({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,i=` at <${um(e.component,e.type,r)}`,a=">"+n;return e.props?[i,...B0(e.props),a]:[i+a]}function B0(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...yv(r,e[r]))}),n.length>3&&t.push(" ..."),t}function yv(e,t,n){return Vt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:et(t)?(t=yv(e,ot(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):De(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ot(t),n?t:[`${e}=`,t])}function Cr(e,t,n,r){let i;try{i=r?e(...r):e()}catch(a){so(a,t,n)}return i}function Gn(e,t,n,r){if(De(e)){const a=Cr(e,t,n,r);return a&&lf(a)&&a.catch(o=>{so(o,t,n)}),a}const i=[];for(let a=0;a<e.length;a++)i.push(Gn(e[a],t,n,r));return i}function so(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let a=t.parent;const o=t.proxy,s=n;for(;a;){const u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,o,s)===!1)return}a=a.parent}const l=t.appContext.config.errorHandler;if(l){Cr(l,null,10,[e,o,s]);return}}k0(e,n,i,r)}function k0(e,t,n,r=!0){console.error(e)}let cl=!1,ac=!1;const Un=[];let Br=0;const ga=[];let aa=null,mo=0;const ya=[];let ni=null,go=0;const bv=Promise.resolve();let bf=null,sc=null;function tn(e){const t=bf||bv;return e?t.then(this?e.bind(this):e):t}function D0(e){let t=Br+1,n=Un.length;for(;t<n;){const r=t+n>>>1;Fa(Un[r])<e?t=r+1:n=r}return t}function xf(e){(!Un.length||!Un.includes(e,cl&&e.allowRecurse?Br+1:Br))&&e!==sc&&(e.id==null?Un.push(e):Un.splice(D0(e.id),0,e),xv())}function xv(){!cl&&!ac&&(ac=!0,bf=bv.then(Tv))}function G0(e){const t=Un.indexOf(e);t>Br&&Un.splice(t,1)}function _v(e,t,n,r){Ce(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),xv()}function V0(e){_v(e,aa,ga,mo)}function _f(e){_v(e,ni,ya,go)}function $l(e,t=null){if(ga.length){for(sc=t,aa=[...new Set(ga)],ga.length=0,mo=0;mo<aa.length;mo++)aa[mo]();aa=null,mo=0,sc=null,$l(e,t)}}function fl(e){if($l(),ya.length){const t=[...new Set(ya)];if(ya.length=0,ni){ni.push(...t);return}for(ni=t,ni.sort((n,r)=>Fa(n)-Fa(r)),go=0;go<ni.length;go++)ni[go]();ni=null,go=0}}const Fa=e=>e.id==null?1/0:e.id;function Tv(e){ac=!1,cl=!0,$l(e),Un.sort((n,r)=>Fa(n)-Fa(r));const t=ur;try{for(Br=0;Br<Un.length;Br++){const n=Un[Br];n&&n.active!==!1&&Cr(n,null,14)}}finally{Br=0,Un.length=0,fl(),cl=!1,bf=null,(Un.length||ga.length||ya.length)&&Tv(e)}}let yo,bs=[];function wv(e,t){var n,r;yo=e,yo?(yo.enabled=!0,bs.forEach(({event:i,args:a})=>yo.emit(i,...a)),bs=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{wv(a,t)}),setTimeout(()=>{yo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,bs=[])},3e3)):bs=[]}function $0(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||xt;let i=n;const a=t.startsWith("update:"),o=a&&t.slice(7);if(o&&o in r){const c=`${o==="modelValue"?"model":o}Modifiers`,{number:f,trim:d}=r[c]||xt;d&&(i=n.map(h=>h.trim())),f&&(i=n.map(vi))}let s,l=r[s=va(t)]||r[s=va(Vn(t))];!l&&a&&(l=r[s=va(wr(t))]),l&&Gn(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Gn(u,e,6,i)}}function Cv(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const a=e.emits;let o={},s=!1;if(!De(e)){const l=u=>{const c=Cv(u,t,!0);c&&(s=!0,Xt(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!s?(r.set(e,null),null):(Ce(a)?a.forEach(l=>o[l]=null):Xt(o,a),r.set(e,o),o)}function jl(e,t){return!e||!qa(t)?!1:(t=t.slice(2).replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,wr(t))||dt(e,t))}let mn=null,Hl=null;function Ma(e){const t=mn;return mn=e,Hl=e&&e.type.__scopeId||null,t}function hr(e){Hl=e}function pr(){Hl=null}const j0=e=>Pe;function Pe(e,t=mn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&pc(-1);const a=Ma(t),o=e(...i);return Ma(a),r._d&&pc(
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function mh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fx(e){var t,n;return mh(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(mh(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}const qt=Symbol("ProxyState"),bo=Symbol("ProxyPath");function an(e,t={}){const n=t;let r=!1;function i(){return r||(Object.assign(n,e(n)),r=!0),n}return new Proxy(n,{get(a,o){return o===qt?i():i()[o]},set(a,o,s){return i()[o]=s,!0},has(a,o){return o===qt?!0:Reflect.has(i(),o)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(a,o){return r||(Object.assign(n,e(n)),r=!0),Object.getOwnPropertyDescriptor(a,o)}})}var Rt=window.state=jo({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Vm=Pr({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function $m(e){return JSON.stringify(e,(t,n)=>x(n))}const jm={get(e,t){var r;if(t===qt||t===bo)return e[t];const n=e[qt][t];if(t!=="value"&&(Fx(n)||Array.isArray(n))){if(n!==((r=e[t])==null?void 0:r[qt])){const i=[...e[bo],t];e[t]=new Proxy({[qt]:n,[bo]:i},jm)}return e[t]}return n},set(e,t,n,r){if(!Rt.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof O&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const i=e[qt][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof O&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw Vm.autosave=!1,Rt.hasNaN=!0,Rt.NaNPath=[...e[bo],t],Rt.NaNReceiver=r,console.error("Attempted to set NaN value",[...e[bo],t],e[qt]),"Attempted to set NaN value. See above for details"}return e[qt][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[qt])},has(e,t){return Reflect.has(e[qt],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[qt],t)}};var xe=window.player=new Proxy({[qt]:Vm,[bo]:["player"]},jm);let Hm=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}});const sn=Hm();let xo=null,Ta=null;function yl(){const e=Date.now();let t=(e-xe.time)/1e3;xe.time=e;const n=t;if(Rt.lastTenTicks.push(n),Rt.lastTenTicks.length>10&&(Rt.lastTenTicks=Rt.lastTenTicks.slice(1)),!((Ta==null?void 0:Ta.value)&&!xe.keepGoing)&&!Rt.hasNaN&&(t=Math.max(t,0),xe.devSpeed!==0)){if(xe.offlineTime!=null){if(O.gt(xe.offlineTime,_t.offlineLimit*3600)&&(xe.offlineTime=_t.offlineLimit*3600),O.gt(xe.offlineTime,0)&&xe.devSpeed!==0){const r=Math.max(xe.offlineTime/10,t);xe.offlineTime=xe.offlineTime-r,t+=r}else xe.devSpeed===0&&(xe.offlineTime+=t);(!xe.offlineProd||O.lt(xe.offlineTime,0))&&(xe.offlineTime=null)}t=Math.min(t,_t.maxTickLength),xe.devSpeed!=null&&(t*=xe.devSpeed),Number.isFinite(t)||(t=1e308),!O.eq(t,0)&&(xe.timePlayed+=t,Number.isFinite(xe.timePlayed)||(xe.timePlayed=1e308),sn.emit("update",t,n),bt.unthrottled?(requestAnimationFrame(yl),xo!=null&&(clearInterval(xo),xo=null)):xo==null&&(xo=setInterval(yl,50)))}}async function Mx(){Ta=(await sl(()=>Promise.resolve().then(function(){return Ny}),void 0)).hasWon,Dt(Ta,e=>{e&&sn.emit("gameWon")}),bt.unthrottled?requestAnimationFrame(yl):xo=setInterval(yl,50)}var Lx=Object.freeze(Object.defineProperty({__proto__:null,globalBus:sn,startGameLoop:Mx},Symbol.toStringTag,{value:"Module"})),Js=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zm(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var Xm={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(l,u){if(!a[l]){a[l]={};for(var c=0;c<l.length;c++)a
`,e),await Wi(Ro())}}function Ro(){const e=Qs(),t=Wm({id:e});return rr(t),bt.saves.push(e),t}function Qs(){let e,t=0;do e=`${_t.id}-${t++}`;while(localStorage.getItem(e));return e}async function Wi(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:r}=await sl(()=>Promise.resolve().then(function(){return o_}),void 0),{fixOldSave:i,getInitialLayers:a}=await sl(()=>Promise.resolve().then(function(){return Ny}),void 0);for(const o in t){const s=t[o];s&&n(s)}a(e).forEach(o=>r(o,e)),e=Wm(e),e.offlineProd&&e.time&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=(Date.now()-e.time)/1e3),e.time=Date.now(),e.modVersion!==_t.versionNumber&&i(e.modVersion,e),Object.assign(xe,e),bt.active=xe.id}setInterval(()=>{xe.autosave&&rr()},1e3);window.onbeforeunload=()=>{xe.autosave&&rr()};window.save=rr;const kx=window.hardReset=async()=>{await Wi(Ro())},Ba=Pr({active:"",saves:[],showTPS:!0,theme:Ff.Nordic,unthrottled:!1});Dt(Ba,e=>{const t=li.compressToUTF16(JSON.stringify(e));localStorage.setItem(_t.id,t)},{deep:!0});var bt=window.settings=Ba;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Ff.Nordic};sn.emit("loadSettings",e),Object.assign(Ba,e),kx()};function Dx(){try{let e=localStorage.getItem(_t.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=li.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Ba,t)}sn.emit("loadSettings",Ba)}catch{}}const Km=Pr([]);function Ym(e){Km.push(e)}const Zm=Pr([]);function Gx(e){Zm.push(e)}const Vx=Pr([]),$x={class:"table"},qs=Ie({__name:"Column",setup(e){const t=J(()=>Kr[bt.theme].mergeAdjacent);return(n,r)=>(M(),W("div",$x,[P("div",{class:ze(["col",{mergeAdjacent:x(t)}])},[Mt(n.$slots,"default")],2)]))}}),jx={class:"table"},wa=Ie({__name:"Row",setup(e){const t=J(()=>Kr[bt.theme].mergeAdjacent);return(n,r)=>(M(),W("div",jx,[P("div",{class:ze(["row",{mergeAdjacent:x(t)}])},[Mt(n.$slots,"default")],2)]))}});function Jm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!fr(e)}function Ye(e,t="span"){return typeof e=="function"?Ie({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Ie({template:e})):Ie({render:()=>({})}):e}function Bt(e){if(Jn(e))return typeof e=="function"?e():Ye(e);const t=e[Jt];return C(t,e[nn](),null)}function tr(...e){let t;return C(wa,null,Jm(t=e.map(Bt))?t:{default:()=>[t]})}function Hx(...e){let t;return C(qs,null,Jm(t=e.map(Bt))?t:{default:()=>[t]})}function Er(e){if(Jn(e))return typeof e=="function"?e():typeof e=="string"?C(Oe,null,[e]):C(e,null,null);const t=e[Jt];return C(t,e[nn](),null)}function Jn(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ua]===!0}function Mf(e,t){const n=Te(null),r=Te(void 0);function i(s){n.value||(n.value=setInterval(o,250)),r.value=s}function a(){n.value&&(clearInterval(n.value),n.value=null)}function o(){t&&t.value?t.value():e&&e.value&&e.value(r.value)}return Ho(a),{start:i,stop:a,handleHolding:o}}function Vo(e,t="div"){const n=An();return zt(()=>{n.value=Ye(Ot(e),t)}),n}function lo(e,t="div"){const n=An(null);return zt(()=>{const r=Ot(e);n.value=r==null?null:Ye(r,t)}),n}function zx(e){return J(()=>Ot(e))}function Ot(e){return x(x(e))}function q(...e){return e.includes(Object)||e.push(Object),e}var Qe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Xx=Ie({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var c;const n=Te({}),r=new ResizeObserver(s),i=Te(null);vr(()=>{const f=i.value;f!=null&&r.observe(f)});let a=!0,o=Te((c=i.value)==null?void 0:c.getBoundingClientRect());function s(){i.value!=null&&a&&(a=!1,tn(()=>{var f;o.value=(f=i.value)==null?void 0:f.getBoundingClientRect(),Object.values(n.value).filter(d=>d).forEach(d=>d.rect=d.element.getBoundingClientRect()),t("updateNodes",n.value),a=!0}))}document.fonts.ready.then(s);const l={attributes:!1,childLis
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Kt(e){const t=et(e)?e:Te(e);return t[ka]=t,t[Da]=et(e)?e.value:e,t[bl]=n_(),t[qm]=!1,ir.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[bl]):Ao[ir[ir.length-1]].add(t),t}sn.on("addLayer",(e,t)=>{const n=[],r=(i,a=[])=>{let o=!1;return Object.keys(i).forEach(s=>{const l=i[s];if(l&&typeof l=="object")if(ka in l){if(o=!0,l[qm]){console.warn("Deleted persistent ref present in returned object. Ignoring...",l,`
Created at:
`+l[bl]);return}Ao[e.id].delete(qt in l?l[qt]:l);const u=a.reduce((f,d)=>(d in f||(f[d]={}),f[d]),t),c=u[s];u[s]=l[ka],di(u)?c!=null?u[s]=c:u[s]=l[Da]:c!=null?u[s].value=c:u[s].value=l[Da]}else!(l instanceof O)&&!et(l)&&!n.includes(l)&&(typeof l.type=="symbol"&&n.push(l),r(l,[...a,s])&&(Ce(l)&&!Ce(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.",qt in i?i[qt]:i,s):o=!0))}),o};r(e),Ao[e.id].forEach(i=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
Created at:
`+i[bl])}),Ao[e.id].clear()});const Lf=Symbol("RegisterNode"),Uf=Symbol("UnregisterNode"),Bf=Symbol("Nodes"),kf=Symbol("Bounds"),Rn=jo({});window.layers=Rn;const Ao={},ir=[];function ss(e,t){return an(()=>{const n={},r=n.emitter=Hm();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=Te({}),n.id=e,ir.push(e),Ao[e]=new Set,n.minimized=Kt(!1),Object.assign(n,t.call(n)),ir[ir.length-1]==null||ir[ir.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${ir}
Trying to pop ${n.id}`;return ir.pop(),H(n,"color"),H(n,"display"),H(n,"name"),ft(n,"name",n.id),H(n,"minWidth"),ft(n,"minWidth",600),H(n,"minimizable"),ft(n,"minimizable",!0),n})}function eg(e,t){if(console.info("Adding layer",e.id),Rn[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Rn[e.id]);return}ft(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Rn[e.id]=e,sn.emit("addLayer",e,t.layers[e.id])}function r_(e){return Rn[e]}function tg(e){console.info("Removing layer",e.id),sn.emit("removeLayer",e),Rn[e.id]=void 0}function i_(e){tg(e),eg(e,xe)}function ng(e){const t=Te(!1);return{openModal:()=>t.value=!0,modal:it(()=>C(wi,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>C("h2",null,[x(e.name)]),body:x(e.display)}))}}sn.on("update",function(t){Object.values(Rn).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Rn).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Rn).forEach(n=>{n==null||n.emit("postUpdate",t)})});var o_=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Lf,UnregisterNodeInjectionKey:Uf,NodesInjectionKey:Bf,BoundsInjectionKey:kf,layers:Rn,persistentRefs:Ao,addingLayers:ir,createLayer:ss,addLayer:eg,getLayer:r_,removeLayer:tg,reloadLayer:i_,setupLayerModal:ng},Symbol.toStringTag,{value:"Module"}));const a_=Ie({components:{Context:Qm},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:q(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:q(Number,String),required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:r,minWidth:i,tab:a}=Et(e),o=Vo(t),s=J(()=>_t.allowGoBack&&n.value>0&&!r.value);function l(){xe.tabs.splice(x(e.index),1/0)}tn(()=>c(r.value,x(i.value))),Dt([r,zx(i)],([f,d])=>c(f,d));function u(f){e.nodes.value=f}function c(f,d){const h=typeof d=="number"||Number.isNaN(parseInt(d))?d+"px":d,p=a.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=h,p.style.margin=""))}return{component:o,showGoBack:s,updateNodes:u,unref:x,goBack:l}}});function s_(e,t,n,r,i,a){const o=wt("Context");return M(),W("div",{class:"layer-container",style:tt({"--layer-color":e.unref(e.color)})},[e.showGoBack?(M(),W("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...s)=>e.goBack&&e.goBack(...s))},"\u2190")):ve("",!0),e.minimized.value?(M(),W("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=s=>e.minimized.value=!1)},[P("div",null,Je(e.unref(e.name)),1)])):(M(),W("div",{key:2,class:ze(["layer-tab",{showGoBack:e.showGoBack}])},[C(o,{onUpdateNodes:e.updateNodes},{default:Pe(()=>[(M(),we(gt(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(M(),W("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=s=>e.minimized.value=!0)}," \u25BC ")):ve("",!0)],4)}var l_=Qe(a_,[["render",s_],["__scopeId","data-v-34c9d881"]]);const rg=e=>(hr("data-v-4b4bda40"),e=e(),pr(),e),u_=rg(()=>P("h2",null,"Changelog",-1)),c_=rg(()=>P("details",{open:""},[P("summary",null,[le("v0.0 Initial Commit - "),P("time",null,"2021-09-04")]),le(" This is the first release :D "),P("ul",null,[P("li",{class:"feature"},"Did everything"),P("li",{class:"fix"},"Had some fun"),P("li",{class:"breaking"},"Removed everything"),P("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),f_=Ie({__name:"Changelog",setup(e,{expose:t}){const n=Te(!1);return t({open(){n.value=!0}}),(r,i)=>(M(),we(wi,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a)},{header:Pe(()=>[u_]),body:Pe(()=>[c_]),_:1},8,["modelValue"]))}});var d_=Qe(f_,[["__scopeId","data-v-4b4bda40"]]),h_=Ie({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ig(e,t){if(e){if(typeof e=="string")return _c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_c(e,t):void 0}}function _c(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ji(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ig(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}var Tc={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(e,t){var n=Te(null);return vr(function(){e.autofocus&&n.value.focus()}),os(function(){e.autofocus&&n.value.focus()}),{handleInput:function(r){t.emit("input",r),t.emit("update:modelValue",r.target.value)},handleChange:function(r){t.emit("change",r),t.emit("update:modelValue",r.target.value)},handleFocus:function(r){t.emit("focus",r)},handleBlur:function(r){t.emit("blur",r)},input:n,handleEscape:function(r){n.value.blur(),t.emit("escape",r)}}}},P_={class:"vue-input"},F_=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];Tc.render=function(e,t,n,r,i,a){return M(),W("div",P_,[Mt(e.$slots,"prepend"),P("input",{ref:"input",autocomplete:n.autocomplete,modelValue:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onInput:t[0]||(t[0]=function(){return r.handleInput&&r.handleInput.apply(r,arguments)}),onChange:t[1]||(t[1]=function(){return r.handleChange&&r.handleChange.apply(r,arguments)}),onFocus:t[2]||(t[2]=function(){return r.handleFocus&&r.handleFocus.apply(r,arguments)}),onBlur:t[3]||(t[3]=function(){return r.handleBlur&&r.handleBlur.apply(r,arguments)}),onKeyup:t[4]||(t[4]=$i(ln(function(){return r.handleEscape&&r.handleEscape.apply(r,arguments)},["exact"]),["esc"])),tabindex:n.tabindex,autofocus:n.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(n.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(n.comboboxUid,"-combobox")},null,40,F_),Mt(e.$slots,"append")])},Tc.__file="src/components/input.vue";var wc={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Df(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(e,t){return{dataAttrs:Kn("dataAttrs"),handleClick:function(n){t.emit("click",n)}}}};wc.render=function(e,t,n,r,i,a){return M(),W("ul",un({class:["vue-tags",{collapsed:n.collapseTags}],onMousedown:t[0]||(t[0]=ln(function(){},["prevent"])),tabindex:"-1",onClick:t[1]||(t[1]=function(){return r.handleClick&&r.handleClick.apply(r,arguments)})},r.dataAttrs),[(M(!0),W(Oe,null,Rr(n.modelValue,function(o){return M(),W(Oe,{key:o.key},[o.group?ve("v-if",!0):(M(),W("li",{key:0,class:ze(["vue-tag",{selected:o.selected}])},[Mt(e.$slots,"default",{option:o},function(){return[P("span",null,Je(o.label),1)]})],2))],64)}),128))],16)},wc.__file="src/components/tags.vue";var Cc={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Df(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(e,t){return{dataAttrs:Kn("dataAttrs"),handleClickItem:function(n,r){r.disabled||t.emit("click-item",n,r)},handleMouseenter:function(n,r){t.emit("mouseenter",n,r)}}}},M_=["id","aria-multiselectable","aria-busy","aria-disabled"],L_=["onClick","onMouseenter","id","aria-selected","aria-disabled"];Cc.render=function(e,t,n,r,i,a){return M(),W("ul",un({class:"vue-dropdown",style:{maxHeight:n.maxHeight+"px"},onMousedown:t[0]||(t[0]=ln(function(){},["prevent"]))},r.dataAttrs,{role:"listbox",id:"vs".concat(n.comboboxUid,"-listbox"),"aria-multiselectable":r.dataAttrs["data-multiple"],"aria-busy":r.dataAttrs["data-loading"],"aria-d
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(n),!0).forEach(function(r){eT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function el(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?el=function(t){return typeof t}:el=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function eT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qn(){return Qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qn.apply(this,arguments)}function tT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function nT(e,t){if(e==null)return{};var n=tT(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function rT(e){return iT(e)||oT(e)||aT(e)||sT()}function iT(e){if(Array.isArray(e))return Ec(e)}function oT(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aT(e,t){if(!!e){if(typeof e=="string")return Ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ec(e,t)}}function Ec(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sT(){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 lT="1.14.0";function Vr(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var Yr=Vr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ls=Vr(/Edge/i),bh=Vr(/firefox/i),Ca=Vr(/safari/i)&&!Vr(/chrome/i)&&!Vr(/android/i),lg=Vr(/iP(ad|od|hone)/i),uT=Vr(/chrome/i)&&Vr(/android/i),ug={capture:!1,passive:!1};function lt(e,t,n){e.addEventListener(t,n,!Yr&&ug)}function rt(e,t,n){e.removeEventListener(t,n,!Yr&&ug)}function _l(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function cT(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function or(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&_l(e,t):_l(e,t))||r&&e===n)return e;if(e===n)break}while(e=cT(e))}return null}var xh=/\s+/g;function Ut(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(xh," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(xh," ")}}function Ee(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function qi(e,t){var n="";if(typeof e=="string")n=e;else do{var r=Ee(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function cg(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function Ir(){var e=document.scrollingElement;return e||document.documentElement}function Ft(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,l,u,c,f;if(e!==window&&e.parentNode&&e!==Ir()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,u=a.right,c=a.height,f=a.width):(o=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!Yr))do if(i&&i.getBoundingClientRect&&(Ee(i,"transform")!=="none"||n&&Ee(i,"position")!=="static")){var d=i.getBoundingClientRect();o-=d.top+parseInt(Ee(i,"border-top-width")),s-=d.left+parseInt(Ee(i,"border-left-width")),l=o+a.height,u=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var h=qi(i||e),p=h&&h.a,v=h&&h.d;h&&(o/=v,s/=p,f/=p,c/=v,l=o+c,u=s+f)}return{top:o,left:s,bottom:l,right:u,width:f,height:c}}}function _h(e,t,n){for(var r=ui(e,!0),i=Ft(e)[t];r;){var a=Ft(r)[n],o=void 0;if(n==="top"||n==="left"?o=i>=a:o=i<=a,!o)return r;if(r===Ir())break;r=ui(r,!1)}return!1}function $o(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==ke.ghost&&(r||o[a]!==ke.dragged)&&or(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function Vf(e,t){for(var n=e.lastElementChild;n&&(n===ke.ghost||Ee(n,"display")==="none"||t&&!_l(n,t));)n=n.previousElementSibling;return n||null}function Ht(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ke.clone&&(!t||_l(e,t))&&n++;return n}function Th(e){var t=0,n=0,r=Ir();if(e)do{var i=qi(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function fT(e,t){for(var n in e)if(!!e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function ui(e,t){if(!e||!e.getBoundingClientRect)return Ir();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Ee(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Ir();if(r||t)return
`)&&(R="(?: "+R+")",$=" "+$,U++),T=new RegExp("^(?:"+R+")",I)),p&&(T=new RegExp("^"+R+"$(?!\\s)",I)),d&&(b=m.lastIndex),S=u.call(N?T:m,$),N?S?(S.input=S.input.slice(U),S[0]=S[0].slice(U),S.index=m.lastIndex,m.lastIndex+=S[0].length):m.lastIndex=0:d&&S&&(m.lastIndex=m.global?S.index+S[0].length:b),p&&S&&S.length>1&&c.call(S[0],T,function(){for(w=1;w<arguments.length-2;w++)arguments[w]===void 0&&(S[w]=void 0)}),S}),i.exports=f},"94ca":function(i,a,o){var s=o("d039"),l=/#|\.prototype\./,u=function(p,v){var g=f[c(p)];return g==h?!0:g==d?!1:typeof v=="function"?s(v):!!v},c=u.normalize=function(p){return String(p).replace(l,".").toLowerCase()},f=u.data={},d=u.NATIVE="N",h=u.POLYFILL="P";i.exports=u},"99af":function(i,a,o){var s=o("23e7"),l=o("d039"),u=o("e8b5"),c=o("861d"),f=o("7b0b"),d=o("50c4"),h=o("8418"),p=o("65f0"),v=o("1dde"),g=o("b622"),y=o("2d00"),m=g("isConcatSpreadable"),b=9007199254740991,T="Maximum allowed index exceeded",S=y>=51||!l(function(){var R=[];return R[m]=!1,R.concat()[0]!==R}),w=v("concat"),N=function(R){if(!c(R))return!1;var U=R[m];return U!==void 0?!!U:u(R)},I=!S||!w;s({target:"Array",proto:!0,forced:I},{concat:function(U){var $=f(this),z=p($,0),j=0,B,he,Y,oe,me;for(B=-1,Y=arguments.length;B<Y;B++)if(me=B===-1?$:arguments[B],N(me)){if(oe=d(me.length),j+oe>b)throw TypeError(T);for(he=0;he<oe;he++,j++)he in me&&h(z,j,me[he])}else{if(j>=b)throw TypeError(T);h(z,j++,me)}return z.length=j,z}})},"9bdd":function(i,a,o){var s=o("825a");i.exports=function(l,u,c,f){try{return f?u(s(c)[0],c[1]):u(c)}catch(h){var d=l.return;throw d!==void 0&&s(d.call(l)),h}}},"9bf2":function(i,a,o){var s=o("83ab"),l=o("0cfb"),u=o("825a"),c=o("c04e"),f=Object.defineProperty;a.f=s?f:function(h,p,v){if(u(h),p=c(p,!0),u(v),l)try{return f(h,p,v)}catch{}if("get"in v||"set"in v)throw TypeError("Accessors not supported");return"value"in v&&(h[p]=v.value),h}},"9ed3":function(i,a,o){var s=o("ae93").IteratorPrototype,l=o("7c73"),u=o("5c6c"),c=o("d44e"),f=o("3f8c"),d=function(){return this};i.exports=function(h,p,v){var g=p+" Iterator";return h.prototype=l(s,{next:u(1,v)}),c(h,g,!1,!0),f[g]=d,h}},"9f7f":function(i,a,o){var s=o("d039");function l(u,c){return RegExp(u,c)}a.UNSUPPORTED_Y=s(function(){var u=l("a","y");return u.lastIndex=2,u.exec("abcd")!=null}),a.BROKEN_CARET=s(function(){var u=l("^r","gy");return u.lastIndex=2,u.exec("str")!=null})},a2bf:function(i,a,o){var s=o("e8b5"),l=o("50c4"),u=o("0366"),c=function(f,d,h,p,v,g,y,m){for(var b=v,T=0,S=y?u(y,m,3):!1,w;T<p;){if(T in h){if(w=S?S(h[T],T,d):h[T],g>0&&s(w))b=c(f,d,w,l(w.length),b,g-1)-1;else{if(b>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[b]=w}b++}T++}return b};i.exports=c},a352:function(i,a){i.exports=r},a434:function(i,a,o){var s=o("23e7"),l=o("23cb"),u=o("a691"),c=o("50c4"),f=o("7b0b"),d=o("65f0"),h=o("8418"),p=o("1dde"),v=o("ae40"),g=p("splice"),y=v("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,b=Math.min,T=9007199254740991,S="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!g||!y},{splice:function(N,I){var R=f(this),U=c(R.length),$=l(N,U),z=arguments.length,j,B,he,Y,oe,me;if(z===0?j=B=0:z===1?(j=0,B=U-$):(j=z-2,B=b(m(u(I),0),U-$)),U+j-B>T)throw TypeError(S);for(he=d(R,B),Y=0;Y<B;Y++)oe=$+Y,oe in R&&h(he,Y,R[oe]);if(he.length=B,j<B){for(Y=$;Y<U-B;Y++)oe=Y+B,me=Y+j,oe in R?R[me]=R[oe]:delete R[me];for(Y=U;Y>U-B+j;Y--)delete R[Y-1]}else if(j>B)for(Y=U-B;Y>$;Y--)oe=Y+B-1,me=Y+j-1,oe in R?R[me]=R[oe]:delete R[me];for(Y=0;Y<j;Y++)R[Y+$]=arguments[Y+2];return R.length=U-B+j,he}})},a4d3:function(i,a,o){var s=o("23e7"),l=o("da84"),u=o("d066"),c=o("c430"),f=o("83ab"),d=o("4930"),h=o("fdbf"),p=o("d039"),v=o("5135"),g=o("e8b5"),y=o("861d"),m=o("825a"),b=o("7b0b"),T=o("fc6a"),S=o("c04e"),w=o("5c6c"),N=o("7c73"),I=o("df75"),R=o("241c"),U=o("057f"),$=o("7418"),z=o("06cf"),j=o("9bf2"),B=o("d1e7"),he=o("9112"),Y=o("6eeb"),oe=o("5692"),me=o("f772"),Ke=o("d012"),re=o("90e3"),de=o("b622"),ye=o("e538"),Se=o("746f"),k=o("d44e"),X=o("69f3"),ce=o("b727").forEach,ue=me("hidden"),Ve="Symbol",ie="prototype",Ze=de("toPrimitive"),at=X.set,ut=X.getterFor(Ve)
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(F,L){return h(F)||p(F,L)||g(F,L)||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 S(){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 w(F){return b(F)||T(F)||g(F)||S()}var N=o("a352"),I=o.n(N);function R(F){F.parentElement!==null&&F.parentElement.removeChild(F)}function U(F,L,G){var te=G===0?F.children[0]:F.children[G-1].nextSibling;F.insertBefore(L,te)}var $=o("dbf1");o("13d5"),o("4fad"),o("ac1f"),o("5319");function z(F){var L=Object.create(null);return function(te){var _e=L[te];return _e||(L[te]=F(te))}}var j=/-(\w)/g,B=z(function(F){return F.replace(j,function(L,G){return G.toUpperCase()})});o("5db7"),o("73d9");var he=["Start","Add","Remove","Update","End"],Y=["Choose","Unchoose","Sort","Filter","Clone"],oe=["Move"],me=[oe,he,Y].flatMap(function(F){return F}).map(function(F){return"on".concat(F)}),Ke={manage:oe,manageAndEmit:he,emit:Y};function re(F){return me.indexOf(F)!==-1}o("caad"),o("2ca0");var de=["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 ye(F){return de.includes(F)}function Se(F){return["transition-group","TransitionGroup"].includes(F)}function k(F){return["id","class","role","style"].includes(F)||F.startsWith("data-")||F.startsWith("aria-")||F.startsWith("on")}function X(F){return F.reduce(function(L,G){var te=m(G,2),_e=te[0],Fe=te[1];return L[_e]=Fe,L},{})}function ce(F){var L=F.$attrs,G=F.componentData,te=G===void 0?{}:G,_e=X(Object.entries(L).filter(function(Fe){var $e=m(Fe,2),Ge=$e[0];return $e[1],k(Ge)}));return d(d({},_e),te)}function ue(F){var L=F.$attrs,G=F.callBackBuilder,te=X(Ve(L));Object.entries(G).forEach(function(Fe){var $e=m(Fe,2),Ge=$e[0],mt=$e[1];Ke[Ge].forEach(function(Be){te["on".concat(Be)]=mt(Be)})});var _e="[data-draggable]".concat(te.draggable||"");return d(d({},te),{},{draggable:_e})}function Ve(F){return Object.entries(F).filter(function(L){var G=m(L,2),te=G[0];return G[1],!k(te)}).map(function(L){var G=m(L,2),te=G[0],_e=G[1];return[B(te),_e]}).filter(function(L){var G=m(L,2),te=G[0];return G[1],!re(te)})}o("c740");function ie(F,L){if(!(F instanceof L))throw new TypeError("Cannot call a class as a function")}function Ze(F,L){for(var G=0;G<L.length;G++){var te=L[G];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(F,te.key,te)}}function at(F,L,G){return L&&Ze(F.prototype,L),G&&Ze(F,G),F}var ut=function(L){var G=L.el;return G},E=function(L,G){return L.__draggable_context=G},A=function(L){return L.__draggable_context},V=function(){function F(L){var G=L.nodes,te=G.header,_e=G.default,Fe=G.footer,$e=L.root,Ge=L.realList;ie(this,F),this.defaultNodes=_e,this.children=[].concat(w(te),w(_e),w(Fe)),this.externalComponent=$e.externalComponent,this.rootTransition=$e.transition,this.tag=$e.tag,this.realList=Ge}return at(F,[{key:"render",value:function(G,te){var _e=this.tag,Fe=this.children,$e=this._isRootComponent,Ge=$e?{default:function(){return Fe}}:Fe;return G(_e,te,Ge)}},{key:"updated",value:function(){var G=this.defaultNodes,te=this.realList;G.forEach(function(_e,Fe){E(ut(_e),{element:te[Fe],index:Fe})})}},{key:"getUnderlyingVm",value:function(G){return A(G)}},{key:"getVmIndexFromDomIndex",value:function(G,te){var _e=this.defaultNodes,Fe=_e.length,$e=te.children,Ge=$e.item(G);if(Ge===null)return Fe;var mt=A(Ge);if(mt)return mt.index;if(Fe===0)return 0;var Be=ut(_e[0]),Ae=
* vue-textarea-autosize v1.1.1
* (c) 2019 Saymon
* Released under the MIT License.
*/var kT={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 t=this.important;return t===!0||Array.isArray(t)&&t.includes("resize")},isOverflowImportant:function(){var t=this.important;return t===!0||Array.isArray(t)&&t.includes("overflow")},isHeightImportant:function(){var t=this.important;return t===!0||Array.isArray(t)&&t.includes("height")}},watch:{value:function(t){this.val=t},val:function(t){this.$nextTick(this.resize),this.$emit("input",t)},minHeight:function(){this.$nextTick(this.resize)},maxHeight:function(){this.$nextTick(this.resize)},autosize:function(t){t&&this.resize()}},methods:{resize:function(){var t=this,n=this.isHeightImportant?"important":"";return this.height="auto".concat(n?" !important":""),this.$nextTick(function(){var r=t.$el.scrollHeight+1;t.minHeight&&(r=r<t.minHeight?t.minHeight:r),t.maxHeight&&(r>t.maxHeight?(r=t.maxHeight,t.maxHeightScroll=!0):t.maxHeightScroll=!1);var i=r+"px";t.height="".concat(i).concat(n?" !important":"")}),this}},created:function(){this.val=this.value},mounted:function(){this.resize()}};function DT(e,t,n,r,i,a,o,s,l,u){typeof o!="boolean"&&(l=s,s=o,o=!1);var c=typeof n=="function"?n.options:n;e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),r&&(c._scopeId=r);var f;if(a?(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__),t&&t.call(this,l(v)),v&&v._registeredComponents&&v._registeredComponents.add(a)},c._ssrRegister=f):t&&(f=o?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(p){t.call(this,s(p))}),f)if(c.functional){var d=c.render;c.render=function(v,g){return f.call(g),d(v,g)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,f):[f]}return n}var GT=DT;const VT=kT;var $T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.val,expression:"val"}],style:e.computedStyles,domProps:{value:e.val},on:{focus:e.resize,input:function(r){r.target.composing||(e.val=r.target.value)}}})},jT=[];const HT=void 0,zT=void 0,XT=void 0,WT=!1;var KT=GT({render:$T,staticRenderFns:jT},HT,VT,zT,WT,XT,void 0,void 0),YT="1.1.1",ZT=function(t){t.component("TextareaAutosize",KT)},bg={install:ZT,version:YT};typeof window!="undefined"&&window.Vue&&window.Vue.use(bg);const JT=["onSubmit"],QT={class:"field"},qT={key:0,class:"field-title"},ew=["placeholder"],tw=Ie({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:t}){const r=Et(e),i=J(()=>{var l;return((l=r.title)==null?void 0:l.value)&&Ye(x(r.title.value),"span")}),a=Te(null);vr(()=>{var l;(l=a.value)==null||l.focus()});const o=J({get(){return x(r.modelValue)||""},set(l){t("update:modelValue",l)}});function s(){t("submit")}return(l,u)=>(M(),W("form",{onSubmit:ln(s,["prevent"])},[P("div",QT,[x(i)?(M(),W("span",qT,[(M(),we(gt(x(i))))])):ve("",!0),e.textArea?(M(),we(x(bg),{key:1,modelValue:x(o),"onUpdate:modelValue":u[0]||(u[0]=c=>et(o)?o.value=c:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:s,ref_key:"field",ref:a},null,8,["modelValue","placeholder","maxHeight"])):zo((M(),W("input",{key:2,type:"text","onUpdate:modelValue":u[1]||(u[1]=c=>et(o)?o.value=c:null),placeholder:e.placeholder,class:ze({fullWidth:!e.title}),onBlur:s,ref_key:"field",ref:a},null,42,ew)),[[Do,x(o)]])])],40,JT))}});var zf=Qe(tw,[["__scopeId","data-v-d74adb0a"]]);const nw={key:0},r
${T}
${b}`)}}return u[m]}Dt(n,m=>{m&&Object.keys(u).forEach(b=>delete u[b])});const f=J(()=>bt.saves.reduce((m,b)=>(m[b]=c(b),m),{}));function d(m){let b;switch(xe.id===m?b=$m(xe[qt]):b=JSON.stringify(f.value[m]),_t.exportEncoding){default:console.warn(`Unknown save encoding: ${_t.exportEncoding}. Defaulting to lz`);case"lz":b=li.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 h(m){xe.id===m&&rr();const b={...f.value[m],id:Qs()};rr(b),bt.saves.push(b.id)}function p(m){bt.saves=bt.saves.filter(b=>b!==m),localStorage.removeItem(m),u[m]=void 0}function v(m){f.value[xe.id].time=xe.time,rr(),u[xe.id]=void 0,Wi(f.value[m]),u[m]=void 0}function g(m){if(o.value=m,tn(()=>{o.value=null}),m[0]!=="{")if(m[0]==="e")m=decodeURIComponent(escape(atob(m)));else if(m[0]==="\u1BE1")m=li.decompressFromUTF16(m);else{console.warn("Unable to determine preset encoding",m);return}const b=JSON.parse(m);b.id=Qs(),rr(b),bt.saves.push(b.id),v(b.id)}function y(m,b){const T=f.value[m];T&&(T.name=b,xe.id===m?(xe.name=b,rr()):(rr(T),u[m]=void 0))}return(m,b)=>(M(),we(wi,{modelValue:n.value,"onUpdate:modelValue":b[4]||(b[4]=T=>n.value=T),ref_key:"modal",ref:r},{header:Pe(()=>[Rw]),body:Pe(({shown:T})=>[T?(M(),we(x(BT),{key:0,list:x(bt).saves,handle:".handle",itemKey:S=>S},{item:Pe(({element:S})=>[C(Nw,{save:x(f)[S],onOpen:w=>v(S),onExport:w=>d(S),onEditName:w=>y(S,w),onDuplicate:w=>h(S),onDelete:w=>p(S)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):ve("",!0)]),footer:Pe(()=>[P("div",Aw,[C(zf,{modelValue:a.value,"onUpdate:modelValue":b[0]||(b[0]=T=>a.value=T),title:"Import Save",placeholder:"Paste your save here!",class:ze({importingFailed:i.value})},null,8,["modelValue","class"]),P("div",Ow,[Pw,P("div",Fw,[P("button",{class:"button",onClick:b[1]||(b[1]=T=>v(x(Ro)().id))},"New Game"),Object.keys(x(l)).length>0?(M(),we(Gf,{key:0,options:x(l),modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=T=>g(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):ve("",!0)])]),P("div",Mw,[Lw,P("button",{class:"button modal-default-button",onClick:b[3]||(b[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var xg=Qe(Uw,[["__scopeId","data-v-3b9991aa"]]);const Hn=e=>(hr("data-v-4a3f8425"),e=e(),pr(),e),Bw=["src","alt"],kw={key:1,class:"title"},Dw=Hn(()=>P("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Gw={class:"discord"},Vw={class:"discord-links"},$w={key:0},jw=["href"],Hw=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),zw=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Xw={href:"https://forums.moddingtree.com/",target:"_blank"},Ww=Hn(()=>P("span",{class:"material-icons"},"forum",-1)),Kw=Hn(()=>P("span",{class:"material-icons"},"info",-1)),Yw=Hn(()=>P("span",{class:"material-icons"},"library_books",-1)),Zw=Hn(()=>P("span",{class:"material-icons"},"settings",-1)),Jw=Hn(()=>P("span",{class:"material-icons"},"library_books",-1)),Qw=Hn(()=>P("span",{class:"material-icons"},"settings",-1)),qw=Hn(()=>P("span",{class:"material-icons"},"info",-1)),e2={href:"https://forums.moddingtree.com/",target:"_blank"},t2=Hn(()=>P("span",{class:"material-icons"},"forum",-1)),n2={class:"discord"},r2={class:"discord-links"},i2={key:0},o2=["href"],a2=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),s2=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),l2=Ie({__name:"Nav",setup(e){const t=Te(null),n=Te(null),r=Te(null),i=Te(null),{useHeader:a,banner:o,title:s,discordName:l,discordLink:u,versionNumber:c}=_t;function f(){window.open(u,"mywindow")}return(d,h)=>(M(),W(Oe,null,[x(a)?(M(),W("div",un({key:0
* @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 Yi=pE(globalThis.navigator);function vE(e){var t=!0;if(Yi.tablet||Yi.phone){if(Yi.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(Yi.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}function mE(){return!Yi.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 Xh;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Xh||(Xh={}));var Wh;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(Wh||(Wh={}));var Kh;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Kh||(Kh={}));var Yh;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Yh||(Yh={}));var Zh;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Zh||(Zh={}));var Jh;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Jh||(Jh={}));var Qh;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Qh||(Qh={}));var qh;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(qh||(qh={}));var ep;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(ep||(ep={}));var Pc;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Pc||(Pc={}));var Fc;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Fc||(Fc={}));var Mc;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(Mc||(Mc={}));var tp;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(tp||(tp={}));var np;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BL
* @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 Xr;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Xr||(Xr={}));var ja;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(ja||(ja={}));var Sl;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Sl||(Sl={}));var Me;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Me||(Me={}));var Ha;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Ha||(Ha={}));var ge;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(ge||(ge={}));var eo;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(eo||(eo={}));var vt;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(vt||(vt={}));var Nl;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(Nl||(Nl={}));var Dr;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Dr||(Dr={}));var Bc;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Bc||(Bc={}));var ro;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(ro||(ro={}));var bi;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(bi||(bi={}));var ai;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BL
`," "],HE=["{","}","|","\\","^","`"].concat(jE),jc=["'"].concat(HE),ap=["%","/","?",";","#"].concat(jc),sp=["/","?","#"],zE=255,lp=/^[+a-z0-9A-Z_-]{0,63}$/,XE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,WE={javascript:!0,"javascript:":!0},Hc={javascript:!0,"javascript:":!0},Oo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},zc=Ka;function ou(e,t,n){if(e&&gr.isObject(e)&&e instanceof cr)return e;var r=new cr;return r.parse(e,t,n),r}cr.prototype.parse=function(e,t,n){if(!gr.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r<e.indexOf("#")?"?":"#",a=e.split(i),o=/\\/g;a[0]=a[0].replace(o,"/"),e=a.join(i);var s=e;if(s=s.trim(),!n&&e.split("#").length===1){var l=$E.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],t?this.query=zc.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var u=GE.exec(s);if(u){u=u[0];var c=u.toLowerCase();this.protocol=c,s=s.substr(u.length)}if(n||u||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f=s.substr(0,2)==="//";f&&!(u&&Hc[u])&&(s=s.substr(2),this.slashes=!0)}if(!Hc[u]&&(f||u&&!Oo[u])){for(var d=-1,h=0;h<sp.length;h++){var p=s.indexOf(sp[h]);p!==-1&&(d===-1||p<d)&&(d=p)}var v,g;d===-1?g=s.lastIndexOf("@"):g=s.lastIndexOf("@",d),g!==-1&&(v=s.slice(0,g),s=s.slice(g+1),this.auth=decodeURIComponent(v)),d=-1;for(var h=0;h<ap.length;h++){var p=s.indexOf(ap[h]);p!==-1&&(d===-1||p<d)&&(d=p)}d===-1&&(d=s.length),this.host=s.slice(0,d),s=s.slice(d),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var m=this.hostname.split(/\./),h=0,b=m.length;h<b;h++){var T=m[h];if(!!T&&!T.match(lp)){for(var S="",w=0,N=T.length;w<N;w++)T.charCodeAt(w)>127?S+="x":S+=T[w];if(!S.match(lp)){var I=m.slice(0,h),R=m.slice(h+1),U=T.match(XE);U&&(I.push(U[1]),R.unshift(U[2])),R.length&&(s="/"+R.join(".")+s),this.hostname=I.join(".");break}}}this.hostname.length>zE?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=UE.toASCII(this.hostname));var $=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+$,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!WE[c])for(var h=0,b=jc.length;h<b;h++){var j=jc[h];if(s.indexOf(j)!==-1){var B=encodeURIComponent(j);B===j&&(B=escape(j)),s=s.split(j).join(B)}}var he=s.indexOf("#");he!==-1&&(this.hash=s.substr(he),s=s.slice(0,he));var Y=s.indexOf("?");if(Y!==-1?(this.search=s.substr(Y),this.query=s.substr(Y+1),t&&(this.query=zc.parse(this.query)),s=s.slice(0,Y)):t&&(this.search="",this.query={}),s&&(this.pathname=s),Oo[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",oe=this.search||"";this.path=$+oe}return this.href=this.format(),this};function KE(e){return gr.isString(e)&&(e=ou(e)),e instanceof cr?e.format():cr.prototype.format.call(e)}cr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&gr.isObject(this.query)&&Object.keys(this.query).length&&(a=zc.stringify(this.query));var o=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||Oo[t])&&i!==!1?(i="//"+(i||""),n&&n.charAt(0)!=="/"&&(n="/"+n)):i||(i=""),r&&r.charAt(0)!=="#"&&(r="#"+r),o&&o.charAt(0)!=="?"&&(o="?"+o),n=n.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),o=o.replace("#","%23"),t+i+n+o+r};function YE(e,t){return ou(e,!1,!0).resolve(t)}cr.prototype.resolve=function(e){return this.resolveObject(ou(e,!1,!0)).format()};cr.prototype.resolveObject=function(e){if(gr.isString(e)){var t=new cr;t.parse(e,!1,!0),e=t}for(var n=new cr,r=Object.keys(this),i=0;i<r.length;i++){var a=r[i];n[a]=this[a]}if(n.hash=e.hash,e
* @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 ZE={parse:BE,format:DE,resolve:kE};He.RETINA_PREFIX=/@([0-9\.]+)x/;He.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var up=!1,cp="6.4.2";function JE(e){var t;if(!up){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=[`
%c %c %c PixiJS `+cp+" - \u2730 "+e+` \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;"];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log("PixiJS "+cp+" - "+e+" - http://www.pixijs.com/");up=!0}}var Lu;function QE(){return typeof Lu=="undefined"&&(Lu=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:He.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!globalThis.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",t)||n.getContext("experimental-webgl",t),i=!!(r&&r.getContextAttributes().stencil);if(r){var a=r.getExtension("WEBGL_lose_context");a&&a.loseContext()}return r=null,i}catch{return!1}}()),Lu}function qE(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function eI(e){var t=e.toString(16);return t="000000".substring(0,6-t.length)+t,"#"+t}function tI(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[Me.NORMAL_NPM]=Me.NORMAL,e[Me.ADD_NPM]=Me.ADD,e[Me.SCREEN_NPM]=Me.SCREEN,t[Me.NORMAL]=Me.NORMAL_NPM,t[Me.ADD]=Me.ADD_NPM,t[Me.SCREEN]=Me.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var nI=tI();function rI(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function ny(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function Rl(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function fp(e){return!(e&e-1)&&!!e}function dp(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function al(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i<a;++i)e[i]=e[i+n];e.length=a}}function Ms(e){return e===0?0:e<0?-1:1}var iI=0;function Ya(){return++iI}var hp={};function Za(e,t,n){if(n===void 0&&(n=3),!hp[t]){var r=new Error().stack;typeof r=="undefined"?console.warn("PixiJS Deprecation Warning: ",t+`
Deprecated since v`+e):(r=r.split(`
`).splice(n).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+`
Deprecated since v`+e),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+`
Deprecated since v`+e),console.warn(r))),hp[t]=!0}}var pp={},Ur=Object.create(null),Oi=Object.create(null);(function(){function e(t,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||He.RESOLUTION,this.resize(t,n)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(t,n){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(n*this.resolution)},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),e})();var Ls;function oI(e,t){if(t===void 0&&(t=globalThis.location),e.indexOf("data:")===0)return"";t=t||globalThis.location,Ls||(Ls=document.createElement("a")),Ls.href=e;var n=ZE.parse(Ls.href),r=!n.port&&t.port===""||n.port===t.port;return n.hostname!==t.hostname||!r||n.protocol!==t.protocol?"anonymous":""}function vp(e,t){var n=He.RETINA_PREFIX.exec(e);return n?parseFloat(n[1]):t!==void 0?t: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 pn=function(){function e(t){this.items=[],this._name=t,this._aliasCount=0}return e.prototype.emit=function(t,n,r,i,a,o,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 d=0,h=f.length;d<h;d++)f[d][c](t,n,r,i,a,o,s,l);return f===this.items&&this._aliasCount--,this},e.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},e.prototype.remove=function(t){var n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this},e.prototype.contains=function(t){return this.items.indexOf(t)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(pn.prototype,{dispatch:{value:pn.prototype.emit},run:{value:pn.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
*/He.TARGET_FPMS=.06;var Al;(function(e){e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY"})(Al||(Al={}));var Uu=function(){function e(t,n,r,i){n===void 0&&(n=null),r===void 0&&(r=0),i===void 0&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}return e.prototype.match=function(t,n){return n===void 0&&(n=null),this.fn===t&&this.context===n},e.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n},e.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},e.prototype.destroy=function(t){t===void 0&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var n=this.next;return this.next=t?null:n,this.previous=null,n},e}(),Ui=function(){function e(){var t=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 Uu(null,null,1/0),this.deltaMS=1/He.TARGET_FPMS,this.elapsedMS=1/He.TARGET_FPMS,this._tick=function(n){t._requestId=null,t.started&&(t.update(n),t.started&&t._requestId===null&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(t,n,r){return r===void 0&&(r=Al.NORMAL),this._addListener(new Uu(t,n,r))},e.prototype.addOnce=function(t,n,r){return r===void 0&&(r=Al.NORMAL),this._addListener(new Uu(t,n,r,!0))},e.prototype._addListener=function(t){var n=this._head.next,r=this._head;if(!n)t.connect(r);else{for(;n;){if(t.priority>n.priority){t.connect(r);break}r=n,n=n.next}t.previous||t.connect(r)}return this._startIfPossible(),this},e.prototype.remove=function(t,n){for(var r=this._head.next;r;)r.match(t,n)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,n=this._head;n=n.next;)t++;return t},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(t){t===void 0&&(t=performance.now());var n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*He.TARGET_FPMS;for(var i=this._head,a=i.next;a;)a=a.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(e.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var n=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,n)/1e3,He.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(t===0)this._minElapsedMS=0;else{var n=Math.max(this.minFPS,t);this._minElapsedMS
* @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 aI=Math.PI*2,sI=180/Math.PI,lI=Math.PI/180,Xc;(function(e){e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC"})(Xc||(Xc={}));var Yt=function(){function e(t,n){t===void 0&&(t=0),n===void 0&&(n=0),this.x=0,this.y=0,this.x=t,this.y=n}return e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},e.prototype.copyTo=function(t){return t.set(this.x,this.y),t},e.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},e.prototype.set=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=t),this.x=t,this.y=n,this},e.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},e}(),Us=[new Yt,new Yt,new Yt,new Yt],Zt=function(){function e(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=Xc.RECT}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e,"EMPTY",{get:function(){return new e(0,0,0,0)},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},e.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},e.prototype.contains=function(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&n>=this.y&&n<this.y+this.height},e.prototype.intersects=function(t,n){if(!n){var r=this.x<t.x?t.x:this.x,i=this.right>t.right?t.right:this.right;if(i<=r)return!1;var a=this.y<t.y?t.y:this.y,o=this.bottom>t.bottom?t.bottom:this.bottom;return o>a}var s=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=s||c<=u)return!1;var f=Us[0].set(t.left,t.top),d=Us[1].set(t.left,t.bottom),h=Us[2].set(t.right,t.top),p=Us[3].set(t.right,t.bottom);if(h.x<=f.x||d.y<=f.y)return!1;var v=Math.sign(n.a*n.d-n.b*n.c);if(v===0||(n.apply(f,f),n.apply(d,d),n.apply(h,h),n.apply(p,p),Math.max(f.x,d.x,h.x,p.x)<=s||Math.min(f.x,d.x,h.x,p.x)>=l||Math.max(f.y,d.y,h.y,p.y)<=u||Math.min(f.y,d.y,h.y,p.y)>=c))return!1;var g=v*(d.y-f.y),y=v*(f.x-d.x),m=g*s+y*u,b=g*l+y*u,T=g*s+y*c,S=g*l+y*c;if(Math.max(m,b,T,S)<=g*f.x+y*f.y||Math.min(m,b,T,S)>=g*p.x+y*p.y)return!1;var w=v*(f.y-h.y),N=v*(h.x-f.x),I=w*s+N*u,R=w*l+N*u,U=w*s+N*c,$=w*l+N*c;return!(Math.max(I,R,U,$)<=w*f.x+N*f.y||Math.min(I,R,U,$)>=w*p.x+N*p.y)},e.prototype.pad=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=t),this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this},e.prototype.fit=function(t){var n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(a-i,0),this},e.prototype.ceil=function(t,n){t===void 0&&(t=1),n===void 0&&(n=.001);var r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this},e.prototype.enlarge=function(t){var n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=a-i,this},e.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},e}(),ha=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=n}return e.prototype.clone=function(t,n){return t===void 0&&(
* @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
*/He.PREFER_ENV=Yi.any?Xr.WEBGL:Xr.WEBGL2;He.STRICT_TEXTURE_CACHE=!1;var Kc=[];function iy(e,t){if(!e)return null;var n="";if(typeof e=="string"){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=Kc.length-1;i>=0;--i){var a=Kc[i];if(a.test&&a.test(e,n))return new a(e,t)}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 Yc=function(e,t){return Yc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Yc(e,t)};function Nt(e,t){Yc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Zc=function(){return Zc=Object.assign||function(t){for(var n=arguments,r,i=1,a=arguments.length;i<a;i++){r=n[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Zc.apply(this,arguments)};function fI(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n}var Ja=function(){function e(t,n){t===void 0&&(t=0),n===void 0&&(n=0),this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new pn("setRealSize"),this.onUpdate=new pn("update"),this.onError=new pn("onError")}return e.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},e.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},e.prototype.resize=function(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))},Object.defineProperty(e.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),e.prototype.update=function(){this.destroyed||this.onUpdate.emit()},e.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.style=function(t,n,r){return!1},e.prototype.dispose=function(){},e.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)},e.test=function(t,n){return!1},e}(),Zf=function(e){Nt(t,e);function t(n,r){var i=this,a=r||{},o=a.width,s=a.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return i=e.call(this,o,s)||this,i.data=n,i}return t.prototype.upload=function(n,r,i){var a=n.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===bi.UNPACK);var o=r.realWidth,s=r.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(r.target,0,0,0,o,s,r.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(r.target,0,i.internalFormat,o,s,0,r.format,i.type,this.data)),!0},t.prototype.dispose=function(){this.data=null},t.test=function(n){return n instanceof Float32Array||n instanceof Uint8Array||n instanceof Uint32Array},t}(Ja),dI={scaleMode:Dr.NEAREST,format:ge.RGBA,alphaMode:bi.NPM},rn=function(e){Nt(t,e);function t(n,r){n===void 0&&(n=null),r===void 0&&(r=null);var i=e.call(this)||this;r=r||{};var a=r.alphaMode,o=r.mipmap,s=r.anisotropicLevel,l=r.scaleMode,u=r.width,c=r.height,f=r.wrapMode,d=r.format,h=r.type,p=r.target,v=r.resolution,g=r.resourceOptions;return n&&!(n instanceof Ja)&&(n=iy(n,g),n.internal=!0),i.resolution=v||He.RESOLUTION,i.width=Math.round((u||0)*i.resolution)/i.resolution,i.height=Math.round((c||0)*i.resolution)/i.resolution,i._mipmap=o!==void 0?o:He.MIPMAP_TEXTURES,i.anisotropicLevel=s!==void 0?s:He.ANISOTROPIC_LEVEL,i._wrapMode=f||He.WRAP_MODE,i._scaleMode=l!==void 0?l:He.SCALE_MODE,i.format=d||ge.RGBA,i.type=h||vt.UNSIGNED_BYTE,i.target=p||eo.TEXTURE_2D,i.alphaMode=a!==void 0?a:bi.UNPACK,i.uid=Ya(),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.setReso
`).map(function(u,c){return c+": "+u}),r=e.getShaderInfoLog(t),i=r.split(`
`),a={},o=i.map(function(u){return parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(u){return u&&!a[u]?(a[u]=!0,!0):!1}),s=[""];o.forEach(function(u){n[u-1]="%c"+n[u-1]+"%c",s.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var l=n.join(`
`);s[0]=l,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,s),console.groupEnd()}function BI(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||_p(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||_p(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}function Du(e){for(var t=new Array(e),n=0;n<t.length;n++)t[n]=!1;return t}function fy(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return Du(2*t);case"bvec3":return Du(3*t);case"bvec4":return Du(4*t);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 dy={},ea=dy;function kI(){if(ea===dy||ea&&ea.isContextLost()){var e=document.createElement("canvas"),t=void 0;He.PREFER_ENV>=Xr.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),ea=t}return ea}var Gs;function DI(){if(!Gs){Gs=_r.MEDIUM;var e=kI();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);Gs=t.precision?_r.HIGH:_r.MEDIUM}}return Gs}function Tp(e,t,n){if(e.substring(0,9)!=="precision"){var r=t;return t===_r.HIGH&&n!==_r.HIGH&&(r=_r.MEDIUM),"precision "+r+` float;
`+e}else if(n!==_r.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}var GI={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 hy(e){return GI[e]}var Vs=null,wp={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 py(e,t){if(!Vs){var n=Object.keys(wp);Vs={};for(var r=0;r<n.length;++r){var i=n[r];Vs[e[i]]=wp[i]}}return Vs[t]}var Fo=[{test:function(e){return e.type==="float"&&e.size===1},code:function(e){return`
if(uv["`+e+'"] !== ud["'+e+`"].value)
{
ud["`+e+'"].value = uv["'+e+`"]
gl.uniform1f(ud["`+e+'"].location, uv["'+e+`"])
}
`}},{test:function(e){return(e.type==="sampler2D"||e.type==="samplerCube"||e.type==="sampler2DArray")&&e.size===1&&!e.isArray},code:function(e){return`t = syncData.textureCount++;
renderer.texture.bind(uv["`+e+`"], t);
if(ud["`+e+`"].value !== t)
{
ud["`+e+`"].value = t;
gl.uniform1i(ud["`+e+`"].location, t);
; // eslint-disable-line max-len
}`}},{test:function(e,t){return e.type==="mat3"&&e.size===1&&t.a!==void 0},code:function(e){return`
gl.uniformMatrix3fv(ud["`+e+'"].location, false, uv["'+e+`"].toArray(true));
`},codeUbo:function(e){return`
var `+e+"_matrix = uv."+e+`.toArray(true);
data[offset] = `+e+`_matrix[0];
data[offset+1] = `+e+`_matrix[1];
data[offset+2] = `+e+`_matrix[2];
data[offset + 4] = `+e+`_matrix[3];
data[offset + 5] = `+e+`_matrix[4];
data[offset + 6] = `+e+`_matrix[5];
data[offset + 8] = `+e+`_matrix[6];
data[offset + 9] = `+e+`_matrix[7];
data[offset + 10] = `+e+`_matrix[8];
`}},{test:function(e,t){return e.type==="vec2"&&e.size===1&&t.x!==void 0},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["`+e+`"].location, v.x, v.y);
}`},codeUbo:function(e){return`
v = uv.`+e+`;
data[offset] = v.x;
data[offset+1] = v.y;
`}},{test:function(e){return e.type==="vec2"&&e.size===1},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["`+e+`"].location, v[0], v[1]);
}
`}},{test:function(e,t){return e.type==="vec4"&&e.size===1&&t.width!==void 0},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
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["`+e+`"].location, v.x, v.y, v.width, v.height)
}`},codeUbo:function(e){return`
v = uv.`+e+`;
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`}},{test:function(e){return e.type==="vec4"&&e.size===1},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
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["`+e+`"].location, v[0], v[1], v[2], v[3])
}`}}],VI={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)"},$I={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 jI(e,t){var n,r=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(var i in e.uniforms){var a=t[i];if(!a){!((n=e.uniforms[i])===null||n===void 0)&&n.group&&(e.uniforms[i].ubo?r.push(`
renderer.shader.syncUniformBufferGroup(uv.`+i+", '"+i+`');
`):r.push(`
renderer.shader.syncUniformGroup(uv.`+i+`, syncData);
`));continue}for(var o=e.uniforms[i],s=!1,l=0;l<Fo.length;l++)if(Fo[l].test(a,o)){r.push(Fo[l].code(i,o)),s=!0;break}if(!s){var u=a.size===1?VI:$I,c=u[a.type].replace("location",'ud["'+i+'"].location');r.push(`
cu = ud["`+i+`"];
cv = cu.value;
v = uv["`+i+`"];
`+c+";")}}return new Function("ud","uv","renderer","syncData",r.join(`
`))}var HI=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function zI(e){for(var t="",n=0;n<e;++n)n>0&&(t+=`
else `),n<e-1&&(t+="if(test == "+n+".0){}");return t}function XI(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var n=t.createShader(t.FRAGMENT_SHADER);;){var r=HI.replace(/%forloop%/gi,zI(e));if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))e=e/2|0;else break}return e}var ta;function WI(){if(typeof ta=="boolean")return ta;try{var e=new Function("param1","param2","param3","return param1[param2] === param3;");ta=e({a:"b"},"a","b")===!0}catch{ta=!1}return ta}var KI=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`,YI=`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;
}
`,ZI=0,$s={},qf=function(){function e(t,n,r){r===void 0&&(r="pixi-shader"),this.id=ZI++,this.vertexSrc=t||e.defaultVertexSrc,this.fragmentSrc=n||e.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),$s[r]?($s[r]++,r+="-"+$s[r]):$s[r]=1,this.vertexSrc="#define SHADER_NAME "+r+`
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+r+`
`+this.fragmentSrc,this.vertexSrc=Tp(this.vertexSrc,He.PRECISION_VERTEX,_r.HIGH),this.fragmentSrc=Tp(this.fragmentSrc,He.PRECISION_FRAGMENT,DI())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(e,"defaultVertexSrc",{get:function(){return YI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return KI},enumerable:!1,configurable:!0}),e.from=function(t,n,r){var i=t+n,a=pp[i];return a||(pp[i]=a=new e(t,n,r)),a},e}(),vy=function(){function e(t,n){this.uniformBindCount=0,this.program=t,n?n instanceof Po?this.uniformGroup=n:this.uniformGroup=new Po(n):this.uniformGroup=new Po({})}return e.prototype.checkUniformExists=function(t,n){if(n.uniforms[t])return!0;for(var r in n.uniforms){var i=n.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},e.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(e.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),e.from=function(t,n,r){var i=qf.from(t,n);return new e(i,r)},e}(),Gu=0,Vu=1,$u=2,ju=3,Hu=4,zu=5,ed=function(){function e(){this.data=0,this.blendMode=Me.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(e.prototype,"blend",{get:function(){return!!(this.data&1<<Gu)},set:function(t){!!(this.data&1<<Gu)!==t&&(this.data^=1<<Gu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return!!(this.data&1<<Vu)},set:function(t){!!(this.data&1<<Vu)!==t&&(this.data^=1<<Vu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"culling",{get:function(){return!!(this.data&1<<$u)},set:function(t){!!(this.data&1<<$u)!==t&&(this.data^=1<<$u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthTest",{get:function(){return!!(this.data&1<<ju)},set:function(t){!!(this.data&1<<ju)!==t&&(this.data^=1<<ju)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthMask",{get:function(){return!!(this.data&1<<zu)},set:function(t){!!(this.data&1<<zu)!==t&&(this.data^=1<<zu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwiseFrontFace",{get:function(){return!!(this.data&1<<Hu)},set:function(t){!!(this.data&1<<Hu)!==t&&(this.data^=1<<Hu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==Me.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[@pixi/core:State "+("blendMode="+this.blendMode+" ")+("clockwiseFrontFace="+this.clockwiseFrontFace+" ")+("culling="+this.culling+" ")+("depthMask="+this.depthMask+" ")+("polygonOffset="+this.polygonOffset)+"]"},e.for2d=function(){var t=new e;return t.depthTest=!1,t.blend=!0,t},e}(),JI=`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();
}
`,QI=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`,qI=function(e){Nt(t,e);function t(n,r,i){var a=this,o=qf.from(n||t.defaultVertexSrc,r||t.defaultFragmentSrc);return a=e.call(this,o,i)||this,a.padding=0,a.resolution=He.FILTER_RESOLUTION,a.multisample=He.FILTER_MULTISAMPLE,a.enabled=!0,a.autoFit=!0,a.state=new ed,a}return t.prototype.apply=function(n,r,i,a,o){n.applyFilter(this,r,i,a)},Object.defineProperty(t.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(n){this.state.blendMode=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(n){this._resolution=n},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultVertexSrc",{get:function(){return JI},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return QI},enumerable:!1,configurable:!0}),t}(vy),eS=`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;
}
`,tS=`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;
}
`,Cp=new jn,nS=function(){function e(t,n){this._texture=t,this.mapCoord=new jn,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof n=="undefined"?.5:n,this.isSimple=!1}return Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),e.prototype.multiplyUvs=function(t,n){n===void 0&&(n=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var a=t[i],o=t[i+1];n[i]=a*r.a+o*r.c+r.tx,n[i+1]=a*r.b+o*r.d+r.ty}return n},e.prototype.update=function(t){var n=this._texture;if(!n||!n.valid||!t&&this._textureID===n._updateID)return!1;this._textureID=n._updateID,this._updateID++;var r=n._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=n.orig,a=n.trim;a&&(Cp.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(Cp));var o=n.baseTexture,s=this.uClampFrame,l=this.clampMargin/o.resolution,u=this.clampOffset;return s[0]=(n._frame.x+l+u)/o.width,s[1]=(n._frame.y+l+u)/o.height,s[2]=(n._frame.x+n._frame.width-l+u)/o.width,s[3]=(n._frame.y+n._frame.height-l+u)/o.height,this.uClampOffset[0]=u/o.realWidth,this.uClampOffset[1]=u/o.realHeight,this.isSimple=n._frame.width===o.width&&n._frame.height===o.height&&n.rotate===0,!0},e}(),rS=function(e){Nt(t,e);function t(n,r,i){var a=this,o=null;return typeof n!="string"&&r===void 0&&i===void 0&&(o=n,n=void 0,r=void 0,i=void 0),a=e.call(this,n||eS,r||tS,i)||this,a.maskSprite=o,a.maskMatrix=new jn,a}return Object.defineProperty(t.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(n){this._maskSprite=n,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),t.prototype.apply=function(n,r,i,a){var o=this._maskSprite,s=o._texture;!s.valid||(s.uvMatrix||(s.uvMatrix=new nS(s,0)),s.uvMatrix.update(),this.uniforms.npmAlpha=s.baseTexture.alphaMode?0:1,this.uniforms.mask=s,this.uniforms.otherMatrix=n.calculateSpriteMatrix(this.maskMatrix,o).prepend(s.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=s.uvMatrix.uClampFrame,n.applyFilter(this,r,i,a))},t}(qI),iS=function(){function e(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return e.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},e.prototype.push=function(t,n){var r=n;if(!r.isMaskData){var i=this.maskDataPool.pop()||new UI;i.pooled=!0,i.maskObject=n,r=i}var a=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(r.copyCountersOrReset(a),r.autoDetect&&this.detect(r),r._target=t,r.type!==hn.SPRITE&&this.maskStack.push(r),r.enabled)switch(r.type){case hn.SCISSOR:this.renderer.scissor.push(r);break;case hn.STENCIL:this.renderer.stencil.push(r);break;case hn.SPRITE:r.copyCountersOrReset(null),this.pushSpriteMask(r);break}r.type===hn.SPRITE&&this.maskStack.push(r)},e.prototype.pop=function(t){var n=this.maskStack.pop();if(!(!n||n._target!==t)){if(n.enabled)switch(n.type){case hn.SCISSOR:this.renderer.scissor.pop();break;case hn.STENCIL:this.renderer.stencil.pop(n.maskObject);break;case hn.SPRITE:this.popSpriteMask(n);break}if(n.reset(),n.pooled&&this.maskDataPool.push(n),this.maskStack.length!==0){var r=this.maskStack[this.maskStack.length-1];r.type===hn.SPRITE&&r._filters&&(r._filters[0].maskSprite=r.maskObject)}}},e.prototype.detect=function(t){var n=t.maskObject;n.isSprite?t.type=hn.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=hn.SCISSOR:t.type=hn.STENCIL},e.prototype.pushSpriteMask=function(t){var n,r,i=t.maskObject,a=t._target,o=t._filters;o||(o=this.alphaMaskPool[this.alphaMaskIndex],o||(o=this.alphaMaskPool[this.alphaMaskIndex]=[new rS]));var s=this.renderer,l=s.renderTexture,u,c;if(l.current){var f=l.current;u=t.resolution||f.resolution,c=(n=t.multisample)!==null&&n!==void 0?n:f.multisample}else u=t.resolution||s
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];
}
`},gy={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 fS(e){for(var t=e.map(function(l){return{data:l,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a<t.length;a++){var o=t[a];if(n=gy[o.data.type],o.data.size>1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function dS(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(i,a){return i.index-a.index}),n}function hS(e,t){if(!e.autoManage)return{size:0,syncFunc:uS};for(var n=dS(e.uniforms,t),r=fS(n),i=r.uboElements,a=r.size,o=[`
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=e.uniforms[l.data.name],c=l.data.name,f=!1,d=0;d<Fo.length;d++){var h=Fo[d];if(h.codeUbo&&h.test(l.data,u)){o.push("offset = "+l.offset/4+";",Fo[d].codeUbo(l.data.name,u)),f=!0;break}}if(!f)if(l.data.size>1){var p=hy(l.data.type),v=Math.max(gy[l.data.type]/16,1),g=p/v,y=(4-g%4)%4;o.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 < `+g+`; j++)
{
data[offset++] = v[t++];
}
offset += `+y+`;
}
`)}else{var m=cS[l.data.type];o.push(`
cv = ud.`+c+`.value;
v = uv.`+c+`;
offset = `+l.offset/4+`;
`+m+`;
`)}}return o.push(`
renderer.buffer.update(buffer);
`),{size:a,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
`))}}var pS=function(){function e(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function vS(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var a=t.getActiveAttrib(e,i);if(a.name.indexOf("gl_")!==0){var o=py(t,a.type),s={type:o,name:a.name,size:hy(o),location:t.getAttribLocation(e,a.name)};n[a.name]=s}}return n}function mS(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;i++){var a=t.getActiveUniform(e,i),o=a.name.replace(/\[.*?\]$/,""),s=!!a.name.match(/\[.*?\]$/),l=py(t,a.type);n[o]={name:o,index:i,type:l,size:a.size,isArray:s,value:fy(l,a.size)}}return n}function gS(e,t){var n=xp(e,e.VERTEX_SHADER,t.vertexSrc),r=xp(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();if(e.attachShader(i,n),e.attachShader(i,r),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||BI(e,i,n,r),t.attributeData=vS(i,e),t.uniformData=mS(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){var a=Object.keys(t.attributeData);a.sort(function(c,f){return c>f?1:-1});for(var o=0;o<a.length;o++)t.attributeData[a[o]].location=o,e.bindAttribLocation(i,o,a[o]);e.linkProgram(i)}e.deleteShader(n),e.deleteShader(r);var s={};for(var o in t.uniformData){var l=t.uniformData[o];s[o]={location:e.getUniformLocation(i,o),value:fy(l.type,l.size)}}var u=new pS(i,s);return u}var yS=0,js={textureCount:0,uboCount:0},bS=function(){function e(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=yS++}return e.prototype.systemCheck=function(){if(!WI())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,n){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(js.textureCount=0,js.uboCount=0,this.syncUniformGroup(t.uniformGroup,js)),i},e.prototype.setUniforms=function(t){var n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t,n){var r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))},e.prototype.syncUniforms=function(t,n,r){var i=t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t);i(n.uniformData,t.uniforms,this.renderer,r)},e.prototype.createSyncGroups=function(t){var n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=jI(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]},e.prototype.syncUniformBufferGroup=function(t,n){var r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;var i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,js,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])},e.prototype.createSyncBufferGroup=function(t,n,r){var i=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var a=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;var o=this.getSignature(t,this.shader.program.uniformData,"ubo"),s=this._uboCache[o];if(s||(s=this._uboCache[o]=hS(t,this.shader.program.uniformData)),t.autoManage){var l=new Float32Array(s.size/4);t.buffer.update(l)}return n.uniformGroups[t.id]=s.syncFunc,n.uniformGroups[t.id]},e.prototype.getSignature=function(t,n,r
`,n+=`
`;for(var r=0;r<t;r++)r>0&&(n+=`
else `),r<t-1&&(n+="if(vTextureId < "+r+".5)"),n+=`
{`,n+=`
color = texture2D(uSamplers[`+r+"], vTextureCoord);",n+=`
}`;return n+=`
`,n+=`
`,n},e}(),VS=function(e){Nt(t,e);function t(n){n===void 0&&(n=!1);var r=e.call(this)||this;return r._buffer=new Mn(null,n,!1),r._indexBuffer=new Mn(null,n,!0),r.addAttribute("aVertexPosition",r._buffer,2,!1,vt.FLOAT).addAttribute("aTextureCoord",r._buffer,2,!1,vt.FLOAT).addAttribute("aColor",r._buffer,4,!0,vt.UNSIGNED_BYTE).addAttribute("aTextureId",r._buffer,1,!0,vt.FLOAT).addIndex(r._indexBuffer),r}return t}(Qf),Ip=`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;
}
`,Sp=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`,$S=function(){function e(){}return e.create=function(t){var n=Object.assign({vertex:Ip,fragment:Sp,geometryClass:VS,vertexSize:6},t),r=n.vertex,i=n.fragment,a=n.vertexSize,o=n.geometryClass;return function(s){Nt(l,s);function l(u){var c=s.call(this,u)||this;return c.shaderGenerator=new GS(r,i),c.geometryClass=o,c.vertexSize=a,c}return l}(DS)},Object.defineProperty(e,"defaultVertexSrc",{get:function(){return Ip},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentTemplate",{get:function(){return Sp},enumerable:!1,configurable:!0}),e}();$S.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
*/He.SORTABLE_CHILDREN=!1;var Qc=function(){function e(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Zt.EMPTY:(t=t||new Zt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},e.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},e.prototype.addPointMatrix=function(t,n){var r=t.a,i=t.b,a=t.c,o=t.d,s=t.tx,l=t.ty,u=r*n.x+a*n.y+s,c=i*n.x+o*n.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)},e.prototype.addQuad=function(t){var n=this.minX,r=this.minY,i=this.maxX,a=this.maxY,o=t[0],s=t[1];n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[2],s=t[3],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[4],s=t[5],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[6],s=t[7],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,this.minX=n,this.minY=r,this.maxX=i,this.maxY=a},e.prototype.addFrame=function(t,n,r,i,a){this.addFrameMatrix(t.worldTransform,n,r,i,a)},e.prototype.addFrameMatrix=function(t,n,r,i,a){var o=t.a,s=t.b,l=t.c,u=t.d,c=t.tx,f=t.ty,d=this.minX,h=this.minY,p=this.maxX,v=this.maxY,g=o*n+l*r+c,y=s*n+u*r+f;d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*i+l*r+c,y=s*i+u*r+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*n+l*a+c,y=s*n+u*a+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*i+l*a+c,y=s*i+u*a+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,this.minX=d,this.minY=h,this.maxX=p,this.maxY=v},e.prototype.addVertexData=function(t,n,r){for(var i=this.minX,a=this.minY,o=this.maxX,s=this.maxY,l=n;l<r;l+=2){var u=t[l],c=t[l+1];i=u<i?u:i,a=c<a?c:a,o=u>o?u:o,s=c>s?c:s}this.minX=i,this.minY=a,this.maxX=o,this.maxY=s},e.prototype.addVertices=function(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)},e.prototype.addVerticesMatrix=function(t,n,r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=a);for(var s=t.a,l=t.b,u=t.c,c=t.d,f=t.tx,d=t.ty,h=this.minX,p=this.minY,v=this.maxX,g=this.maxY,y=r;y<i;y+=2){var m=n[y],b=n[y+1],T=s*m+u*b+f,S=c*b+l*m+d;h=Math.min(h,T-a),v=Math.max(v,T+a),p=Math.min(p,S-o),g=Math.max(g,S+o)}this.minX=h,this.minY=p,this.maxX=v,this.maxY=g},e.prototype.addBounds=function(t){var n=this.minX,r=this.minY,i=this.maxX,a=this.maxY;this.minX=t.minX<n?t.minX:n,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a},e.prototype.addBoundsMask=function(t,n){var r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,a=t.maxX<n.maxX?t.maxX:n.maxX,o=t.maxY<n.maxY?t.maxY:n.maxY;if(r<=a&&i<=o){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=r<s?r:s,this.minY=i<l?i:l,this.maxX=a>u?a:u,this.maxY=o>c?o:c}},e.prototype.addBoundsMatrix=function(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.addBoundsArea=function(t,n){var r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,a=t.maxX<n.x+n.width?t.maxX:n.x+n.width,o=t.maxY<n.y+n.height?t.maxY:n.y+n.height;if(r<=a&&i<=o){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=r<s?r:s,this.minY=i<l?i:l,this.maxX=a>u?a:u,this.maxY=o>c?o:c}},e.prototype.pad=function(t,n){t===void 0&&(t=0),n===void 0&&(n=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)},e.prototype.addFramePad=function(t,n,r,i,a,o){t-=a,n-=o,r+=a,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<n?this.minY:n,this.maxY=this.maxY>i?this.maxY:i},e}();/*! *****************************************************************************
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 qc=function(e,t){return qc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},qc(e,t)};function td(e,t){qc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ol=function(e){td(t,e);function t(){var n=e.call(this)||this;return n.tempDisplayObjectParent=null,n.transform=new cI,n.alpha=1,n.visible=!0,n.renderable=!0,n.cullable=!1,n.cullArea=null,n.parent=null,n.worldAlpha=1,n._lastSortedIndex=0,n._zIndex=0,n.filterArea=null,n.filters=null,n._enabledFilters=null,n._bounds=new Qc,n._localBounds=null,n._boundsID=0,n._boundsRect=null,n._localBoundsRect=null,n._mask=null,n._maskRefCount=0,n._destroyed=!1,n.isSprite=!1,n.isMask=!1,n}return t.mixin=function(n){for(var r=Object.keys(n),i=0;i<r.length;++i){var a=r[i];Object.defineProperty(t.prototype,a,Object.getOwnPropertyDescriptor(n,a))}},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),t.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},t.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},t.prototype.getBounds=function(n,r){return n||(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),r||(this._boundsRect||(this._boundsRect=new Zt),r=this._boundsRect),this._bounds.getRectangle(r)},t.prototype.getLocalBounds=function(n){n||(this._localBoundsRect||(this._localBoundsRect=new Zt),n=this._localBoundsRect),this._localBounds||(this._localBounds=new Qc);var r=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var a=this._bounds,o=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,n);return this.parent=i,this.transform=r,this._bounds=a,this._bounds.updateID+=this._boundsID-o,s},t.prototype.toGlobal=function(n,r,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(n,r)},t.prototype.toLocal=function(n,r,i,a){return r&&(n=r.toGlobal(n,i,a)),a||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(n,i)},t.prototype.setParent=function(n){if(!n||!n.addChild)throw new Error("setParent: Argument must be a Container");return n.addChild(this),n},t.prototype.setTransform=function(n,r,i,a,o,s,l,u,c){return n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1),a===void 0&&(a=1),o===void 0&&(o=0),s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0),this.position.x=n,this.position.y=r,this.scale.x=i||1,this.scale.y=a||1,this.rotation=o,this.skew.x=s,this.skew.y=l,this.pivot.x=u,this.pivot.y=c,this},t.prototype.destroy=function(n){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(t.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new jS),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),t.prototype.enableTempPar
* @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 Np;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Np||(Np={}));var Rp;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(Rp||(Rp={}));var Ap;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Ap||(Ap={}));var Op;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Op||(Op={}));var Pp;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Pp||(Pp={}));var Fp;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Fp||(Fp={}));var Mp;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Mp||(Mp={}));var Lp;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(Lp||(Lp={}));var Up;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(Up||(Up={}));var Bp;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Bp||(Bp={}));var kp;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(kp||(kp={}));var Dp;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(Dp||(Dp={}));var Gp;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Gp||(Gp={}));var Vp;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BL
* @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 tf=function(e,t){return tf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},tf(e,t)};function zS(e,t){tf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ra=new Yt,XS=new Uint16Array([0,1,2,0,2,3]),WS=function(e){zS(t,e);function t(n){var r=e.call(this)||this;return r._anchor=new ha(r._onAnchorUpdate,r,n?n.defaultAnchor.x:0,n?n.defaultAnchor.y:0),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=Me.NORMAL,r._cachedTint=16777215,r.uvs=null,r.texture=n||Gr.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.indices=XS,r.pluginName="batch",r.isSprite=!0,r._roundPixels=He.ROUND_PIXELS,r}return t.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ms(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ms(this.scale.y)*this._height/this._texture.orig.height)},t.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},t.prototype.calculateVertices=function(){var n=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===n._updateID)){this._textureID!==n._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=n._updateID;var r=this.transform.worldTransform,i=r.a,a=r.b,o=r.c,s=r.d,l=r.tx,u=r.ty,c=this.vertexData,f=n.trim,d=n.orig,h=this._anchor,p=0,v=0,g=0,y=0;if(f?(v=f.x-h._x*d.width,p=v+f.width,y=f.y-h._y*d.height,g=y+f.height):(v=-h._x*d.width,p=v+d.width,y=-h._y*d.height,g=y+d.height),c[0]=i*v+o*y+l,c[1]=s*y+a*v+u,c[2]=i*p+o*y+l,c[3]=s*y+a*p+u,c[4]=i*p+o*g+l,c[5]=s*g+a*p+u,c[6]=i*v+o*g+l,c[7]=s*g+a*v+u,this._roundPixels)for(var m=He.RESOLUTION,b=0;b<c.length;++b)c[b]=Math.round((c[b]*m|0)/m)}},t.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 n=this._texture,r=this.vertexTrimmedData,i=n.orig,a=this._anchor,o=this.transform.worldTransform,s=o.a,l=o.b,u=o.c,c=o.d,f=o.tx,d=o.ty,h=-a._x*i.width,p=h+i.width,v=-a._y*i.height,g=v+i.height;r[0]=s*h+u*v+f,r[1]=c*v+l*h+d,r[2]=s*p+u*v+f,r[3]=c*v+l*p+d,r[4]=s*p+u*g+f,r[5]=c*g+l*p+d,r[6]=s*h+u*g+f,r[7]=c*g+l*h+d},t.prototype._render=function(n){this.calculateVertices(),n.batch.setObjectRenderer(n.plugins[this.pluginName]),n.plugins[this.pluginName].render(this)},t.prototype._calculateBounds=function(){var n=this._texture.trim,r=this._texture.orig;!n||n.width===r.width&&n.height===r.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},t.prototype.getLocalBounds=function(n){return this.children.length===0?(this._localBounds||(this._localBounds=new Qc),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),n||(this._localBoundsRect||(this._localBoundsRect=new Zt),n=this._localBoundsRect),this._localBounds.getRectangle(n)):e.prototype.getLocalBounds.call(this,n)},t.prototype.containsPoint=function(n){this.worldTransform.applyInverse(n,ra);var r=this._texture.orig.width,i=this._texture.orig.height,a=-r*this.anchor.x,o=0;return ra.x>=a&&ra.x<a+r&&(o=-i*this.anchor.y,ra.y>=o&&ra.y<o+i)},t.prototype.destroy=function(n){e.prototype.destroy.call(this,n),this._texture.off("update",this._onTextureUpdate,this),this._anc
* @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 Tr{constructor(t,n,r){this.value=t,this.time=n,this.next=null,this.isStepped=!1,r?this.ease=typeof r=="function"?r:xy(r):this.ease=null}static createList(t){if("list"in t){const r=t.list;let i;const{value:a,time:o}=r[0],s=i=new Tr(typeof a=="string"?Hs(a):a,o,t.ease);if(r.length>2||r.length===2&&r[1].value!==a)for(let l=1;l<r.length;++l){const{value:u,time:c}=r[l];i.next=new Tr(typeof u=="string"?Hs(u):u,c),i=i.next}return s.isStepped=!!t.isStepped,s}const n=new Tr(typeof t.start=="string"?Hs(t.start):t.start,0);return t.end!==t.start&&(n.next=new Tr(typeof t.end=="string"?Hs(t.end):t.end,1)),n}}let Qa=Gr.from;const br=Math.PI/180;function jr(e,t){if(!e)return;const n=Math.sin(e),r=Math.cos(e),i=t.x*r-t.y*n,a=t.x*n+t.y*r;t.x=i,t.y=a}function au(e,t,n){return e<<16|t<<8|n}function yy(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function KS(e){const t=1/yy(e);e.x*=t,e.y*=t}function by(e,t){e.x*=t,e.y*=t}function Hs(e,t){t||(t={}),e.charAt(0)==="#"?e=e.substr(1):e.indexOf("0x")===0&&(e=e.substr(2));let n;return e.length===8&&(n=e.substr(0,2),e=e.substr(2)),t.r=parseInt(e.substr(0,2),16),t.g=parseInt(e.substr(2,2),16),t.b=parseInt(e.substr(4,2),16),n&&(t.a=parseInt(n,16)),t}function xy(e){const t=e.length,n=1/t;return function(r){const i=t*r|0,a=(r-i*n)*t,o=e[i]||e[t-1];return o.s+a*(2*(1-a)*(o.cp-o.s)+a*(o.e-o.s))}}function YS(e){return e?(e=e.toUpperCase().replace(/ /g,"_"),Me[e]||Me.NORMAL):Me.NORMAL}class Ku extends WS{constructor(t){super(),this.prevChild=this.nextChild=null,this.emitter=t,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(t){this.maxLife=t,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 St;(function(e){e[e.Spawn=0]="Spawn",e[e.Normal=2]="Normal",e[e.Late=5]="Late"})(St||(St={}));const Yu=Ui.shared,Fi=Symbol("Position particle per emitter position");class Tt{constructor(t,n){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 Yt,this.particlesPerWave=1,this.rotation=0,this.ownerPos=new Yt,this._prevEmitterPos=new Yt,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=t,n&&this.init(n),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}static registerBehavior(t){Tt.knownBehaviors[t.type]=t}get frequency(){return this._frequency}set frequency(t){typeof t=="number"&&t>0?this._frequency=t:this._frequency=1}get parent(){return this._parent}set parent(t){this.cleanup(),this._parent=t}init(t){if(!t)return;this.cleanup(),this._origConfig=t,this.minLifetime=t.lifetime.min,this.maxLifetime=t.lifetime.max,t.ease?this.customEase=typeof t.ease=="function"?t.ease:xy(t.ease):this.customEase=null,this.particlesPerWave=1,t.particlesPerWave&&t.particlesPerWave>1&&(this.particlesPerWave=t.particlesPerWave),this.frequency=t.frequency,this.spawnChance=typeof t.spawnChance=="number"&&t.spawnChance>0?t.spawnChance:1,this.emitterLifetime=t.emitterLifetime||-1,this.maxParticles=t.maxParticles>0?t.maxParticles:1e3,this.addAtBack=!!t.addAtBack,this.rotation=0,this.ownerPos.set(0),t.pos?this.spawnPos.copyFrom(t.pos):this.spawnPos.set(0),this._prevEmitterPos.copyFrom(this.spawnPos),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=t.emit===void 0?!0:
* @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 wy=function(){function e(t){var n=this;this.stage=new Pl,t=Object.assign({forceCanvas:!1},t),this.renderer=LS(t),e._plugins.forEach(function(r){r.init.call(n,t)})}return e.registerPlugin=function(t){e._plugins.push(t)},e.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(e.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,n){var r=this,i=e._plugins.slice(0);i.reverse(),i.forEach(function(a){a.destroy.call(r)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null},e._plugins=[],e}(),oN=function(){function e(){}return e.init=function(t){var n=this;Object.defineProperty(this,"resizeTo",{set:function(r){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=r,r&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){!n._resizeTo||(n.cancelResize(),n._resizeId=requestAnimationFrame(function(){return n.resize()}))},this.cancelResize=function(){n._resizeId&&(cancelAnimationFrame(n._resizeId),n._resizeId=null)},this.resize=function(){if(!!n._resizeTo){n.cancelResize();var r,i;if(n._resizeTo===globalThis.window)r=globalThis.innerWidth,i=globalThis.innerHeight;else{var a=n._resizeTo,o=a.clientWidth,s=a.clientHeight;r=o,i=s}n.renderer.resize(r,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e}();wy.registerPlugin(oN);var aN=Ie({props:{style:q(String,Object,Array),classes:q(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=Te(null),n=new ResizeObserver(a),r=Te(null);vr(()=>{var s,l;const o=r.value;o!=null&&(n.observe(o),t.value=new wy({resizeTo:o,backgroundAlpha:0}),(s=r.value)==null||s.appendChild(t.value.view),(l=e.onInit)==null||l.call(e,t.value)),a(),e.onHotReload&&tn(e.onHotReload)}),as(()=>{var o;(o=t.value)==null||o.destroy()});let i=!0;function a(){i&&(i=!1,tn(()=>{var o;r.value!=null&&e.onContainerResized&&(e.onContainerResized(r.value.getBoundingClientRect()),(o=t.value)==null||o.resize()),i=!0}))}return document.fonts.ready.then(a),{unref:x,resizeListener:r}}});function sN(e,t,n,r,i,a){return M(),W("div",{ref:"resizeListener",class:ze(["resize-listener",e.unref(e.classes)]),style:tt(e.unref(e.style))},null,6)}var lN=Qe(aN,[["render",sN],["__scopeId","data-v-8adf21fa"]]);const uN=Symbol("Particles");function cN(e){return an(()=>{var i,a;const t=(i=e==null?void 0:e())!=null?i:{};t.id=_n("particles-"),t.type=uN,t[Jt]=lN,t.app=An(null),t.addEmitter=o=>{const s=t;return s.app.value?Promise.resolve(new Tt(s.app.value.stage,o)):new Promise(l=>{n.push({resolve:l,config:o})})};let n=[];function r(o){t.app.value=o,n.forEach(({resolve:s,config:l})=>s(new Tt(o.stage,l))),n=[]}return t.onContainerResized=(a=t.onContainerResized)==null?void 0:a.bind(t),t[nn]=function(){const{id:o,style:s,classes:l,onContainerResized:u,onHotReload:c}=this;return{id:o,style:x(s),classes:l,onContainerResized:u,onHotReload:c,onInit:r}},t})}window.upgradeConfig=iN;const fN=Symbol("Reset");function Cy(e){return an(()=>{const t=e();return t.id=_n("reset-"),t.type=fN,t.reset=function(){var r;const n=i=>{i&&typeof i=="object"&&(ka in i?i[ka].value=i[Da]:!(i instanceof O)&&!et(i)&&Object.values(i).forEach(a=>n(a)))};x(t.thingsToReset).forEach(n),sn.emit("reset",t),(r=t.onReset)==null||r.call(t)},H(t,"thingsToReset"),t})}const zs={};sn.on("removeLayer",e=>{var t;(t=zs[e.id])==null||t.call(zs),zs[e.id]=void 0});const dN=Ie({__name:"Sticky",setup(e){const t=Te("0"),n=new ResizeObserver(i),r=Te(null);function i(){let a=r.value;if(a==null)return;let o=0;for(;a.previousSibling;){const s=a.previousSibling;s.dataset&&
Reward: The dinosaur is now your friend (you can max Farm Points).`,shouldEarn:function(){return O.gte(xr.points.value,1)},onComplete(){console.log("Bork bork bork!")}})),s=[i,a,o],l=ZC(()=>({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"),it(()=>C(At,un({display:JSON.stringify(this.cells[c].style)},{[f]:!0}),{default:()=>[C("h3",null,[le("Gridable #"),c])]}))},getDisplay(c,f){return String(f)},getCanClick(){return O.eq(yt.points.value,10)},onClick(c,f){this.cells[c].state=Number(f)+1}})),u=it(()=>{let c,f,d;return C(Oe,null,[C(wa,null,{default:()=>[C(At,{display:i.tooltip,bottom:!0},qu(c=Bt(i))?c:{default:()=>[c]}),C(At,{display:a.tooltip,bottom:!0},qu(f=Bt(a))?f:{default:()=>[f]}),C(At,{display:o.tooltip,bottom:!0},qu(d=Bt(o))?d:{default:()=>[d]})]}),tr(l)])});return{id:Yp,color:e,name:t,points:n,achievements:s,grid:l,treeNode:r,display:u}}),yt=ss("main",()=>{const e=Ga(10),t=Tg(e),n=g2(e),r=J(()=>{if(!nr.generatorUpgrade.bought.value)return new O(0);let l=new O(3.19);return nr.lollipopMultiplierUpgrade.bought.value&&(l=l.times(nr.lollipopMultiplierEffect.value)),l});sn.on("update",l=>{e.value=O.add(e.value,O.times(r.value,l))});const i=x2(e,r),{openModal:a,modal:o}=ng(rf),s=Cg(()=>({nodes:[[nr.treeNode],[xr.treeNode,nr.spook]],leftSideNodes:[rf.treeNode,nr.h],branches:[{startNode:xr.treeNode,endNode:nr.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=ot(this.resettingNode.value)===ot(nr.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:B2}));return{name:"Tree",display:it(()=>C(Oe,null,[xe.devSpeed===0?C("div",null,[le("Game Paused")]):null,xe.devSpeed&&xe.devSpeed!==1?C("div",null,[le("Dev Speed: "),kt(xe.devSpeed),le("x")]):null,xe.offlineTime?C("div",null,[le("Offline Time: "),Ql(xe.offlineTime)]):null,C("div",null,[O.lt(e.value,"1e1000")?C("span",null,[le("You have ")]):null,C("h2",null,[kt(e.value)]),O.lt(e.value,"1e1e6")?C("span",null,[le(" points")]):null]),O.gt(r.value,0)?C("div",null,[le("("),i.value,le(")")]):null,C(En,null,null),C("button",{onClick:a},[le("open achievements")]),Bt(o),Bt(s),C(m2,{height:"200px",style:"margin: 10px auto; display: block"},null)])),points:e,best:t,total:n,oomps:i,tree:s,showAchievements:a}}),xR=e=>[yt,xr,nr,rf],Id=J(()=>O.gt(yt.points.value,25));function _R(e,t){}var Ny=Object.freeze(Object.defineProperty({__proto__:null,main:yt,getInitialLayers:xR,hasWon:Id,fixOldSave:_R},Symbol.toStringTag,{value:"Module"}));const ds=e=>(hr("data-v-4a50ce42"),e=e(),pr(),e),TR={class:"game-over-modal-header"},wR=["src","alt"],CR={class:"game-over-modal-title"},ER=ds(()=>P("h2",null,"Congratulations!",-1)),IR={key:0},SR=ds(()=>P("br",null,null,-1)),NR=ds(()=>P("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),RR=ds(()=>P("br",null,null,-1)),AR=["href"],OR=ds(()=>P("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),PR=Ie({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:a,versionTitle:o}=_t,s=J(()=>Ql(xe.timePlayed)),l=J(()=>Id.value&&!xe.keepGoing),u=Sn(xe,"autosave");function c(){xe.keepGoing=!0}function f(){Wi(Ro())}return(d,h)=>(M(),we(wi,{"model-value":x(l)},{header:Pe(()=>[P("div",TR,[x(n)?(M(),W("img",{key:0,class:"game-over-modal-logo",src:x(n),alt:x(t)},null,8,wR)):ve("",!0),P("div",CR,[ER,P("h4",null,"You've beaten "+Je(x(t))+" v"+Je(x(a))+": "+Je(x(o)),1)])])]),body:Pe(({shown:p})=>[p?(M(),W("div",IR,[P("div",null,"It took you "+Je(x(s))+" to beat the game.",1),SR,NR,RR,P("div",null,[P("a",{href:x(i),class:"game-over-modal-discord-link"},[OR,le(" "+Je(x(r)),1)],8,AR)]),C(Bn,{title:"Autosave",modelValue:x(u),"onUpdate:modelValue":h[0]||(h[0]=v=>et(u)?u.value=v:null)},null,8,["modelValue"])])):ve("",!0)]),footer:Pe(()=>[P("div",{class:"game-over-footer"},[P("button",{onClick:c,class:"button"},"Keep Going"),P("button",{onClick:f,class:"button dange
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.2"]&&_()}catch{}var ec=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function tc(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var ia=function(e,t){this.type=e,Object.assign(this,t)};function Ks(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function JR(){}var QR={type:"SKIP_WAITING"};function Jp(e,t){if(!t)return e&&e.then?e.then(JR):Promise.resolve()}var qR=function(e){var t,n;function r(s,l){var u,c;return l===void 0&&(l={}),(u=e.call(this)||this).nn={},u.tn=0,u.rn=new ec,u.en=new ec,u.on=new ec,u.un=0,u.an=new Set,u.cn=function(){var f=u.fn,d=f.installing;u.tn>0||!tc(d.scriptURL,u.sn.toString())||performance.now()>u.un+6e4?(u.vn=d,f.removeEventListener("updatefound",u.cn)):(u.hn=d,u.an.add(d),u.rn.resolve(d)),++u.tn,d.addEventListener("statechange",u.ln)},u.ln=function(f){var d=u.fn,h=f.target,p=h.state,v=h===u.vn,g={sw:h,isExternal:v,originalEvent:f};!v&&u.mn&&(g.isUpdate=!0),u.dispatchEvent(new ia(p,g)),p==="installed"?u.wn=self.setTimeout(function(){p==="installed"&&d.waiting===h&&u.dispatchEvent(new ia("waiting",g))},200):p==="activating"&&(clearTimeout(u.wn),v||u.en.resolve(h))},u.dn=function(f){var d=u.hn,h=d!==navigator.serviceWorker.controller;u.dispatchEvent(new ia("controlling",{isExternal:h,originalEvent:f,sw:d,isUpdate:u.mn})),h||u.on.resolve(d)},u.gn=(c=function(f){var d=f.data,h=f.ports,p=f.source;return Ks(u.getSW(),function(){u.an.has(p)&&u.dispatchEvent(new ia("message",{data:d,originalEvent:f,ports:h,sw:p}))})},function(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];try{return Promise.resolve(c.apply(this,f))}catch(h){return Promise.reject(h)}}),u.sn=s,u.nn=l,navigator.serviceWorker.addEventListener("message",u.gn),u}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.register=function(s){var l=(s===void 0?{}:s).immediate,u=l!==void 0&&l;try{var c=this;return function(f,d){var h=f();return h&&h.then?h.then(d):d(h)}(function(){if(!u&&document.readyState!=="complete")return Jp(new Promise(function(f){return window.addEventListener("load",f)}))},function(){return c.mn=Boolean(navigator.serviceWorker.controller),c.yn=c.pn(),Ks(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 d=c.fn.waiting;return d&&tc(d.scriptURL,c.sn.toString())&&(c.hn=d,Promise.resolve().then(function(){c.dispatchEvent(new ia("waiting",{sw:d,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)}},o.update=function(){try{return this.fn?Jp(this.fn.update()):void 0}catch(s){return Promise.reject(s)}},o.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(s){try{return Ks(this.getSW(),function(l){return of(l,s)})}catch(l){return Promise.reject(l)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&of(this.fn.waiting,QR)},o.pn=function(){var s=navigator.serviceWorker.controller;return s&&tc(s.scriptURL,this.sn.toString())?s:void 0},o.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 Ks(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=r,(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&YR(i.prototype,a),r}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(n,r){this.Sn(n).add(r)},t.removeEventListener=function(n,r){this.Sn(n).delete(r)},t.dispatchEvent=function(n){n.target=this;for(var
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 Bx();const{globalBus:e,startGameLoop:t}=await sl(()=>Promise.resolve().then(function(){return Lx}),void 0),n=window.vue=Pf(KR);e.emit("setupVue",n),n.mount("#app"),tn(()=>{const r=Kf(),{updateServiceWorker:i}=tA({onNeedRefresh(){r.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(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(a.update,60*60*1e3)}})}),t()});