mirror of
https://github.com/thepaperpilot/Super-Auto-Coots.git
synced 2024-11-28 11:01:35 +00:00
15 lines
134 KiB
JavaScript
15 lines
134 KiB
JavaScript
/* empty css */import"./vue.f6263579.js";import{Z as x,q as st,C as u,t as w,b1 as fe,aa as U,aE as h,a0 as B,a1 as c,aK as _e,G as ae,w as ye,b2 as St,a8 as o,O as Y,ay as Mt,ar as qe,aG as ot,A as be,_ as O,b6 as R,b8 as kt,bs as _a,aq as tt,bu as at,bb as ta,T as Qa,a7 as v,u as Tt,j as Sa,l as Ce,bv as Bt,aL as Ma,$ as M,aN as ce,J as F,I as Xe,aH as Qe,aF as Se,z as ze,br as ka,aJ as Ta,al as Ut,aC as Da,au as Ra,bc as lt,ao as Va,bn as Pa,be as xa}from"./@vue.4ce677c2.js";import{c as aa}from"./nanoevents.1080beb7.js";import{L as Ie}from"./lz-string.f2f3b7cf.js";import{D as qa}from"./vuedraggable.c3acdf62.js";import{Y as za}from"./vue-next-select.0dc4e443.js";import{p as Fa}from"./vue-textarea-autosize.35804eaf.js";import{s as Ga}from"./semver.83ff78cf.js";import{l as Oa}from"./socket.io-client.79ce0df5.js";import{u as na,s as Ua}from"./vue-toastification.b7cd620e.js";import{A as ia,T as La,R as Ja,B as Ya,u as Wa,E as Lt}from"./@pixi.1eac1889.js";import{v as Xa,n as Ka}from"./workbox-window.8d14e8b7.js";import"./earcut.b6f90e68.js";import"./sortablejs.cbae5b2d.js";import"./lru-cache.9a21e90b.js";import"./yallist.fd762fe7.js";import"./engine.io-client.58517560.js";import"./engine.io-parser.3f360695.js";import"./@socket.io.aec831e2.js";import"./socket.io-parser.544e37d1.js";import"./ismobilejs.5c6954b9.js";import"./eventemitter3.dc5195d7.js";import"./url.e51cb87b.js";import"./querystring.23ae9a54.js";const ja=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function a(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}};ja();const Ha="modulepreload",Jt={},Za="./",gt=function(t,a){return!a||a.length===0?t():Promise.all(a.map(n=>{if(n=`${Za}${n}`,n in Jt)return;Jt[n]=!0;const i=n.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":Ha,i||(r.as="script",r.crossOrigin=""),r.href=n,document.head.appendChild(r),i)return new Promise((l,g)=>{r.addEventListener("load",l),r.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},$a="./projInfo-schema.json",en="Super Auto Coots",tn="A project made in Profectus",an="superautocoots",nn="thepaperpilot and crea",sn="",rn="",on="0.0.0",ln="Initial Commit",An=!1,un=!1,cn=2,dn=!0,gn=null,mn="",fn=["main"],hn=3600,vn=1,pn=!0,yn="base64";var G={$schema:$a,title:en,description:tn,id:an,author:nn,discordName:sn,discordLink:rn,versionNumber:on,versionTitle:ln,allowGoBack:An,defaultShowSmall:un,defaultDecimalsShown:cn,useHeader:dn,banner:gn,logo:mn,initialTabs:fn,maxTickLength:hn,offlineLimit:vn,enablePausing:pn,exportEncoding:yn};class bn{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const a=this.map.get(t);if(a!==void 0)return a!==this.first&&(a===this.last?(this.last=a.prev,this.last.next=void 0):(a.prev.next=a.next,a.next.prev=a.prev),a.next=this.first,this.first.prev=a,this.first=a),a.value}set(t,a){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const n=new Cn(t,a);for(this.first===void 0?(this.first=n,this.last=n):(n.next=this.first,this.first.prev=n,this.first=n),this.map.set(t,n);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class Cn{constructor(t,a){this.next=void 0,this.prev=void 0,this.key=t,this.value=a}}const Ct=17,Nn=9e15,Bn=Math.log10(9e15),En=1/9e15,wn=308,In=-324,Yt=5,_n=(1<<10)-1,Qn=function(){const e=[];for(let a=In+1;a<=wn;a++)e.push(Number("1e"+a));const t=323;return function(a){return e[a+t]}}(),ke=[2,Math.E,3,4,5,6,7,8,9,10],Sn=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Mn=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let d=function(t){return E.fromValue_noAlloc(t)},k=function(e,t,a){return E.fromComponents(e,t,a)},D=function(t,a,n){return E.fromComponents_noNormalize(t,a,n)};const Ee=function(t,a){const n=a+1,i=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,n-i))*Math.pow(10,i-n);return parseFloat(s.toFixed(Math.max(n-i,0)))},Nt=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},kn=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let a=.9189385332046727;a=a+(e+.5)*Math.log(e),a=a-e;const n=e*e;let i=e;return a=a+1/(12*i),i=i*n,a=a+1/(360*i),i=i*n,a=a+1/(1260*i),i=i*n,a=a+1/(1680*i),i=i*n,a=a+1/(1188*i),i=i*n,a=a+691/(360360*i),i=i*n,a=a+7/(1092*i),i=i*n,a=a+3617/(122400*i),Math.exp(a)/t},sa=.5671432904097838,Wt=function(e,t=1e-10){let a,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return sa;e<10?a=0:a=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(n=(e*Math.exp(-a)+a*a)/(a+1),Math.abs(n-a)<t*Math.abs(n))return n;a=n}throw Error(`Iteration failed to converge: ${e.toString()}`)};function Xt(e,t=1e-10){let a,n,i,s;if(!Number.isFinite(e.mag)||e.eq(E.dZero))return e;if(e.eq(E.dOne))return E.fromNumber(sa);a=E.ln(e);for(let r=0;r<100;++r){if(n=a.neg().exp(),i=a.sub(e.mul(n)),s=a.sub(i.div(a.add(1).sub(a.add(2).mul(i).div(E.mul(2,a).add(2))))),E.abs(s.sub(a)).lt(E.abs(s).mul(t)))return s;a=s}throw Error(`Iteration failed to converge: ${e.toString()}`)}const A=class{constructor(e){this.sign=0,this.mag=0,this.layer=0,e instanceof A?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"&&this.fromString(e)}get m(){if(this.sign===0)return 0;if(this.layer===0){const e=Math.floor(Math.log10(this.mag));let t;return this.mag===5e-324?t=5:t=this.mag/Qn(e),this.sign*t}else if(this.layer===1){const e=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,e)}else return this.sign}set m(e){this.layer<=2?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),this.sign===0&&(this.layer=0,this.exponent=0))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){e===0?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,t,a){return new A().fromComponents(e,t,a)}static fromComponents_noNormalize(e,t,a){return new A().fromComponents_noNormalize(e,t,a)}static fromMantissaExponent(e,t){return new A().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new A().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new A().fromDecimal(e)}static fromNumber(e){return new A().fromNumber(e)}static fromString(e){return new A().fromString(e)}static fromValue(e){return new A().fromValue(e)}static fromValue_noAlloc(e){if(e instanceof A)return e;if(typeof e=="string"){const t=A.fromStringCache.get(e);return t!==void 0?t:A.fromString(e)}else return typeof e=="number"?A.fromNumber(e):A.dZero}static abs(e){return d(e).abs()}static neg(e){return d(e).neg()}static negate(e){return d(e).neg()}static negated(e){return d(e).neg()}static sign(e){return d(e).sign}static sgn(e){return d(e).sign}static round(e){return d(e).round()}static floor(e){return d(e).floor()}static ceil(e){return d(e).ceil()}static trunc(e){return d(e).trunc()}static add(e,t){return d(e).add(t)}static plus(e,t){return d(e).add(t)}static sub(e,t){return d(e).sub(t)}static subtract(e,t){return d(e).sub(t)}static minus(e,t){return d(e).sub(t)}static mul(e,t){return d(e).mul(t)}static multiply(e,t){return d(e).mul(t)}static times(e,t){return d(e).mul(t)}static div(e,t){return d(e).div(t)}static divide(e,t){return d(e).div(t)}static recip(e){return d(e).recip()}static reciprocal(e){return d(e).recip()}static reciprocate(e){return d(e).reciprocate()}static cmp(e,t){return d(e).cmp(t)}static cmpabs(e,t){return d(e).cmpabs(t)}static compare(e,t){return d(e).cmp(t)}static isNaN(e){return e=d(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=d(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return d(e).eq(t)}static equals(e,t){return d(e).eq(t)}static neq(e,t){return d(e).neq(t)}static notEquals(e,t){return d(e).notEquals(t)}static lt(e,t){return d(e).lt(t)}static lte(e,t){return d(e).lte(t)}static gt(e,t){return d(e).gt(t)}static gte(e,t){return d(e).gte(t)}static max(e,t){return d(e).max(t)}static min(e,t){return d(e).min(t)}static minabs(e,t){return d(e).minabs(t)}static maxabs(e,t){return d(e).maxabs(t)}static clamp(e,t,a){return d(e).clamp(t,a)}static clampMin(e,t){return d(e).clampMin(t)}static clampMax(e,t){return d(e).clampMax(t)}static cmp_tolerance(e,t,a){return d(e).cmp_tolerance(t,a)}static compare_tolerance(e,t,a){return d(e).cmp_tolerance(t,a)}static eq_tolerance(e,t,a){return d(e).eq_tolerance(t,a)}static equals_tolerance(e,t,a){return d(e).eq_tolerance(t,a)}static neq_tolerance(e,t,a){return d(e).neq_tolerance(t,a)}static notEquals_tolerance(e,t,a){return d(e).notEquals_tolerance(t,a)}static lt_tolerance(e,t,a){return d(e).lt_tolerance(t,a)}static lte_tolerance(e,t,a){return d(e).lte_tolerance(t,a)}static gt_tolerance(e,t,a){return d(e).gt_tolerance(t,a)}static gte_tolerance(e,t,a){return d(e).gte_tolerance(t,a)}static pLog10(e){return d(e).pLog10()}static absLog10(e){return d(e).absLog10()}static log10(e){return d(e).log10()}static log(e,t){return d(e).log(t)}static log2(e){return d(e).log2()}static ln(e){return d(e).ln()}static logarithm(e,t){return d(e).logarithm(t)}static pow(e,t){return d(e).pow(t)}static pow10(e){return d(e).pow10()}static pow_base(e,t){return d(e).pow_base(t)}static root(e,t){return d(e).root(t)}static factorial(e,t){return d(e).factorial()}static gamma(e,t){return d(e).gamma()}static lngamma(e,t){return d(e).lngamma()}static exp(e){return d(e).exp()}static sqr(e){return d(e).sqr()}static sqrt(e){return d(e).sqrt()}static cube(e){return d(e).cube()}static cbrt(e){return d(e).cbrt()}static tetrate(e,t=2,a=D(1,0,1)){return d(e).tetrate(t,a)}static iteratedexp(e,t=2,a=D(1,0,1)){return d(e).iteratedexp(t,a)}static iteratedlog(e,t=10,a=1){return d(e).iteratedlog(t,a)}static layeradd10(e,t){return d(e).layeradd10(t)}static layeradd(e,t,a=10){return d(e).layeradd(t,a)}static slog(e,t=10){return d(e).slog(t)}static lambertw(e){return d(e).lambertw()}static ssqrt(e){return d(e).ssqrt()}static pentate(e,t=2,a=D(1,0,1)){return d(e).pentate(t,a)}static sin(e){return d(e).sin()}static cos(e){return d(e).cos()}static tan(e){return d(e).tan()}static asin(e){return d(e).asin()}static acos(e){return d(e).acos()}static atan(e){return d(e).atan()}static sinh(e){return d(e).sinh()}static cosh(e){return d(e).cosh()}static tanh(e){return d(e).tanh()}static asinh(e){return d(e).asinh()}static acosh(e){return d(e).acosh()}static atanh(e){return d(e).atanh()}static affordGeometricSeries(e,t,a,n){return this.affordGeometricSeries_core(d(e),d(t),d(a),n)}static sumGeometricSeries(e,t,a,n){return this.sumGeometricSeries_core(e,d(t),d(a),n)}static affordArithmeticSeries(e,t,a,n){return this.affordArithmeticSeries_core(d(e),d(t),d(a),d(n))}static sumArithmeticSeries(e,t,a,n){return this.sumArithmeticSeries_core(d(e),d(t),d(a),d(n))}static efficiencyOfPurchase(e,t,a){return this.efficiencyOfPurchase_core(d(e),d(t),d(a))}static randomDecimalForTesting(e){if(Math.random()*20<1)return D(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return D(t,0,1);const a=Math.floor(Math.random()*(e+1));let n=a===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let i=Math.pow(10,n);return Math.random()>.9&&(i=Math.trunc(i)),k(t,a,i)}static affordGeometricSeries_core(e,t,a,n){const i=t.mul(a.pow(n));return A.floor(e.div(i).mul(a.sub(1)).add(1).log10().div(a.log10()))}static sumGeometricSeries_core(e,t,a,n){return t.mul(a.pow(n)).mul(A.sub(1,a.pow(e))).div(A.sub(1,a))}static affordArithmeticSeries_core(e,t,a,n){const s=t.add(n.mul(a)).sub(a.div(2)),r=s.pow(2);return s.neg().add(r.add(a.mul(e).mul(2)).sqrt()).div(a).floor()}static sumArithmeticSeries_core(e,t,a,n){const i=t.add(n.mul(a));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(a)))}static efficiencyOfPurchase_core(e,t,a){return e.div(t).add(e.div(a))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag<En)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=Nn)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Bn&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,a){return this.sign=e,this.layer=t,this.mag=a,this.normalize(),this}fromComponents_noNormalize(e,t,a){return this.sign=e,this.layer=t,this.mag=a,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,a=A.fromStringCache.get(t);if(a!==void 0)return this.fromDecimal(a);e=e.replace(",","");const n=e.split("^^^");if(n.length===2){const _=parseFloat(n[0]),Q=parseFloat(n[1]),S=n[1].split(";");let H=1;if(S.length===2&&(H=parseFloat(S[1]),isFinite(H)||(H=1)),isFinite(_)&&isFinite(Q)){const b=A.pentate(_,Q,H);return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}const i=e.split("^^");if(i.length===2){const _=parseFloat(i[0]),Q=parseFloat(i[1]),S=i[1].split(";");let H=1;if(S.length===2&&(H=parseFloat(S[1]),isFinite(H)||(H=1)),isFinite(_)&&isFinite(Q)){const b=A.tetrate(_,Q,H);return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}const s=e.split("^");if(s.length===2){const _=parseFloat(s[0]),Q=parseFloat(s[1]);if(isFinite(_)&&isFinite(Q)){const S=A.pow(_,Q);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}e=e.trim().toLowerCase();let r,l,g=e.split("pt");if(g.length===2){r=10,l=parseFloat(g[0]),g[1]=g[1].replace("(",""),g[1]=g[1].replace(")","");let _=parseFloat(g[1]);if(isFinite(_)||(_=1),isFinite(r)&&isFinite(l)){const Q=A.tetrate(r,l,_);return this.sign=Q.sign,this.layer=Q.layer,this.mag=Q.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}if(g=e.split("p"),g.length===2){r=10,l=parseFloat(g[0]),g[1]=g[1].replace("(",""),g[1]=g[1].replace(")","");let _=parseFloat(g[1]);if(isFinite(_)||(_=1),isFinite(r)&&isFinite(l)){const Q=A.tetrate(r,l,_);return this.sign=Q.sign,this.layer=Q.layer,this.mag=Q.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}const f=e.split("e"),y=f.length-1;if(y===0){const _=parseFloat(e);if(isFinite(_))return this.fromNumber(_),A.fromStringCache.size>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}else if(y===1){const _=parseFloat(e);if(isFinite(_)&&_!==0)return this.fromNumber(_),A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}const p=e.split("e^");if(p.length===2){this.sign=1,p[0].charAt(0)=="-"&&(this.sign=-1);let _="";for(let Q=0;Q<p[1].length;++Q){const S=p[1].charCodeAt(Q);if(S>=43&&S<=57||S===101)_+=p[1].charAt(Q);else return this.layer=parseFloat(_),this.mag=parseFloat(p[1].substr(Q+1)),this.normalize(),A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}}if(y<1)return this.sign=0,this.layer=0,this.mag=0,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this;const C=parseFloat(f[0]);if(C===0)return this.sign=0,this.layer=0,this.mag=0,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this;let N=parseFloat(f[f.length-1]);if(y>=2){const _=parseFloat(f[f.length-2]);isFinite(_)&&(N*=Math.sign(_),N+=Nt(_))}if(!isFinite(C))this.sign=f[0]==="-"?-1:1,this.layer=y,this.mag=N;else if(y===1)this.sign=Math.sign(C),this.layer=1,this.mag=N+Math.log10(Math.abs(C));else if(this.sign=Math.sign(C),this.layer=y,y===2){const _=A.mul(k(1,2,N),d(C));return this.sign=_.sign,this.layer=_.layer,this.mag=_.mag,A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}else this.mag=N;return this.normalize(),A.fromStringCache.maxSize>=1&&A.fromStringCache.set(t,A.fromDecimal(this)),this}fromValue(e){return e instanceof A?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Ee(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Ee(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=Yt?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Ee(this.m,e)+"e"+Ee(this.e,e):this.layer===1?Ee(this.m,e)+"e"+Ee(this.e,e):this.layer<=Yt?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Ee(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Ee(this.mag,e)}abs(){return D(this.sign===0?0:1,this.layer,this.mag)}neg(){return D(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?A.dZero:this.layer===0?k(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?A.dZero:this.layer===0?k(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?A.dZero:this.layer===0?k(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?A.dZero:this.layer===0?k(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=d(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return D(0,0,0);let a,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(A.cmpabs(this,t)>0?(a=this,n=t):(a=t,n=this),a.layer===0&&n.layer===0)return A.fromNumber(a.sign*a.mag+n.sign*n.mag);const i=a.layer*Math.sign(a.mag),s=n.layer*Math.sign(n.mag);if(i-s>=2)return a;if(i===0&&s===-1){if(Math.abs(n.mag-Math.log10(a.mag))>Ct)return a;{const r=Math.pow(10,Math.log10(a.mag)-n.mag),l=n.sign+a.sign*r;return k(Math.sign(l),1,n.mag+Math.log10(Math.abs(l)))}}if(i===1&&s===0){if(Math.abs(a.mag-Math.log10(n.mag))>Ct)return a;{const r=Math.pow(10,a.mag-Math.log10(n.mag)),l=n.sign+a.sign*r;return k(Math.sign(l),1,Math.log10(n.mag)+Math.log10(Math.abs(l)))}}if(Math.abs(a.mag-n.mag)>Ct)return a;{const r=Math.pow(10,a.mag-n.mag),l=n.sign+a.sign*r;return k(Math.sign(l),1,n.mag+Math.log10(Math.abs(l)))}}plus(e){return this.add(e)}sub(e){return this.add(d(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=d(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return D(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return D(this.sign*t.sign,0,1);let a,n;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(a=this,n=t):(a=t,n=this),a.layer===0&&n.layer===0)return A.fromNumber(a.sign*n.sign*a.mag*n.mag);if(a.layer>=3||a.layer-n.layer>=2)return k(a.sign*n.sign,a.layer,a.mag);if(a.layer===1&&n.layer===0)return k(a.sign*n.sign,1,a.mag+Math.log10(n.mag));if(a.layer===1&&n.layer===1)return k(a.sign*n.sign,1,a.mag+n.mag);if(a.layer===2&&n.layer===1){const i=k(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)).add(k(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return k(a.sign*n.sign,i.layer+1,i.sign*i.mag)}if(a.layer===2&&n.layer===2){const i=k(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)).add(k(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return k(a.sign*n.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=d(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?A.dNaN:this.layer===0?k(this.sign,0,1/this.mag):k(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=d(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=d(e),a=this.mag>0?this.layer:-this.layer,n=t.mag>0?t.layer:-t.layer;return a>n?1:a<n?-1:this.mag>t.mag?1:this.mag<t.mag?-1:0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const t=d(e);return this.sign===t.sign&&this.layer===t.layer&&this.mag===t.mag}equals(e){return this.eq(e)}neq(e){return!this.eq(e)}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===-1}lte(e){return!this.gt(e)}gt(e){return this.cmp(e)===1}gte(e){return!this.lt(e)}max(e){const t=d(e);return this.lt(t)?t:this}min(e){const t=d(e);return this.gt(t)?t:this}maxabs(e){const t=d(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=d(e);return this.cmpabs(t)>0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const a=d(e);return this.eq_tolerance(a,t)?0:this.cmp(a)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const a=d(e);if(t==null&&(t=1e-7),this.sign!==a.sign||Math.abs(this.layer-a.layer)>1)return!1;let n=this.mag,i=a.mag;return this.layer>a.layer&&(i=Nt(i)),this.layer<a.layer&&(n=Nt(n)),Math.abs(n-i)<=t*Math.max(Math.abs(n),Math.abs(i))}equals_tolerance(e,t){return this.eq_tolerance(e,t)}neq_tolerance(e,t){return!this.eq_tolerance(e,t)}notEquals_tolerance(e,t){return this.neq_tolerance(e,t)}lt_tolerance(e,t){const a=d(e);return!this.eq_tolerance(a,t)&&this.lt(a)}lte_tolerance(e,t){const a=d(e);return this.eq_tolerance(a,t)||this.lt(a)}gt_tolerance(e,t){const a=d(e);return!this.eq_tolerance(a,t)&&this.gt(a)}gte_tolerance(e,t){const a=d(e);return this.eq_tolerance(a,t)||this.gt(a)}pLog10(){return this.lt(A.dZero)?A.dZero:this.log10()}absLog10(){return this.sign===0?A.dNaN:this.layer>0?k(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):k(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?A.dNaN:this.layer>0?k(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):k(this.sign,0,Math.log10(this.mag))}log(e){return e=d(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?A.dNaN:this.layer===0&&e.layer===0?k(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):A.div(this.log10(),e.log10())}log2(){return this.sign<=0?A.dNaN:this.layer===0?k(this.sign,0,Math.log2(this.mag)):this.layer===1?k(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?k(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):k(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?A.dNaN:this.layer===0?k(this.sign,0,Math.log(this.mag)):this.layer===1?k(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?k(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):k(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=d(e),a=this,n=t;if(a.sign===0)return n.eq(0)?D(1,0,1):a;if(a.sign===1&&a.layer===0&&a.mag===1)return a;if(n.sign===0)return D(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return a;const i=a.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?i.neg():Math.abs(n.toNumber()%2)%2===0?i:A.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return A.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return k(1,0,t);if(e.sign===0)return A.dOne;e=D(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?k(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?k(-e.sign,e.layer+1,-e.mag):A.dOne}pow_base(e){return d(e).pow(this)}root(e){const t=d(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?A.exp(A.mul(this,A.ln(this).sub(1))):A.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(D(1,0,24)))return A.fromNumber(kn(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const a=e*e;let n=e,i=12*n,s=1/i,r=t+s;if(r===t||(t=r,n=n*a,i=360*n,s=1/i,r=t-s,r===t))return A.exp(t);t=r,n=n*a,i=1260*n;let l=1/i;return t=t+l,n=n*a,i=1680*n,l=1/i,t=t-l,A.exp(t)}else return this.layer===1?A.exp(A.mul(this,A.ln(this).sub(1))):A.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?A.dOne:this.layer===0&&this.mag<=709.7?A.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?k(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?k(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):k(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return A.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return k(1,2,Math.log10(this.mag)-.3010299956639812);{const e=A.div(D(this.sign,this.layer-1,this.mag),D(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=D(1,0,1)){if(e===1)return A.pow(this,t);if(e===0)return new A(t);if(this.eq(A.dOne))return A.dOne;if(this.eq(-1))return A.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return A.fromNumber(Math.E);const s=A.ln(this).neg();return s.lambertw().div(s)}else return i>1.444667861009766?A.fromNumber(Number.POSITIVE_INFINITY):A.dNaN}if(this.eq(A.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),A.fromNumber(i)}if(e<0)return A.iteratedlog(t,this,-e);t=d(t);const a=e;e=Math.trunc(e);const n=a-e;if(this.gt(A.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i<e;++i){const s=t;if(t=this.pow(t),s.eq(t))return t}if(n!=0){const i=this.pow(t);return t.mul(1-n).add(i.mul(n))}return t}n!==0&&(t.eq(A.dOne)?this.gt(10)?t=this.pow(n):(t=A.fromNumber(A.tetrate_critical(this.toNumber(),n)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let i=0;i<e;++i){if(t=this.pow(t),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(t.layer-this.layer>3)return D(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=D(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return A.tetrate(e,-t,this);e=d(e);let a=A.fromDecimal(this);const n=t;t=Math.trunc(t);const i=n-t;if(a.layer-e.layer>3){const s=Math.min(t,a.layer-e.layer-3);t-=s,a.layer-=s}for(let s=0;s<t;++s){if(a=a.log(e),!isFinite(a.layer)||!isFinite(a.mag))return a.normalize();if(s>1e4)return a}return i>0&&i<1&&(e.eq(10)?a=a.layeradd10(-i):a=a.layeradd(-i,e)),a}slog(e=10,t=100){let a=.001,n=!1,i=!1,s=this.slog_internal(e).toNumber();for(let r=1;r<t;++r){const g=new A(e).tetrate(s).gt(this);if(r>1&&i!=g&&(n=!0),i=g,n?a/=2:a*=2,a=Math.abs(a)*(g?-1:1),s+=a,a===0)break}return A.fromNumber(s)}slog_internal(e=10){if(e=d(e),e.lte(A.dZero)||e.eq(A.dOne))return A.dNaN;if(e.lt(A.dOne))return this.eq(A.dOne)?A.dZero:this.eq(A.dZero)?A.dNegOne:A.dNaN;if(this.mag<0||this.eq(A.dZero))return A.dNegOne;let t=0,a=A.fromDecimal(this);if(a.layer-e.layer>3){const n=a.layer-e.layer-3;t+=n,a.layer-=n}for(let n=0;n<100;++n)if(a.lt(A.dZero))a=A.pow(e,a),t-=1;else{if(a.lte(A.dOne))return A.fromNumber(t+A.slog_critical(e.toNumber(),a.toNumber()));t+=1,a=A.log(a,e)}return A.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:A.critical_section(e,t,Mn)}static tetrate_critical(e,t){return A.critical_section(e,t,Sn)}static critical_section(e,t,a){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let n=0,i=0;for(let r=0;r<ke.length;++r)if(ke[r]==e){n=a[r][Math.floor(t)],i=a[r][Math.ceil(t)];break}else if(ke[r]<e&&ke[r+1]>e){const l=(e-ke[r])/(ke[r+1]-ke[r]);n=a[r][Math.floor(t)]*(1-l)+a[r+1][Math.floor(t)]*l,i=a[r][Math.ceil(t)]*(1-l)+a[r+1][Math.ceil(t)]*l;break}const s=t-Math.floor(t);return n<=0||i<=0?n*(1-s)+i*s:Math.pow(e,Math.log(n)/Math.log(e)*(1-s)+Math.log(i)/Math.log(e)*s)}layeradd10(e){e=A.fromValue_noAlloc(e).toNumber();const t=A.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const a=Math.trunc(e);e-=a,t.layer+=a}if(e<=-1){const a=Math.trunc(e);if(e-=a,t.layer+=a,t.layer<0)for(let n=0;n<100;++n){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const n=this.slog(t).toNumber()+e;return n>=0?A.tetrate(t,n):Number.isFinite(n)?n>=-1?A.log(A.tetrate(t,n+1),t):A.log(A.log(A.tetrate(t,n+2),t),t):A.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return A.fromNumber(Wt(this.toNumber()));if(this.layer===0)return A.fromNumber(Wt(this.sign*this.mag));if(this.layer===1)return Xt(this);if(this.layer===2)return Xt(this);if(this.layer>=3)return D(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return D(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=D(1,0,1)){t=d(t);const a=e;e=Math.trunc(e);const n=a-e;n!==0&&(t.eq(A.dOne)?(++e,t=A.fromNumber(n)):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let i=0;i<e;++i){if(t=this.tetrate(t.toNumber()),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(i>10)return t}return t}sin(){return this.mag<0?this:this.layer===0?A.fromNumber(Math.sin(this.sign*this.mag)):D(0,0,0)}cos(){return this.mag<0?A.dOne:this.layer===0?A.fromNumber(Math.cos(this.sign*this.mag)):D(0,0,0)}tan(){return this.mag<0?this:this.layer===0?A.fromNumber(Math.tan(this.sign*this.mag)):D(0,0,0)}asin(){return this.mag<0?this:this.layer===0?A.fromNumber(Math.asin(this.sign*this.mag)):D(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?A.fromNumber(Math.acos(this.toNumber())):this.layer===0?A.fromNumber(Math.acos(this.sign*this.mag)):D(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?A.fromNumber(Math.atan(this.sign*this.mag)):A.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return A.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return A.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?D(Number.NaN,Number.NaN,Number.NaN):A.ln(this.add(1).div(A.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(A.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let E=A;E.fromStringCache=new bn(_n);E.dZero=D(0,0,0);E.dOne=D(1,0,1);E.dNegOne=D(-1,0,1);E.dTwo=D(1,0,2);E.dTen=D(1,0,10);E.dNaN=D(Number.NaN,Number.NaN,Number.NaN);E.dInf=D(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);E.dNegInf=D(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);E.dNumberMax=k(1,0,Number.MAX_VALUE);E.dNumberMin=k(1,0,Number.MIN_VALUE);d=E.fromValue_noAlloc;k=E.fromComponents;D=E.fromComponents_noNormalize;E.fromMantissaExponent;E.fromMantissaExponent_noNormalize;const Tn=new E(1);function $e(e,t,a=!0){let n=E.log10(e).floor(),i=E.div(e,E.pow(10,n));i.toStringWithDecimalPlaces(t)==="10"&&(i=Tn,n=n.add(1));const s=n.gte(1e9)?oe(n,Math.max(Math.max(t,3),G.defaultDecimalsShown)):n.gte(1e4)?mt(n,0):n.toStringWithDecimalPlaces(0);return a?i.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function mt(e,t){if(e==null)return"NaN";if(e=new E(e),e.mag<.001)return 0 .toFixed(t);const n=e.toStringWithDecimalPlaces(t).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function ra(e,t){return e==null?"NaN":(e=new E(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),G.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Dn=new E("eeee1000"),Rn=new E("e100000"),Kt=new E("e1000"),oa=new E(1e9),Vn=new E(1e6),Pn=new E(1e3),xn=new E(.98),qn=new E(.001),la=new E(0);function oe(e,t,a){if(t==null&&(t=G.defaultDecimalsShown),a=a!=null?a:G.defaultShowSmall,e=new E(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+oe(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Dn)){const n=e.slog();return n.gte(Vn)?"F"+oe(n.floor()):E.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+mt(n.floor(),0)}else{if(e.gte(Rn))return $e(e,0,!1);if(e.gte(Kt))return $e(e,0);if(e.gte(oa))return $e(e,t);if(e.gte(Pn))return mt(e,0);if(e.gte(qn)||!a)return ra(e,t);if(e.eq(la))return 0 .toFixed(t)}return e=ua(e),e.lt(Kt)?$e(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):oe(e,t)+"\u207B\xB9"}function se(e){return e=new E(e),e.sign<0?"-"+se(e.neg()):e.gte(oa)||e.lte(xn)&&!e.eq(la)?oe(e):oe(e,0)}function Aa(e){return E.lt(e,0)?"-"+Aa(E.neg(e)):E.gt(e,2**51)?oe(E.div(e,31536e3))+"y":(e=new E(e).toNumber(),e<60?oe(e)+"s":e<3600?se(Math.floor(e/60))+"m "+oe(e%60)+"s":e<86400?se(Math.floor(e/3600))+"h "+se(Math.floor(e/60)%60)+"m "+se(e%60)+"s":e<31536e3?se(Math.floor(e/84600)%365)+"d "+se(Math.floor(e/3600)%24)+"h "+se(Math.floor(e/60)%60)+"m":se(Math.floor(e/31536e3))+"y "+se(Math.floor(e/84600)%365)+"d "+se(Math.floor(e/3600)%24)+"h")}function zn(e,t,a){e=new E(e);let n=e.toStringWithDecimalPlaces(t);return new E(n).gte(a)&&(n=E.sub(a,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),n}function Fn(e,t){return oe(e,t,!0)}function ua(e){let t=E.log10(e).ceil();const a=E.div(e,E.pow(10,t));return t=t.neg(),e=new E(10).pow(t).times(a),e}var Gn=Object.freeze(Object.defineProperty({__proto__:null,default:E,exponentialFormat:$e,commaFormat:mt,regularFormat:ra,format:oe,formatWhole:se,formatTime:Aa,toPlaces:zn,formatSmall:Fn,invertOOM:ua},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:On,commaFormat:Un,regularFormat:Ln,format:ca,formatWhole:Et,formatTime:Dt,toPlaces:Jn,formatSmall:Yn,invertOOM:Wn}=Gn;window.Decimal=E;window.exponentialFormat=On;window.commaFormat=Un;window.regularFormat=Ln;window.format=ca;window.formatWhole=Et;window.formatTime=Dt;window.toPlaces=Jn;window.formatSmall=Yn;window.invertOOM=Wn;function Xn(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function jt(e){return typeof e=="function"}var W=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(W||{});const ft=Symbol("DoNotCache");function pe(e,t){const a=e[t];jt(a)&&a.length===0&&!a[ft]?e[t]=x(a.bind(e)):jt(a)&&(e[t]=a.bind(e),e[t][ft]=!0)}const Rt=Symbol("Component"),Vt=Symbol("GatherProps");let Kn=0;function da(e="feature-"){return e+Kn++}function J(e){return e[ft]=!0,e}function et(e,t,a){e[t]===void 0&&a!=null&&(e[t]=a)}const Te={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Pt=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Pt||{}),vt={classic:Te,paper:{...Te,variables:{...Te.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Te,variables:{...Te.variables,"--foreground":"#45283c","--background":"#bbc3e8","--feature-foreground":"#fff7f6","--raised-background":"#fff7f6","--points":"#45283c","--locked":"#fff7f6","--highlighted":"#434c5e","--bought":"#fff7f6","--danger":"#D08770","--link":"#412323","--outline":"#551842","--accent1":"#dc7d71","--accent2":"#8423a9","--accent3":"#47f2ca","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Te,variables:{...Te.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const $=aa();"fonts"in document&&(document.fonts.onloadingdone=()=>$.emit("fontsLoaded"));var jn=Object.freeze(Object.defineProperty({__proto__:null,globalBus:$},Symbol.toStringTag,{value:"Module"}));const Hn=st({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var V=window.player=Hn;function ga(e){return JSON.stringify(e,(t,a)=>u(a))}function ma(e={}){return Object.assign({id:`${G.id}-0`,name:"Default Save",tabs:G.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:G.id,modVersion:G.versionNumber,layers:{}},e)}function re(e){const t=Ie.compressToUTF16(ga(e!=null?e:V));return localStorage.setItem((e!=null?e:V).id,t),t}async function Zn(){ti();try{let e=localStorage.getItem(z.active);if(e==null){await Ve(Le());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ie.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==G.id){await Ve(Le());return}t.id=z.active,await Ve(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
|
`,e),await Ve(Le())}}function Le(){const e=ct(),t=ma({id:e});return re(t),z.saves.push(e),t}function ct(){let e,t=0;do e=`${G.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const $n=w(!1);async function Ve(e){console.info("Loading save",e),$n.value=!0;const{layers:t,removeLayer:a,addLayer:n}=await gt(()=>Promise.resolve().then(function(){return Ei}),void 0),{fixOldSave:i,getInitialLayers:s}=await gt(()=>Promise.resolve().then(function(){return Ro}),void 0);for(const r in t){const l=t[r];l&&a(l)}s(e).forEach(r=>n(r,e)),e=ma(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,G.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==G.versionNumber&&(i(e.modVersion,e),e.modVersion=G.versionNumber),Object.assign(V,e),z.active=V.id,$.emit("onLoad")}setInterval(()=>{V.autosave&&re()},1e3);window.onbeforeunload=()=>{V.autosave&&re()};window.save=re;const ei=window.hardReset=async()=>{await Ve(Le())};window.deleteLowerSaves=()=>{const e=Object.values(z.saves).indexOf(V.id)+1;Object.values(z.saves).slice(e).forEach(t=>localStorage.removeItem(t)),z.saves=z.saves.slice(0,e)};const nt=st({active:"",saves:[],showTPS:!0,theme:Pt.Nordic,unthrottled:!1,alignUnits:!1,autoplay:!1,fast:!1});fe(nt,e=>{const t=Ie.compressToUTF16(JSON.stringify(e));localStorage.setItem(G.id,t)},{deep:!0});var z=window.settings=nt;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Pt.Nordic,alignUnits:!1,autoplay:!1,fast:!1};$.emit("loadSettings",e),Object.assign(nt,e),ei()};function ti(){try{let e=localStorage.getItem(G.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ie.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(nt,t)}$.emit("loadSettings",nt)}catch{}}const fa=st([]);function ai(e){fa.push(e)}const ni=st([]),ii=st([]),si={class:"table"},he=U({__name:"Row",setup(e){const t=x(()=>vt[z.theme].mergeAdjacent);return(a,n)=>(h(),B("div",si,[c("div",{class:ae(["row",{mergeAdjacent:u(t)}])},[_e(a.$slots,"default")],2)]))}});function Ne(e,t="span"){return typeof e=="function"?U({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),U({template:e})):U({render:()=>({})}):e}function Je(e){if(ha(e))return typeof e=="function"?e():Ne(e);const t=e[Rt];return o(t,e[Vt](),null)}function ri(e){if(ha(e))return typeof e=="function"?e():typeof e=="string"?o(Y,null,[e]):o(e,null,null);const t=e[Rt];return o(t,e[Vt](),null)}function ha(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ft]===!0}function oi(e,t="div"){const a=ye();return St(()=>{a.value=Ne(xe(e),t)}),a}function pt(e,t="div"){const a=ye(null);return St(()=>{const n=xe(e);a.value=n==""||n==null?null:Ne(n,t)}),a}function xe(e){return u(u(e))}function ne(...e){return e.includes(Object)||e.push(Object),e}var K=(e,t)=>{const a=e.__vccOpts||e;for(const[n,i]of t)a[n]=i;return a};const li=U({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var y;const a=w({}),n=new ResizeObserver(l),i=w(null);Mt(()=>{const p=i.value;p!=null&&n.observe(p)});let s=!0,r=w((y=i.value)==null?void 0:y.getBoundingClientRect());function l(){s&&(s=!1,qe(()=>{var p;r.value=(p=i.value)==null?void 0:p.getBoundingClientRect(),Object.values(a.value).filter(C=>C).forEach(C=>C.rect=C.element.getBoundingClientRect()),t("updateNodes",a.value),s=!0}))}$.on("fontsLoaded",l);const g={attributes:!1,childList:!0,subtree:!1};ot(qt,(p,C)=>{const N=new MutationObserver(()=>f(p));N.observe(C,g),a.value[p]={element:C,observer:N,rect:C.getBoundingClientRect()},l()}),ot(zt,p=>{var C;(C=a.value[p])==null||C.observer.disconnect(),a.value[p]=void 0,l()}),ot(pa,a),ot(ya,r);function f(p){const C=a.value[p];C!=null&&(C.rect=C.element.getBoundingClientRect(),t("updateNodes",a.value))}return(p,C)=>(h(),B(Y,null,[_e(p.$slots,"default",{},void 0,!0),c("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var va=K(li,[["__scopeId","data-v-2b1dc1bc"]]);const Ai=["onPointerdown"],ui={class:"modal-wrapper"},ci={class:"modal-container"},di={class:"modal-header"},gi=v(" default header "),mi={class:"modal-body"},fi=v(" default body "),hi={class:"modal-footer"},vi=c("div",{class:"modal-default-flex-grow"},null,-1),Fe=U({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const i=be(e),s=x(()=>u(i.modelValue)||l.value);function r(){a("update:modelValue",!1)}const l=w(!1),g=w(null),f=x(()=>{var y,p;return(p=(y=g.value)==null?void 0:y.nodes)!=null?p:null});return t({isOpen:s,nodes:f}),(y,p)=>(h(),O(Qa,{to:"#modal-root"},[o(ta,{name:"modal",onBeforeEnter:p[0]||(p[0]=C=>l.value=!0),onAfterLeave:p[1]||(p[1]=C=>l.value=!1)},{default:R(()=>[kt(c("div",tt({class:"modal-mask",onPointerdown:at(r,["self"])},y.$attrs),[c("div",ui,[c("div",ci,[c("div",di,[_e(y.$slots,"header",{shown:u(s)},()=>[gi])]),c("div",mi,[o(va,{ref_key:"contextRef",ref:g},{default:R(()=>[_e(y.$slots,"body",{shown:u(s)},()=>[fi])]),_:3},512)]),c("div",hi,[_e(y.$slots,"footer",{shown:u(s)},()=>[c("div",{class:"modal-default-footer"},[vi,c("button",{class:"button modal-default-button",onClick:r}," Close ")])])])])])],16,Ai),[[_a,e.modelValue]])]),_:3})]))}}),Re=Symbol("ProxyState");function xt(e,t={}){const a=t;let n=!1;function i(){return n||(Object.assign(a,e(a)),n=!0),a}return new Proxy(a,{get(s,r){if(r===Re)return i();const l=i()[r];return l!=null&&typeof l=="object"&&It in l?l[It]:l},set(s,r,l){return i()[r]=l,!0},has(s,r){return r===Re?!0:Reflect.has(i(),r)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(s,r){return n||(Object.assign(a,e(a)),n=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Z=window.state=Tt({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const yt=Symbol("PersistentState"),Ke=Symbol("DefaultValue"),ht=Symbol("StackTrace"),wt=Symbol("Deleted"),It=Symbol("NonPersistent"),Pe=Symbol("SaveDataPath");function pi(){var e,t;return(t=(e=new Error().stack)==null?void 0:e.split(`
|
|
`).slice(3,5).map(a=>a.trim()).join(`
|
|
`))!=null?t:""}function Ht(e,t){var a;if(E.isNaN(t))throw Z.hasNaN||(V.autosave=!1,Z.hasNaN=!0,Z.NaNPath=e[Pe],Z.NaNPersistent=e),console.error("Attempted to save NaN value to",(a=e[Pe])==null?void 0:a.join("."),e),"Attempted to set NaN value. See above for details";e[yt].value=t}function yi(e){const t=Ce(e)?e:w(e);Ce(e)&&(e=e.value);const a=x({get(){return t.value},set(i){Ht(n,i)}});a[Ke]=e;const n={get value(){return t.value},set value(i){Ht(n,i)},__v_isRef:!0,[yt]:t,[Ke]:e,[ht]:pi(),[wt]:!1,[It]:a,[Pe]:void 0};return ue.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",n,`
|
|
Created at:
|
|
`+n[ht]):Ye[ue[ue.length-1]].add(n),n}function bi(e){return e!=null&&typeof e=="object"&&yt in e}$.on("addLayer",(e,t)=>{const a=[],n=(i,s=[])=>{let r=!1;return Object.keys(i).forEach(l=>{let g=i[l];if(g!=null&&typeof g=="object")if(Re in g&&(g=g[Re]),bi(g)){if(r=!0,g[wt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",g,`
|
|
Created at:
|
|
`+g[ht]);return}Ye[e.id].delete(g);const f=[e.id,...s,l];g[Pe]!=null&&JSON.stringify(f)!==JSON.stringify(g[Pe])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${g[Pe].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,g),g[Pe]=f;const y=s.reduce((C,N)=>(N in C||(C[N]={}),C[N]),t),p=y[l];y[l]=g[yt],Sa(y)?p!=null?y[l]=p:y[l]=g[Ke]:p!=null?y[l].value=p:y[l].value=g[Ke]}else!(g instanceof E)&&!Ce(g)&&!a.includes(g)&&(typeof g.type=="symbol"&&a.push(g),n(g,[...s,l])&&(Bt(g)&&!Bt(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.",Re in i?i[Re]:i,l):r=!0))}),r};n(e[Re]),Ye[e.id].forEach(i=>{i[wt]||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[ht])}),Ye[e.id].clear()});const qt=Symbol("RegisterNode"),zt=Symbol("UnregisterNode"),pa=Symbol("Nodes"),ya=Symbol("Bounds"),ee=Tt({});window.layers=ee;const Ye={},ue=[];function ba(e,t){return xt(()=>{const a={},n=a.emitter=aa();if(a.on=n.on.bind(n),a.emit=n.emit.bind(n),a.nodes=w({}),a.id=e,ue.push(e),Ye[e]=new Set,a.minimized=yi(!1),Object.assign(a,t.call(a)),ue[ue.length-1]==null||ue[ue.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
|
|
Stack: ${ue}
|
|
Trying to pop ${a.id}`;ue.pop(),pe(a,"color"),pe(a,"display"),pe(a,"classes"),pe(a,"style"),pe(a,"name"),et(a,"name",a.id),pe(a,"minWidth"),et(a,"minWidth",600),pe(a,"minimizable"),et(a,"minimizable",!0),pe(a,"minimizedDisplay");const i=a.style;return a.style=x(()=>{var r,l;let s=u(a.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(r=u(i))!=null?r:"",(l=a.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),a})}function Ca(e,t){if(console.info("Adding layer",e.id),ee[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ee[e.id]);return}et(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ee[e.id]=e,$.emit("addLayer",e,t.layers[e.id])}function Ci(e){return ee[e]}function Na(e){console.info("Removing layer",e.id),$.emit("removeLayer",e),ee[e.id]=void 0}function Ni(e){Na(e),Ca(e,V)}function Bi(e){const t=w(!1);return{openModal:()=>t.value=!0,modal:J(()=>o(Fe,{modelValue:t.value,"onUpdate:modelValue":a=>t.value=a},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}$.on("update",function(t){Object.values(ee).forEach(a=>{a==null||a.emit("preUpdate",t)}),Object.values(ee).forEach(a=>{a==null||a.emit("update",t)}),Object.values(ee).forEach(a=>{a==null||a.emit("postUpdate",t)})});var Ei=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:qt,UnregisterNodeInjectionKey:zt,NodesInjectionKey:pa,BoundsInjectionKey:ya,layers:ee,persistentRefs:Ye,addingLayers:ue,createLayer:ba,addLayer:Ca,getLayer:Ci,removeLayer:Na,reloadLayer:Ni,setupLayerModal:Bi},Symbol.toStringTag,{value:"Module"}));const wi=U({components:{Context:va},props:{index:{type:Number,required:!0},display:{type:ne(Object,String,Function),required:!0},minimizedDisplay:ne(Object,String,Function),minimized:{type:Object,required:!0},name:{type:ne(String),required:!0},color:ne(String),minimizable:ne(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:a,minimized:n,minimizedDisplay:i}=be(e),s=oi(t),r=pt(i),l=x(()=>G.allowGoBack&&a.value>0&&!xe(n));function g(){V.tabs.splice(u(e.index),1/0)}function f(y){e.nodes.value=y}return{component:s,minimizedComponent:r,showGoBack:l,updateNodes:f,unref:u,goBack:g}}}),Ii={key:1};function _i(e,t,a,n,i,s){const r=Ma("Context");return h(),B("div",{class:"layer-container",style:Xe({"--layer-color":e.unref(e.color)})},[e.showGoBack?(h(),B("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...l)=>e.goBack&&e.goBack(...l))},"\u274C")):M("",!0),e.unref(e.minimized)?(h(),B("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=l=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(h(),O(ce(e.minimizedComponent),{key:0})):(h(),B("div",Ii,F(e.unref(e.name)),1))])):(h(),B("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[o(r,{onUpdateNodes:e.updateNodes},{default:R(()=>[(h(),O(ce(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(h(),B("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=l=>e.$emit("setMinimized",!0))}," \u25BC ")):M("",!0)],4)}var Qi=K(wi,[["render",_i],["__scopeId","data-v-a592996e"]]);const Ba=e=>(Qe("data-v-4b4bda40"),e=e(),Se(),e),Si=Ba(()=>c("h2",null,"Changelog",-1)),Mi=Ba(()=>c("details",{open:""},[c("summary",null,[v("v0.0 Initial Commit - "),c("time",null,"2021-09-04")]),v(" This is the first release :D "),c("ul",null,[c("li",{class:"feature"},"Did everything"),c("li",{class:"fix"},"Had some fun"),c("li",{class:"breaking"},"Removed everything"),c("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),ki=U({__name:"Changelog",setup(e,{expose:t}){const a=w(!1);return t({open(){a.value=!0}}),(n,i)=>(h(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s)},{header:R(()=>[Si]),body:R(()=>[Mi]),_:1},8,["modelValue"]))}});var Ti=K(ki,[["__scopeId","data-v-4b4bda40"]]),Di=U({props:{element:Object,display:{type:ne(Object,String,Function),required:!0},style:ne(Object,String,Array),classes:ne(Object),direction:ne(String),xoffset:ne(String),yoffset:ne(String),pinned:Object},setup(e){const{element:t,display:a,pinned:n}=be(e),i=w(!1),s=x(()=>(xe(n)||i.value)&&r.value),r=pt(a),l=ye(Ne(J(()=>{const y=xe(t);return y==null?"":ri(y)})));function g(y){const p=n;y.shiftKey&&p&&(p.value=!p.value,y.stopPropagation(),y.preventDefault())}const f=x(()=>xe(n)&&vt[z.theme].showPin);return{Direction:W,isHovered:i,isShown:s,comp:r,elementComp:l,unref:u,togglePinned:g,showPin:f}}});const Ri={key:0,class:"material-icons pinned"};function Vi(e,t,a,n,i,s){return h(),B("div",{class:ae(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=r=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=r=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...r)=>e.togglePinned&&e.togglePinned(...r))},[_e(e.$slots,"default",{},void 0,!0),e.elementComp?(h(),O(ce(e.elementComp),{key:0})):M("",!0),o(ta,{name:"fade",css:!!e.comp},{default:R(()=>{var r;return[e.isShown?(h(),B("div",{key:0,class:ae(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Xe([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(r=e.unref(e.style))!=null?r:{}])},[e.showPin?(h(),B("span",Ri,"push_pin")):M("",!0),e.comp?(h(),O(ce(e.comp),{key:1})):M("",!0)],6)):M("",!0)]}),_:1},8,["css"])],34)}var j=K(Di,[["render",Vi],["__scopeId","data-v-7a579aa7"]]);const Ge=e=>(Qe("data-v-5d3cb6f4"),e=e(),Se(),e),Pi={class:"info-modal-header"},xi=["src","alt"],qi={class:"info-modal-title"},zi={key:0},Fi={key:0},Gi={key:0},Oi=Ge(()=>c("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),Ui=Ge(()=>c("br",null,null,-1)),Li=Ge(()=>c("br",null,null,-1)),Ji=["href"],Yi=Ge(()=>c("span",{class:"material-icons info-modal-discord"},"discord",-1)),Wi=Ge(()=>c("div",null,[c("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[c("span",{class:"material-icons info-modal-discord"},"discord"),v(" The Paper Pilot Community ")])],-1)),Xi=Ge(()=>c("div",null,[c("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[c("span",{class:"material-icons info-modal-discord"},"discord"),v(" The Modding Tree ")])],-1)),Ki=Ge(()=>c("br",null,null,-1));var ji=U({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const a=e,{title:n,logo:i,author:s,discordName:r,discordLink:l,versionNumber:g,versionTitle:f}=G,y=be(a),p=w(!1),C=x(()=>Dt(V.timePlayed)),N=x(()=>Ne(J(()=>o(Y,null,[ni.map(Je)]))));t({open(){p.value=!0}});function _(){var Q;(Q=u(y.changelog))==null||Q.open()}return(Q,S)=>(h(),O(Fe,{modelValue:p.value,"onUpdate:modelValue":S[0]||(S[0]=H=>p.value=H)},{header:R(()=>[c("div",Pi,[u(i)?(h(),B("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(n)},null,8,xi)):M("",!0),c("div",qi,[c("h2",null,F(u(n)),1),c("h4",null,[v(" v"+F(u(g)),1),u(f)?(h(),B("span",zi,": "+F(u(f)),1)):M("",!0)])])])]),body:R(({shown:H})=>[H?(h(),B("div",Fi,[u(s)?(h(),B("div",Gi,"By "+F(u(s)),1)):M("",!0),Oi,Ui,c("div",{class:"link",onClick:_},"Changelog"),Li,c("div",null,[u(l)?(h(),B("a",{key:0,href:u(l),class:"info-modal-discord-link",target:"_blank"},[Yi,v(" "+F(u(r)),1)],8,Ji)):M("",!0)]),Wi,Xi,Ki,c("div",null,"Time Played: "+F(u(C)),1),(h(),O(ce(u(N))))])):M("",!0)]),_:1},8,["modelValue"]))}});var Hi=K(ji,[["__scopeId","data-v-5d3cb6f4"]]);const Zi=c("h2",null,"Settings",-1);var $i=U({__name:"Options",setup(e,{expose:t}){const a=w(!1),n=w("behaviour");function i(l){return l==n.value}function s(l){n.value=l}t({isTab:i,setTab:s,save:re,open(){a.value=!0}}),Object.keys(vt).map(l=>({label:Xn(l),value:l}));const r=x(()=>Ne(J(()=>o(Y,null,[fa.map(Je)]))));return be(z),be(V),x({get(){return V.devSpeed===0},set(l){V.devSpeed=l?0:null}}),J(()=>o("span",{class:"option-title"},[v("Unthrottled"),o("desc",null,[v("Allow the game to run as fast as possible. Not battery friendly.")])])),J(()=>o("span",{class:"option-title"},[v("Offline Production"),o(j,{display:"Save-specific",direction:W.Right},{default:()=>[v("*")]}),o("desc",null,[v("Simulate production that occurs while the game is closed.")])])),J(()=>o("span",{class:"option-title"},[v("Autosave"),o(j,{display:"Save-specific",direction:W.Right},{default:()=>[v("*")]}),o("desc",null,[v("Automatically save the game every second or when the game is closed.")])])),J(()=>o("span",{class:"option-title"},[v("Pause game"),o(j,{display:"Save-specific",direction:W.Right},{default:()=>[v("*")]}),o("desc",null,[v("Stop everything from moving.")])])),J(()=>o("span",{class:"option-title"},[v("Theme"),o("desc",null,[v("How the game looks.")])])),J(()=>o("span",{class:"option-title"},[v("Show TPS"),o("desc",null,[v("Show TPS meter at the bottom-left corner of the page.")])])),J(()=>o("span",{class:"option-title"},[v("Align modifier units"),o("desc",null,[v("Align numbers to the beginning of the unit in modifier view.")])])),(l,g)=>(h(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=f=>a.value=f)},{header:R(()=>[Zi]),body:R(()=>[(h(),O(ce(u(r))))]),_:1},8,["modelValue"]))}});const es={class:"field"},ts={key:0,class:"field-title"},as=U({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var r;const a=e,n=pt(ze(a,"title"),"span"),i=w((r=a.options.find(l=>l.value===a.modelValue))!=null?r:null);fe(ze(a,"modelValue"),l=>{var g;xe(i)!==l&&(i.value=(g=a.options.find(f=>f.value===l))!=null?g:null)});function s(l){t("update:modelValue",l.value)}return(l,g)=>(h(),B("div",es,[u(n)?(h(),B("span",ts,[(h(),O(ce(u(n))))])):M("",!0),o(u(za),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[g[0]||(g[0]=f=>i.value=f),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const ns=["onSubmit"],is={class:"field"},ss={key:0,class:"field-title"},rs=["placeholder"],os=U({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const a=e,n=pt(ze(a,"title"),"span"),i=ye(null);Mt(()=>{var g;(g=i.value)==null||g.focus()});const s=x({get(){var g;return(g=u(a.modelValue))!=null?g:""},set(g){t("update:modelValue",g)}});function r(){t("submit")}function l(){a.submitOnBlur!==!1?t("submit"):t("cancel")}return(g,f)=>(h(),B("form",{onSubmit:at(r,["prevent"])},[c("div",is,[u(n)?(h(),B("span",ss,[(h(),O(ce(u(n))))])):M("",!0),e.textArea?(h(),O(u(Fa),{key:1,modelValue:u(s),"onUpdate:modelValue":f[0]||(f[0]=y=>Ce(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:l,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):kt((h(),B("input",{key:2,type:"text","onUpdate:modelValue":f[1]||(f[1]=y=>Ce(s)?s.value=y:null),placeholder:e.placeholder,class:ae({fullWidth:!e.title}),onBlur:l,ref_key:"field",ref:i},null,42,rs)),[[ka,u(s)]])])],40,ns))}});var Ft=K(os,[["__scopeId","data-v-90bd4994"]]);const ls={key:0},As=["onClick","disabled"],us={key:0},cs=["onClick"],ds=U({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=be(e),i=w(!1);fe(i,l=>{t("confirmingChanged",l)});function s(){if(u(n.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function r(){i.value=!1}return(l,g)=>(h(),B("span",{class:ae(["container",{confirming:i.value}])},[i.value?(h(),B("span",ls,"Are you sure?")):M("",!0),c("button",{onClick:at(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(h(),B("span",us,"Yes")):_e(l.$slots,"default",{key:1},void 0,!0)],8,As),i.value?(h(),B("button",{key:1,class:"button",onClick:at(r,["stop"])},"No",8,cs)):M("",!0)],2))}});var gs=K(ds,[["__scopeId","data-v-2f8ef34c"]]);const ms=["onClick"],fs=U({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const a=w(!1),n=w(null);function i(){t("click"),n.value&&clearTimeout(n.value),a.value=!1,qe(()=>{a.value=!0,n.value=setTimeout(()=>a.value=!1,500)})}return(s,r)=>(h(),B("button",{onClick:at(i,["stop"]),class:ae(["feedback",{activated:a.value,left:e.left}])},[_e(s.$slots,"default",{},void 0,!0)],10,ms))}});var hs=K(fs,[["__scopeId","data-v-01a1b95c"]]);const Be=e=>(Qe("data-v-c3447434"),e=e(),Se(),e),vs=Be(()=>c("div",{class:"handle material-icons"},"drag_handle",-1)),ps={key:0,class:"actions"},ys=Be(()=>c("span",{class:"material-icons"},"content_paste",-1)),bs=Be(()=>c("span",{class:"material-icons"},"content_copy",-1)),Cs=Be(()=>c("span",{class:"material-icons"},"edit",-1)),Ns=Be(()=>c("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Bs={key:1,class:"actions"},Es=Be(()=>c("span",{class:"material-icons"},"check",-1)),ws=Be(()=>c("span",{class:"material-icons"},"close",-1)),Is={key:2,class:"details"},_s={class:"save-version"},Qs=Be(()=>c("br",null,null,-1)),Ss={key:0},Ms={key:3,class:"details"},ks={key:4,class:"details error"},Ts=Be(()=>c("br",null,null,-1)),Ds=U({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const a=e,{save:n}=be(a),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=w(!1),r=w(!1),l=w("");fe(s,()=>{var p;return l.value=(p=n.value.name)!=null?p:""});const g=x(()=>n.value!=null&&n.value.id===V.id),f=x(()=>{var p;return g.value?V.time:(p=n.value!=null&&n.value.time)!=null?p:0});function y(){t("editName",l.value),s.value=!1}return(p,C)=>(h(),B("div",{class:ae(["save",{active:u(g)}])},[vs,s.value?(h(),B("div",Bs,[c("button",{onClick:y,class:"button"},[o(j,{display:"Save",direction:u(W).Left,class:"info"},{default:R(()=>[Es]),_:1},8,["direction"])]),c("button",{onClick:C[5]||(C[5]=N=>s.value=!s.value),class:"button"},[o(j,{display:"Cancel",direction:u(W).Left,class:"info"},{default:R(()=>[ws]),_:1},8,["direction"])])])):(h(),B("div",ps,[u(n).error==null&&!r.value?(h(),O(hs,{key:0,onClick:C[0]||(C[0]=N=>t("export")),class:"button",left:""},{default:R(()=>[o(j,{display:"Export",direction:u(W).Left,class:"info"},{default:R(()=>[ys]),_:1},8,["direction"])]),_:1})):M("",!0),u(n).error==null&&!r.value?(h(),B("button",{key:1,onClick:C[1]||(C[1]=N=>t("duplicate")),class:"button"},[o(j,{display:"Duplicate",direction:u(W).Left,class:"info"},{default:R(()=>[bs]),_:1},8,["direction"])])):M("",!0),u(n).error==null&&!r.value?(h(),B("button",{key:2,onClick:C[2]||(C[2]=N=>s.value=!s.value),class:"button"},[o(j,{display:"Edit Name",direction:u(W).Left,class:"info"},{default:R(()=>[Cs]),_:1},8,["direction"])])):M("",!0),o(gs,{disabled:u(g),onClick:C[3]||(C[3]=N=>t("delete")),onConfirmingChanged:C[4]||(C[4]=N=>r.value=N)},{default:R(()=>[o(j,{display:"Delete",direction:u(W).Left,class:"info"},{default:R(()=>[Ns]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(n).error==null&&!s.value?(h(),B("div",Is,[c("button",{class:"button open",onClick:C[6]||(C[6]=N=>t("open"))},[c("h3",null,F(u(n).name),1)]),c("span",_s,"v"+F(u(n).modVersion),1),Qs,u(f)?(h(),B("div",Ss,"Last played "+F(u(i).format(u(f))),1)):M("",!0)])):u(n).error==null&&s.value?(h(),B("div",Ms,[o(Ft,{modelValue:l.value,"onUpdate:modelValue":C[7]||(C[7]=N=>l.value=N),class:"editname",onSubmit:y},null,8,["modelValue"])])):(h(),B("div",ks,[v(" Error: Failed to load save with id "+F(u(n).id),1),Ts,v(F(u(n).error),1)]))],2))}});var Rs=K(Ds,[["__scopeId","data-v-c3447434"]]);const Gt=e=>(Qe("data-v-5b5b1604"),e=e(),Se(),e),Vs=Gt(()=>c("h2",null,"Saves Manager",-1)),Ps={class:"modal-footer"},xs={class:"field"},qs=Gt(()=>c("span",{class:"field-title"},"Create Save",-1)),zs={class:"field-buttons"},Fs={class:"footer"},Gs=Gt(()=>c("div",{style:{"flex-grow":"1"}},null,-1)),Os=U({__name:"SavesManager",setup(e,{expose:t}){const a=w(!1),n=w(null);t({open(){a.value=!0}});const i=w(!1),s=w(""),r=w(null);fe(s,b=>{b?qe(()=>{try{if(b[0]!=="{")if(b[0]==="e")b=decodeURIComponent(escape(atob(b)));else if(b[0]==="\u1BE1")b=Ie.decompressFromUTF16(b);else{console.warn("Unable to determine preset encoding",b),i.value=!0;return}const I=JSON.parse(b);if(typeof I!="object"){i.value=!0;return}const P=ct();I.id=P,re(I),s.value="",i.value=!1,z.saves.push(P)}catch{i.value=!0}}):i.value=!1});let l={},g=w(Object.keys(l).reduce((b,I)=>(b.push({label:I.split("/").slice(-1)[0].slice(0,-4),value:l[I]}),b),[]));const f=Tt({});function y(b){if(f[b]==null){let I=localStorage.getItem(b);if(I==null)f[b]={error:"Save doesn't exist in localStorage",id:b};else if(I==="dW5kZWZpbmVk")f[b]={error:"Save is undefined",id:b};else try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Ie.decompressFromUTF16(I);else return console.warn("Unable to determine preset encoding",I),i.value=!0,f[b]={error:"Unable to determine preset encoding",id:b},f[b];f[b]={...JSON.parse(I),id:b}}catch(P){f[b]={error:P,id:b},console.warn(`SavesManager: Failed to load info about save with id ${b}:
|
|
${P}
|
|
${I}`)}}return f[b]}fe(a,b=>{b&&Object.keys(f).forEach(I=>delete f[I])});const p=x(()=>z.saves.reduce((b,I)=>(b[I]=y(I),b),{}));function C(b){let I;switch(V.id===b?I=ga(V):I=JSON.stringify(p.value[b]),G.exportEncoding){default:console.warn(`Unknown save encoding: ${G.exportEncoding}. Defaulting to lz`);case"lz":I=Ie.compressToUTF16(I);break;case"base64":I=btoa(unescape(encodeURIComponent(I)));break;case"plain":break}const P=document.createElement("textarea");P.value=I,document.body.appendChild(P),P.select(),P.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(P)}function N(b){V.id===b&&re();const I={...p.value[b],id:ct()};re(I),z.saves.push(I.id)}function _(b){z.saves=z.saves.filter(I=>I!==b),localStorage.removeItem(b),f[b]=void 0}function Q(b){p.value[V.id].time=V.time,re(),f[V.id]=void 0,Ve(p.value[b]),f[b]=void 0}function S(b){if(r.value=b,qe(()=>{r.value=null}),b[0]!=="{")if(b[0]==="e")b=decodeURIComponent(escape(atob(b)));else if(b[0]==="\u1BE1")b=Ie.decompressFromUTF16(b);else{console.warn("Unable to determine preset encoding",b);return}const I=JSON.parse(b);I.id=ct(),re(I),z.saves.push(I.id),Q(I.id)}function H(b,I){const P=p.value[b];P!=null&&(P.name=I,V.id===b?(V.name=I,re()):(re(P),f[b]=void 0))}return(b,I)=>(h(),O(Fe,{modelValue:a.value,"onUpdate:modelValue":I[4]||(I[4]=P=>a.value=P),ref_key:"modal",ref:n},{header:R(()=>[Vs]),body:R(({shown:P})=>[P?(h(),O(u(qa),{key:0,list:u(z).saves,handle:".handle",itemKey:te=>te},{item:R(({element:te})=>[o(Rs,{save:u(p)[te],onOpen:ge=>Q(te),onExport:ge=>C(te),onEditName:ge=>H(te,ge),onDuplicate:ge=>N(te),onDelete:ge=>_(te)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):M("",!0)]),footer:R(()=>[c("div",Ps,[o(Ft,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=P=>s.value=P),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:i.value})},null,8,["modelValue","class"]),c("div",xs,[qs,c("div",zs,[c("button",{class:"button",onClick:I[1]||(I[1]=P=>Q(u(Le)().id))},"New Game"),Object.keys(u(g)).length>0?(h(),O(as,{key:0,options:u(g),modelValue:r.value,"onUpdate:modelValue":I[2]||(I[2]=P=>S(P)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):M("",!0)])]),c("div",Fs,[Gs,c("button",{class:"button modal-default-button",onClick:I[3]||(I[3]=P=>a.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ea=K(Os,[["__scopeId","data-v-5b5b1604"]]);const de=e=>(Qe("data-v-269f7a94"),e=e(),Se(),e),Us=["src","alt"],Ls={key:1,class:"title"},Js=de(()=>c("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Ys={class:"discord"},Ws={class:"discord-links"},Xs={key:0},Ks=["href"],js=de(()=>c("li",null,[c("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Hs=de(()=>c("li",null,[c("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Zs={href:"https://forums.moddingtree.com/",target:"_blank"},$s=de(()=>c("span",{class:"material-icons"},"forum",-1)),er=de(()=>c("span",{class:"material-icons"},"info",-1)),tr=de(()=>c("span",{class:"material-icons"},"settings",-1)),ar=de(()=>c("span",{class:"material-icons"},"settings",-1)),nr=de(()=>c("span",{class:"material-icons"},"info",-1)),ir={href:"https://forums.moddingtree.com/",target:"_blank"},sr=de(()=>c("span",{class:"material-icons"},"forum",-1)),rr={class:"discord"},or={class:"discord-links"},lr={key:0},Ar=["href"],ur=de(()=>c("li",null,[c("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),cr=de(()=>c("li",null,[c("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),dr=U({__name:"Nav",setup(e){const t=w(null),a=w(null),n=w(null),i=w(null),{useHeader:s,banner:r,title:l,discordName:g,discordLink:f,versionNumber:y}=G;function p(){window.open(f,"mywindow")}return(C,N)=>(h(),B(Y,null,[u(s)?(h(),B("div",tt({key:0,class:"nav"},C.$attrs),[u(r)?(h(),B("img",{key:0,src:u(r),class:"banner",alt:u(l)},null,8,Us)):(h(),B("div",Ls,F(u(l)),1)),c("div",{onClick:N[0]||(N[0]=_=>{var Q;return(Q=i.value)==null?void 0:Q.open()}),class:"version-container"},[o(j,{display:"Changelog",direction:u(W).Down,class:"version"},{default:R(()=>[c("span",null,"v"+F(u(y)),1)]),_:1},8,["direction"])]),Js,c("div",Ys,[c("span",{onClick:p,class:"material-icons"},"discord"),c("ul",Ws,[u(f)?(h(),B("li",Xs,[c("a",{href:u(f),target:"_blank"},F(u(g)),9,Ks)])):M("",!0),js,Hs])]),c("div",null,[c("a",Zs,[o(j,{display:"Forums",direction:u(W).Down,yoffset:"5px"},{default:R(()=>[$s]),_:1},8,["direction"])])]),c("div",{onClick:N[1]||(N[1]=_=>{var Q;return(Q=t.value)==null?void 0:Q.open()})},[o(j,{display:"Info",direction:u(W).Down,class:"info"},{default:R(()=>[er]),_:1},8,["direction"])]),c("div",{onClick:N[2]||(N[2]=_=>{var Q;return(Q=n.value)==null?void 0:Q.open()})},[o(j,{display:"Settings",direction:u(W).Down,xoffset:"-66px"},{default:R(()=>[tr]),_:1},8,["direction"])])],16)):(h(),B("div",tt({key:1,class:"overlay-nav"},C.$attrs),[c("div",{onClick:N[3]||(N[3]=_=>{var Q;return(Q=i.value)==null?void 0:Q.open()}),class:"version-container"},[o(j,{display:"Changelog",direction:u(W).Right,xoffset:"25%",class:"version"},{default:R(()=>[c("span",null,"v"+F(u(y)),1)]),_:1},8,["direction"])]),c("div",{onClick:N[4]||(N[4]=_=>{var Q;return(Q=n.value)==null?void 0:Q.open()})},[o(j,{display:"Settings",direction:u(W).Right},{default:R(()=>[ar]),_:1},8,["direction"])]),c("div",{onClick:N[5]||(N[5]=_=>{var Q;return(Q=t.value)==null?void 0:Q.open()})},[o(j,{display:"Info",direction:u(W).Right},{default:R(()=>[nr]),_:1},8,["direction"])]),c("div",null,[c("a",ir,[o(j,{display:"Forums",direction:u(W).Right,xoffset:"7px"},{default:R(()=>[sr]),_:1},8,["direction"])])]),c("div",rr,[c("span",{onClick:p,class:"material-icons"},"discord"),c("ul",or,[u(f)?(h(),B("li",lr,[c("a",{href:u(f),target:"_blank"},F(u(g)),9,Ar)])):M("",!0),ur,cr])])],16)),o(Hi,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),o(Ea,{ref_key:"savesManager",ref:a},null,512),o($i,{ref_key:"options",ref:n},null,512),o(Ti,{ref_key:"changelog",ref:i},null,512)],64))}});var wa=K(dr,[["__scopeId","data-v-269f7a94"]]);const gr={class:"inner-tab"},mr=U({__name:"Game",setup(e){const t=ze(V,"tabs"),a=x(()=>Object.keys(ee)),n=G.useHeader;function i(s){const{display:r,minimized:l,name:g,color:f,minimizable:y,nodes:p,minimizedDisplay:C}=s;return{display:r,minimized:l,name:g,color:f,minimizable:y,nodes:p,minimizedDisplay:C}}return(s,r)=>(h(),B("div",{class:ae(["tabs-container",{useHeader:u(n)}])},[(h(!0),B(Y,null,Ta(u(t),(l,g)=>{var f,y;return h(),B("div",{key:g,class:ae(["tab",u((f=u(ee)[l])==null?void 0:f.classes)]),style:Xe(u((y=u(ee)[l])==null?void 0:y.style))},[g===0&&!u(n)?(h(),O(wa,{key:0})):M("",!0),c("div",gr,[u(a).includes(l)?(h(),O(Qi,tt({key:0},i(u(ee)[l]),{index:g,onSetMinimized:p=>u(ee)[l].minimized.value=p}),null,16,["index","onSetMinimized"])):(h(),O(ce(l),{key:1,index:g},null,8,["index"]))])],6)}),128))],2))}});var fr=K(mr,[["__scopeId","data-v-3e0f1aab"]]);const hr=U({__name:"Node",props:{id:null},setup(e){const a=be(e),n=Ut(qt,()=>{}),i=Ut(zt,()=>{}),s=ye(null),r=x(()=>s.value&&s.value.parentElement);return fe([r,a.id],([l,g],[f,y])=>{f&&i(u(y)),l&&n(g,l)}),Da(()=>i(u(a.id))),(l,g)=>(h(),B("div",{class:"node",ref_key:"node",ref:s},null,512))}});var vr=K(hr,[["__scopeId","data-v-a48cb382"]]),dt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAAAqhJREFUeJzt3LFqFFEYBeBdERGJCaKgESUWCsZCTG0dbSyCZTp9B0ufxMJu38EHsA5YCDaiKGihiCxYuhZp7x254e6O6/m+8me4M1k4/HCYzGQCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkGg69gOs2mLxbbHM86fTS8XfdKz7MuzU2A8AYxIAogkA0QSAaAJAtNNjP8Cy1FqX+zceRt1XOzTMBiCaABBNAIgmAEQTAKKtfQvU2rrsb10tzu9t/i7O9y5sF+dHP74U5w92D4rzZ9evNJ1fU7tv7e/VDg2zAYgmAEQTAKIJANEEgGhr3wL10tr21Ly4dbvLObXrq63Rp69N53PMBiCaABBNAIgmAEQTAKLFtUCff30vzl9+LF//ZKdPO1TT2vb0ui/HbACiCQDRBIBoAkA0ASBaXAt07dzF4rzWDk0ml4vTXi1N6zneBerLBiCaABBNAIgmAEQTAKL9t9+G6fW9oFo79Hz3TnHe692e2vWHb46K89cfXhXnvv8zzAYgmgAQTQCIJgBEEwCixTUE69IOaX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NZ7tVLVtuf84n6P25afXGvp9T3PxglANAEgmgAQTQCIJgBEW+2Xeqs9aLUWrVbkyaPPi+ujZ2Cq7Up1/7vTy/KeRjp7f7K4Xv2eZ2uHnABEEwCiCQDRBIBoAkC0g3kv0JdXHxfXzy8eL65XW5pWm1FtpVpa+99sltuV0e6++bC4/uDF8pNrb0+Xr1Od0ZqNE4BoAkA0ASCaABBNAIg2XQtUbWN2m1o71FJte9qtDofECUA0ASCaABBNAIgmAEQ7mCfCzu58G7qf3dfbUfftpbX/VpvniTCYiAAQTQCIJgBEEwCiDf9FXm171lKdQTr0+/bivUBwwASAaAJANAEgmgAQbbpZIPgfvdokJwDRBIBoAkA0ASCaABBtqrkM/qjOUM32NubR/1DfUm2HnABEEwCiCQDRBIBoAkC06d4OzXHo1UqNbr2cAEQTAKIJANEEgGgCQDQt0JGrtiijW5fqjNDoGScnANEEgGgCQDQBIJoAEE0LxJWqtjpmgWAgASCaABBNAIgmAETTAh2J0TM/vT5fZRYIBhIAogkA0QSAaAJANG+HnpT/UPs7/xEGHQgA0QSAaAJANAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK7ILzj6vECOPLAcAAAAAElFTkSuQmCC";const Ot=e=>(Qe("data-v-77dfedc5"),e=e(),Se(),e),Er=["ondragstart","ondragend","ondragenter","ondragleave","ondragover","ondrop"],wr={key:0,class:"move-indicator"},Ir=Ot(()=>c("span",{class:"material-icons"},"straight",-1)),_r=[Ir],Qr={key:1,class:"move-indicator"},Sr=Ot(()=>c("span",{class:"material-icons"},"merge",-1)),Mr=[Sr],kr={key:2,class:"character-display"},Tr=["src"],Dr={key:3,class:"relevancy-display"},Rr=["src"],Vr={key:4,class:"presence-display"},Pr=Ot(()=>c("span",{class:"material-icons"}," extension ",-1)),xr={key:5,class:"level-display"},qr=["src"],zr=["src"],Fr=["src"],Gr=["src"],Or=["src"],Ur=["src"],Lr={key:6,class:"frozen"};var Jr=U({__name:"CharacterSlot",props:{id:null,character:null,isSelected:{type:Boolean},isShop:{type:Boolean},isDragging:{type:Boolean},selected:null,shake:{type:Boolean},frozen:{type:Boolean}},emits:["dragstart","dragend","drop"],setup(e,{emit:t}){const a=e,n=w(!1),i=w(!1);fe(n,r=>{t(r?"dragstart":"dragend")});const s=ye("");return St(()=>{if(a.character==null||a.selected!=null||n.value){s.value="";return}const r=Ne(X[a.character.type].abilityDescription(a.character));s.value=J(()=>o(Y,null,[o("b",null,[X[a.character.type].nickname]),o("br",null,null),o(r,null,null)]))}),(r,l)=>(h(),O(j,{display:u(s),direction:u(W).Up},{default:R(()=>{var g,f,y;return[c("div",{class:ae(["character",{selected:e.isSelected,empty:e.character==null&&e.selected==null,dragging:n.value,isDragging:e.isDragging,draggingOver:i.value,shake:e.shake}]),draggable:"true",ondragstart:()=>n.value=!0,ondragend:()=>n.value=!1,ondragenter:()=>i.value=!0,ondragleave:()=>i.value=!1,ondragover:p=>{var C;e.selected!=null&&!e.isShop&&(((C=e.character)==null?void 0:C.type)!==e.selected.type||e.isSelected)&&p.preventDefault(),e.character!=null&&e.selected!=null&&!e.isSelected&&e.character.type===e.selected.type&&e.character.exp<6&&p.preventDefault()},ondrop:()=>{i.value=!1,t("drop")}},[e.selected!=null&&!e.isShop&&(((g=e.character)==null?void 0:g.type)!==e.selected.type||e.isSelected)&&n.value===!1?(h(),B("span",wr,_r)):M("",!0),e.character!=null&&e.selected!=null&&!e.isSelected&&e.character.type===e.selected.type&&e.character.exp<6?(h(),B("span",Qr,Mr)):M("",!0),e.character!=null?(h(),B("span",kr,[c("img",{src:u(X)[e.character.type].display},null,8,Tr)])):M("",!0),e.character!=null?(h(),B("span",Dr,[c("img",{src:u(dt)},null,8,Rr),c("span",null,F((f=e.character)==null?void 0:f.relevancy),1)])):M("",!0),e.character!=null?(h(),B("span",Vr,[Pr,c("span",null,F((y=e.character)==null?void 0:y.presence),1)])):M("",!0),e.character!=null?(h(),B("span",xr,[e.character.exp===1?(h(),B("img",{key:0,src:u(pr)},null,8,qr)):M("",!0),e.character.exp===2?(h(),B("img",{key:1,src:u(yr)},null,8,zr)):M("",!0),e.character.exp===3?(h(),B("img",{key:2,src:u(br)},null,8,Fr)):M("",!0),e.character.exp===4?(h(),B("img",{key:3,src:u(Cr)},null,8,Gr)):M("",!0),e.character.exp===5?(h(),B("img",{key:4,src:u(Nr)},null,8,Or)):M("",!0),e.character.exp===6?(h(),B("img",{key:5,src:u(Br)},null,8,Ur)):M("",!0)])):M("",!0),e.frozen?(h(),B("div",Lr)):M("",!0),e.id?(h(),O(vr,{key:7,id:e.id},null,8,["id"])):M("",!0)],10,Er)]}),_:1},8,["display","direction"]))}});var we=K(Jr,[["__scopeId","data-v-77dfedc5"]]);const Yr={min:.25,max:.5},Wr=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],Xr=.01,Kr=.1,jr=100,Hr=!0,Zr={x:0,y:0},$r=!1,eo=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:100},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:2},{time:1,value:.5}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#FFC000"},{time:1,value:"#FFDF00"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["particle.png"]}},{type:"spawnShape",config:{type:"torus",data:{radius:100,x:0,y:0}}}];var to={lifetime:Yr,ease:Wr,frequency:Xr,emitterLifetime:Kr,maxParticles:jr,addAtBack:Hr,pos:Zr,emit:$r,behaviors:eo};const it=w(!1),_t=w(""),Zt=na(),Ue=w(),We=w("");function me(e,...t){var a;!it.value||(a=Ue.value)==null||a.emit(e,...t)}$.on("loadSettings",e=>{et(e,"server","https://Super-Auto-Coots.thepaperpilot.repl.co"),fe(()=>e.server,t=>{Ue.value&&Ue.value.close(),Ue.value=Oa(t),ao(Ue.value),it.value=!1,We.value="",Ue.value.connect()},{immediate:!0}),ai(J(()=>o(Y,null,[o(Ft,{title:"Server URL","onUpdate:modelValue":t=>e.server=t,modelValue:e.server},null),o("div",{style:"font-style: italic; font-size: small; margin-top: -10px;"},[it.value?o("span",null,[v("Connected!")]):We.value?o("span",{style:"color: red"},[We.value]):o("span",null,[v("Connecting...")])])])))});function ve(e){var n;const t=m.particles.boundingRect.value;if(!t)return;const a=(n=m.nodes.value[e])==null?void 0:n.rect;a&&m.particles.addEmitter(to).then(i=>{i.updateOwnerPos(a.x+a.width/2-t.x,a.y+a.height/2-t.y),i.playOnceAndDestroy()})}function ao(e){e.on("connect",()=>{We.value="",it.value=!0,m.reset.reset()}),e.on("connect_error",t=>{We.value=`${t.name}: ${t.message}`}),e.on("disconnect",(t,a)=>{var n;We.value=a instanceof Error?`${a.name}: ${a.message}`:(n=a==null?void 0:a.description)!=null?n:t,it.value=!1}),e.on("server version",t=>{Ga(G.versionNumber,t)||(Zt.info("Server only accepts game versions in range: "+t),e.disconnect())}),e.on("info",t=>{Zt.info(t),t==="Failed to start streaming"&&(m.findingMatch.value=!1)}),e.on("nickname",t=>{_t.value=t}),e.on("newTurn",t=>{m.gold.value=10,m.turn.value++,m.battle.value=null,m.shop.value=t.map(a=>({type:a,relevancy:X[a].initialRelevancy,presence:X[a].initialPresence,exp:1})),m.frozen.value=m.frozen.value.map((a,n)=>n),setTimeout(()=>{t.forEach((a,n)=>ve(`shop-char-${n}`))},0),m.showRefreshAnim.value=!0,setTimeout(()=>m.showRefreshAnim.value=!1,500)}),e.on("reroll",t=>{m.gold.value--,m.shop.value=t.map(a=>({type:a,relevancy:X[a].initialRelevancy,presence:X[a].initialPresence,exp:1})),m.frozen.value=m.frozen.value.map((a,n)=>n),setTimeout(()=>{t.forEach((a,n)=>ve(`shop-char-${n}`))},0),m.showRefreshAnim.value=!0,setTimeout(()=>m.showRefreshAnim.value=!1,500)}),e.on("buy",(t,a,n)=>{m.team.value[a]=n,m.shop.value[t]=null,m.gold.value-=3,ve(`shop-char-${t}`),ve(`team-char-${a}`),m.frozen.value.includes(t)&&(m.frozen.value=m.frozen.value.filter(i=>i!==t))}),e.on("move",(t,a)=>{const n=m.team.value[t];m.team.value[t]=m.team.value[a],m.team.value[a]=n,ve(`team-char-${t}`),ve(`team-char-${a}`)}),e.on("merge",(t,a,n)=>{var l,g;const i=(g=(l=m.team.value[a])==null?void 0:l.exp)!=null?g:0,s=i>=6?3:i>=3?2:1,r=n.exp>=6?3:n.exp>=3?2:1;m.team.value[t]=null,m.team.value[a]=n,ve(`team-char-${t}`),ve(`team-char-${a}`),X[n.type].abilityType==="LevelUp"&&s!==r&&setTimeout(()=>X[n.type].performAbility(n),1250)}),e.on("stream",(t,a)=>{let n=!1;m.team.value.forEach(i=>{i!=null&&X[i.type].abilityType==="StreamStarted"&&(n=!0,X[i.type].performAbility(i))}),n?setTimeout(()=>$t(t,a)):$t(t,a)}),e.on("sell",t=>{const a=m.team.value[t];let n;a.exp>=6?n=3:a.exp>=3?n=2:n=1,m.gold.value+=n,m.team.value[t]=null,ve(`team-char-${t}`),X[a.type].abilityType==="Sold"&&setTimeout(()=>X[a.type].performAbility(a),500)}),e.on("freeze",t=>{m.frozen.value.includes(t)?m.frozen.value=m.frozen.value.filter(a=>a!==t):m.frozen.value.push(t)})}function $t(e,t){m.findingMatch.value=!1,m.battle.value={team:JSON.parse(JSON.stringify(m.team.value.filter(a=>a!=null))),streamers:[],enemyTeam:e.team,enemyStreamers:[],enemyNickname:e.nickname,enemyLives:e.lives,enemyWins:e.wins,enemyTurn:e.turn,ranLivestreamEnded:!1},m.outcome.value=t,m.showingOutcome.value=!1,m.playClicked.value=!1,setTimeout(m.prepareMove,1e3)}var no="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAABT5JREFUeJzt3UGrVVUYBuBj2ERSikSKRmXixDBoEl6kBpVSEBUGgRbUyF9QTYQLd6KDaBoNykqhSKpJo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iADAGgGANQIAawQA1mrfBVJdmourcXdicEidIIu7HKrbo7oupfYaKeq52a6OOummPgduhwYaiADAGgGANQIAawQA1mrfBVLUbcntldxeoFLyvxGWu01anRRT3Rutmd0ehRUA1ggArBEAWCMAsEYAYK02XaC7++MTXtVqXFe/4XWuP947pPbAqL032RNhpX4jLLs36YtTYhzR1VHq3u1RWAFgjQDAGgGANQIAawQA1rrWBSp1a/T00cnUc09O7km9Xt+H01tK3dvT1G6PwgoAawQA1ggArBEAWCMAsNZze4FKdYfmlg6HdXWPkOqiLMxfCOvqf45tAxvC+gfHxF+Q44g/+HklLA+KvUBYHysArBEAWCMAsEYAYI0AwFrt931ku0PKg8PHi8zn8+V7i4yjqHmq5zb1Pp9SWAFgjQDAGgGANQIAawQA1npuL1BWqb1DWdmui6LmU6orhfWxAsAaAYA1AgBrBADWCACs1b4LVEr/1dd0ewr/0mvzaSpWAFgjALBGAGCNAMAaAYA1AgBrBADWCACsEQBYIwCwRgBgjb1Alyz+cWvq9TduvBjW5W3VyZNinZ6POjHndl8QKwCsEQBYIwCwRgBgjQDAmtU3/qrq/H1B2duYe20+blgBYI0AwBoBgDUCAGsEANboBFyiujFZpborvTafpmIFgDUCAGsEANYIAKwRAAAAAAAAAAAAAAAAAABA7f0NUYSCE1qhmF4AAAAASUVORK5CYII=",uo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAABk1JREFUeJzt3TFoXVUcx/GX1EWRp4N0UkRD0UEJCELhVVuEWHQQIxVKWhxKcRCXiqO6tOhS6iIZRDIIFodCN4sECmIrQqxQ6KBIsigEpEItgks0DnX8/5B//J/ce9/v+xlPH/fevMevB36cc+5oBAAAAAAAAAAAAAAAAGAazHT9ALtte/vmdtfP8H/MzDxg95u1NNv1AwBdIgCwRgBgjQDAGgGAtbu6foBWVNszGb+2249SSv1dtEM7wwwAawQA1ggArBEAWCMAsDb4Fijb9lz99ULT52ltMj4SjtMO7Q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OnW0Vsm1DFXWqc+t2SMmeAl2180sZyhvnmQFgjQDAGgGANQIAawQA1np3OvSe2V/EHV4PR6+f+CIcV2tLWrdGrdsh9f088Un8/WSpU6DVO8JunPy45L5//f1gON76jfPMALBGAGCNAMAaAYA1AgBrne0IU23G0XfeDMc/P/lROL7/+Avh+If3xy3QqVvnwvG+UTvX5le6aXvU9/n0Uvz9Z62dvxSOsyMMaIgAwBoBgDUCAGsEANbSLVDd2p7Y+sZ6OC7boTNxO6SoNiOrau1N1Rvkla7anj+feygcv/vyz6nrt26HmAFgjQDAGgGANQIAawQA1jo7Fyjd6oiWoGotStaa3AkV72zKUjvI1I4zdc7Psw8fCser1kQdWF4Ix7Nrsa68sVryPFnMALBGAGCNAMAaAYA1AgBrvTsdWq2x0a3LMKj2JkutrVLn86jW5ew4Ht8j/kuce3QuHN88u5G6r/q8uv5a/DhlmAFgjQDAGgGANQIAawQA1kpO2B2N2p8LlJXdKZa9r7q+OuVYnVbdmmp71KnLffu9Wp8azQwAawQA1ggArBEAWCMAsFbWAimtzxFSVHugZO+bbSeyb3Kvkm1L+vZ78Y4woCECAGsEANYIAKwRAFhr3gIp2bYhS7UHSva+Ve1Ka1VtSVe/V9XzK8wAsEYAYI0AwBoBgDUCAGudtUBKVVuSbQ+y923dTgxFV79XFWYAWCMAsEYAYI0AwBoBgLV/AH3DQBxUNmu+AAAAAElFTkSuQmCC",co="./assets/start stream.dd66a6ec.png";const go=Symbol("Reset");function mo(e){return xt(()=>{const t=e();return t.id=da("reset-"),t.type=go,t.reset=function(){var i;const a=s=>{if(s!=null&&typeof s=="object")if(Ke in s){const r=s;r.value=r[Ke]}else!(s instanceof E)&&!Ce(s)&&Object.values(s).forEach(r=>a(r))},n=u(t.thingsToReset);Bt(n)?n.forEach(a):a(n),$.emit("reset",t),(i=t.onReset)==null||i.call(t)},pe(t,"thingsToReset"),t})}const At={};$.on("removeLayer",e=>{var t;(t=At[e.id])==null||t.call(At),At[e.id]=void 0});ia.registerPlugin(La);Ja.registerPlugin("batch",Ya);var fo=U({props:{style:ne(String,Object,Array),classes:ne(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=ye(null),a=new ResizeObserver(s),n=ye(null);Mt(()=>{var l,g;const r=n.value;r!=null&&(a.observe(r),t.value=new ia({resizeTo:r,backgroundAlpha:0}),(l=n.value)==null||l.appendChild(t.value.view),(g=e.onInit)==null||g.call(e,t.value)),s(),e.onHotReload&&qe(e.onHotReload)}),Ra(()=>{var r;(r=t.value)==null||r.destroy()});let i=!0;function s(){i&&(i=!1,qe(()=>{var r;n.value!=null&&((r=e.onContainerResized)==null||r.call(e,n.value.getBoundingClientRect())),i=!0}))}return $.on("fontsLoaded",s),{unref:u,resizeListener:n}}});function ho(e,t,a,n,i,s){return h(),B("div",{ref:"resizeListener",class:ae(["resize-listener",e.unref(e.classes)]),style:Xe(e.unref(e.style))},null,6)}var vo=K(fo,[["render",ho],["__scopeId","data-v-0b99a6fc"]]);const po=Symbol("Particles");function yo(e){return xt(()=>{var i,s;const t=(i=e==null?void 0:e())!=null?i:{};t.id=da("particles-"),t.type=po,t[Rt]=vo,t.app=ye(null),t.addEmitter=r=>{const l=t;return l.app.value?Promise.resolve(new Lt(l.app.value.stage,r)):new Promise(g=>{a.push({resolve:g,config:r})})};let a=[];function n(r){const l=t;l.app.value=r,a.forEach(({resolve:g,config:f})=>g(new Lt(r.stage,f))),a=[]}return t.onContainerResized=(s=t.onContainerResized)==null?void 0:s.bind(t),t[Vt]=function(){const{id:r,style:l,classes:g,onContainerResized:f,onHotReload:y}=this;return{id:r,style:u(l),classes:g,onContainerResized:f,onHotReload:y,onInit:n}},t})}window.upgradeConfig=Wa;const bo={min:1.5,max:2.5},Co=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],No=.001,Bo=.1,Eo=100,wo=!0,Io={x:0,y:0},_o=!1,Qo=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveAcceleration",config:{accel:{x:0,y:2e3},minStart:600,maxStart:600,rotate:!0}},{type:"scale",config:{scale:{list:[{time:0,value:.5},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#962121"},{time:.5,value:"#214a96"},{time:1,value:"#4c2196"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["particle.png"]}},{type:"spawnShape",config:{type:"torus",data:{radius:100,x:0,y:0}}}];var So={lifetime:bo,ease:Co,frequency:No,emitterLifetime:Bo,maxParticles:Eo,addAtBack:wo,pos:Io,emit:_o,behaviors:Qo},Mo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAYAAACkx7W/AAAAAXNSR0IArs4c6QAACg5JREFUeJzt3U+IXVcdB/D3mjSOIcbRjrHVldZ2iAilNmRkxhIQizXFFCSCQUiLBOlGg1B0JTVkJwWpaxENSFSykEhatFCVNqkRqwSsENp0m5qO0JZQh3TG50KEZHLOzDvz7p375/f5LH+5c+5J8rjf93v3N/cNBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC017DpDVBmNFocNb0HyBkOZ1xTOuSWpjcAQDMEAEBQAgAgKAEAEJQAAAhqa9MbIC037TM3dWiztwJjy71uTQe1kw4AICgBABCUAAAISgAABCUAAIIyBdSw0mmfY7MryfqeB6vbE2xU7nVrOqiddAAAQQkAg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+3egD3QAAEEJAICgBABAUAIAICgBABCUKaCeu+/u25L1W6Zvr2T9HZdeTdZn705Pj+TO+583Xy86ftvL6fPu3vuJZD2nqvOW/n1L97Pt5e21nrfY7+tdns2hAwAISgAABCUAAIISAABBCQCAoEwB0Qq1T63UrOv7JyYdAEBQAgAgKAEAEJQAAAhKAAAEZQqo56JNp5Q+26dubdtPTlf2SbV0AABBCQCAoAQAQFACACAoAQAQlCkgalHVN2GZQoH66AAAghIAAEEJAICgBABAUAIAIChTQD1xbelq01voJFNGRKYDAAhKAAAEJQAAghIAAEEJAICgTAEFVfezd9r2bJ+m/r7QZjoAgKAEAEBQAgAgKAEAEJQAAAjKFFDPVTWd0tQ6dU/XNDW905W/V36dj1ayPs3SAQAEJQAAghIAAEEJAICgBABAUKaAeuK1CyvJ+o5Lpd8U9urkmxkMBhefaeYbypwXxqcDAAhKAAAEJQAAghIAAEEJAICghk1vgDKj0eIoVZ+bOrTZWyGw80snk/XhcMY1pUN0AABBCQCAoAQAQFACACAoAQAQlDv2PZGbDoI6mPbpBx0AQFACACAoAQAQlAAACEoAAAAAAAAAAAAAAHTSfwF85RziHHwuDAAAAABJRU5ErkJggg==",ko="./assets/shop.3860773a.gif";function De(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Va(e)}const X={coots:{nickname:"Coots",initialRelevancy:3,initialPresence:1,display:oo,abilityType:"LivestreamJoined",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Livestream joined")]),v(": Deal "),e.exp>=6?6:e.exp>=3?4:2," ",v("relevancy damage to every character on a stream")])),performAbility(e){if(m.battle.value==null)return;const t=e.exp>=6?6:e.exp>=3?4:2;m.battle.value.streamers.forEach(a=>a.relevancy-=t),m.battle.value.enemyStreamers.forEach(a=>a.relevancy-=t)}},ludwig:{nickname:"Ludwig Coots",initialRelevancy:2,initialPresence:1,display:no,abilityType:"LivestreamJoined",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Livestream joined")]),v(": Gain "),e.exp>=6?3:e.exp>=3?2:1," ",v("presence for every character on a stream")])),performAbility(e){if(m.battle.value==null)return;const t=e.exp>=6?3:e.exp>=3?2:1;m.battle.value.streamers.includes(e)?e.presence+=t*m.battle.value.streamers.length:e.presence+=t*m.battle.value.enemyStreamers.length}},qt:{nickname:"Qt Coots",initialRelevancy:1,initialPresence:2,display:lo,abilityType:"Sold",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Sold")]),v(": Gain "),e.exp>=6?3:e.exp>=3?2:1,v(" mogul"),e.exp>=3?"s":""])),performAbility(e){const t=e.exp>=6?3:e.exp>=3?2:1;m.gold.value+=t}},maid:{nickname:"Maid Coots",initialRelevancy:2,initialPresence:2,display:io,abilityType:"LevelUp",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Level up")]),v(": Every character gains "),e.exp>=3?2:1,v(" relevancy and presence")])),performAbility(e){const t=e.exp>=6?2:1;m.team.value.forEach(a=>{a&&(a.relevancy+=t,a.presence+=t)})}},mail:{nickname:"Mogul Mail Coots",initialRelevancy:1,initialPresence:1,display:so,abilityType:"LivestreamJoined",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Livestream joined")]),v(": Summon a lv")," ",e.exp>=6?3:e.exp>=3?2:1,v(" Ludwig Coots with this character's stats.")])),performAbility(e){if(m.battle.value==null)return;const t=e.exp>=6?3:e.exp>=3?2:1,a={type:"ludwig",exp:t===3?6:t===2?3:1,presence:e.presence,relevancy:e.relevancy};m.queue.value.push({action:"LivestreamJoined",target:a}),m.battle.value.streamers.includes(e)?m.battle.value.streamers.push(a):m.battle.value.enemyStreamers.push(a)}},stanz:{nickname:"Stanz Coots",initialRelevancy:1,initialPresence:1,display:Ao,abilityType:"LivestreamEnded",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Livestream ended")]),v(": Gain "),e.exp>=6?3:e.exp>=3?2:1," ",v("relevancy for every character on either livestream with more relevancy.")])),performAbility(e){if(m.battle.value==null)return;const t=e.exp>=6?3:e.exp>=3?2:1;e.relevancy+=t*(m.battle.value.streamers.filter(a=>a.relevancy<e.relevancy).length+m.battle.value.enemyStreamers.filter(a=>a.relevancy<e.relevancy).length)}},money:{nickname:"Mogul Money Coots",initialRelevancy:1,initialPresence:1,display:ro,abilityType:"StreamStarted",abilityDescription:e=>J(()=>o(Y,null,[o("i",null,[v("Stream started")]),v(": Permanently gain")," ",e.exp>=6?3:e.exp>=3?2:1,v(" presence if you have 2 or more moguls.")])),performAbility(e){if(m.gold.value>=2){const t=e.exp>=6?3:e.exp>=3?2:1;e.presence+=t}}},vespa:{nickname:"Vespa Coots",initialRelevancy:1,initialPresence:1,display:uo,abilityType:"LivestreamJoined",abilityDescription:()=>J(()=>o(Y,null,[o("i",null,[v("Livestream joined")]),v(": Set the character that most recently joined the enemy livestream's presence to 0. This effect does not improve on level up.")])),performAbility(e){m.battle.value!=null&&(m.battle.value.streamers.includes(e)?m.battle.value.enemyStreamers.length>0&&(m.battle.value.enemyStreamers[m.battle.value.enemyStreamers.length-1].presence=0):m.battle.value.streamers.length>0&&(m.battle.value.streamers[m.battle.value.streamers.length-1].presence=0))}}},m=ba("main",function(){const e=w(3),t=w(0),a=w(0),n=w(0),i=w([null,null,null]),s=w([]),r=w(null),l=w(null),g=w(!1),f=w(""),y=w(!1),p=w(!1),C=w(!1),N=w([]),_=w([]),Q=w(!1),S=w(null),H=x(()=>S.value==null?0:S.value.streamers.reduce((ie,q)=>ie+Math.max(0,q.presence)*Math.max(0,q.relevancy),0)*100),b=x(()=>S.value==null?0:S.value.enemyStreamers.reduce((ie,q)=>ie+Math.max(0,q.presence)*Math.max(0,q.relevancy),0)*100),I=mo(()=>({onReset(){e.value=3,t.value=0,a.value=0,n.value=0,i.value=[null,null,null],s.value=[],r.value=null,l.value=null,g.value=!1,S.value=null,f.value="",y.value=!1,C.value=!1,N.value=[],_.value=[]}})),P=w(!1);function te(){var ie,q;if(S.value==null)throw"Preparing move while not in battle";if(N.value.length===0&&S.value.team.length===0&&S.value.enemyTeam.length===0){if(S.value.ranLivestreamEnded===!1){S.value.streamers.forEach(T=>{X[T.type].abilityType==="LivestreamEnded"&&N.value.push({action:"LivestreamEnded",target:T})}),S.value.enemyStreamers.forEach(T=>{X[T.type].abilityType==="LivestreamEnded"&&N.value.push({action:"LivestreamEnded",target:T})}),S.value.ranLivestreamEnded=!0,te();return}f.value==="Victory"?t.value++:f.value==="Defeat"&&e.value--,y.value=!0;return}if(N.value.length===0?N.value.push({action:"join"}):N.value.length>1&&(N.value=N.value.sort((T,L)=>T.action!==L.action?1:T.target!=null&&L.target!=null?L.target.relevancy-T.target.relevancy:0)),z.autoplay===!1&&C.value===!1)p.value=!0;else{p.value=!1;const T=N.value.shift();switch(T.action){case"join":if(((ie=S.value.team.length)!=null?ie:0)>0){const L=S.value.team.pop();S.value.streamers.push(L),X[L.type].abilityType==="LivestreamJoined"&&N.value.unshift({action:"LivestreamJoined",target:L})}if(((q=S.value.enemyTeam.length)!=null?q:0)>0){const L=S.value.enemyTeam.pop();S.value.enemyStreamers.push(L),X[L.type].abilityType==="LivestreamJoined"&&N.value.unshift({action:"LivestreamJoined",target:L})}break;default:if(T.target==null){console.error("Invalid action",T);break}X[T.target.type].performAbility(T.target);break}C.value=!1,setTimeout(te,z.fast?750:1250)}}const ge=yo(()=>({fullscreen:!1,zIndex:10,boundingRect:w(null),onContainerResized(ie){this.boundingRect.value=ie}}));return{name:"Game",minimizable:!1,display:J(()=>{let ie;if(t.value>=5){let q;return o("div",{class:"total-outcome-container"},[o("span",{class:"total-outcome"},[v("You Won!")]),o("span",{class:"smiley"},[v("\u{1F603}")]),o(he,null,De(q=new Array(3).fill(0).map((T,L)=>o(we,{character:i.value[L]},null)))?q:{default:()=>[q]}),o("button",{class:"button",onClick:()=>location.reload()},[v("Play again")]),Je(ge)])}if(e.value<=0){let q;return o("div",{class:"total-outcome-container"},[o("span",{class:"total-outcome"},[v("You ran out of lives!")]),o("span",{class:"smiley"},[v("\u{1F630}")]),o(he,null,De(q=new Array(3).fill(0).map((T,L)=>o(we,{character:i.value[L]},null)))?q:{default:()=>[q]}),o("button",{class:"button",onClick:()=>location.reload()},[v("Play again")]),Je(ge)])}if(S.value!=null){let q,T,L,Oe;return o("div",{class:{["battle-container"]:!0,fast:z.fast}},[o("div",{class:"battle-controls"},[o("button",{class:"button",onClick:()=>{C.value=!0,te()}},[o("span",{class:"material-icons"},[v("play_arrow")]),o("span",null,[v("Play")])]),o("button",{class:{button:!0,active:z.autoplay},onClick:()=>{z.autoplay=!z.autoplay,p.value&&te()}},[o("span",{class:"material-icons"},[v("all_inclusive")]),o("span",null,[v("Autoplay")])]),o("button",{class:{button:!0,active:z.fast},onClick:()=>z.fast=!z.fast},[o("span",{class:"material-icons"},[v("fast_forward")]),o("span",null,[v("Fast")])])]),o("div",{class:"teams-container",style:y.value?"pointer-events: none;":""},[o("div",{class:"team-container"},[o("div",{class:"stream-container"},[o("div",{class:"stream-details",style:"left: 1vmin"},[o("span",{style:"margin-left: 0"},[_t.value,v(" (YOU)")]),o("div",{class:"stats",style:"margin-left: 0"},[o("div",{class:"resource-box"},[o("img",{src:dt},null),o("span",null,[e.value])]),o("div",{class:"resource-box"},[o("span",{class:"material-icons"},[v("emoji_events")]),o("span",null,[t.value,v("/5")])])])]),o("div",{class:"view-counter",style:"right: 1vmin"},[Et(H.value),v(" Views")]),o(he,{class:"streamers-container"},{default:()=>[o(lt,{name:"character-transition"},De(q=S.value.streamers.slice().reverse().map((le,Me)=>{var Ae;return o(we,{key:S.value.streamers.length-Me,character:le,shake:p.value&&((Ae=N.value[0])==null?void 0:Ae.target)===le},null)}))?q:{default:()=>[q]})]})]),o(he,{class:"members-container",style:"margin-left: 0; padding-right: 4vmin;"},{default:()=>[o(lt,{name:"character-transition"},De(T=S.value.team.map((le,Me)=>{var Ae,je,He,Ze;return o(we,{character:le,key:Me,shake:p.value&&((Ae=N.value[0])==null?void 0:Ae.action)==="join"&&le===((Ze=S.value)==null?void 0:Ze.team[((He=(je=S.value)==null?void 0:je.team.length)!=null?He:0)-1])},null)}))?T:{default:()=>[T]})]})]),o("div",{class:"team-container"},[o("div",{class:"stream-container"},[o("div",{class:"stream-details",style:"right: 1vmin"},[o("span",{style:"margin-right: 0"},[S.value.enemyNickname]),o("div",{class:"stats",style:"margin-right: 0"},[o("div",{class:"resource-box"},[o("img",{src:dt},null),o("span",null,[S.value.enemyLives])]),o("div",{class:"resource-box"},[o("span",{class:"material-icons"},[v("emoji_events")]),o("span",null,[S.value.enemyWins,v("/5")])])])]),o("div",{class:"view-counter",style:"left: 1vmin"},[Et(b.value),v(" Views")]),o(he,{class:"streamers-container"},{default:()=>[o(lt,{name:"character-transition"},De(L=S.value.enemyStreamers.map((le,Me)=>{var Ae;return o(we,{key:Me,character:le,shake:p.value&&((Ae=N.value[0])==null?void 0:Ae.target)===le},null)}))?L:{default:()=>[L]})]})]),o(he,{class:"members-container",style:"margin-right: 0; padding: 0 4vmin;"},{default:()=>[o(lt,{name:"character-transition"},De(Oe=S.value.enemyTeam.slice().reverse().map((le,Me)=>{var Ae,je,He,Ze;return o(we,{character:le,key:S.value.enemyStreamers.length+Me,shake:p.value&&((Ae=N.value[0])==null?void 0:Ae.action)==="join"&&le===((Ze=S.value)==null?void 0:Ze.enemyTeam[((He=(je=S.value)==null?void 0:je.enemyTeam.length)!=null?He:0)-1])},null)}))?Oe:{default:()=>[Oe]})]})])]),y.value?o("div",{class:"outcome",onClick:()=>me("newTurn")},[o("span",null,[f.value]),o("span",{style:"font-size: 2vmin"},[v("Next Turn")])]):null])}return o("div",{class:"game-container",style:g.value?"pointer-events: none":"",onClick:()=>{r.value=null,l.value=null}},[o("h2",{class:"team-nickname"},[_t.value]),o(he,{class:"manager-header"},{default:()=>[o("div",{class:"resource-box"},[o("span",{class:"material-icons"},[v("credit_card")]),n.value]),o("div",{class:"resource-box"},[o("img",{src:dt},null),e.value]),o("div",{class:"resource-box"},[o("span",{class:"material-icons"},[v("emoji_events")]),t.value,v("/5")]),o("div",{style:"flex-grow: 1"},null),g.value?o("div",{class:"waiting"},[v("Finding opposing team...")]):o(Y,null,[r.value==null?null:o("button",{class:"button",onDragover:q=>q.preventDefault(),onClick:()=>me("sell",r.value),onDrop:()=>me("sell",r.value)},[v("Sell")]),l.value==null?null:o("button",{class:"button",onDragover:q=>q.preventDefault(),onClick:()=>me("freeze",l.value),onDrop:()=>me("freeze",l.value)},[v("Freeze")]),o("img",{class:"startStream",draggable:"false",onClick:()=>{me("stream"),g.value=!0},src:co},null)])]}),o("div",{style:"flex-grow: 1"},null),o(he,{style:"margin-top: 10vh"},De(ie=new Array(3).fill(0).map((q,T)=>{var L,Oe;return o(we,{id:`team-char-${T}`,character:i.value[T],isSelected:r.value===T,selected:r.value==null?l.value==null||i.value[T]!=null&&((L=s.value[l.value])==null?void 0:L.type)!==((Oe=i.value[T])==null?void 0:Oe.type)||n.value<3?null:s.value[l.value]:i.value[r.value],isDragging:P.value,onClick:ea(T),onDragstart:()=>{P.value=!0,r.value=T,l.value=null},onDragend:()=>{P.value=!1,r.value=null,l.value=null},onDrop:()=>ea(T)()},null)}))?ie:{default:()=>[ie]}),o(he,{class:"shop"},{default:()=>[o("div",{class:"reroll",style:n.value>0?"":"color: var(--locked); cursor: not-allowed",onClick:()=>{n.value>0&&me("reroll")}},[o("img",{src:Q.value?ko:Mo},null)]),s.value.map((q,T)=>o(we,{id:`shop-char-${T}`,frozen:_.value.includes(T),character:q==null?void 0:q,isSelected:l.value===T,isShop:!0,isDragging:P.value,onClick:L=>{q!=null&&(l.value=l.value===T?null:T,r.value=null,L.stopPropagation())},onDragstart:()=>{P.value=!0,r.value=null,l.value=T},onDragend:()=>{P.value=!1,r.value=null,l.value=null}},null))]}),Je(ge)])}),lives:e,wins:t,turn:a,gold:n,team:i,shop:s,selectedCharacter:r,selectedShopItem:l,findingMatch:g,showingOutcome:y,outcome:f,reset:I,battle:S,frozen:_,playClicked:C,prepareMove:te,particles:ge,queue:N,showRefreshAnim:Q}});let ut=0;$.on("update",e=>{if(m.wins.value>=5){if(ut+=e,ut>=1){ut=0;const t=m.particles.boundingRect.value;if(!t)return;m.particles.addEmitter(So).then(a=>{a.updateOwnerPos(Math.random()*t.width,Math.random()*t.height),console.log(a),a.playOnceAndDestroy()})}}else ut=0});function ea(e){return t=>{var a,n,i,s,r,l,g;m.selectedCharacter.value!=null&&m.selectedCharacter.value!==e?((a=m.team.value[m.selectedCharacter.value])==null?void 0:a.type)===((n=m.team.value[e])==null?void 0:n.type)&&((s=(i=m.team.value[m.selectedCharacter.value])==null?void 0:i.exp)!=null?s:0)<6&&((l=(r=m.team.value[e])==null?void 0:r.exp)!=null?l:0)<6?(me("merge",m.selectedCharacter.value,e),m.selectedCharacter.value=null):(me("move",m.selectedCharacter.value,e),m.selectedCharacter.value=null):m.selectedCharacter.value===e?m.selectedCharacter.value=null:m.selectedShopItem.value!==null?((m.team.value[e]==null||m.team.value[e].type===((g=m.shop.value[m.selectedShopItem.value])==null?void 0:g.type)&&m.team.value[e].exp<6)&&m.gold.value>=3&&me("buy",m.selectedShopItem.value,e),m.selectedShopItem.value=null):m.selectedCharacter.value=e,t==null||t.stopPropagation()}}const To=e=>[m],Ia=x(()=>!1);function Do(e,t){}var Ro=Object.freeze(Object.defineProperty({__proto__:null,characters:X,main:m,getInitialLayers:To,hasWon:Ia,fixOldSave:Do},Symbol.toStringTag,{value:"Module"}));const Vo={class:"field"},Po=U({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=x(()=>{var s;return Ne((s=u(a.title))!=null?s:"<span></span>","span")}),i=x({get(){return!!a.modelValue},set(s){t("update:modelValue",s)}});return(s,r)=>(h(),B("label",Vo,[kt(c("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":r[0]||(r[0]=l=>Ce(i)?i.value=l:null)},null,512),[[Pa,u(i)]]),(h(),O(ce(u(n))))]))}});var Qt=K(Po,[["__scopeId","data-v-11046116"]]);const rt=e=>(Qe("data-v-4a50ce42"),e=e(),Se(),e),xo={class:"game-over-modal-header"},qo=["src","alt"],zo={class:"game-over-modal-title"},Fo=rt(()=>c("h2",null,"Congratulations!",-1)),Go={key:0},Oo=rt(()=>c("br",null,null,-1)),Uo=rt(()=>c("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Lo=rt(()=>c("br",null,null,-1)),Jo=["href"],Yo=rt(()=>c("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Wo=U({__name:"GameOverScreen",setup(e){const{title:t,logo:a,discordName:n,discordLink:i,versionNumber:s,versionTitle:r}=G,l=x(()=>Dt(V.timePlayed)),g=x(()=>Ia.value&&!V.keepGoing),f=ze(V,"autosave");function y(){V.keepGoing=!0}function p(){Ve(Le())}return(C,N)=>(h(),O(Fe,{"model-value":u(g)},{header:R(()=>[c("div",xo,[u(a)?(h(),B("img",{key:0,class:"game-over-modal-logo",src:u(a),alt:u(t)},null,8,qo)):M("",!0),c("div",zo,[Fo,c("h4",null,"You've beaten "+F(u(t))+" v"+F(u(s))+": "+F(u(r)),1)])])]),body:R(({shown:_})=>[_?(h(),B("div",Go,[c("div",null,"It took you "+F(u(l))+" to beat the game.",1),Oo,Uo,Lo,c("div",null,[c("a",{href:u(i),class:"game-over-modal-discord-link"},[Yo,v(" "+F(u(n)),1)],8,Jo)]),o(Qt,{title:"Autosave",modelValue:u(f),"onUpdate:modelValue":N[0]||(N[0]=Q=>Ce(f)?f.value=Q:null)},null,8,["modelValue"])])):M("",!0)]),footer:R(()=>[c("div",{class:"game-over-footer"},[c("button",{onClick:y,class:"button"},"Keep Going"),c("button",{onClick:p,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Xo=K(Wo,[["__scopeId","data-v-4a50ce42"]]);const bt=e=>(Qe("data-v-336bf74f"),e=e(),Se(),e),Ko=bt(()=>c("div",{class:"nan-modal-header"},[c("h2",null,"NaN value detected!")],-1)),jo={key:0},Ho=bt(()=>c("br",null,null,-1)),Zo=["href"],$o=bt(()=>c("span",{class:"material-icons nan-modal-discord"},"discord",-1)),el=bt(()=>c("br",null,null,-1)),tl={class:"nan-footer"},al=U({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:a}=G,n=w(!0),i=w(!0),s=ze(Z,"hasNaN"),r=w(null);fe(s,C=>{C?(n.value=V.autosave,i.value=V.devSpeed===0):(V.autosave=n.value,V.devSpeed=i.value?0:null)});const l=x(()=>{var C;return(C=Z.NaNPath)==null?void 0:C.join(".")}),g=x(()=>Z.NaNPersistent!=null?Z.NaNPersistent.value:null);function f(){Z.NaNPersistent!=null&&(Z.NaNPersistent.value=new E(0),Z.hasNaN=!1)}function y(){Z.NaNPersistent&&(Z.NaNPersistent.value=new E(1),Z.hasNaN=!1)}function p(){Z.NaNPersistent&&(Z.NaNPersistent.value=new E(NaN),Z.hasNaN=!1)}return(C,N)=>(h(),B(Y,null,[o(Fe,tt({modelValue:u(s),"onUpdate:modelValue":N[4]||(N[4]=_=>Ce(s)?s.value=_:null)},C.$attrs),{header:R(()=>[Ko]),body:R(()=>[c("div",null,[v(' Attempted to assign "'+F(u(l))+'" to NaN',1),u(g)?(h(),B("span",jo,F(" ")+"(previously "+F(u(ca)(u(g)))+")",1)):M("",!0),v(". Auto-saving has been "+F(n.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Ho,c("div",null,[c("a",{href:u(a)||"https://discord.gg/WzejVAx",class:"nan-modal-discord-link"},[$o,v(" "+F(u(t)||"The Paper Pilot Community"),1)],8,Zo)]),el,o(Qt,{title:"Autosave",modelValue:n.value,"onUpdate:modelValue":N[0]||(N[0]=_=>n.value=_)},null,8,["modelValue"]),u(G).enablePausing?(h(),O(Qt,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":N[1]||(N[1]=_=>i.value=_)},null,8,["modelValue"])):M("",!0)]),footer:R(()=>[c("div",tl,[c("button",{onClick:N[2]||(N[2]=_=>{var Q;return(Q=r.value)==null?void 0:Q.open()}),class:"button"},"Open Saves Manager"),c("button",{onClick:f,class:"button"},"Set to 0"),c("button",{onClick:y,class:"button"},"Set to 1"),u(g)&&u(E).neq(u(g),0)&&u(E).neq(u(g),1)?(h(),B("button",{key:0,onClick:N[3]||(N[3]=_=>s.value=!1),class:"button"}," Set to previous ")):M("",!0),c("button",{onClick:p,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Ea,{ref_key:"savesManager",ref:r},null,512)],64))}});var nl=K(al,[["__scopeId","data-v-336bf74f"]]);var il=U({__name:"App",setup(e){const t=G.useHeader,a=x(()=>vt[z.theme].variables);ze(z,"showTPS");const n=x(()=>Ne(J(()=>o(Y,null,[ii.map(Je)]))));return(i,s)=>(h(),B(Y,null,[c("div",{id:"modal-root",style:Xe(u(a))},null,4),c("div",{class:ae(["app",{useHeader:u(t)}]),style:Xe(u(a))},[u(t)?(h(),O(wa,{key:0})):M("",!0),o(fr),o(Xo),o(nl),(h(),O(ce(u(n))))],6)],64))}});var sl=K(il,[["__scopeId","data-v-48adfab3"]]);$.on("setupVue",e=>e.use(Ua));function rl(e={}){const{immediate:t=!1,onNeedRefresh:a,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e;let r,l;const g=async(f=!0)=>{f&&(r==null||r.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),l&&l.waiting&&await Ka(l.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new Xa("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",f=>{f.isUpdate||n==null||n()});{const f=()=>{a==null||a()};r.addEventListener("waiting",f),r.addEventListener("externalwaiting",f)}r.register({immediate:t}).then(f=>{l=f,i==null||i(f)}).catch(f=>{s==null||s(f)})}return g}function ol(e={}){const{immediate:t=!0,onNeedRefresh:a,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e,r=w(!1),l=w(!1);return{updateServiceWorker:rl({immediate:t,onNeedRefresh(){r.value=!0,a==null||a()},onOfflineReady(){l.value=!0,n==null||n()},onRegistered:i,onRegisterError:s}),offlineReady:l,needRefresh:r}}document.title=G.title;window.projInfo=G;if(G.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c
|
|
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Zn();const{globalBus:e}=await gt(()=>Promise.resolve().then(function(){return jn}),void 0),{startGameLoop:t}=await gt(()=>import("./gameLoop.839c30ab.js"),["assets/gameLoop.839c30ab.js","assets/@fontsource.f66d05e7.css","assets/vue.f6263579.js","assets/earcut.b6f90e68.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/vuedraggable.c3acdf62.js","assets/sortablejs.cbae5b2d.js","assets/vue-next-select.0dc4e443.js","assets/vue-next-select.9e6f4164.css","assets/vue-textarea-autosize.35804eaf.js","assets/semver.83ff78cf.js","assets/lru-cache.9a21e90b.js","assets/yallist.fd762fe7.js","assets/socket.io-client.79ce0df5.js","assets/engine.io-client.58517560.js","assets/engine.io-parser.3f360695.js","assets/@socket.io.aec831e2.js","assets/socket.io-parser.544e37d1.js","assets/vue-toastification.b7cd620e.js","assets/vue-toastification.4b5f8ac8.css","assets/@pixi.1eac1889.js","assets/ismobilejs.5c6954b9.js","assets/eventemitter3.dc5195d7.js","assets/url.e51cb87b.js","assets/querystring.23ae9a54.js","assets/workbox-window.8d14e8b7.js"]),a=window.vue=xa(sl);e.emit("setupVue",a),a.mount("#app"),qe(()=>{const n=na(),{updateServiceWorker:i}=ol({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{E as D,gt as _,Z as a,G as b,Ro as c,$ as g,$n as l,V as p,z as s};
|