19 lines
210 KiB
JavaScript
19 lines
210 KiB
JavaScript
/* empty css */import"./vue.92681fcb.js";import{Z as C,l as Xe,aa as le,t as O,ay as Yl,ar as ul,aE as b,a0 as M,aK as Bt,a1 as g,O as x,aG as Vl,A as rt,_ as Y,a8 as o,b6 as K,b8 as Zl,bs as Jn,C as u,aq as cl,bu as Nl,bb as en,T as La,a7 as d,u as tn,j as Qa,bv as Pn,q as Bl,b1 as Pt,G as Qe,aC as Xn,w as Mt,b2 as _t,ao as ja,I as Ye,J as ce,$ as P,aH as Wt,aF as zt,z as Ft,aN as He,al as Ql,aL as tl,H as Wa,aJ as Yn,bn as za,br as Ka,be as Ja}from"./@vue.4ce677c2.js";import{c as Zn}from"./nanoevents.1080beb7.js";import{L as Yt}from"./lz-string.731cedc5.js";import{i as Xa}from"./is-plain-object.906d88e8.js";import{Y as Ya}from"./vue-next-select.a2bfab1d.js";import{s as Za,u as ea}from"./vue-toastification.6f567382.js";import{D as ei}from"./vuedraggable.7949458c.js";import{p as ti}from"./vue-textarea-autosize.35804eaf.js";import{v as li,n as ni}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ai=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(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"&&a(r)}).observe(document,{childList:!0,subtree:!0});function l(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 a(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}};ai();const ii="modulepreload",Fn={},oi="./",jl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(a=>{if(a=`${oi}${a}`,a in Fn)return;Fn[a]=!0;const i=a.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${s}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":ii,i||(r.as="script",r.crossOrigin=""),r.href=a,document.head.appendChild(r),i)return new Promise((c,p)=>{r.addEventListener("load",c),r.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())},si="./projInfo-schema.json",ri="Advent Incremental",ui="An incremental game you play a day at a time, leading up to Christmas!",ci="advent-incremental",di="thepaperpilot and friends",pi="",mi="",gi="0.3",hi="Initial Commit",fi=!0,vi=!1,yi=2,bi=!0,wi=null,Ci="",ki=["main"],_i=3600,Ai=0,Si=!0,Ni="base64";var Ie={$schema:si,title:ri,description:ui,id:ci,author:di,discordName:pi,discordLink:mi,versionNumber:gi,versionTitle:hi,allowGoBack:fi,defaultShowSmall:vi,defaultDecimalsShown:yi,useHeader:bi,banner:wi,logo:Ci,initialTabs:ki,maxTickLength:_i,offlineLimit:Ai,enablePausing:Si,exportEncoding:Ni};const mn=17,Mi=9e15,Ii=Math.log10(9e15),Ei=1/9e15,xi=308,Bi=-324,Tn=5,Di=function(){const e=[];for(let l=Bi+1;l<=xi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),ol=[2,Math.E,3,4,5,6,7,8,9,10],Pi=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Fi=[[-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]],v=function(t){return n.fromValue_noAlloc(t)},ee=function(e,t,l){return n.fromComponents(e,t,l)},me=function(t,l,a){return n.fromComponents_noNormalize(t,l,a)},Xt=function(t,l){const a=l+1,i=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,a-i))*Math.pow(10,i-a);return parseFloat(s.toFixed(Math.max(a-i,0)))},gn=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Ti=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 l=.9189385332046727;l=l+(e+.5)*Math.log(e),l=l-e;const a=e*e;let i=e;return l=l+1/(12*i),i=i*a,l=l+1/(360*i),i=i*a,l=l+1/(1260*i),i=i*a,l=l+1/(1680*i),i=i*a,l=l+1/(1188*i),i=i*a,l=l+691/(360360*i),i=i*a,l=l+7/(1092*i),i=i*a,l=l+3617/(122400*i),Math.exp(l)/t},ta=.5671432904097838,Rn=function(e,t=1e-10){let l,a;if(!Number.isFinite(e)||e===0)return e;if(e===1)return ta;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(a=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(a-l)<t*Math.abs(a))return a;l=a}throw Error(`Iteration failed to converge: ${e.toString()}`)};function On(e,t=1e-10){let l,a,i,s;if(!Number.isFinite(e.mag)||e===n.dZero)return e;if(e===n.dOne)return v(ta);n.abs(e),l=n.ln(e);for(let r=0;r<100;++r){if(a=n.exp(-l),i=l.sub(e.mul(a)),s=l.sub(i.div(l.add(1).sub(l.add(2).mul(i).div(n.mul(2,l).add(2))))),n.abs(s.sub(l)).lt(n.abs(s).mul(t)))return s;l=s}throw Error(`Iteration failed to converge: ${e.toString()}`)}const _=class{constructor(e){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,e instanceof _||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}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/Di(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,this.exponent))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(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,l){return new _().fromComponents(e,t,l)}static fromComponents_noNormalize(e,t,l){return new _().fromComponents_noNormalize(e,t,l)}static fromMantissaExponent(e,t){return new _().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new _().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new _().fromDecimal(e)}static fromNumber(e){return new _().fromNumber(e)}static fromString(e){return new _().fromString(e)}static fromValue(e){return new _().fromValue(e)}static fromValue_noAlloc(e){return e instanceof _?e:new _(e)}static abs(e){return v(e).abs()}static neg(e){return v(e).neg()}static negate(e){return v(e).neg()}static negated(e){return v(e).neg()}static sign(e){return v(e).sign}static sgn(e){return v(e).sign}static round(e){return v(e).round()}static floor(e){return v(e).floor()}static ceil(e){return v(e).ceil()}static trunc(e){return v(e).trunc()}static add(e,t){return v(e).add(t)}static plus(e,t){return v(e).add(t)}static sub(e,t){return v(e).sub(t)}static subtract(e,t){return v(e).sub(t)}static minus(e,t){return v(e).sub(t)}static mul(e,t){return v(e).mul(t)}static multiply(e,t){return v(e).mul(t)}static times(e,t){return v(e).mul(t)}static div(e,t){return v(e).div(t)}static divide(e,t){return v(e).div(t)}static recip(e){return v(e).recip()}static reciprocal(e){return v(e).recip()}static reciprocate(e){return v(e).reciprocate()}static cmp(e,t){return v(e).cmp(t)}static cmpabs(e,t){return v(e).cmpabs(t)}static compare(e,t){return v(e).cmp(t)}static isNaN(e){return e=v(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=v(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return v(e).eq(t)}static equals(e,t){return v(e).eq(t)}static neq(e,t){return v(e).neq(t)}static notEquals(e,t){return v(e).notEquals(t)}static lt(e,t){return v(e).lt(t)}static lte(e,t){return v(e).lte(t)}static gt(e,t){return v(e).gt(t)}static gte(e,t){return v(e).gte(t)}static max(e,t){return v(e).max(t)}static min(e,t){return v(e).min(t)}static minabs(e,t){return v(e).minabs(t)}static maxabs(e,t){return v(e).maxabs(t)}static clamp(e,t,l){return v(e).clamp(t,l)}static clampMin(e,t){return v(e).clampMin(t)}static clampMax(e,t){return v(e).clampMax(t)}static cmp_tolerance(e,t,l){return v(e).cmp_tolerance(t,l)}static compare_tolerance(e,t,l){return v(e).cmp_tolerance(t,l)}static eq_tolerance(e,t,l){return v(e).eq_tolerance(t,l)}static equals_tolerance(e,t,l){return v(e).eq_tolerance(t,l)}static neq_tolerance(e,t,l){return v(e).neq_tolerance(t,l)}static notEquals_tolerance(e,t,l){return v(e).notEquals_tolerance(t,l)}static lt_tolerance(e,t,l){return v(e).lt_tolerance(t,l)}static lte_tolerance(e,t,l){return v(e).lte_tolerance(t,l)}static gt_tolerance(e,t,l){return v(e).gt_tolerance(t,l)}static gte_tolerance(e,t,l){return v(e).gte_tolerance(t,l)}static pLog10(e){return v(e).pLog10()}static absLog10(e){return v(e).absLog10()}static log10(e){return v(e).log10()}static log(e,t){return v(e).log(t)}static log2(e){return v(e).log2()}static ln(e){return v(e).ln()}static logarithm(e,t){return v(e).logarithm(t)}static pow(e,t){return v(e).pow(t)}static pow10(e){return v(e).pow10()}static root(e,t){return v(e).root(t)}static factorial(e,t){return v(e).factorial()}static gamma(e,t){return v(e).gamma()}static lngamma(e,t){return v(e).lngamma()}static exp(e){return v(e).exp()}static sqr(e){return v(e).sqr()}static sqrt(e){return v(e).sqrt()}static cube(e){return v(e).cube()}static cbrt(e){return v(e).cbrt()}static tetrate(e,t=2,l=me(1,0,1)){return v(e).tetrate(t,l)}static iteratedexp(e,t=2,l=me(1,0,1)){return v(e).iteratedexp(t,l)}static iteratedlog(e,t=10,l=1){return v(e).iteratedlog(t,l)}static layeradd10(e,t){return v(e).layeradd10(t)}static layeradd(e,t,l=10){return v(e).layeradd(t,l)}static slog(e,t=10){return v(e).slog(t)}static lambertw(e){return v(e).lambertw()}static ssqrt(e){return v(e).ssqrt()}static pentate(e,t=2,l=me(1,0,1)){return v(e).pentate(t,l)}static affordGeometricSeries(e,t,l,a){return this.affordGeometricSeries_core(v(e),v(t),v(l),a)}static sumGeometricSeries(e,t,l,a){return this.sumGeometricSeries_core(e,v(t),v(l),a)}static affordArithmeticSeries(e,t,l,a){return this.affordArithmeticSeries_core(v(e),v(t),v(l),v(a))}static sumArithmeticSeries(e,t,l,a){return this.sumArithmeticSeries_core(v(e),v(t),v(l),v(a))}static efficiencyOfPurchase(e,t,l){return this.efficiencyOfPurchase_core(v(e),v(t),v(l))}static randomDecimalForTesting(e){if(Math.random()*20<1)return me(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return me(t,0,1);const l=Math.floor(Math.random()*(e+1));let a=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(a=Math.trunc(a));let i=Math.pow(10,a);return Math.random()>.9&&(i=Math.trunc(i)),ee(t,l,i)}static affordGeometricSeries_core(e,t,l,a){const i=t.mul(l.pow(a));return _.floor(e.div(i).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,a){return t.mul(l.pow(a)).mul(_.sub(1,l.pow(e))).div(_.sub(1,l))}static affordArithmeticSeries_core(e,t,l,a){const s=t.add(a.mul(l)).sub(l.div(2)),r=s.pow(2);return s.neg().add(r.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,a){const i=t.add(a.mul(l));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(l)))}static efficiencyOfPurchase_core(e,t,l){return e.div(t).add(e.div(l))}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<Ei)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=Mi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Ii&&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,l){return this.sign=e,this.layer=t,this.mag=l,this.normalize(),this}fromComponents_noNormalize(e,t,l){return this.sign=e,this.layer=t,this.mag=l,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){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const w=parseFloat(t[0]),h=parseFloat(t[1]),k=t[1].split(";");let A=1;if(k.length===2&&(A=parseFloat(k[1]),isFinite(A)||(A=1)),isFinite(w)&&isFinite(h)){const S=_.pentate(w,h,A);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,this}}const l=e.split("^^");if(l.length===2){const w=parseFloat(l[0]),h=parseFloat(l[1]),k=l[1].split(";");let A=1;if(k.length===2&&(A=parseFloat(k[1]),isFinite(A)||(A=1)),isFinite(w)&&isFinite(h)){const S=_.tetrate(w,h,A);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,this}}const a=e.split("^");if(a.length===2){const w=parseFloat(a[0]),h=parseFloat(a[1]);if(isFinite(w)&&isFinite(h)){const k=_.pow(w,h);return this.sign=k.sign,this.layer=k.layer,this.mag=k.mag,this}}e=e.trim().toLowerCase();let i,s,r=e.split("pt");if(r.length===2){i=10,s=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let w=parseFloat(r[1]);if(isFinite(w)||(w=1),isFinite(i)&&isFinite(s)){const h=_.tetrate(i,s,w);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}if(r=e.split("p"),r.length===2){i=10,s=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let w=parseFloat(r[1]);if(isFinite(w)||(w=1),isFinite(i)&&isFinite(s)){const h=_.tetrate(i,s,w);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}const c=e.split("e"),p=c.length-1;if(p===0){const w=parseFloat(e);if(isFinite(w))return this.fromNumber(w)}else if(p===1){const w=parseFloat(e);if(isFinite(w)&&w!==0)return this.fromNumber(w)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let w="";for(let h=0;h<m[1].length;++h){const k=m[1].charCodeAt(h);if(k>=43&&k<=57||k===101)w+=m[1].charAt(h);else return this.layer=parseFloat(w),this.mag=parseFloat(m[1].substr(h+1)),this.normalize(),this}}if(p<1)return this.sign=0,this.layer=0,this.mag=0,this;const y=parseFloat(c[0]);if(y===0)return this.sign=0,this.layer=0,this.mag=0,this;let f=parseFloat(c[c.length-1]);if(p>=2){const w=parseFloat(c[c.length-2]);isFinite(w)&&(f*=Math.sign(w),f+=gn(w))}if(!isFinite(y))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=f;else if(p===1)this.sign=Math.sign(y),this.layer=1,this.mag=f+Math.log10(Math.abs(y));else if(this.sign=Math.sign(y),this.layer=p,p===2){const w=_.mul(ee(1,2,f),v(y));return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}else this.mag=f;return this.normalize(),this}fromValue(e){return e instanceof _||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?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:Xt(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Xt(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<=Tn?(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):Xt(this.m,e)+"e"+Xt(this.e,e):this.layer===1?Xt(this.m,e)+"e"+Xt(this.e,e):this.layer<=Tn?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Xt(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Xt(this.mag,e)}abs(){return me(this.sign===0?0:1,this.layer,this.mag)}neg(){return me(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?_.dZero:this.layer===0?ee(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?_.dZero:this.layer===0?ee(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?_.dZero:this.layer===0?ee(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?_.dZero:this.layer===0?ee(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=v(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 me(0,0,0);let l,a;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(_.cmpabs(this,t)>0?(l=this,a=t):(l=t,a=this),l.layer===0&&a.layer===0)return v(l.sign*l.mag+a.sign*a.mag);const i=l.layer*Math.sign(l.mag),s=a.layer*Math.sign(a.mag);if(i-s>=2)return l;if(i===0&&s===-1){if(Math.abs(a.mag-Math.log10(l.mag))>mn)return l;{const r=Math.pow(10,Math.log10(l.mag)-a.mag),c=a.sign+l.sign*r;return ee(Math.sign(c),1,a.mag+Math.log10(Math.abs(c)))}}if(i===1&&s===0){if(Math.abs(l.mag-Math.log10(a.mag))>mn)return l;{const r=Math.pow(10,l.mag-Math.log10(a.mag)),c=a.sign+l.sign*r;return ee(Math.sign(c),1,Math.log10(a.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-a.mag)>mn)return l;{const r=Math.pow(10,l.mag-a.mag),c=a.sign+l.sign*r;return ee(Math.sign(c),1,a.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(v(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=v(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return me(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return me(this.sign*t.sign,0,1);let l,a;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,a=t):(l=t,a=this),l.layer===0&&a.layer===0)return v(l.sign*a.sign*l.mag*a.mag);if(l.layer>=3||l.layer-a.layer>=2)return ee(l.sign*a.sign,l.layer,l.mag);if(l.layer===1&&a.layer===0)return ee(l.sign*a.sign,1,l.mag+Math.log10(a.mag));if(l.layer===1&&a.layer===1)return ee(l.sign*a.sign,1,l.mag+a.mag);if(l.layer===2&&a.layer===1){const i=ee(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ee(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)));return ee(l.sign*a.sign,i.layer+1,i.sign*i.mag)}if(l.layer===2&&a.layer===2){const i=ee(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ee(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)));return ee(l.sign*a.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=v(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?_.dNaN:this.layer===0?ee(this.sign,0,1/this.mag):ee(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=v(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=v(e),l=this.mag>0?this.layer:-this.layer,a=t.mag>0?t.layer:-t.layer;return l>a?1:l<a?-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=v(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=v(e);return this.lt(t)?t:this}min(e){const t=v(e);return this.gt(t)?t:this}maxabs(e){const t=v(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=v(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 l=v(e);return this.eq_tolerance(l,t)?0:this.cmp(l)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const l=v(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let a=this.mag,i=l.mag;return this.layer>l.layer&&(i=gn(i)),this.layer<l.layer&&(a=gn(a)),Math.abs(a-i)<=t*Math.max(Math.abs(a),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 l=v(e);return!this.eq_tolerance(l,t)&&this.lt(l)}lte_tolerance(e,t){const l=v(e);return this.eq_tolerance(l,t)||this.lt(l)}gt_tolerance(e,t){const l=v(e);return!this.eq_tolerance(l,t)&&this.gt(l)}gte_tolerance(e,t){const l=v(e);return this.eq_tolerance(l,t)||this.gt(l)}pLog10(){return this.lt(_.dZero)?_.dZero:this.log10()}absLog10(){return this.sign===0?_.dNaN:this.layer>0?ee(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ee(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?_.dNaN:this.layer>0?ee(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ee(this.sign,0,Math.log10(this.mag))}log(e){return e=v(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?_.dNaN:this.layer===0&&e.layer===0?ee(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):_.div(this.log10(),e.log10())}log2(){return this.sign<=0?_.dNaN:this.layer===0?ee(this.sign,0,Math.log2(this.mag)):this.layer===1?ee(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ee(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ee(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?_.dNaN:this.layer===0?ee(this.sign,0,Math.log(this.mag)):this.layer===1?ee(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ee(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ee(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=v(e),l=this,a=t;if(l.sign===0)return a.eq(0)?me(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(a.sign===0)return me(1,0,1);if(a.sign===1&&a.layer===0&&a.mag===1)return l;const i=l.absLog10().mul(a).pow10();return this.sign===-1?Math.abs(a.toNumber()%2)%2===1?i.neg():Math.abs(a.toNumber()%2)%2===0?i:_.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return _.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 ee(1,0,t);if(e.sign===0)return _.dOne;e=me(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ee(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ee(-e.sign,e.layer+1,-e.mag):_.dOne}pow_base(e){return v(e).pow(this)}root(e){const t=v(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?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(me(1,0,24)))return v(Ti(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const l=e*e;let a=e,i=12*a,s=1/i,r=t+s;if(r===t||(t=r,a=a*l,i=360*a,s=1/i,r=t-s,r===t))return _.exp(t);t=r,a=a*l,i=1260*a;let c=1/i;return t=t+c,a=a*l,i=1680*a,c=1/i,t=t-c,_.exp(t)}else return this.layer===1?_.exp(_.mul(this,_.ln(this).sub(1))):_.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?_.dOne:this.layer===0&&this.mag<=709.7?v(Math.exp(this.sign*this.mag)):this.layer===0?ee(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ee(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ee(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return v(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ee(1,2,Math.log10(this.mag)-.3010299956639812);{const e=_.div(me(this.sign,this.layer-1,this.mag),me(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=me(1,0,1)){if(e===1)return _.pow(this,t);if(e===0)return new _(t);if(this.eq(_.dOne))return _.dOne;if(this.eq(-1))return _.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return new _(Math.E);const s=_.ln(this).neg();return s.lambertw().div(s)}else return i>1.444667861009766?new _(Number.POSITIVE_INFINITY):_.dNaN}if(this.eq(_.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),new _(i)}if(e<0)return _.iteratedlog(t,this,-e);t=v(t);const l=e;e=Math.trunc(e);const a=l-e;if(this.gt(_.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(a!=0){const i=this.pow(t);return t.mul(1-a).add(i.mul(a))}return t}a!==0&&(t.eq(_.dOne)?this.gt(10)?t=this.pow(a):(t=v(_.tetrate_critical(this.toNumber(),a)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(a):t=t.layeradd(a,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 me(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=me(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return _.tetrate(e,-t,this);e=v(e);let l=v(this);const a=t;t=Math.trunc(t);const i=a-t;if(l.layer-e.layer>3){const s=Math.min(t,l.layer-e.layer-3);t-=s,l.layer-=s}for(let s=0;s<t;++s){if(l=l.log(e),!isFinite(l.layer)||!isFinite(l.mag))return l.normalize();if(s>1e4)return l}return i>0&&i<1&&(e.eq(10)?l=l.layeradd10(-i):l=l.layeradd(-i,e)),l}slog(e=10){if(e=v(e),e.lte(_.dZero)||e.eq(_.dOne))return _.dNaN;if(e.lt(_.dOne))return this.eq(_.dOne)?_.dZero:this.eq(_.dZero)?_.dNegOne:_.dNaN;if(this.mag<0||this.eq(_.dZero))return _.dNegOne;let t=0,l=v(this);if(l.layer-e.layer>3){const a=l.layer-e.layer-3;t+=a,l.layer-=a}for(let a=0;a<100;++a)if(l.lt(_.dZero))l=_.pow(e,l),t-=1;else{if(l.lte(_.dOne))return v(t+_.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=_.log(l,e)}return v(t)}static slog_critical(e,t){return e>10?t-1:_.critical_section(e,t,Fi)}static tetrate_critical(e,t){return _.critical_section(e,t,Pi)}static critical_section(e,t,l){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let a=0,i=0;for(let c=0;c<ol.length;++c)if(ol[c]==e){a=l[c][Math.floor(t)],i=l[c][Math.ceil(t)];break}else if(ol[c]<e&&ol[c+1]>e){const p=(e-ol[c])/(ol[c+1]-ol[c]);a=l[c][Math.floor(t)]*(1-p)+l[c+1][Math.floor(t)]*p,i=l[c][Math.ceil(t)]*(1-p)+l[c+1][Math.ceil(t)]*p;break}const s=t-Math.floor(t);return a*(1-s)+i*s}layeradd10(e){e=_.fromValue_noAlloc(e).toNumber();const t=v(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 l=Math.trunc(e);e-=l,t.layer+=l}if(e<=-1){const l=Math.trunc(e);if(e-=l,t.layer+=l,t.layer<0)for(let a=0;a<100;++a){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 a=this.slog(t).toNumber()+e;return a>=0?_.tetrate(t,a):Number.isFinite(a)?a>=-1?_.log(_.tetrate(t,a+1),t):_.log(_.log(_.tetrate(t,a+2),t),t):_.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return v(Rn(this.toNumber()));if(this.layer===0)return v(Rn(this.sign*this.mag));if(this.layer===1)return On(this);if(this.layer===2)return On(this);if(this.layer>=3)return me(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return me(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=me(1,0,1)){t=v(t);const l=e;e=Math.trunc(e);const a=l-e;a!==0&&(t.eq(_.dOne)?(++e,t=new _(a)):this.eq(10)?t=t.layeradd10(a):t=t.layeradd(a,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?v(Math.sin(this.sign*this.mag)):me(0,0,0)}cos(){return this.mag<0?_.dOne:this.layer===0?v(Math.cos(this.sign*this.mag)):me(0,0,0)}tan(){return this.mag<0?this:this.layer===0?v(Math.tan(this.sign*this.mag)):me(0,0,0)}asin(){return this.mag<0?this:this.layer===0?v(Math.asin(this.sign*this.mag)):me(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?v(Math.acos(this.toNumber())):this.layer===0?v(Math.acos(this.sign*this.mag)):me(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?v(Math.atan(this.sign*this.mag)):v(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 _.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return _.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?me(Number.NaN,Number.NaN,Number.NaN):_.ln(this.add(1).div(v(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(_.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 n=_;n.dZero=me(0,0,0);n.dOne=me(1,0,1);n.dNegOne=me(-1,0,1);n.dTwo=me(1,0,2);n.dTen=me(1,0,10);n.dNaN=me(Number.NaN,Number.NaN,Number.NaN);n.dInf=me(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);n.dNegInf=me(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);n.dNumberMax=ee(1,0,Number.MAX_VALUE);n.dNumberMin=ee(1,0,Number.MIN_VALUE);const Ri=new n(1);function _l(e,t,l=!0){let a=n.log10(e).floor(),i=n.div(e,n.pow(10,a));i.toStringWithDecimalPlaces(t)==="10"&&(i=Ri,a=a.add(1));const s=a.gte(1e9)?ne(a,Math.max(Math.max(t,3),Ie.defaultDecimalsShown)):a.gte(1e4)?Wl(a,0):a.toStringWithDecimalPlaces(0);return l?i.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function Wl(e,t){if(e==null)return"NaN";if(e=new n(e),e.mag<.001)return 0 .toFixed(t);const a=e.toStringWithDecimalPlaces(t).split(".");return a[0]=a[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),a.length==1?a[0]:a[0]+"."+a[1]}function la(e,t){return e==null?"NaN":(e=new n(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),Ie.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Oi=new n("eeee1000"),Ui=new n("e100000"),Un=new n("e1000"),na=new n(1e9),$i=new n(1e6),Hi=new n(1e3),qi=new n(.98),Vi=new n(.001),aa=new n(0);function ne(e,t,l){if(t==null&&(t=Ie.defaultDecimalsShown),l=l!=null?l:Ie.defaultShowSmall,e=new n(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+ne(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Oi)){const a=e.slog();return a.gte($i)?"F"+ne(a.floor()):n.pow(10,a.sub(a.floor())).toStringWithDecimalPlaces(3)+"F"+Wl(a.floor(),0)}else{if(e.gte(Ui))return _l(e,0,!1);if(e.gte(Un))return _l(e,0);if(e.gte(na))return _l(e,t);if(e.gte(Hi))return Wl(e,0);if(e.gte(Vi)||!l)return la(e,t);if(e.eq(aa))return 0 .toFixed(t)}return e=ia(e),e.lt(Un)?_l(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):ne(e,t)+"\u207B\xB9"}function te(e){return e=new n(e),e.sign<0?"-"+te(e.neg()):e.gte(na)||e.lte(qi)&&!e.eq(aa)?ne(e):ne(e,0)}function vn(e,t){return t==null&&(t=Ie.defaultDecimalsShown),n.lt(e,0)?"-"+vn(n.neg(e),t):n.gt(e,2**51)?ne(n.div(e,31536e3))+"y":(e=new n(e).toNumber(),e<60?ne(e)+"s":e<3600?te(Math.floor(e/60))+"m "+ne(e%60,t)+"s":e<86400?te(Math.floor(e/3600))+"h "+te(Math.floor(e/60)%60)+"m "+te(e%60)+"s":e<31536e3?te(Math.floor(e/84600)%365)+"d "+te(Math.floor(e/3600)%24)+"h "+te(Math.floor(e/60)%60)+"m":te(Math.floor(e/31536e3))+"y "+te(Math.floor(e/84600)%365)+"d "+te(Math.floor(e/3600)%24)+"h")}function Gi(e,t,l){e=new n(e);let a=e.toStringWithDecimalPlaces(t);return new n(a).gte(l)&&(a=n.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),a}function Li(e,t){return ne(e,t,!0)}function ia(e){let t=n.log10(e).ceil();const l=n.div(e,n.pow(10,t));return t=t.neg(),e=new n(10).pow(t).times(l),e}function oa(e,t,l=n.dOne){let a=e[0][0],i=e[0][1];for(let s=1;s<e.length;s++)n.lt(e[s][0],a)&&(a=e[s][0],i=e[s][1]);return ne(n.times(a,l))+t+", limited by "+i}function sa(e){return{[-1]:`${ne(e)}/s`,0:"",1:`+${ne(e)}/s`}[n.compare(e,0)]}var Qi=Object.freeze(Object.defineProperty({__proto__:null,default:n,exponentialFormat:_l,commaFormat:Wl,regularFormat:la,format:ne,formatWhole:te,formatTime:vn,toPlaces:Gi,formatSmall:Li,invertOOM:ia,formatLimit:oa,formatGain:sa},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:ji,commaFormat:Wi,regularFormat:zi,format:Ce,formatWhole:he,formatTime:ln,toPlaces:Ki,formatSmall:Ji,formatLimit:ra,invertOOM:Xi,formatGain:zl}=Qi;window.Decimal=n;window.exponentialFormat=ji;window.commaFormat=Wi;window.regularFormat=zi;window.format=Ce;window.formatWhole=he;window.formatTime=ln;window.toPlaces=Ki;window.formatSmall=Ji;window.formatLimit=ra;window.invertOOM=Xi;window.formatGain=zl;function ua(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function fn(e){return typeof e=="function"}var ye=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(ye||{});const Ml=Symbol("DoNotCache");function $(e,t){const l=e[t];fn(l)&&l.length===0&&!l[Ml]?e[t]=C(l.bind(e)):fn(l)&&(e[t]=l.bind(e),e[t][Ml]=!0)}function it(e){return fn(e)&&!e[Ml]&&(e=C(e)),e}const nl=Symbol("Component"),al=Symbol("GatherProps");let Yi=0;function bl(e="feature-"){return e+Yi++}var tt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(tt||{});function B(e){return e[Ml]=!0,e}function T(e,t=2){return e?0:t}function ot(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function ca(e,...t){const l=[],a=i=>{Object.keys(i).forEach(s=>{const r=i[s];r&&typeof r=="object"&&(t.includes(r.type)?l.push(r):!(r instanceof n)&&!Xe(r)&&a(r))})};return a(e),l}const sl={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 yn=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(yn||{}),Dl={classic:sl,paper:{...sl,variables:{...sl.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:{...sl,variables:{...sl.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...sl,variables:{...sl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const qe=Zn();document.fonts.onloadingdone=()=>qe.emit("fontsLoaded");var Zi=Object.freeze(Object.defineProperty({__proto__:null,globalBus:qe},Symbol.toStringTag,{value:"Module"}));var Ae=(e,t)=>{const l=e.__vccOpts||e;for(const[a,i]of t)l[a]=i;return l};const eo=le({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var y;const l=O({}),a=new ResizeObserver(c),i=O(null);Yl(()=>{const f=i.value;f!=null&&a.observe(f)});let s=!0,r=O((y=i.value)==null?void 0:y.getBoundingClientRect());function c(){s&&(s=!1,ul(()=>{var f;r.value=(f=i.value)==null?void 0:f.getBoundingClientRect(),Object.values(l.value).filter(w=>w).forEach(w=>w.rect=w.element.getBoundingClientRect()),t("updateNodes",l.value),s=!0}))}qe.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};Vl(bn,(f,w)=>{const h=new MutationObserver(()=>m(f));h.observe(w,p),l.value[f]={element:w,observer:h,rect:w.getBoundingClientRect()},c()}),Vl(wn,f=>{var w;(w=l.value[f])==null||w.observer.disconnect(),l.value[f]=void 0,c()}),Vl(Cn,l),Vl(kn,r);function m(f){const w=l.value[f];w!=null&&(w.rect=w.element.getBoundingClientRect(),t("updateNodes",l.value))}return(f,w)=>(b(),M(x,null,[Bt(f.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var da=Ae(eo,[["__scopeId","data-v-2b1dc1bc"]]);const to=["onPointerdown"],lo={class:"modal-wrapper"},no={class:"modal-container"},ao={class:"modal-header"},io=d(" default header "),oo={class:"modal-body"},so=d(" default body "),ro={class:"modal-footer"},uo=g("div",{class:"modal-default-flex-grow"},null,-1),ft=le({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const i=rt(e),s=C(()=>i.modelValue||c.value);function r(){l("update:modelValue",!1)}const c=O(!1),p=O(null),m=C(()=>{var y,f;return(f=(y=p.value)==null?void 0:y.nodes)!=null?f:null});return t({isOpen:s,nodes:m}),(y,f)=>(b(),Y(La,{to:"#modal-root"},[o(en,{name:"modal",onBeforeEnter:f[0]||(f[0]=w=>c.value=!0),onAfterLeave:f[1]||(f[1]=w=>c.value=!1)},{default:K(()=>[Zl(g("div",cl({class:"modal-mask",onPointerdown:Nl(r,["self"])},y.$attrs),[g("div",lo,[g("div",no,[g("div",ao,[Bt(y.$slots,"header",{shown:u(s)},()=>[io])]),g("div",oo,[o(da,{ref_key:"contextRef",ref:p},{default:K(()=>[Bt(y.$slots,"body",{shown:u(s)},()=>[so])]),_:3},512)]),g("div",ro,[Bt(y.$slots,"footer",{shown:u(s)},()=>[g("div",{class:"modal-default-footer"},[uo,g("button",{class:"button modal-default-button",onClick:r}," Close ")])])])])])],16,to),[[Jn,e.modelValue]])]),_:3})]))}}),bn=Symbol("RegisterNode"),wn=Symbol("UnregisterNode"),Cn=Symbol("Nodes"),kn=Symbol("Bounds"),ct=tn({});window.layers=ct;const fl={},Et=[];function Tt(e,t){return bt(()=>{const l={},a=l.emitter=Zn();if(l.on=a.on.bind(a),l.emit=a.emit.bind(a),l.nodes=O({}),l.id=e,Et.push(e),fl[e]=new Set,l.minimized=be(!1),Object.assign(l,t.call(l)),Et[Et.length-1]==null||Et[Et.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
|
|
Stack: ${Et}
|
|
Trying to pop ${l.id}`;return Et.pop(),$(l,"color"),$(l,"display"),$(l,"name"),ot(l,"name",l.id),$(l,"minWidth"),ot(l,"minWidth",600),$(l,"minimizable"),ot(l,"minimizable",!0),l})}function pa(e,t){if(console.info("Adding layer",e.id),ct[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ct[e.id]);return}ot(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ct[e.id]=e,qe.emit("addLayer",e,t.layers[e.id])}function co(e){return ct[e]}function ma(e){console.info("Removing layer",e.id),qe.emit("removeLayer",e),ct[e.id]=void 0}function po(e){ma(e),pa(e,Q)}function mo(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(ft,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}qe.on("update",function(t){Object.values(ct).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(ct).forEach(l=>{l==null||l.emit("update",t)}),Object.values(ct).forEach(l=>{l==null||l.emit("postUpdate",t)})});var go=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:bn,UnregisterNodeInjectionKey:wn,NodesInjectionKey:Cn,BoundsInjectionKey:kn,layers:ct,persistentRefs:fl,addingLayers:Et,createLayer:Tt,addLayer:pa,getLayer:co,removeLayer:ma,reloadLayer:po,setupLayerModal:mo},Symbol.toStringTag,{value:"Module"}));const _n=Symbol("PersistentState"),el=Symbol("DefaultValue"),Kl=Symbol("StackTrace"),ga=Symbol("Deleted"),Il=Symbol("NonPersistent"),Al=Symbol("SaveDataPath");function ho(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
|
`).slice(3,5).map(t=>t.trim()).join(`
|
|
`))||""}function be(e){const t=Xe(e)?e:O(e);t[_n]=t,t[el]=Xe(e)?e.value:e,t[Kl]=ho(),t[ga]=!1;const l=C({get(){return t.value},set(a){t.value=a}});return l[el]=t[el],t[Il]=l,t[Al]=void 0,Et.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
|
Created at:
|
|
`+t[Kl]):fl[Et[Et.length-1]].add(t),t}function fo(e){return e&&typeof e=="object"&&_n in e}function H(e){return e[Il]}qe.on("addLayer",(e,t)=>{const l=[],a=(i,s=[])=>{let r=!1;return Object.keys(i).forEach(c=>{let p=i[c];if(p&&typeof p=="object")if(Ve in p&&(p=p[Ve]),fo(p)){if(r=!0,p[ga]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
|
|
Created at:
|
|
`+p[Kl]);return}fl[e.id].delete(p);const m=[e.id,...s,c];p[Al]!=null&&JSON.stringify(m)!==JSON.stringify(p[Al])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Al].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Al]=m;const y=s.reduce((w,h)=>(h in w||(w[h]={}),w[h]),t),f=y[c];y[c]=p[_n],Qa(y)?f!=null?y[c]=f:y[c]=p[el]:f!=null?y[c].value=f:y[c].value=p[el]}else!(p instanceof n)&&!Xe(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),a(p,[...s,c])&&(Pn(p)&&!Pn(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.",Ve in i?i[Ve]:i,c):r=!0))}),r};a(e[Ve]),fl[e.id].forEach(i=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
|
|
Created at:
|
|
`+i[Kl])}),fl[e.id].clear()});const Ve=Symbol("ProxyState"),hl=Symbol("ProxyPath");function bt(e,t={}){const l=t;let a=!1;function i(){return a||(Object.assign(l,e(l)),a=!0),l}return new Proxy(l,{get(s,r){if(r===Ve)return i();const c=i()[r];return c&&typeof c=="object"&&Il in c?c[Il]:c},set(s,r,c){return i()[r]=c,!0},has(s,r){return r===Ve?!0:Reflect.has(i(),r)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(s,r){return a||(Object.assign(l,e(l)),a=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Le=window.state=tn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const ha=Bl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function fa(e){return JSON.stringify(e,(t,l)=>u(l))}const va={get(e,t){var a;if(t===Ve||t===hl)return e[t];const l=e[Ve][t];if(t!=="value"&&(Xa(l)||Array.isArray(l))){if(l!==((a=e[t])==null?void 0:a[Ve])){const i=[...e[hl],t];e[t]=new Proxy({[Ve]:l,[hl]:i},va)}return e[t]}return l},set(e,t,l,a){if(!Le.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const i=e[Ve][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof n&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw ha.autosave=!1,Le.hasNaN=!0,Le.NaNPath=[...e[hl],t],Le.NaNReceiver=a,console.error("Attempted to set NaN value",[...e[hl],t],e[Ve]),"Attempted to set NaN value. See above for details"}return e[Ve][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Ve])},has(e,t){return Reflect.has(e[Ve],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Ve],t)}};var Q=window.player=new Proxy({[Ve]:ha,[hl]:["player"]},va);function ya(e={}){return Object.assign({id:`${Ie.id}-0`,name:"Default Save",tabs:Ie.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ie.id,modVersion:Ie.versionNumber,layers:{}},e)}function xt(e){const t=Yt.compressToUTF16(fa(e!=null?e:Q[Ve]));return localStorage.setItem((e!=null?e:Q[Ve]).id,t),t}async function vo(){bo();try{let e=localStorage.getItem(Ge.active);if(e==null){await rl(vl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Yt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ie.id){await rl(vl());return}t.id=Ge.active,await rl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
|
`,e),await rl(vl())}}function vl(){const e=Ll(),t=ya({id:e});return xt(t),Ge.saves.push(e),t}function Ll(){let e,t=0;do e=`${Ie.id}-${t++}`;while(localStorage.getItem(e));return e}const An=O(!1);async function rl(e){console.info("Loading save",e),An.value=!0;const{layers:t,removeLayer:l,addLayer:a}=await jl(()=>Promise.resolve().then(function(){return go}),void 0),{fixOldSave:i,getInitialLayers:s}=await jl(()=>Promise.resolve().then(function(){return sr}),void 0);for(const r in t){const c=t[r];c&&l(c)}s(e).forEach(r=>a(r,e)),e=ya(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Ie.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ie.versionNumber&&i(e.modVersion,e),Object.assign(Q,e),Ge.active=Q.id,qe.emit("onLoad")}setInterval(()=>{Q.autosave&&xt()},1e3);window.onbeforeunload=()=>{Q.autosave&&xt()};window.save=xt;const yo=window.hardReset=async()=>{await rl(vl())},El=Bl({active:"",saves:[],showTPS:!0,theme:yn.Nordic,unthrottled:!1});Pt(El,e=>{const t=Yt.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ie.id,t)},{deep:!0});var Ge=window.settings=El;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:yn.Nordic};qe.emit("loadSettings",e),Object.assign(El,e),yo()};function bo(){try{let e=localStorage.getItem(Ie.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Yt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(El,t)}qe.emit("loadSettings",El)}catch{}}const ba=Bl([]);function wo(e){ba.push(e)}const wa=Bl([]);function Co(e){wa.push(e)}const ko=Bl([]),_o={class:"table"},Ct=le({__name:"Column",setup(e){const t=C(()=>Dl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),M("div",_o,[g("div",{class:Qe(["col",{mergeAdjacent:u(t)}])},[Bt(l.$slots,"default")],2)]))}}),Ao={class:"table"},xl=le({__name:"Row",setup(e){const t=C(()=>Dl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),M("div",Ao,[g("div",{class:Qe(["row",{mergeAdjacent:u(t)}])},[Bt(l.$slots,"default")],2)]))}});function Sn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ja(e)}function ke(e,t="span"){return typeof e=="function"?le({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),le({template:e})):le({render:()=>({})}):e}function ue(e){if(jt(e))return typeof e=="function"?e():ke(e);const t=e[nl];return o(t,e[al](),null)}function _e(...e){let t;return o(xl,null,Sn(t=e.map(ue))?t:{default:()=>[t]})}function Sl(...e){let t;return o(Ct,null,Sn(t=e.map(ue))?t:{default:()=>[t]})}function Dt(e){if(jt(e))return typeof e=="function"?e():typeof e=="string"?o(x,null,[e]):o(e,null,null);const t=e[nl];return o(t,e[al](),null)}function So(...e){let t;return o(Ct,null,Sn(t=e.map(Dt))?t:{default:()=>[t]})}function jt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ml]===!0}function Ca(e,t,l){const a=O(null),i=O(void 0);function s(p){a.value||(a.value=setInterval(c,250)),i.value=p,l&&(l.value=!0)}function r(){a.value&&(clearInterval(a.value),a.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return Xn(r),{start:s,stop:r,handleHolding:c}}function No(e,t){const l=C(()=>e.filter(a=>u(a.visibility)===tt.Visible&&t(a)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>Sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function Jl(e,t="div"){const l=Mt();return _t(()=>{l.value=ke(lt(e),t)}),l}function ll(e,t="div"){const l=Mt(null);return _t(()=>{const a=lt(e);l.value=a==null?null:ke(a,t)}),l}function Mo(e){return C(()=>lt(e))}function lt(e){return u(u(e))}function q(...e){return e.includes(Object)||e.push(Object),e}const we=le({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(b(),M("div",{style:Ye({width:e.width,height:e.height})},null,4))}});const Io={},Eo={class:"notif"};function xo(e,t){return b(),M("div",Eo,"!")}var $n=Ae(Io,[["render",xo],["__scopeId","data-v-66323fd4"]]);const nn=e=>(Wt("data-v-9de19f28"),e=e(),zt(),e),Bo={key:0,class:"day feature dontMerge opened"},Do={class:"date"},Po=d("Dec"),Fo=nn(()=>g("br",null,null,-1)),To={class:"date"},Ro=d("Dec"),Oo=nn(()=>g("br",null,null,-1)),Uo=nn(()=>g("div",{class:"doors"},null,-1)),$o={class:"date"},Ho=d("Dec"),qo=nn(()=>g("br",null,null,-1)),Vo={key:0,class:"material-icons lock"},Go={key:1,class:"timer"},Lo={key:2,class:"timer"},Qo=le({__name:"Day",props:{day:null,symbol:null,layer:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const l=e,a=C(()=>l.layer&&n.gte(J.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function i(){a.value&&t("unlockLayer")}return(s,r)=>e.opened.value?(b(),M("div",Bo,[o(en,{appear:"",name:"door"},{default:K(()=>[g("div",{class:"doors",onClick:r[0]||(r[0]=c=>t("openLayer"))},[g("div",Do,[Po,Fo,d(ce(e.day),1)]),g("div",To,[Ro,Oo,d(ce(e.day),1)])])]),_:1}),g("div",{class:"icon",style:Ye({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:r[1]||(r[1]=c=>t("openLore"))},"?"),u(e.shouldNotify)?(b(),Y($n,{key:0})):P("",!0)])):(b(),M("div",{key:1,class:Qe(["day feature dontMerge",{can:u(a),locked:!u(a),canOpen:u(a)}]),onClick:i},[Uo,g("div",$o,[Ho,qo,d(ce(e.day),1)]),u(a)?P("",!0):(b(),M("div",Vo,"lock")),u(J).day.value===e.day&&!u(a)?(b(),M("div",Go,ce(u(vn)(u(J).timeUntilNewDay.value,0)),1)):u(J).day.value===e.day&&e.layer==null?(b(),M("div",Lo,"NYI")):P("",!0),u(a)?(b(),Y($n,{key:3})):P("",!0)],2))}});var jo=Ae(Qo,[["__scopeId","data-v-9de19f28"]]);const Wo=le({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=Jl(Ft(t,"display")),a=Jl(Ft(t,"content"));return(i,s)=>(b(),Y(Ct,{class:"collapsible-container"},{default:K(()=>[g("button",{onClick:s[0]||(s[0]=r=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(b(),Y(He(u(l))))]),e.collapsed.value?P("",!0):(b(),Y(He(u(a)),{key:0}))]),_:1}))}});var zo=Ae(Wo,[["__scopeId","data-v-a72c16aa"]]);const Ko={key:0},Jo={key:0,class:"mark star"},Xo=["src"],Yo=le({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(b(),M("div",Ko,[e.mark===!0?(b(),M("div",Jo)):(b(),M("img",{key:1,class:"mark",src:e.mark},null,8,Xo))])):P("",!0)}});var an=Ae(Yo,[["__scopeId","data-v-2207999f"]]);const Zo=le({__name:"Node",props:{id:null},setup(e){const l=rt(e),a=Ql(bn,()=>{}),i=Ql(wn,()=>{}),s=Mt(null),r=C(()=>s.value&&s.value.parentElement);return Pt([r,l.id],([c,p],[m,y])=>{m&&i(u(y)),c&&a(p,c)}),Xn(()=>i(u(l.id))),(c,p)=>(b(),M("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Pl=Ae(Zo,[["__scopeId","data-v-a48cb382"]]);const es=le({props:{progress:{type:q(String,Object,Number),required:!0},width:{type:q(Number),required:!0},height:{type:q(Number),required:!0},direction:{type:q(String),required:!0},display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),borderStyle:q(Object,String,Array),textStyle:q(Object,String,Array),baseStyle:q(Object,String,Array),fillStyle:q(Object,String,Array),mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:an,Node:Pl},setup(e){const{progress:t,width:l,height:a,direction:i,display:s}=rt(e),r=C(()=>{let m=t.value instanceof n?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=C(()=>{const m={width:lt(l)+.5+"px",height:lt(a)+.5+"px"};switch(u(i)){case ye.Up:m.clipPath=`inset(${r.value}% 0% 0% 0%)`,m.width=lt(l)+1+"px";break;case ye.Down:m.clipPath=`inset(0% 0% ${r.value}% 0%)`,m.width=lt(l)+1+"px";break;case ye.Right:m.clipPath=`inset(0% ${r.value}% 0% 0%)`;break;case ye.Left:m.clipPath=`inset(0% 0% 0% ${r.value} + '%)`;break;case ye.Default:m.clipPath="inset(0% 50% 0% 0%)";break}return m}),p=ll(s);return{normalizedProgress:r,barStyle:c,component:p,unref:u,Visibility:tt}}});function ts(e,t,l,a,i,s){var p,m,y,f,w,h,k;const r=tl("MarkNode"),c=tl("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("div",{key:0,style:Ye([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),class:Qe({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:Ye([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(b(),M("span",{key:0,class:"overlayText",style:Ye(e.unref(e.textStyle))},[(b(),Y(He(e.component)))],4)):P("",!0)],4),g("div",{class:"border",style:Ye([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(y=e.unref(e.style))!=null?y:{},(f=e.unref(e.baseStyle))!=null?f:{},(w=e.unref(e.borderStyle))!=null?w:{}])},[g("div",{class:"fill",style:Ye([e.barStyle,(h=e.unref(e.style))!=null?h:{},(k=e.unref(e.fillStyle))!=null?k:{}])},null,4)],4),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):P("",!0)}var ls=Ae(es,[["render",ts],["__scopeId","data-v-02d0d7b2"]]);const ns=Symbol("Bar");function Qt(e){return bt(()=>{const t=e();return t.id=bl("bar-"),t.type=ns,t[nl]=ls,$(t,"visibility"),ot(t,"visibility",tt.Visible),$(t,"width"),$(t,"height"),$(t,"direction"),$(t,"style"),$(t,"classes"),$(t,"borderStyle"),$(t,"baseStyle"),$(t,"textStyle"),$(t,"fillStyle"),$(t,"progress"),$(t,"display"),$(t,"mark"),t[al]=function(){const{progress:l,width:a,height:i,direction:s,display:r,visibility:c,style:p,classes:m,borderStyle:y,textStyle:f,baseStyle:w,fillStyle:h,mark:k,id:A}=this;return{progress:l,width:a,height:i,direction:s,display:r,visibility:c,style:u(p),classes:m,borderStyle:y,textStyle:f,baseStyle:w,fillStyle:h,mark:k,id:A}},t})}var as=le({props:{display:{type:q(Object,String,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),onClick:Function,onHold:Function,canClick:{type:q(Boolean),required:!0},small:Boolean,mark:q(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Pl,MarkNode:an},setup(e){const{display:t,onClick:l,onHold:a}=rt(e),i=Mt("");_t(()=>{const c=lt(t);if(c==null){i.value="";return}if(jt(c)){i.value=ke(c);return}const p=ke(c.title||"","h3"),m=ke(c.description,"div");i.value=ke(B(()=>o("span",null,[c.title?o("div",null,[o(p,null,null)]):null,o(m,null,null)])))});const{start:s,stop:r}=Ca(l,a,e.isHolding);return{start:s,stop:r,comp:i,Visibility:tt,unref:u}}});function is(e,t,l,a,i,s){var p;const r=tl("MarkNode"),c=tl("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("button",{key:0,style:Ye([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:Qe({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(b(),Y(He(e.unref(e.comp)),{key:0})):P("",!0),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):P("",!0)}var ka=Ae(as,[["render",is],["__scopeId","data-v-8cedd7da"]]);const os=Symbol("Clickable");function V(e){return bt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=bl("clickable-"),t.type=os,t[nl]=ka,t.isHolding=O(!1),$(t,"visibility"),ot(t,"visibility",tt.Visible),$(t,"canClick"),ot(t,"canClick",!0),$(t,"classes"),$(t,"style"),$(t,"mark"),$(t,"display"),t.onClick){const a=t.onClick.bind(t);t.onClick=function(i){u(t.canClick)&&a(i)}}if(t.onHold){const a=t.onHold.bind(t);t.onHold=function(){u(t.canClick)&&a()}}return t[al]=function(){const{display:a,visibility:i,style:s,classes:r,onClick:c,onHold:p,isHolding:m,canClick:y,small:f,mark:w,id:h}=this;return{display:a,visibility:i,style:u(s),classes:r,onClick:c,onHold:p,isHolding:m,canClick:y,small:f,mark:w,id:h}},t})}function st(e,t="points",l=0,a=void 0){const i=Xe(e)?e:be(e);if(i.displayName=t,i.precision=l,i.small=a,!Xe(e)){const s=i[Il];s.displayName=t,s.precision=l,s.small=a}return i}function Hn(e){const t=be(e.value);return Pt(e,l=>{An.value||n.gt(l,t.value)&&(t.value=l)}),t}function ss(e){const t=be(e.value);return Pt(e,(l,a)=>{An.value||n.gt(l,a)&&(t.value=n.add(t.value,n.sub(l,a)))}),t}new n("10^^8");new n("1e100");function Fl(e,t){const l=t!=null?t:e.value;return n.eq(e.precision,0)?he(e.small?l:n.floor(l)):Ce(l,e.precision,e.small)}const rs=["x1","y1","x2","y2"],us=le({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=rt(e),a=C(()=>{const s=l.startNode.value.rect,r=l.boundingRect.value,c=r?{x:s.x+s.width/2-r.x,y:s.y+s.height/2-r.y}:{x:0,y:0};return l.link.value.offsetStart&&(c.x+=l.link.value.offsetStart.x,c.y+=l.link.value.offsetStart.y),c}),i=C(()=>{const s=l.endNode.value.rect,r=l.boundingRect.value,c=r?{x:s.x+s.width/2-r.x,y:s.y+s.height/2-r.y}:{x:0,y:0};return l.link.value.offsetEnd&&(c.x+=l.link.value.offsetEnd.x,c.y+=l.link.value.offsetEnd.y),c});return(s,r)=>(b(),M("line",cl({"stroke-width":"15px",stroke:"white"},e.link,{x1:u(a).x,y1:u(a).y,x2:u(i).x,y2:u(i).y}),null,16,rs))}});const cs=le({__name:"Links",props:{links:null},setup(e){var p;const l=Ft(e,"links"),a=O(null),i=Ql(Cn,O({})),s=Ql(kn,O(void 0)),r=O((p=a.value)==null?void 0:p.getBoundingClientRect());Pt(s,()=>{var m;return r.value=(m=a.value)==null?void 0:m.getBoundingClientRect()}),Yl(()=>{var m;return r.value=(m=a.value)==null?void 0:m.getBoundingClientRect()});const c=C(()=>{var y,f;const m=i.value;return(f=(y=l.value)==null?void 0:y.filter(w=>{var h,k;return((h=m[w.startNode.id])==null?void 0:h.rect)&&((k=m[w.startNode.id])==null?void 0:k.rect)}))!=null?f:[]});return(m,y)=>(b(),M(x,null,[u(c)?(b(),M("svg",Wa(cl({key:0},m.$attrs)),[(b(!0),M(x,null,Yn(u(c),(f,w)=>(b(),Y(us,{key:w,link:f,boundingRect:r.value,startNode:u(i)[f.startNode.id],endNode:u(i)[f.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):P("",!0),g("div",{ref_key:"resizeListener",ref:a,class:"resize-listener"},null,512)],64))}});var ds=Ae(cs,[["__scopeId","data-v-063f6d6b"]]);le({props:{nodes:{type:q(Array),required:!0},leftSideNodes:q(Array),rightSideNodes:q(Array),branches:q(Array)},components:{Links:ds},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:a}=rt(e),i=Mt();_t(()=>{const c=lt(t);i.value=ke(B(()=>o(x,null,[c.map(p=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Dt)]))])))});const s=Mt();_t(()=>{const c=lt(l);s.value=c?ke(B(()=>o("span",{class:"left-side-nodes small"},[c.map(Dt)]))):""});const r=Mt();return _t(()=>{const c=lt(a);r.value=c?ke(B(()=>o("span",{class:"side-nodes small"},[c.map(Dt)]))):""}),{unref:u,nodesComp:i,leftNodesComp:s,rightNodesComp:r}}});le({props:{display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),onClick:Function,onHold:Function,color:q(String),glowColor:q(String),canClick:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:an,Node:Pl},setup(e){const{onClick:t,onHold:l,display:a}=rt(e),i=ll(a),{start:s,stop:r}=Ca(t,l);return{start:s,stop:r,comp:i,unref:u,Visibility:tt,isCoercableComponent:jt}}});function dl(e){const t=[],l={};let a=!1;function i(){return a||(t.push(...e()),l.base=t.map(c=>it(c.base)),l.baseText=t.map(c=>it(c.baseText)),l.visible=t.map(c=>it(c.visible)),a=!0),t}const s=be({});return[B(()=>{const c=i();let p=!0;const m=c.map((y,f)=>{var A,S,oe;if(u(l.visible[f])===!1)return null;const w=o("h3",{onClick:()=>s.value[f]=!s.value[f],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(u(s.value[f])?" collapsed":"")},[d("\u25BC")]),y.title,y.subtitle?o("span",{class:"subtitle"},[d(" ("),y.subtitle,d(")")]):null]),h=u(s.value[f])?null:o(x,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[Dt((A=u(l.baseText[f]))!=null?A:"Base")]),o("span",{class:"modifier-amount"},[Ce((S=u(l.base[f]))!=null?S:1),y.unit])]),Dt(u(y.modifier.description))]),k=!p;return p=!1,o(x,null,[k?o("br",null,null):null,o("div",null,[w,o("br",null,null),h,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[d("Total")]),o("span",{class:"modifier-amount"},[Ce(y.modifier.apply((oe=u(l.base[f]))!=null?oe:1)),y.unit])])])])});return o(x,null,[m])}),s]}function Xl(e){const t=Object.values(e).reverse(),l=be(!0),a=C(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:i,collapsedContent:s,hasCollapsedContent:r}=No(t,p=>p.earned.value),c=B(()=>{const p=[...a.value];return i.value&&p.push(i.value),So(...p,B(()=>Zl(o(zo,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[Jn,u(r)]])))});return{collapseMilestones:l,display:c}}function pl(e){const t=ss(e.resource),l=()=>{var c,p;if(J.day.value!==e.day)return 1;let s=n.add(t.value,1),r=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:Q.usingLog)&&(s=s.log10(),r=n.log10(r)),n.div(s,r)},a=Qt(()=>({direction:ye.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:B(()=>J.day.value===e.day?o(x,null,[te(t.value),d("/"),te(e.goal)]):"")})),i=B(()=>o(x,null,[o("div",null,[J.day.value===e.day?o(x,null,[d("Reach "),te(e.goal),d(" total "),e.resource.displayName,d(" to complete the day")]):o(x,null,[e.name,d(" Complete!")]),e.modal?o(x,null,[" ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[d("Check Modifiers")])]):void 0]),ue(a),e.modal?ue(e.modal.display):void 0]));return _t(()=>{J.day.value===e.day&&n.gte(t.value,e.goal)&&J.completeDay()}),{total:t,trackerDisplay:i}}const ps=Symbol("Buyable");function Pe(e){const t=be(0);return bt(()=>{var s,r,c;const l=e();if(l.canPurchase==null&&(l.resource==null||l.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",l),"Cannot create buyable without a canPurchase property or a resource and cost property";l.id=bl("buyable-"),l.type=ps,l[nl]=ka,l.amount=t,l.amount[el]=(s=l.initialValue)!=null?s:0,l.canAfford=C(()=>{const p=l,m=u(p.cost);return p.resource!=null&&m!=null&&n.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=C(()=>u(l.visibility)===tt.Visible&&u(l.canAfford)&&n.lt(l.amount.value,u(l.purchaseLimit)))),l.maxed=C(()=>n.gte(l.amount.value,u(l.purchaseLimit))),$(l,"classes");const a=l.classes;l.classes=C(()=>{const p=u(a)||{};return l.maxed.value&&(p.bought=!0),p}),$(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(r=l.onClick)!=null?r:l.purchase)!=null?c:function(){var y;const p=l;if(!u(p.canPurchase))return;const m=u(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=n.sub(p.resource.value,m),p.amount.value=n.add(p.amount.value,1)),(y=p.onPurchase)==null||y.call(p,m)},$(l,"display");const i=l.display;return l.display=B(()=>{const p=u(i);if(jt(p)){const m=ke(p);return o(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,y=ke(p.title||"","h3"),f=ke(p.description||""),w=ke(p.effectDisplay||"");return o("span",null,[p.title?o("div",null,[o(y,null,null)]):null,p.description?o(f,null,null):null,p.showAmount===!1?null:o("div",null,[o("br",null,null),u(m.purchaseLimit)===n.dInf?o(x,null,[d("Amount: "),he(m.amount.value)]):o(x,null,[d("Amount: "),he(m.amount.value),d(" /")," ",he(u(m.purchaseLimit))])]),p.effectDisplay?o("div",null,[o("br",null,null),d("Currently: "),o(w,null,null)]):null,m.cost&&!m.maxed.value?o("div",null,[d("Cost: "),Ce(u(m.cost)||0)," ",l.resource.displayName]):null])}return""}),$(l,"visibility"),ot(l,"visibility",tt.Visible),$(l,"cost"),$(l,"resource"),$(l,"purchaseLimit"),ot(l,"purchaseLimit",n.dInf),$(l,"style"),$(l,"mark"),$(l,"small"),l[al]=function(){const{display:p,visibility:m,style:y,classes:f,onClick:w,canClick:h,small:k,mark:A,id:S}=this;return{display:p,visibility:m,style:u(y),classes:f,onClick:w,canClick:h,small:k,mark:A,id:S}},l})}const on=tn({}),Nn=Symbol("Hotkey");function yl(e){return bt(()=>{const t=e();return t.type=Nn,$(t,"enabled"),ot(t,"enabled",!0),$(t,"description"),t})}qe.on("addLayer",e=>{ca(e,Nn).forEach(t=>{on[t.key]=t})});qe.on("removeLayer",e=>{ca(e,Nn).forEach(t=>{on[t.key]=void 0})});document.onkeydown=function(e){var a;if(((a=e.target)==null?void 0:a.tagName)==="INPUT"||En.value&&!Q.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=on[t];l&&u(l.enabled)&&(e.preventDefault(),l.onPress())};Co(B(()=>{const e=Object.values(on).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":o("div",null,[o("br",null,null),o("h4",null,[d("Hotkeys")]),e.map(t=>o("div",null,[t==null?void 0:t.key,d(": "),t==null?void 0:t.description]))])}));const ms=le({__name:"Sticky",setup(e){const t=O("0"),l=new ResizeObserver(i),a=Mt(null);function i(){let s=a.value;if(s==null)return;let r=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(r+=c.offsetHeight),s=c}t.value=r+"px"}return ul(i),document.fonts.ready.then(i),Yl(()=>{var r;const s=(r=a.value)==null?void 0:r.parentElement;s&&l.observe(s)}),(s,r)=>(b(),M("div",{class:"sticky",style:Ye({top:t.value}),ref_key:"element",ref:a,"data-v-sticky":""},[Bt(s.$slots,"default",{},void 0,!0)],4))}});var gs=Ae(ms,[["__scopeId","data-v-cccac690"]]);const qn=le({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=C(()=>Fl(t.resource));return(a,i)=>(b(),M("h2",{style:Ye({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},ce(u(l)),5))}});const hs={class:"main-display"},fs={key:0},vs={key:1},ys=d(", "),bs={key:2},ws=g("br",null,null,-1),Cs={class:"main-display"},ks={key:0},_s={key:1},As=d(", "),Ss={key:2},Ns=g("br",null,null,-1),At=le({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=rt(e),a=O(null),i=ll(l.effectDisplay),s=O(null),r=ll(l.productionDisplay),c=C(()=>n.lt(l.resource.value,"1e1000"));return(p,m)=>{var y,f;return e.sticky?(b(),Y(gs,{key:0},{default:K(()=>{var w,h,k,A;return[g("div",{class:Qe(["main-display-container",(w=e.classes)!=null?w:{}]),style:Ye([{height:`${((k=(h=a.value)==null?void 0:h.$el.clientHeight)!=null?k:0)+50}px`},(A=e.style)!=null?A:{}])},[g("div",hs,[u(c)?(b(),M("span",fs,"You have ")):P("",!0),o(qn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),u(i)?(b(),M("span",vs,[ys,(b(),Y(He(u(i)),{ref_key:"effectRef",ref:a},null,512))])):P("",!0),u(r)?(b(),M("span",bs,[ws,(b(),Y(He(u(r)),{ref_key:"productionRef",ref:s},null,512))])):P("",!0)])],6)]}),_:1})):(b(),M("div",{key:1,class:Qe(["main-display-container",(y=e.classes)!=null?y:{}]),style:Ye([{height:"50px"},(f=e.style)!=null?f:{}])},[g("div",Cs,[u(c)?(b(),M("span",ks,"You have ")):P("",!0),o(qn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),u(i)?(b(),M("span",_s,[As,(b(),Y(He(u(i)),{ref_key:"effectRef",ref:a},null,512))])):P("",!0),u(r)?(b(),M("span",Ss,[Ns,(b(),Y(He(u(r)),{ref_key:"productionRef",ref:s},null,512))])):P("",!0)])],6))}}});var Ms=le({props:{display:{type:q(String,Object,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),resource:Object,cost:q(String,Object,Number),canPurchase:{type:q(Boolean),required:!0},bought:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Pl,MarkNode:an},setup(e){const{display:t,cost:l}=rt(e),a=Mt("");return _t(()=>{const i=lt(t);if(i==null){a.value="";return}if(jt(i)){a.value=ke(i);return}const s=lt(l),r=ke(i.title||"","h3"),c=ke(i.description,"div"),p=ke(i.effectDisplay||"");a.value=ke(B(()=>{var m;return o("span",null,[i.title?o("div",null,[o(r,null,null)]):null,o(c,null,null),i.effectDisplay?o("div",null,[d("Currently: "),o(p,null,null)]):null,e.resource!=null&&i.showCost!==!1?o(x,null,[o("br",null,null),d("Cost: "),e.resource&&Fl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:a,unref:u,Visibility:tt}}});const Is=["disabled"];function Es(e,t,l,a,i,s){var p;const r=tl("MarkNode"),c=tl("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("button",{key:0,style:Ye([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:Qe({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(b(),Y(He(e.unref(e.component)),{key:0})):P("",!0),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,Is)):P("",!0)}var xs=Ae(Ms,[["render",Es],["__scopeId","data-v-7f411ac8"]]);const Bs=Symbol("Upgrade");function L(e){const t=be(!1);return bt(()=>{const l=e();return l.id=bl("upgrade-"),l.type=Bs,l[nl]=xs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=C(()=>{const a=l;return a.resource!=null&&a.cost!=null&&n.gte(a.resource.value,u(a.cost))}):$(l,"canAfford"),l.canPurchase=C(()=>u(l.visibility)===tt.Visible&&u(l.canAfford)&&!u(l.bought)),l.purchase=function(){var i;const a=l;!u(a.canPurchase)||(a.resource!=null&&a.cost!=null&&(a.resource.value=n.sub(a.resource.value,u(a.cost))),t.value=!0,(i=a.onPurchase)==null||i.call(a))},$(l,"visibility"),ot(l,"visibility",tt.Visible),$(l,"classes"),$(l,"style"),$(l,"display"),$(l,"mark"),$(l,"cost"),$(l,"resource"),l[al]=function(){const{display:a,visibility:i,style:s,classes:r,resource:c,cost:p,canPurchase:m,bought:y,mark:f,id:w,purchase:h}=this;return{display:a,visibility:i,style:u(s),classes:r,resource:c,cost:p,canPurchase:m,bought:y,mark:f,id:w,purchase:h}},l})}function ae(e){return bt(()=>{const{addend:t,description:l,enabled:a}=e(),i=it(t),s=it(l),r=a==null?void 0:it(a);return{apply:c=>n.add(c,u(i)),revert:c=>n.sub(c,u(i)),enabled:r,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(s)?o("span",{class:"modifier-description"},[Dt(u(s))]):null,o("span",{class:"modifier-amount"},[n.gte(u(i),0)?"+":"",Ce(u(i))])]))}})}function E(e){return bt(()=>{const{multiplier:t,description:l,enabled:a}=e(),i=it(t),s=it(l),r=a==null?void 0:it(a);return{apply:c=>n.times(c,u(i)),revert:c=>n.div(c,u(i)),enabled:r,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(s)?o("span",{class:"modifier-description"},[Dt(u(s))]):null,o("span",{class:"modifier-amount"},[d("\xD7"),Ce(u(i))])]))}})}function _a(e){return bt(()=>{const{exponent:t,description:l,enabled:a,supportLowNumbers:i}=e(),s=it(t),r=it(l),c=a==null?void 0:it(a);return{apply:p=>{let m=p;return i&&(m=n.add(m,1)),m=n.pow(m,u(s)),i&&(m=n.sub(m,1)),m},revert:p=>{let m=p;return i&&(m=n.add(m,1)),m=n.root(m,u(s)),i&&(m=n.sub(m,1)),m},enabled:c,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(r)?o("span",{class:"modifier-description"},[Dt(u(r)),i?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[d("^"),Ce(u(s))])]))}})}function X(e){return bt(()=>{const t=e();return{apply:l=>t.filter(a=>u(a.enabled)!==!1).reduce((a,i)=>i.apply(a),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(a=>u(a.enabled)!==!1).reduceRight((a,i)=>i.revert(a),l):void 0,enabled:C(()=>t.filter(l=>u(l.enabled)!==!1).length>0),description:B(()=>o(x,null,[t.filter(l=>u(l.enabled)!==!1).map(l=>u(l.description)).filter(l=>l).map(Dt)]))}})}function Aa(e){return bt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(0),u(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=C(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.nextAt==null&&(t.nextAt=C(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.convert==null&&(t.convert=function(){var i;const l=u(t.currentGain),a=u(t.currentAt);t.gainResource.value=n.add(t.gainResource.value,l),t.spend(l,a),(i=t.onConvert)==null||i.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),$(t,"currentGain"),$(t,"actualGain"),$(t,"currentAt"),$(t,"nextAt"),$(t,"buyMax"),ot(t,"buyMax",!0),$(t,"roundUpCost"),ot(t,"roundUpCost",!0),t})}function Mn(e,t){const l=it(e),a=it(t);return{currentGain(i){let s=u(i.baseResource.value);if(i.costModifier&&(s=i.costModifier.apply(s)),n.lt(s,u(l)))return 0;const r=n.div(s,u(l)).pow(u(a));return r.isNan()?new n(0):r},currentAt(i){let s=u(i.currentGain);return i.gainModifier&&(s=i.gainModifier.revert(s)),s=n.max(0,s).root(u(a)).times(u(l)),i.costModifier&&(s=i.costModifier.revert(s)),s},nextAt(i){let s=n.add(u(i.currentGain),1).floor();return i.gainModifier&&(s=i.gainModifier.revert(s)),s=n.max(0,s).root(u(a)).times(u(l)).max(u(l)),i.costModifier&&(s=i.costModifier.revert(s)),s}}}function Sa(e){return Aa(e)}function Ds(e){return Aa(()=>{const t=e();return ot(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(t.gainResource.value),u(t.buyMax)||(l=l.min(n.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=C(()=>{let l=n.sub(n.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return u(t.buyMax)||(l=l.min(1)),l})),ot(t,"convert",function(){var i;const l=u(t.actualGain),a=u(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(u(t.currentGain)):u(t.currentGain),t.spend(l,a),(i=t.onConvert)==null||i.call(t,l)}),t})}const Ps="boxes",Vn=6,kt=Tt(Ps,function(){const e="Boxes",t="#964B00",l=st(0,"boxes"),a=Sa(()=>({scaling:Mn(1e10,1),baseResource:fe.logs,gainResource:H(l),roundUpCost:!0})),i=V(()=>({display:B(()=>o(x,null,[o("span",{style:"font-size: large"},[d("Create "),he(a.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost:")," ",Fl(fe.logs,n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",fe.logs.displayName])])),canClick:()=>n.gte(a.actualGain.value,1),onClick(){!u(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),s=L(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:H(l),cost:100})),r=L(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:H(l),cost:1e3})),c=L(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:H(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:r,coalUpgrade:c},m=Pe(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:B(()=>o(x,null,[Ce(n.div(m.amount.value,2).add(1)),d("x")]))},resource:H(l),cost(){return n.pow(3,m.amount.value).times(100)},visibility:()=>T(s.bought.value)})),y=Pe(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:B(()=>o(x,null,[Ce(n.div(y.amount.value,2).add(1)),d("x")]))},resource:H(l),cost(){return n.pow(5,y.amount.value).times(1e3)},visibility:()=>T(r.bought.value)})),f=Pe(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:B(()=>o(x,null,[Ce(n.div(f.amount.value,2).add(1)),d("x")]))},resource:H(l),cost(){return n.pow(7,f.amount.value).times(1e3)},visibility:()=>T(c.bought.value)})),w={logBoxesBuyable:m,ashBoxesBuyable:y,coalBoxesBuyable:f},{total:h,trackerDisplay:k}=pl({resource:l,goal:5e4,name:e,day:Vn,color:t});return{name:e,day:Vn,color:t,boxes:l,totalBoxes:h,boxesConversion:a,upgrades:p,buyables:w,minWidth:700,display:B(()=>o(x,null,[ue(k),o(we,null,null),o(At,{resource:l,color:t,style:"margin-bottom: 0"},null),o(we,null,null),ue(i),o(we,null,null),_e(...Object.values(p)),_e(...Object.values(w))]))}});const Fs={class:"field"},Ts=le({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=C(()=>ke(u(l.title)||"<span></span>","span")),i=C({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,r)=>(b(),M("label",Fs,[Zl(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":r[0]||(r[0]=c=>Xe(i)?i.value=c:null)},null,512),[[za,u(i)]]),(b(),Y(He(u(a))))]))}});var Lt=Ae(Ts,[["__scopeId","data-v-33d57459"]]);const Rs={class:"field"},Os={key:0,class:"field-title"},In=le({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var r;const l=e,a=ll(Ft(l,"title"),"span"),i=O((r=l.options.find(c=>c.value===l.modelValue))!=null?r:null);Pt(Ft(l,"modelValue"),c=>{var p;lt(i)!==c&&(i.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(b(),M("div",Rs,[u(a)?(b(),M("span",Os,[(b(),Y(He(u(a))))])):P("",!0),o(u(Ya),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>i.value=m),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var Us=le({props:{visibility:{type:q(Number),required:!0},display:{type:q(String,Object,Function),required:!0},style:q(String,Object,Array),classes:q(Object),earned:{type:q(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Pl},setup(e){const{display:t}=rt(e),l=Mt("");return _t(()=>{const a=lt(t);if(a==null){l.value="";return}if(jt(a)){l.value=ke(a);return}const i=ke(a.requirement,"h3"),s=ke(a.effectDisplay||"","b"),r=ke(a.optionsDisplay||"","span");l.value=ke(B(()=>o("span",null,[o(i,null,null),a.effectDisplay?o("div",null,[o(s,null,null)]):null,a.optionsDisplay?o("div",{class:"equal-spaced"},[o(r,null,null)]):null])))}),{comp:l,unref:u,Visibility:tt}}});function $s(e,t,l,a,i,s){var c;const r=tl("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("div",{key:0,style:Ye([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:Qe({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(b(),Y(He(e.unref(e.comp)))),o(r,{id:e.id},null,8,["id"])],6)):P("",!0)}var Hs=Ae(Us,[["render",$s],["__scopeId","data-v-f4e8794e"]]);qe.on("setupVue",e=>e.use(Za));const Gn=ea(),qs=Symbol("Milestone");let Zt;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Zt||(Zt={}));function Ee(e){const t=be(!1);return bt(()=>{var i;const l=(i=e==null?void 0:e())!=null?i:{};l.id=bl("milestone-"),l.type=qs,l[nl]=Hs,l.earned=t,l.complete=function(){var r;const s=l;if(t.value=!0,(r=s.onComplete)==null||r.call(s),s.display&&u(s.showPopups)===!0){const c=u(s.display),p=ke(jt(c)?c:c.requirement);Gn(o(x,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(p,null,null)])]))}},$(l,"visibility"),ot(l,"visibility",tt.Visible);const a=l.visibility;if(l.visibility=C(()=>{const s=u(l.display);switch(Ge.msDisplay){default:case Zt.All:return u(a);case Zt.Configurable:return u(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?tt.None:u(a);case Zt.Incomplete:return u(l.earned)?tt.None:u(a);case Zt.None:return tt.None}}),$(l,"style"),$(l,"classes"),$(l,"display"),$(l,"showPopups"),l[al]=function(){const{visibility:s,display:r,style:c,classes:p,earned:m,id:y}=this;return{visibility:s,display:r,style:u(c),classes:p,earned:m,id:y}},l.shouldEarn){const s=l;_t(()=>{var r,c;if(Ge.active===Q.id&&!s.earned.value&&u(s.visibility)===tt.Visible&&((r=s.shouldEarn)==null?void 0:r.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&u(s.showPopups)===!0)){const p=u(s.display),m=ke(jt(p)?p:p.requirement);Gn(o(x,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}})}return l})}qe.on("loadSettings",e=>{ot(e,"msDisplay",Zt.All)});const Vs=Object.values(Zt).map(e=>({label:ua(e),value:e}));wo(B(()=>o(In,{title:"Show Milestones",options:Vs,"onUpdate:modelValue":e=>Ge.msDisplay=e,modelValue:Ge.msDisplay},null)));const Gs=Symbol("Reset");function Ls(e){return bt(()=>{const t=e();return t.id=bl("reset-"),t.type=Gs,t.reset=function(){var a;const l=i=>{if(i&&typeof i=="object")if(el in i){const s=i;s.value=s[el]}else!(i instanceof n)&&!Xe(i)&&Object.values(i).forEach(s=>l(s))};u(t.thingsToReset).forEach(l),qe.emit("reset",t),(a=t.onReset)==null||a.call(t)},$(t,"thingsToReset"),t})}const Gl={};qe.on("removeLayer",e=>{var t;(t=Gl[e.id])==null||t.call(Gl),Gl[e.id]=void 0});const Qs="paper",Ln=5,Me=Tt(Qs,function(){const e="Paper",t="#E8DCB8",l=st(0,"paper"),a=st(C(()=>n.min(n.div(fe.logs.value,1e9),n.div(U.ash.value,1e6))),"pulp"),i=Sa(()=>({scaling:Mn(1,1.2),baseResource:a,gainResource:H(l),roundUpCost:!0,spend(de,G){fe.logs.value=n.sub(fe.logs.value,n.times(G,1e9)),U.ash.value=n.sub(U.ash.value,n.times(G,1e6))},gainModifier:oe})),s=V(()=>({display:B(()=>{const de=n.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value;return o(x,null,[o("span",{style:"font-size: large"},[d("Create "),he(i.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),Fl(fe.logs,de),d(" "),a.displayName,d(" ("),he(n.times(de,1e9)),d(" "),fe.logs.displayName,d(";")," ",he(n.times(de,1e6)),d(" "),U.ash.displayName,d(")")])])}),canClick:()=>n.gte(i.actualGain.value,1),onClick(){!u(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"}));function r(de){const G=Pe(()=>({...de,display:{title:de.name,description:`Print a copy of "${de.name}", which ${de.elfName} will use to improve their skills! Each copy printed will reduce the "${de.buyableName}" price scaling by 0.95x and make ${de.elfName} purchase +10% faster!`,effectDisplay:B(()=>o(x,null,[Ce(n.pow(.95,G.amount.value)),d("x price scaling,")," ",Ce(n.div(G.amount.value,10).add(1)),d("x auto-purchase speed")])),showAmount:!1},resource:H(l),cost:()=>n.pow(5,G.amount.value).times(10),style:"width: 600px"}));return G}const c=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),f=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),w=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),h=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>T(Je.elves.smallFireElf.bought.value)}),k=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>T(Je.elves.bonfireElf.bought.value)}),A=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>T(Je.elves.kilnElf.bought.value)}),S={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:y,heatedPlantersBook:f,fertilizerBook:w,smallFireBook:h,bonfireBook:k,kilnBook:A},oe=X(()=>[E(()=>({multiplier:2,description:"Scholar's shoes",enabled:qt.paperUpgrades.paperUpgrade1.bought})),E(()=>({multiplier:2,description:"Scholar's slacks",enabled:qt.paperUpgrades.paperUpgrade2.bought})),E(()=>({multiplier:2,description:"Scholar's jacket",enabled:qt.paperUpgrades.paperUpgrade3.bought}))]),[I,N]=dl(()=>[{title:"Paper Gain",modifier:oe,base:1}]),F=O(!1),Se=B(()=>o(ft,{modelValue:F.value,"onUpdate:modelValue":de=>F.value=de},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:I})),{total:Te,trackerDisplay:Z}=pl({resource:l,goal:5e3,name:e,day:Ln,color:t,textColor:"var(--feature-foreground)",modal:{show:F,display:Se}});return{name:e,day:Ln,color:t,paper:l,totalPaper:Te,paperConversion:i,books:S,generalTabCollapsed:N,minWidth:700,display:B(()=>o(x,null,[ue(Z),o(we,null,null),o(At,{resource:l,color:t,style:"margin-bottom: 0"},null),o(we,null,null),ue(s),o(we,null,null),Sl(...Object.values(S))]))}}),js="workshop",Cl=2,gt=Tt(js,function(){const e="Workshop",t="#D66B02",l="#D66B02",a=st(0,"foundation progress"),i=Ds(()=>({scaling:Mn(250,1.5),baseResource:fe.logs,gainResource:H(a),roundUpCost:!0,buyMax:!1,spend(F,Se){fe.logs.value=n.sub(fe.logs.value,Se)}})),s=V(()=>({display:B(()=>o(x,null,[o("b",{style:"font-size: x-large"},[d("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost:")," ",Fl(fe.logs,n.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",fe.logs.displayName])])),visibility:()=>T(n.lt(a.value,100)),canClick:()=>n.gte(i.actualGain.value,1)&&n.lt(a.value,100),onClick(){!u(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),r=yl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=C(()=>!Je.milestones[6].earned.value),p=Ee(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>n.gte(a.value,1),showPopups:c})),m=Ee(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>n.gte(a.value,10),visibility:()=>T(p.earned.value),showPopups:c})),y=Ee(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>n.gte(a.value,20),visibility:()=>T(m.earned.value),showPopups:c})),f=Ee(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>n.gte(a.value,30),visibility:()=>T(y.earned.value),showPopups:c})),w=Ee(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>n.gte(a.value,40),visibility:()=>T(f.earned.value),showPopups:c})),h=Ee(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(a.value,50),visibility:()=>T(w.earned.value),showPopups:c})),k=Ee(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>n.gte(a.value,75),visibility:()=>T(h.earned.value),showPopups:c})),A=Ee(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>n.gte(a.value,100),visibility:()=>T(k.earned.value),showPopups:c})),S={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:y,autoCutMilestone2:f,autoPlantMilestone2:w,logGainMilestone2:h,morePlantsMilestone1:k,logGainMilestone3:A},{collapseMilestones:oe,display:I}=Xl(S),N=Qt(()=>({direction:ye.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===Cl?n.div(a.value,100):1,display:B(()=>J.day.value===Cl?o(x,null,[he(a.value),d("%")]):"")}));return _t(()=>{J.day.value===Cl&&n.gte(a.value,100)&&J.completeDay()}),{name:e,day:Cl,color:t,foundationProgress:a,foundationConversion:i,milestones:S,collapseMilestones:oe,minWidth:700,buildFoundationHK:r,display:B(()=>o(x,null,[o("div",null,[J.day.value===Cl?"Complete the foundation to complete the day":`${e} Complete!`]),ue(N),o(we,null,null),o("div",null,[o("span",null,[d("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[he(a.value)]),d("% completed")]),n.lt(a.value,100)?o(we,null,null):null,ue(s),o(we,null,null),I()]))}}),Ws="elves",kl=4,Je=Tt(Ws,function(){const e="Elves",t="red",l="#911D21",i=Qt(()=>({direction:ye.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===kl?n.div(pe.value,6).times(.8333333333333334).add(n.div(n.add(U.coal.value,1).log10(),n.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>J.day.value===kl?n.lt(pe.value,6)?o(x,null,[he(pe.value),d("/6 elves")]):o(x,null,[he(U.coal.value),d("/"),he(1e9),d(" coal")]):"")})),s=Ls(()=>({thingsToReset:[fe,gt,U],onReset(){setTimeout(()=>{nt.earned.value?(fe.row1Upgrades.forEach(j=>j.bought.value=!0),fe.row2Upgrades.forEach(j=>j.bought.value=!0)):ve.earned.value&&(fe.row1Upgrades[4].bought.value=!0,fe.row2Upgrades[4].bought.value=!0),ie.earned.value&&(gt.foundationProgress.value=100)})}})),r=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>n.gt(Me.books.cuttersBook.amount.value,0)}))]),c=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>n.gt(Me.books.plantersBook.amount.value,0)}))]),p=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>n.gt(Me.books.expandersBook.amount.value,0)}))]),m=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>n.gt(Me.books.heatedCuttersBook.amount.value,0)}))]),y=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>n.gt(Me.books.heatedPlantersBook.amount.value,0)}))]),f=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>n.gt(Me.books.fertilizerBook.amount.value,0)}))]),w=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>n.gt(Me.books.smallFireBook.amount.value,0)}))]),h=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>n.gt(Me.books.bonfireBook.amount.value,0)}))]),k=X(()=>[E(()=>({multiplier:2,description:"6 Elves Trained",enabled:Be.earned})),E(()=>({multiplier:()=>n.times(Me.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>n.gt(Me.books.kilnBook.amount.value,0)}))]),[A,S]=dl(()=>[{title:"Holly Auto-Buy Frequency",modifier:r,base:10,unit:"/s",visible:W.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:W.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:W.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:W.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:W.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:f,base:10,unit:"/s",visible:W.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:W.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:W.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:k,base:10,unit:"/s",visible:W.kilnElf.bought}]),oe=O(!1),I=B(()=>o(ft,{modelValue:oe.value,"onUpdate:modelValue":j=>oe.value=j},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:A}));function N(j){var Nt;const dt=C(()=>n.pow(4,pe.value).times(1e6)),ge=be(0),se=j.hasToggle?be(!1):O(!0),Vt=C(()=>j.cooldownModifier.apply(10)),yt=it((Nt=j.canBuy)!=null?Nt:!0);function Rt(wt){var We;if(R.bought.value&&u(yt)){ge.value=n.add(ge.value,wt);const Ot=n.recip(Vt.value);for(;n.gte(ge.value,Ot);)if(j.customCost==null?u(j.buyable.canPurchase):n.gte(j.buyable.resource.value,j.customCost(j.buyable.amount.value)))j.buyable.amount.value=n.add(j.buyable.amount.value,1),ge.value=n.sub(ge.value,Ot),(We=j.onAutoPurchase)==null||We.call(j);else{ge.value=Ot;break}}}const R=L(()=>({...j,buyable:void 0,toggle:se,buyProgress:ge,update:Rt,resource:U.coal,cost:dt,computedAutoBuyCooldown:Vt,display:()=>({title:j.name,description:B(()=>o(x,null,[j.description,R.bought.value?null:o(x,null,[" ",d("Training this elf will require resetting all your progress from days 1-3.")]),R.bought.value&&j.hasToggle===!0?o(x,null,[o(Lt,{title:j.toggleDesc,"onUpdate:modelValue":wt=>se.value=wt,modelValue:se.value},null)]):null])),showCost:!R.bought.value}),style:"width: 190px",onPurchase(){var wt;(wt=j.onPurchase)==null||wt.call(j),s.reset()}}));return R}const F=N({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:fe.row1Buyables[0],cooldownModifier:r}),Se=N({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:fe.row1Buyables[1],cooldownModifier:c}),Te=N({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:fe.row1Buyables[2],cooldownModifier:p}),Z=[F,Se,Te],de=N({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:U.heatedCutters,cooldownModifier:m}),G=N({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:U.heatedPlanters,cooldownModifier:y}),Ze=N({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:U.moreFertilizer,cooldownModifier:f}),Re=[de,G,Ze],Oe=N({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:U.buildFire,cooldownModifier:w,visibility:()=>T(kt.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Oe.toggle.value&&(U.activeFires.value=n.add(U.activeFires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0}}),xe=N({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:U.buildBonfire,cooldownModifier:h,visibility:()=>T(kt.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const j=u(this.buyable.cost);U.activeFires.value=n.sub(U.activeFires.value,j).max(0),U.buildFire.amount.value=n.sub(U.buildFire.amount.value,j).max(0),xe.toggle.value&&(U.activeBonfires.value=n.add(U.activeBonfires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:U.unlockBonfire.bought}),je=N({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:U.buildKiln,cooldownModifier:k,visibility:()=>T(kt.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){je.toggle.value&&(U.activeKilns.value=n.add(U.activeKilns.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:U.unlockKiln.bought}),ut=[Oe,xe,je],W={cuttersElf:F,plantersElf:Se,expandersElf:Te,heatedCuttersElf:de,heatedPlantersElf:G,fertilizerElf:Ze,smallFireElf:Oe,bonfireElf:xe,kilnElf:je},pe=C(()=>Object.values(W).filter(j=>j.bought.value).length),z=Ee(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>n.gte(pe.value,1)})),ve=Ee(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>n.gte(pe.value,2),visibility:()=>T(z.earned.value)})),Ne=Ee(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>n.gte(pe.value,3),visibility:()=>T(ve.earned.value)})),et=Ee(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(pe.value,4),visibility:()=>T(Ne.earned.value)})),Ue=Ee(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>n.gte(pe.value,5),visibility:()=>T(et.earned.value)})),Be=Ee(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>n.gte(pe.value,6),visibility:()=>T(Ue.earned.value)})),ie=Ee(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>n.gte(pe.value,7),visibility:()=>T(Be.earned.value&&J.day.value>5)})),De=Ee(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>n.gte(pe.value,8),visibility:()=>T(ie.earned.value)})),nt=Ee(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>n.gte(pe.value,9),visibility:()=>T(De.earned.value)})),$e=[z,ve,Ne,et,Ue,Be,ie,De,nt],re={manualMilestone:z,researchMilestone:ve,coalGainMilestone:Ne,logGainMilestone:et,forestMilestone:Ue,elvesMilestone:Be,foundationMilestone:ie,forestMilestone2:De,treeUpgradesMilestone:nt},{collapseMilestones:vt,display:at}=Xl(re);return qe.on("update",j=>{n.lt(J.day.value,kl)||Object.values(W).forEach(dt=>dt.update(j))}),_t(()=>{J.day.value===kl&&n.gte(pe.value,6)&&n.gte(U.coal.value,1e9)&&J.completeDay()}),{name:e,color:t,elves:W,totalElves:pe,milestones:$e,collapseMilestones:vt,generalTabCollapsed:S,minWidth:700,display:B(()=>o(x,null,[o("div",null,[J.day.value===kl?`Reach ${he(6)} trained elves and ${he(1e9)} ${U.coal.displayName} to complete the day`:`${e} Complete!`," ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>oe.value=!0},[d("Check Modifiers")])]),ue(i),ue(I),o(we,null,null),o("div",{style:"width: 600px"},[_e(...Z),_e(...Re),_e(...ut)]),at()]))}}),zs={},Ks={style:{"white-space":"nowrap"}},Js=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Xs={style:{"text-decoration":"overline"}};function Ys(e,t){return b(),M("span",Ks,[Js,g("span",Xs,[Bt(e.$slots,"default")])])}var Zs=Ae(zs,[["render",Ys]]);const er="oil",hn=9,ze=Tt(er,function(){const e="Oil",t="#000000",l="var(--foreground)",a=st(0,"oil"),i=st(0,"depth"),s=be(0),r=C(()=>n.lt(i.value,990)?n.add(10,i.value):n.pow(1.001,n.sub(i.value,990)).mul(1e3));function c(){if(n.lt(i.value,990)){const Fe=n.min(n.affordArithmeticSeries(s.value,10,1,i.value),n.sub(990,i.value)),mt=n.sumArithmeticSeries(Fe,10,1,i.value);s.value=n.sub(s.value,mt),i.value=n.add(i.value,Fe)}if(n.gte(i.value,990)){const Fe=n.affordGeometricSeries(s.value,1e3,1.001,n.sub(i.value,990)),mt=n.sumGeometricSeries(Fe,1e3,1.001,n.sub(i.value,990));s.value=n.sub(s.value,mt),i.value=n.add(i.value,Fe)}}const p=be(0),m=C(()=>n.times(n.pow(p.value,oe.value).pow(2),1e14)),y=C(()=>n.times(n.pow(p.value,oe.value),1)),f=Pe(()=>({resource:ht.metal,cost(){const Fe=new n(this.amount.value);return n.pow(1.3,Fe).times(25e3)},display:B(()=>o(x,null,[o("h3",null,[d("Heavy Drill")]),o("br",null,null),d("A large drill specialized at deep mining."),o("br",null,null),d("Consumes 1e14*(Heavy Drills amount)"),o("sup",null,[d("2")]),d(" coal/sec for (Heavy Drills amount) drill power."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ne(m.value),d(" coal/sec"),o("br",null,null),d("+"),ne(y.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),te(u(f.cost)),d(" "),f.resource.displayName])),onPurchase(){p.value=n.add(p.value,1)},style:{color:l,width:"160px"}})),w=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(p.value,0)},onClick(){p.value=0}})),h=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(p.value,0)},onClick(){p.value=n.sub(p.value,1)}})),k=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(p.value,f.amount.value)},onClick(){p.value=n.add(p.value,1)}})),A=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(p.value,f.amount.value)},onClick(){p.value=f.amount.value}})),S=be(0),oe=C(()=>n.add(S.value,Math.E).ln()),I=Pe(()=>({resource:ht.metal,cost(){const Fe=new n(this.amount.value);return n.pow(2,Fe).times(1e5)},display:B(()=>o(x,null,[o("h3",null,[d("Heavy Drill Drill")]),o("br",null,null),d("Attach extra drills to Heavy Drills to make them faster"),o("br",null,null),d("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),o("br",null,null),d("(also affects coal consumption)."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("^"),ne(oe.value),d(" Heavy Drill amount"),o("br",null,null),o("br",null,null),d("Cost: "),te(u(I.cost)),d(" "),I.resource.displayName])),onPurchase(){S.value=n.add(S.value,1)},style:{color:l,width:"160px"}})),N=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(S.value,0)},onClick(){S.value=0}})),F=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(S.value,0)},onClick(){S.value=n.sub(S.value,1)}})),Se=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(S.value,I.amount.value)},onClick(){S.value=n.add(S.value,1)}})),Te=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(S.value,I.amount.value)},onClick(){S.value=I.amount.value}})),Z=be(0),de=C(()=>n.pow(1/3,Z.value)),G=C(()=>n.pow(2,Z.value)),Ze=C(()=>n.pow(1.2,Z.value)),Re=Pe(()=>({resource:ht.metal,cost(){const Fe=new n(this.amount.value);return n.pow(8,Fe).times(2e5)},display:B(()=>o(x,null,[o("h3",null,[d("Heavy Extractor")]),o("br",null,null),d("Attach extractors to the drill to mine coal and ore, but with a price."),o("br",null,null),d("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),ne(de.value),d(" drill power"),o("br",null,null),d("\xD7"),ne(G.value),d(" coal/sec"),o("br",null,null),d("\xD7"),ne(Ze.value),d(" ore/sec"),o("br",null,null),o("br",null,null),d("Cost: "),te(u(Re.cost))," ",Re.resource.displayName])),onPurchase(){Z.value=n.add(Z.value,1)},style:{color:l,width:"160px"}})),Oe=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(Z.value,0)},onClick(){Z.value=0}})),xe=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(Z.value,0)},onClick(){Z.value=n.sub(Z.value,1)}})),je=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(Z.value,Re.amount.value)},onClick(){Z.value=n.add(Z.value,1)}})),ut=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(Z.value,Re.amount.value)},onClick(){Z.value=Re.amount.value}})),W=be(0),pe=C(()=>n.pow(It[3].bought.value?4:5,W.value)),z=C(()=>n.pow(W.value,2).mul(p.value).mul(n.add(S.value,1)).mul(Z.value).mul(i.value).div(1e5)),ve=Pe(()=>({resource:ht.metal,cost(){const Fe=new n(this.amount.value);let mt=n.pow(16,Fe).times(2e6);return It[4].bought.value&&(mt=mt.div(n.add(il.value,1).root(6))),mt},display:B(()=>o(x,null,[o("h3",null,[d("Oil Pump")]),o("br",null,null),d("Pump that oil from the ground."),o("br",null,null),d("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),It[3].bought.value?4:5,d("\xD7."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),ne(pe.value),d(" coal usage"),o("br",null,null),d("+"),ne(z.value),d(" oil/sec"),o("br",null,null),o("br",null,null),d("Cost: "),te(u(ve.cost)),d(" "),ve.resource.displayName])),onPurchase(){W.value=n.add(W.value,1)},style:{color:l,width:"160px"}})),Ne=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(W.value,0)},onClick(){W.value=0}})),et=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(W.value,0)},onClick(){W.value=n.sub(W.value,1)}})),Ue=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(W.value,ve.amount.value)},onClick(){W.value=n.add(W.value,1)}})),Be=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(W.value,ve.amount.value)},onClick(){W.value=ve.amount.value}})),ie=be(0),De=C(()=>n.pow(ie.value,2)),nt=C(()=>n.pow(ie.value,3).mul(1e19)),$e=C(()=>n.add(ie.value,1)),re=Pe(()=>({resource:H(a),cost(){const Fe=new n(this.amount.value);return n.pow(2,Fe).times(50)},display:B(()=>o(x,null,[o("h3",null,[d("Oil Burner")]),o("br",null,null),d("Burn oil as fuel."),o("br",null,null),d("(Oil Burner Amount)"),o("sup",null,[d("2")]),d(" unit of oil can give 1e19*(Oil Burner Amount)"),o("sup",null,[d("3")]),d(" units of coal."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ne(De.value),d(" oil/sec"),o("br",null,null),d("-"),ne(nt.value),d(" coal consumption"),It[2].bought.value?o(x,null,[o("br",null,null),d("\xD7"),ne($e.value),d(" to auto smelting multi")]):"",o("br",null,null),o("br",null,null),d("Cost: "),te(u(re.cost)),d(" "),re.resource.displayName])),onPurchase(){ie.value=n.add(ie.value,1)},style:{color:l,width:"160px"}})),vt=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(ie.value,0)},onClick(){ie.value=0}})),at=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(ie.value,0)},onClick(){ie.value=n.sub(ie.value,1)}})),j=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(ie.value,re.amount.value)},onClick(){ie.value=n.add(ie.value,1)}})),dt=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(ie.value,re.amount.value)},onClick(){ie.value=re.amount.value}})),ge=be(0),se=C(()=>n.pow(ge.value,2).mul(100)),Vt=C(()=>n.add(ge.value,1)),yt=Pe(()=>({resource:ht.metal,cost(){const Fe=new n(this.amount.value);let mt=n.pow(10,Fe).times(1e7);return It[4].bought.value&&(mt=mt.div(n.add(il.value,1).root(6))),mt},display:B(()=>o(x,null,[o("h3",null,[d("Oil Smelter")]),o("br",null,null),d("Use oil as a crucible fuel."),o("br",null,null),d("Burn 100x"),o("sup",null,[d("2")]),d(" oil to smelt +100% faster."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ne(se.value),d(" oil/sec"),o("br",null,null),d("\xD7"),ne(Vt.value),d(" smelting speed"),o("br",null,null),o("br",null,null),d("Cost: "),te(u(yt.cost)),d(" "),yt.resource.displayName])),onPurchase(){ge.value=n.add(ge.value,1)},style:{color:l,width:"160px"}})),Rt=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(ge.value,0)},onClick(){ge.value=0}})),R=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.gt(ge.value,0)},onClick(){ge.value=n.sub(ge.value,1)}})),Nt=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(ge.value,yt.amount.value)},onClick(){ge.value=n.add(ge.value,1)}})),wt=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return n.lt(ge.value,yt.amount.value)},onClick(){ge.value=yt.amount.value}})),We=[Ee(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>n.gte(i.value,5)})),Ee(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>n.gte(i.value,10),visibility:()=>T(We[0].earned.value)})),Ee(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>n.gte(i.value,25),visibility:()=>T(We[1].earned.value)})),Ee(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>n.gte(i.value,60),visibility:()=>T(We[2].earned.value)})),Ee(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock more coal and metal upgrades!"},shouldEarn:()=>n.gte(i.value,150),visibility:()=>T(We[3].earned.value)})),Ee(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>n.gte(i.value,350),visibility:()=>T(We[4].earned.value)})),Ee(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>n.gte(i.value,1e3),visibility:()=>T(n.gte(i.value,1e3))})),Ee(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>n.gte(i.value,3e3),visibility:()=>T(n.gte(i.value,2e3))}))],{collapseMilestones:Ot,display:rn}=Xl(We),Ut=[Ee(()=>({display:{requirement:"100 total oil",effectDisplay:"Hmm, these oil pumps are really expensive. Maybe you should find a way to solve this problem... maybe you can use oil as fuel instead of coal?"},shouldEarn:()=>n.gte(il.value,100)})),Ee(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>n.gte(il.value,500),visibility:()=>T(Ut[0].earned.value)})),Ee(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>n.gte(il.value,1e4),visibility:()=>T(Ut[1].earned.value)}))],{collapseMilestones:un,display:Rl}=Xl(Ut),$t=[L(()=>({resource:U.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:B(()=>o(x,null,[d("x"),ne(pt[0].value)]))},style:{color:l}})),L(()=>({resource:ht.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:B(()=>o(x,null,[d("x"),ne(pt[1].value)]))},style:{color:l}})),L(()=>({resource:U.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:B(()=>o(x,null,[d("x"),ne(pt[2].value)]))},style:{color:l}})),L(()=>({resource:ht.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:B(()=>o(x,null,[d("x"),ne(pt[3].value)]))},style:{color:l}})),L(()=>({resource:H(a),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:B(()=>o(x,null,[d("+"),ne(n.mul(pt[4].value,100)),d("%")]))},style:{color:l}}))],pt=[C(()=>n.mul(U.buildDrill.amount.value,n.add(.04,Gt.value)).add(1)),C(()=>n.mul(ht.oreDrill.amount.value,n.add(.04,Gt.value)).add(1)),C(()=>n.mul(n.max(U.coal.value,1).log10().floor(),n.add(.06,Gt.value)).add(1)),C(()=>n.mul(n.max(ht.metal.value,1).log10().floor(),n.add(.1,Gt.value)).add(1)),C(()=>n.mul(f.amount.value,.001))],It=[L(()=>({resource:H(a),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),L(()=>({resource:H(a),cost:500,display:{title:"Oil the Mining Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:l}})),L(()=>({resource:H(a),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),L(()=>({resource:H(a),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Well's coal consumption multipler from 5 to 4"},style:{color:l}})),L(()=>({resource:H(a),cost:5e4,display:{title:"Be One with the Oil",description:B(()=>o(x,null,[d("Divide metal ingot prices of oil buildings by "),o("sup",null,[d("6")]),o(Zs,null,{default:()=>[d("total oil + 1")]})]))},style:{color:l}}))],ml=X(()=>[ae(()=>({addend:()=>n.negate(m.value),description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),E(()=>({multiplier:pe,description:"Oil Pump",enabled:()=>n.gt(W.value,0)})),ae(()=>({addend:cn,description:"Oil to Coal Substitution",enabled:()=>n.gt(cn.value,0)}))]),Ol=C(()=>ml.apply(0)),wl=X(()=>[ae(()=>({addend:y,description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),E(()=>({multiplier:de,description:"Heavy Extractor",enabled:()=>n.gt(Z.value,0)})),E(()=>({multiplier:pt[0],description:"Coal Drill Synergy",enabled:$t[0].bought})),E(()=>({multiplier:pt[1],description:"Metal Drill Synergy",enabled:$t[1].bought})),E(()=>({multiplier:pt[2],description:"Coal Drill Upgrade",enabled:$t[2].bought})),E(()=>({multiplier:pt[3],description:"Metal Drill Upgrade",enabled:$t[3].bought})),E(()=>({multiplier:()=>Ht.value,description:"Effectiveness",enabled:()=>n.lt(Ht.value,1)}))]),Ul=C(()=>wl.apply(0)),$l=X(()=>[ae(()=>({addend:pt[4],description:"Drill Oil",enabled:$t[4].bought}))]),Gt=C(()=>$l.apply(0)),Hl=X(()=>[ae(()=>({addend:z,description:"Oil Pump",enabled:()=>n.gt(W.value,0)})),E(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:It[0].bought})),E(()=>({multiplier:2,description:"3000m Well Depth",enabled:We[7].earned})),E(()=>({multiplier:()=>Ht.value,description:"Effectiveness",enabled:()=>n.lt(Ht.value,1)}))]),gl=C(()=>Hl.apply(0)),ql=X(()=>[ae(()=>({addend:()=>n.negate(De.value),description:"Oil Burner",enabled:()=>n.gt(ie.value,0)})),ae(()=>({addend:()=>n.negate(se.value),description:"Oil Smelter",enabled:()=>n.gt(ge.value,0)}))]),D=C(()=>ql.apply(0)),Dn=X(()=>[ae(()=>({addend:nt,description:"Oil Burner",enabled:()=>n.gt(ie.value,0)})),E(()=>({multiplier:()=>Jt.value,description:"Effectiveness",enabled:()=>n.lt(Jt.value,1)}))]),cn=C(()=>Dn.apply(0)),[Ha,qa]=dl(()=>[{title:"Coal Consumption",modifier:ml,unit:"/s",base:0},{title:"Drill Power",modifier:wl,base:0},{title:"Upgrade Bonus",modifier:$l,base:0,visible(){return n.gt(Gt.value,0)}},{title:"Oil Speed",modifier:Hl,unit:"/s",base:0,visible(){return n.gt(gl.value,0)}},{title:"Oil Consumption",modifier:ql,unit:"/s",base:0,visible(){return n.lt(D.value,0)}},{title:"Oil to Coal Substitution",modifier:Dn,unit:"/s",base:0,visible(){return n.gt(cn.value,0)}}]),dn=O(!1),Va=B(()=>o(ft,{modelValue:dn.value,"onUpdate:modelValue":Fe=>dn.value=Fe},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Ha})),Ht=O(n.dOne),Jt=O(n.dOne);qe.on("update",Fe=>{if(n.lt(J.day.value,hn))return;const mt=n.negate(Ol.value);n.gt(mt,0)?(Ht.value=n.min(n.div(U.coal.value,mt),1),U.coal.value=n.sub(U.coal.value,n.mul(mt,Ht.value).mul(Fe))):Ht.value=n.dOne,s.value=n.add(s.value,n.mul(Ul.value,Fe)),a.value=n.add(a.value,n.mul(gl.value,Fe)),c();const pn=n.negate(D.value);n.gt(pn,0)?(Jt.value=n.min(n.div(a.value,pn),1),a.value=n.sub(a.value,n.mul(pn,Jt.value).mul(Fe))):Jt.value=n.dOne});const{total:il,trackerDisplay:Ga}=pl({resource:a,goal:25e4,name:e,day:hn,color:t,modal:{show:dn,display:Va}});return{name:e,day:hn,color:t,oil:a,totalOil:il,depth:i,drillProgress:s,activeHeavy:p,buildHeavy:f,activeHeavy2:S,buildHeavy2:I,activeExtractor:Z,buildExtractor:Re,activePump:W,buildPump:ve,activeBurner:ie,buildBurner:re,activeSmelter:ge,buildSmelter:yt,extractorCoal:G,extractorOre:Ze,coalEffectiveness:Ht,oilEffectiveness:Jt,depthMilestones:We,collapsedDepthMilestones:Ot,row1Upgrades:$t,row2Upgrades:It,minWidth:700,oilMilestones:Ut,collapsedOilMilestones:un,generalTabCollapsed:qa,display:B(()=>o(x,null,[ue(Ga),o(we,null,null),n.lt(Ht.value,1)?"Coal efficiency: "+ne(n.mul(Ht.value,100))+"%":null,n.lt(Jt.value,1)?"Oil efficiency: "+ne(n.mul(Jt.value,100))+"%":null,o(At,{resource:a,color:t,sticky:!0,productionDisplay:B(()=>o(x,null,[n.lt(i.value,1e3)?"Reach 1000m to start gaining oil":o(x,null,[zl(n.add(gl.value,D.value))])]))},null),n.eq(gl.value,0)?o(x,null,[d("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),o("br",null,null)]):"",o(xl,null,{default:()=>[We[6].earned.value?o(Ct,null,{default:()=>[ue(ve),o("div",null,[te(n.floor(W.value)),d("/"),te(n.floor(ve.amount.value))]),_e(Ne,et,Ue,Be)]}):null,Ut[0].earned.value?o(Ct,null,{default:()=>[ue(re),o("div",null,[te(n.floor(ie.value)),d("/"),te(n.floor(re.amount.value))]),_e(vt,at,j,dt)]}):null,Ut[2].earned.value?o(Ct,null,{default:()=>[ue(yt),o("div",null,[te(n.floor(ge.value)),d("/"),te(n.floor(yt.amount.value))]),_e(Rt,R,Nt,wt)]}):null]}),o("br",null,null),o("div",null,[o("span",null,[d("The well is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[te(i.value)]),d("m deep"),o("br",null,null),d("Next at "),ne(n.sub(r.value,s.value)),d(" drill power seconds")]),o("div",null,[o("span",null,[d("Your drill power is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[ne(Ul.value)])]),o(we,null,null),o(xl,null,{default:()=>[o(Ct,null,{default:()=>[ue(f),o("div",null,[te(n.floor(p.value)),d("/"),te(n.floor(f.amount.value))]),_e(w,h,k,A)]}),We[3].earned.value?o(Ct,null,{default:()=>[ue(I),o("div",null,[te(n.floor(S.value)),d("/"),te(n.floor(I.amount.value))]),_e(N,F,Se,Te)]}):null,We[5].earned.value?o(Ct,null,{default:()=>[ue(Re),o("div",null,[te(n.floor(Z.value)),d("/"),te(n.floor(Re.amount.value))]),_e(Oe,xe,je,ut)]}):null]}),o(we,null,null),We[1].earned.value?_e(...$t):null,Ut[1].earned.value?_e(...It):null,o(we,null,null),rn(),n.gte(il.value,50)?Rl():""]))}}),tr="coal",Qn=3,U=Tt(tr,function(){const e="Coal",t="#151716",l="#B2BeB5",a="var(--foreground)",i=st(0,"coal"),s=st(0,"ash"),r=be(0),c=C(()=>n.times(r.value,1e3)),p=C(()=>n.times(r.value,.1)),m=C(()=>n.times(r.value,50)),y=Pe(()=>({resource:fe.logs,cost(){let D=n.times(F.amount.value,u(F.cost)).plus(this.amount.value);return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,Me.books.smallFireBook.amount.value).times(D),D.pow(1.5).times(1e4)},display:B(()=>o(x,null,[o("h3",null,[d("Small Fire")]),o("br",null,null),d("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),Ce(c.value),d(" logs/sec"),o("br",null,null),d("+"),Ce(p.value),d(" coal/sec"),o("br",null,null),d("+"),Ce(m.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),he(u(y.cost)),d(" "),y.resource.displayName])),onPurchase(){r.value=n.add(r.value,1)},style:{color:a,width:"160px"}})),f=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(r.value,0)},onClick(){r.value=0}})),w=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(r.value,0)},onClick(){r.value=n.sub(r.value,1)}})),h=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(r.value,y.amount.value)},onClick(){r.value=n.add(r.value,1)}})),k=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(r.value,y.amount.value)},onClick(){r.value=y.amount.value}})),A=st(y.amount,"small fires"),S=be(0),oe=C(()=>n.times(S.value,1e4)),I=C(()=>n.times(S.value,10)),N=C(()=>n.times(S.value,1e3)),F=Pe(()=>({resource:A,cost(){return n.pow(.95,Me.books.bonfireBook.amount.value).times(10)},display:B(()=>o(x,null,[o("h3",null,[d("Bonfire")]),o("br",null,null),d("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),Ce(oe.value),d(" logs/sec"),o("br",null,null),d("+"),Ce(I.value),d(" coal/sec"),o("br",null,null),d("+"),Ce(N.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),he(u(F.cost)),d(" "),F.resource.displayName])),onPurchase(D){r.value=n.sub(r.value,D).max(0),S.value=n.add(S.value,1)},style:{color:a,width:"160px"},visibility:()=>T(re.bought.value)})),Se=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(S.value,0)},onClick(){S.value=0}})),Te=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(S.value,0)},onClick(){S.value=n.sub(S.value,1)}})),Z=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(S.value,F.amount.value)},onClick(){S.value=n.add(S.value,1)}})),de=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(S.value,F.amount.value)},onClick(){S.value=F.amount.value}})),G=be(0),Ze=C(()=>n.times(G.value,1e6)),Re=C(()=>n.times(G.value,1e4)),Oe=C(()=>n.times(G.value,1e4)),xe=Pe(()=>({resource:fe.logs,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,Me.books.kilnBook.amount.value).times(D),n.pow(1.1,D).times(1e7)},display:B(()=>o(x,null,[o("h3",null,[d("Charcoal Kiln")]),o("br",null,null),d("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),Ce(Ze.value),d(" logs/sec"),o("br",null,null),d("+"),Ce(Re.value),d(" coal/sec"),o("br",null,null),d("+"),Ce(Oe.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),he(u(xe.cost)),d(" "),xe.resource.displayName])),onPurchase(){G.value=n.add(G.value,1)},style:{color:a,width:"160px"},visibility:()=>T(ge.bought.value)})),je=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(G.value,0)},onClick(){G.value=0}})),ut=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(G.value,0)},onClick(){G.value=n.sub(G.value,1)}})),W=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(G.value,xe.amount.value)},onClick(){G.value=n.add(G.value,1)}})),pe=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(G.value,xe.amount.value)},onClick(){G.value=xe.amount.value}})),z=be(0),ve=C(()=>n.times(n.pow(z.value,ze.row2Upgrades[1].bought.value?2:1),5e7).times(ht.efficientDrill.bought.value?2:1)),Ne=Pe(()=>({resource:ht.metal,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),n.pow(1.15,D).times(10)},display:B(()=>o(x,null,[o("h3",null,[d("Mining Drill")]),o("br",null,null),d("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("+"),Ce(ve.value),d(" coal/sec"),o("br",null,null),o("br",null,null),d("Cost: "),he(u(Ne.cost)),d(" "),Ne.resource.displayName])),onPurchase(){z.value=n.add(z.value,1)},style:{color:a,width:"160px"},visibility:()=>T(ht.coalDrill.bought.value)})),et=V(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(z.value,0)},onClick(){z.value=0}})),Ue=V(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.gt(z.value,0)},onClick(){z.value=n.sub(z.value,1)}})),Be=V(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(z.value,Ne.amount.value)},onClick(){z.value=n.add(z.value,1)}})),ie=V(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:a},canClick(){return n.lt(z.value,Ne.amount.value)},onClick(){z.value=Ne.amount.value}})),De=L(()=>({resource:H(i),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:a}})),nt=L(()=>({resource:H(i),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:a}})),$e=L(()=>({resource:H(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:a}})),re=L(()=>({resource:A,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){A.value=n.add(A.value,this.cost)},style:{color:a}})),vt=[De,nt,$e,re],at=L(()=>({resource:H(i),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:a},visibility:()=>T(re.bought.value)})),j=L(()=>({resource:H(i),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:a},visibility:()=>T(re.bought.value)})),dt=L(()=>({canAfford(){return n.gte(fe.logs.value,1e5)&&n.gte(s.value,1e5)},onPurchase(){fe.logs.value=n.sub(fe.logs.value,1e5),s.value=n.sub(s.value,1e5)},display:B(()=>o(x,null,[o("h3",null,[d("Mulched Soil")]),o("br",null,null),d("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),d("Cost: "),he(1e5),d(" "),fe.logs.displayName,o("br",null,null),he(1e5),d(" "),s.displayName])),style:{color:a},visibility:()=>T(re.bought.value)})),ge=L(()=>({resource:fe.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:a},visibility:()=>T(re.bought.value)})),se=[at,j,dt,ge],Vt=L(()=>({resource:H(i),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:a},visibility:()=>T(ze.depthMilestones[4].earned.value)})),yt=[Vt],Rt=Pe(()=>({resource:H(i),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,Me.books.heatedCuttersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(x,null,[d("Cutters cut down trees "),Ce(Ot.value),d("x faster")]))},style:{color:a},visibility:()=>T(De.bought.value)})),R=Pe(()=>({resource:H(i),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,Me.books.heatedPlantersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(x,null,[d("Planters plant trees "),Ce(Ut.value),d("x faster")]))},style:{color:a},visibility:()=>T(nt.bought.value)})),Nt=Pe(()=>({resource:H(s),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,Me.books.fertilizerBook.amount.value).times(D),n.add(D,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(x,null,[d("Trees give "),Ce(Rl.value),d("x more logs")]))},style:{color:a},visibility:()=>T($e.bought.value)})),wt=[Rt,R,Nt],We=X(()=>[ae(()=>({addend(){return n.times(Rt.amount.value,.25)},description:"Heated Cutters",enabled(){return n.gt(Rt.amount.value,0)}})),E(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:at.bought}))]),Ot=C(()=>We.apply(1)),rn=X(()=>[ae(()=>({addend(){return n.times(R.amount.value,.25)},description:"Heated Planters",enabled(){return n.gt(R.amount.value,0)}})),E(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:j.bought}))]),Ut=C(()=>rn.apply(1)),un=X(()=>[ae(()=>({addend(){return n.times(Nt.amount.value,.25)},description:"Fertilized Soil",enabled(){return n.gt(Nt.amount.value,0)}})),E(()=>({multiplier:2,description:"Mulched Soil",enabled:dt.bought}))]),Rl=C(()=>un.apply(1)),$t=X(()=>[ae(()=>({addend(){return p.value},description:"Small Fires",enabled(){return n.gt(r.value,0)}})),ae(()=>({addend(){return I.value},description:"Bonfires",enabled(){return n.gt(S.value,0)}})),ae(()=>({addend(){return Re.value},description:"Charcoal Kilns",enabled(){return n.gt(G.value,0)}})),ae(()=>({addend(){return ve.value},description:"Mining Drills",enabled(){return n.gt(z.value,0)}})),E(()=>({multiplier:2,description:"Carry coal in boxes",enabled:kt.upgrades.coalUpgrade.bought})),E(()=>({multiplier:()=>n.div(kt.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:kt.upgrades.coalUpgrade.bought})),E(()=>({multiplier:()=>n.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Je.elves.smallFireElf.bought})),E(()=>({multiplier:()=>n.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Je.elves.bonfireElf.bought})),E(()=>({multiplier:()=>n.div(xe.amount.value,100).add(1),description:"Kiln Synergy",enabled:Je.elves.kilnElf.bought})),E(()=>({multiplier:2,description:"Mining overalls",enabled:qt.metalUpgrades.metalUpgrade2.bought})),E(()=>({multiplier:3,description:"Mining helmet",enabled:qt.metalUpgrades.metalUpgrade3.bought})),_a(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Je.milestones[2].earned,supportLowNumbers:!0})),E(()=>({multiplier:()=>n.mul(ze.depth.value,.25).add(1),description:"5m Well Depth",enabled:ze.depthMilestones[0].earned})),E(()=>({multiplier:ze.extractorCoal,description:"Heavy Extractor",enabled:()=>n.gt(ze.activeExtractor.value,0)}))]),pt=C(()=>$t.apply(0)),It=X(()=>[ae(()=>({addend(){return m.value},description:"Small Fires",enabled(){return n.gt(r.value,0)}})),ae(()=>({addend(){return N.value},description:"Bonfires",enabled(){return n.gt(S.value,0)}})),ae(()=>({addend(){return Oe.value},description:"Charcoal Kilns",enabled(){return n.gt(G.value,0)}})),E(()=>({multiplier:2,description:"Carry ash in boxes",enabled:kt.upgrades.ashUpgrade.bought})),E(()=>({multiplier:()=>n.div(kt.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:kt.upgrades.ashUpgrade.bought})),E(()=>({multiplier:()=>n.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Je.elves.smallFireElf.bought})),E(()=>({multiplier:()=>n.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Je.elves.bonfireElf.bought})),E(()=>({multiplier:()=>n.div(xe.amount.value,100).add(1),description:"Kiln Synergy",enabled:Je.elves.kilnElf.bought})),E(()=>({multiplier:4,description:"Mining boots",enabled:qt.metalUpgrades.metalUpgrade1.bought}))]),ml=C(()=>It.apply(0)),Ol=X(()=>[ae(()=>({addend(){return n.negate(c.value)},description:"Small Fires",enabled(){return n.gt(r.value,0)}})),ae(()=>({addend(){return n.negate(oe.value)},description:"Bonfires",enabled(){return n.gt(S.value,0)}})),ae(()=>({addend(){return n.negate(Ze.value)},description:"Charcoal Kilns",enabled(){return n.gt(G.value,0)}}))]),wl=C(()=>Ol.apply(0)),[Ul,$l]=dl(()=>[{title:"Log Consumption",modifier:Ol,base:0,visible(){return n.gt(r.value,0)||n.gt(S.value,0)||n.gt(G.value,0)}},{title:"Coal Gain",modifier:$t,base:0,visible(){return n.gt(r.value,0)||n.gt(S.value,0)||n.gt(G.value,0)}},{title:"Ash Gain",modifier:It,base:0,visible(){return n.gt(r.value,0)||n.gt(S.value,0)||n.gt(G.value,0)}}]),Gt=O(!1),Hl=B(()=>o(ft,{modelValue:Gt.value,"onUpdate:modelValue":D=>Gt.value=D},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Ul}));qe.on("update",D=>{n.lt(J.day.value,Qn)||n.times(D,wl.value).negate().gt(fe.logs.value)||(fe.logs.value=n.times(D,wl.value).plus(fe.logs.value),i.value=n.times(D,pt.value).plus(i.value),s.value=n.times(D,ml.value).plus(s.value),r.value=n.max(r.value,0))});const{total:gl,trackerDisplay:ql}=pl({resource:i,goal:1e7,name:e,day:Qn,color:t,modal:{show:Gt,display:Hl}});return{name:e,color:t,coal:i,totalCoal:gl,computedCoalGain:pt,ash:s,activeFires:r,buildFire:y,activeBonfires:S,buildBonfire:F,activeKilns:G,buildKiln:xe,activeDrills:z,buildDrill:Ne,warmerCutters:De,warmerPlanters:nt,basicFertilizer:$e,unlockBonfire:re,dedicatedCutters:at,dedicatedPlanters:j,betterFertilizer:dt,unlockKiln:ge,efficientSmelther:Vt,heatedCutters:Rt,heatedPlanters:R,moreFertilizer:Nt,computedHeatedCutterEffect:Ot,computedHeatedPlanterEffect:Ut,computedFertilizerEffect:Rl,generalTabCollapsed:$l,minWidth:700,display:B(()=>o(x,null,[ue(ql),o(we,null,null),o(At,{resource:i,color:t,style:"margin-bottom: 0",effectDisplay:n.gt(pt.value,0)?`+${Ce(pt.value)}/s`:void 0},null),o(we,null,null),o(At,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:n.gt(ml.value,0)?`+${Ce(ml.value)}/s`:void 0},null),o(we,null,null),o(xl,null,{default:()=>[o(Ct,null,{default:()=>[ue(y),o("div",null,[he(n.floor(r.value)),d("/"),he(n.floor(y.amount.value))]),_e(f,w,h,k)]}),re.bought.value?o(x,null,[o(we,null,null),o(Ct,null,{default:()=>[ue(F),o("div",null,[he(S.value),d("/"),he(F.amount.value)]),_e(Se,Te,Z,de)]})]):void 0,ge.bought.value?o(x,null,[o(we,null,null),o(Ct,null,{default:()=>[ue(xe),o("div",null,[he(G.value),d("/"),he(xe.amount.value)]),_e(je,ut,W,pe)]})]):void 0,ht.coalDrill.bought.value?o(x,null,[o(we,null,null),o(Ct,null,{default:()=>[ue(Ne),o("div",null,[he(z.value),d("/"),he(Ne.amount.value)]),_e(et,Ue,Be,ie)]})]):void 0]}),o(we,null,null),_e(...vt),_e(...se),_e(...yt),_e(...wt)]))}}),lr="metal",jn=7,ht=Tt(lr,function(){const e="Metal",t="#888B8D",l=st(0,"metal ingots",void 0,!0),a=Hn(l),i=st(0,"ore"),s=Hn(i),r=X(()=>[E(()=>({multiplier:5,description:"Crucible",enabled:xe.bought})),E(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>n.gte(z.amount.value,1)})),E(()=>({multiplier:2,description:"Industrial Furnace",enabled:ut.bought})),E(()=>({multiplier:()=>n.add(et.value,1),description:"Hotter Forges",enabled:()=>n.gte(Ne.amount.value,1)}))]),c=C(()=>r.apply(.1)),p=X(()=>[ae(()=>({addend:()=>n.times(z.amount.value,10),description:"Industrial Crucibles",enabled:()=>n.gte(z.amount.value,1)})),E(()=>({multiplier:2,description:"Efficient Crucibles",enabled:U.efficientSmelther.bought})),E(()=>({multiplier:()=>n.mul(ze.activeSmelter.value,ze.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>n.gt(ze.activeSmelter.value,0)}))]),m=C(()=>p.apply(0)),y=X(()=>[E(()=>({multiplier:3,description:"Efficient Crucibles",enabled:U.efficientSmelther.bought})),E(()=>({multiplier:()=>n.add(ze.activeBurner.value,1).mul(ze.oilEffectiveness.value),description:"Blaster Burner",enabled:ze.row2Upgrades[2].bought}))]),f=C(()=>y.apply(1)),w=1e10,h=C(()=>n.min(i.value,n.div(U.coal.value,w)).floor().max(0)),k=V(()=>({display:B(()=>{const re=n.gte(h.value,1)?h.value:n.add(h.value,1);return o(x,null,[o("span",{style:"font-size: large"},[d("Smelt "),ne(n.times(h.value,c.value))," ",l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),te(re),d(" "),i.displayName,d(";")," ",te(n.times(re,w)),d(" "),U.coal.displayName])])}),canClick:()=>n.gte(h.value,1),onClick(){!u(this.canClick)||A(h.value)},style:{width:"600px",minHeight:"unset"}}));function A(re,vt=1){const[at,j,dt]=[n.times(re,c.value).times(vt),re,n.times(re,w)];l.value=n.add(l.value,at),i.value=n.sub(i.value,j),U.coal.value=n.sub(U.coal.value,dt)}const S=X(()=>[ae(()=>({addend:()=>pe.amount.value,description:"Mining Drills",enabled:()=>n.gte(pe.amount.value,1)})),E(()=>({multiplier:()=>n.mul(ze.depth.value,.05).add(1),description:"25m Well Depth",enabled:ze.depthMilestones[2].earned})),E(()=>({multiplier:ze.extractorOre,description:"Heavy Extractor",enabled:()=>n.gt(ze.activeExtractor.value,0)}))]),oe=C(()=>S.apply(1)),I=X(()=>[E(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Re.bought})),E(()=>({multiplier:2,description:"Double Pickaxe",enabled:Oe.bought})),E(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>n.gte(pe.amount.value,1)})),E(()=>({multiplier:2,description:"Efficient Drills",enabled:W.bought})),E(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:ze.row2Upgrades[1].bought}))]),N=C(()=>I.apply(n.recip(Se))),F=be(0),Se=10,Te=Qt(()=>({width:400,height:25,direction:ye.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),Z=X(()=>[ae(()=>({addend:oe})),E(()=>({multiplier:N}))]),de=C(()=>Z.apply(0)),G=X(()=>[ae(()=>({addend:de})),ae(()=>({addend:()=>n.negate(m.value),enabled:ve}))]),Ze=C(()=>G.apply(0)),Re=L(()=>({resource:H(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.<br/><br/>Halve the time to mine more ore"}})),Oe=L(()=>({resource:H(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?<br/><br/>Halve the time to mine ore, again"},visibility:()=>T(Oe.bought.value)})),xe=L(()=>({resource:H(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!<br/><br/>Increase the metal extracted per ore by 5x"},visibility:()=>T(xe.bought.value||n.div(s.value,c.value).plus(a.value).gte(1))})),je=L(()=>({resource:H(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>T(n.gte(pe.amount.value,1)&&(je.bought.value||n.lt(U.computedCoalGain.value,n.times(oe.value,N.value).times(w)))),onPurchase(){J.days[2].recentlyUpdated.value=!0}})),ut=L(()=>({canAfford(){return n.gte(l.value,50)&&n.gte(U.coal.value,1e11)},onPurchase(){l.value=n.sub(l.value,50),U.coal.value=n.sub(U.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore
|
|
<br/>
|
|
<br/>
|
|
Cost: 50 ${l.displayName}<br/>${ne(1e11)} ${U.coal.displayName}`}})),W=L(()=>({resource:H(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibilty:()=>T(ze.depthMilestones[4].earned.value)})),pe=Pe(()=>({resource:H(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(x,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",te(pe.amount.value),d(" ore per operation")]))},visibility:()=>T(n.gte(pe.amount.value,1)||n.div(s.value,c.value).plus(a.value).gte(10)),style:{width:"200px"}})),z=Pe(()=>({resource:H(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(x,null,[d("Automatically smelts")," ",te(n.times(z.amount.value,10)),d(" ore per second")]))},visibility:()=>T(n.gte(z.amount.value,1)||n.gte(pe.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),ve=be(!0),Ne=Pe(()=>({resource:U.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(x,null,[d("Gain "),te(n.times(et.value,100)),d("% more metal per ore")]))},visibility:()=>T(n.gte(Ne.amount.value,1)||ut.bought.value),style:{width:"200px"}})),et=C(()=>n.times(Ne.amount.value,.25));qe.on("update",re=>{F.value=n.times(re,N.value).plus(F.value);const vt=F.value.trunc();F.value=F.value.minus(vt),i.value=n.add(i.value,n.times(vt,oe.value)),ve.value&&A(n.min(h.value,n.times(m.value,re)),f.value)});const[Ue,Be]=dl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(z.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return n.gt(f.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:S,base:1},{title:"Mining Speed",modifier:I,base:.1,unit:"/s"}]),ie=O(!1),De=B(()=>o(ft,{modelValue:ie.value,"onUpdate:modelValue":re=>ie.value=re},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Ue})),{total:nt,trackerDisplay:$e}=pl({resource:l,goal:25e3,name:e,day:jn,color:t,modal:{show:ie,display:De}});return{name:e,day:jn,color:t,ore:i,bestOre:s,oreProgress:F,metal:l,bestMetal:a,totalMetal:nt,simplePickaxe:Re,doublePickaxe:Oe,crucible:xe,coalDrill:je,industrialFurnace:ut,efficientDrill:W,oreDrill:pe,industrialCrucible:z,autoSmeltEnabled:ve,hotterForge:Ne,generalTabCollapsed:Be,minWidth:700,display:B(()=>o(x,null,[ue($e),o(we,null,null),o(At,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(x,null,[ve.value&&n.gte(z.amount.value,1)?`+${oa([[m.value,"smelting speed"],[de.value,"ore gain"],[n.div(U.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,f.value))}`:void 0]))},null),o(we,null,null),ue(k),n.gte(z.amount.value,1)?o("div",{style:{width:"150px"}},[o(Lt,{title:"Auto Smelt",modelValue:ve.value,"onUpdate:modelValue":re=>ve.value=re},null)]):void 0,o(we,null,null),o(At,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(x,null,[sa(Ze.value)]))},null),o(we,null,null),o("div",null,[d("Currently mining "),ne(oe.value),d(" ore every")," ",ne(n.recip(N.value)),d(" seconds")]),ue(Te),o(we,null,null),_e(Re,Oe,xe,je,ut,W),_e(pe,z,Ne)]))}}),nr="cloth",Wn=8,qt=Tt(nr,function(){const e="Cloth",t="white",l=st(0,"cloth"),a=st(0,"wool"),i=st(10,"sheep"),s=be(0),r=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,ve.value)})),c=V(()=>({display:{title:"Breed sheep",description:B(()=>o(x,null,[d("Breed "),te(n.floor(pe.value)),d(" sheep"),o("br",null,null),ue(r)]))},style:{minHeight:"80px"},canClick:()=>n.gte(s.value,ve.value),onClick(){if(n.lt(s.value,ve.value))return;const se=n.floor(pe.value);i.value=n.add(i.value,se),s.value=0}})),p=be(0),m=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(p.value,Be.value)})),y=V(()=>({display:{title:"Shear sheep",description:B(()=>o(x,null,[d("Shear up to "),te(n.floor(et.value)),d(" sheep"),o("br",null,null),ue(m)]))},style:{minHeight:"80px"},canClick:()=>n.gte(p.value,Be.value),onClick(){if(n.lt(p.value,Be.value))return;const se=n.min(i.value,et.value).floor();a.value=n.add(a.value,se),p.value=0}})),f=be(0),w=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(f.value,$e.value)})),h=V(()=>({display:{title:"Spinning wool",description:B(()=>o(x,null,[d("Spin "),te(n.floor(De.value)),d(" wool"),o("br",null,null),ue(w)]))},style:{minHeight:"80px"},canClick:()=>n.gte(f.value,$e.value),onClick(){if(n.lt(f.value,$e.value))return;const se=n.min(a.value,De.value).floor();l.value=n.add(l.value,se),a.value=n.sub(a.value,se),f.value=0}})),k=yl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),A=yl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),S=yl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{h.canClick.value&&h.onClick()}})),oe=Pe(()=>({resource:fe.logs,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.5,se).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),I=Pe(()=>({resource:ht.metal,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.4,se).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),N=Pe(()=>({resource:Me.paper,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.3,se).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=L(()=>({resource:H(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Se=L(()=>({resource:H(a),cost:150,visibility:()=>T(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),Z={treesUpgrade3:L(()=>({resource:H(i),cost:200,visibility:()=>T(Se.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),treesUpgrade2:Se,treesUpgrade1:F},de=L(()=>({resource:H(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),G=L(()=>({resource:H(a),cost:225,visibility:()=>T(de.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Re={metalUpgrade3:L(()=>({resource:H(i),cost:300,visibility:()=>T(G.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),metalUpgrade2:G,metalUpgrade1:de},Oe=L(()=>({resource:H(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),xe=L(()=>({resource:H(a),cost:200,visibility:()=>T(Oe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),ut={paperUpgrade3:L(()=>({resource:H(i),cost:400,visibility:()=>T(xe.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),paperUpgrade2:xe,paperUpgrade1:Oe},W=X(()=>[ae(()=>({addend:oe.amount,description:"Build more pens"}))]),pe=C(()=>W.apply(1)),z=X(()=>[]),ve=C(()=>z.apply(1)),Ne=X(()=>[ae(()=>({addend:I.amount,description:"Make stronger shears"}))]),et=C(()=>Ne.apply(1)),Ue=X(()=>[]),Be=C(()=>Ue.apply(1)),ie=X(()=>[ae(()=>({addend:N.amount,description:"Learn how to spin"}))]),De=C(()=>ie.apply(1)),nt=X(()=>[]),$e=C(()=>nt.apply(1)),[re,vt]=dl(()=>[{title:"Sheep Gain",modifier:W,base:1},{title:"Sheep Breeding Cooldown",modifier:z,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Ne,base:1},{title:"Shearing Cooldown",modifier:Ue,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:ie,base:1},{title:"Spinning Cooldown",modifier:nt,base:1,visible:!1,unit:"s"}]),at=O(!1),j=B(()=>o(ft,{modelValue:at.value,"onUpdate:modelValue":se=>at.value=se},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:re}));qe.on("update",se=>{n.lt(J.day.value,Wn)||(n.gte(s.value,ve.value)?s.value=ve.value:(s.value=n.add(s.value,se),c.isHolding.value&&c.onClick()),n.gte(p.value,Be.value)?p.value=Be.value:(p.value=n.add(p.value,se),y.isHolding.value&&y.onClick()),n.gte(f.value,$e.value)?f.value=$e.value:(f.value=n.add(f.value,se),h.isHolding.value&&h.onClick()))});const{total:dt,trackerDisplay:ge}=pl({resource:l,goal:1e3,name:e,day:Wn,color:t,textColor:"var(--feature-foreground)",modal:{show:at,display:j}});return{name:e,color:t,cloth:l,totalCloth:dt,wool:a,sheep:i,buildPens:oe,betterShears:I,fasterSpinning:N,treesUpgrades:Z,metalUpgrades:Re,paperUpgrades:ut,generalTabCollapsed:vt,breedingProgress:s,shearingProgress:p,spinningProgress:f,breedSheepHK:k,shearSheepHK:A,spinWoolHK:S,minWidth:700,display:B(()=>o(x,null,[ue(ge),o(we,null,null),o(At,{resource:l,style:"margin-bottom: 0"},null),o(At,{resource:a,style:"margin-bottom: 0"},null),o(At,{resource:i,style:"margin-bottom: 0"},null),_e(c,y,h),_e(oe,I,N),o(we,null,null),o(xl,null,{default:()=>[Sl(...Object.values(Z)),Sl(...Object.values(Re)),Sl(...Object.values(ut))]})]))}}),ar="trees",zn=1,Kn=.1,fe=Tt(ar,function(){const e="Trees",t="#4BDC13",l="green",a=st(0,"logs"),i=st(0,"saplings"),s=O(0),r=X(()=>[ae(()=>({addend:()=>n.times(Z.amount.value,10),description:"Expand Forest",enabled:N.bought})),ae(()=>({addend:()=>n.div(gt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:gt.milestones.morePlantsMilestone1.earned})),E(()=>({multiplier:2,description:"5 Elves Trained",enabled:Je.milestones[4].earned})),E(()=>({multiplier:2,description:"8 Elves Trained",enabled:Je.milestones[7].earned})),E(()=>({multiplier:4,description:"Lumberjack Boots",enabled:qt.treesUpgrades.treesUpgrade1.bought}))]),c=st(C(()=>n.sub(r.apply(10),i.value)),"trees"),p=C(()=>r.apply(10)),m=L(()=>({resource:H(a),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=L(()=>({resource:H(a),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),f=L(()=>({resource:H(a),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),w=L(()=>({resource:H(a),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),h=L(()=>({resource:H(a),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),k=[m,y,f,w,h],A=L(()=>({resource:H(a),cost:50,visibility:()=>T(h.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),S=L(()=>({resource:H(a),cost:50,visibility:()=>T(h.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),oe=L(()=>({resource:H(a),cost:150,visibility:()=>T(h.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),I=L(()=>({resource:H(a),cost:150,visibility:()=>T(h.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),N=L(()=>({resource:H(a),cost:300,visibility:()=>T(h.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[A,S,oe,I,N],Se=Pe(()=>({resource:H(a),cost(){let R=this.amount.value;return n.gte(R,50)&&(R=n.pow(R,2).div(50)),n.gte(R,200)&&(R=n.pow(R,2).div(200)),n.gte(R,2e6)&&(R=n.pow(R,2).div(2e6)),R=n.pow(.95,Me.books.cuttersBook.amount.value).times(R),n.times(100,R).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>T(N.bought.value)})),Te=Pe(()=>({resource:H(a),cost(){let R=this.amount.value;return n.gte(R,50)&&(R=n.pow(R,2).div(50)),n.gte(R,200)&&(R=n.pow(R,2).div(200)),n.gte(R,2e6)&&(R=n.pow(R,2).div(2e6)),R=n.pow(.95,Me.books.plantersBook.amount.value).times(R),n.times(100,R).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>T(N.bought.value)})),Z=Pe(()=>({resource:H(a),cost(){let R=this.amount.value;return n.gte(R,100)&&(R=n.pow(R,2).div(100)),n.gte(R,1e5)&&(R=n.pow(R,2).div(1e5)),R=n.pow(.95,Me.books.expandersBook.amount.value).times(R),n.pow(n.add(R,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>T(N.bought.value)})),de=[Se,Te,Z],G=X(()=>[ae(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),ae(()=>({addend:je,description:"Smart Knives",enabled:oe.bought}))]),Ze=C(()=>G.apply(1)),Re=X(()=>[E(()=>({multiplier:.5,description:"Sharper Fingers",enabled:A.bought})),E(()=>({multiplier:()=>n.pow(.5,Je.totalElves.value),description:"1 Elf Trained",enabled:Je.milestones[0].earned}))]),Oe=C(()=>Re.apply(1)),xe=X(()=>[ae(()=>({addend:1,description:"Automated Knives",enabled:f.bought})),ae(()=>({addend:Se.amount,description:"Generic Cutters",enabled:N.bought})),ae(()=>({addend:()=>n.div(gt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:gt.milestones.autoCutMilestone1.earned})),E(()=>({multiplier:2,description:"30% Foundation Completed",enabled:gt.milestones.autoCutMilestone2.earned})),E(()=>({multiplier:2,description:"Warmer Cutters",enabled:U.warmerCutters.bought})),E(()=>({multiplier:U.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>n.gt(U.heatedCutters.amount.value,0)})),E(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:qt.treesUpgrades.treesUpgrade2.bought}))]),je=C(()=>xe.apply(0)),ut=X(()=>[ae(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),ae(()=>({addend:Ne,description:"Smart Spades",enabled:I.bought}))]),W=C(()=>ut.apply(1)),pe=X(()=>[E(()=>({multiplier:.5,description:"Greener Fingers",enabled:S.bought})),E(()=>({multiplier:()=>n.pow(.5,Je.totalElves.value),description:"1 Elf Trained",enabled:Je.milestones[0].earned}))]),z=C(()=>pe.apply(1)),ve=X(()=>[ae(()=>({addend:1,description:"Automated Spade",enabled:w.bought})),ae(()=>({addend:()=>n.div(Te.amount.value,2),description:"Generic Planters",enabled:N.bought})),ae(()=>({addend:()=>n.div(gt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:gt.milestones.autoPlantMilestone1.earned})),E(()=>({multiplier:2,description:"40% Foundation Completed",enabled:gt.milestones.autoPlantMilestone2.earned})),E(()=>({multiplier:2,description:"Warmer Planters",enabled:U.warmerPlanters.bought})),E(()=>({multiplier:U.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>n.gt(U.heatedPlanters.amount.value,0)})),E(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:qt.treesUpgrades.treesUpgrade3.bought}))]),Ne=C(()=>ve.apply(0)),et=X(()=>[E(()=>({multiplier:1.25,description:"Research I",enabled:h.bought})),E(()=>({multiplier:1.25,description:"Research II",enabled:N.bought})),E(()=>({multiplier:()=>n.div(gt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:gt.milestones.logGainMilestone1.earned})),E(()=>({multiplier:2,description:"50% Foundation Completed",enabled:gt.milestones.logGainMilestone2.earned})),E(()=>({multiplier:1.25,description:"Ashy Soil",enabled:U.basicFertilizer.bought})),E(()=>({multiplier:U.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>n.gt(U.moreFertilizer.amount.value,0)})),E(()=>({multiplier:2,description:"4 Elves Trained",enabled:Je.milestones[3].earned})),E(()=>({multiplier:2,description:"Carry logs in boxes",enabled:kt.upgrades.logsUpgrade.bought})),E(()=>({multiplier:()=>n.div(kt.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:kt.upgrades.logsUpgrade.bought})),_a(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:gt.milestones.logGainMilestone3.earned}))]),Ue=be(0),Be=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(Ue.value,Oe.value)})),ie=V(()=>({display:{title:"Cut trees",description:B(()=>o(x,null,[d("Cut down up to "),he(n.floor(Ze.value))," ",d("tree"),n.eq(Ze.value,1)?"":"s",d(" at once!"),o("br",null,null),ue(Be)]))},style:{minHeight:"80px"},canClick:()=>n.gte(c.value,1)&&n.gte(Ue.value,Oe.value),onClick(){if(n.lt(Ue.value,Oe.value))return;const R=n.floor(n.min(c.value,n.times(Ze.value,n.div(Ue.value,Oe.value).floor())));a.value=n.add(a.value,n.times(et.apply(1),R)),i.value=n.add(i.value,R),Ue.value=0}})),De=be(0),nt=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(De.value,z.value)})),$e=V(()=>({display:{title:"Plant trees",description:B(()=>o(x,null,[d("Plant up to "),he(n.floor(W.value))," ",d("tree"),n.eq(W.value,1)?"":"s",d(" at once!"),o("br",null,null),ue(nt)]))},style:{minHeight:"80px"},canClick:()=>n.gte(i.value,1)&&n.gte(De.value,z.value),onClick(){if(n.lt(De.value,z.value))return;const R=n.floor(n.min(i.value,n.times(W.value,n.div(De.value,z.value).floor())));i.value=n.sub(i.value,R),De.value=0}})),[re,vt]=dl(()=>[{title:"Logs per Tree",modifier:et,base:1,visible:h.bought},{title:"Manual Cutting Amount",modifier:G,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Re,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:ut,base:1,visible:y.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:pe,base:1,visible:y.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:xe,base:0,visible:f.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:ve,base:0,visible:w.bought,unit:"/s"},{title:"Forest Size",modifier:r,base:10,visible:N.bought}]),at=O(!1),j=B(()=>o(ft,{modelValue:at.value,"onUpdate:modelValue":R=>at.value=R},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:re}));qe.on("update",R=>{if(n.lt(J.day.value,zn))return;n.gte(Ue.value,Oe.value)?Ue.value=Oe.value:(Ue.value=n.add(Ue.value,R),ie.isHolding.value&&ie.onClick()),n.gte(De.value,z.value)?De.value=z.value:(De.value=n.add(De.value,R),$e.isHolding.value&&$e.onClick());const Nt=n.min(c.value,n.times(je.value,R)),wt=n.mul(et.apply(1),Nt),We=n.div(wt,R);s.value=n.mul(We,Kn).add(n.mul(s.value,n.dOne.sub(Kn))),a.value=n.add(a.value,wt),i.value=n.add(i.value,Nt);const Ot=n.min(i.value,n.times(Ne.value,R));i.value=n.sub(i.value,Ot)});const dt=C(()=>n.sub(je.value,Ne.value)),ge=C(()=>n.sub(Ne.value,je.value)),se=yl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{ie.canClick.value&&ie.onClick()}})),Vt=yl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{$e.canClick.value&&$e.onClick()}})),{total:yt,trackerDisplay:Rt}=pl({resource:a,goal:1e4,name:e,day:zn,color:l,modal:{show:at,display:j}});return{name:e,color:t,logs:a,totalLogs:yt,trees:c,saplings:i,cutTree:ie,plantTree:$e,cutTreeHK:se,plantTreeHK:Vt,row1Upgrades:k,row2Upgrades:F,row1Buyables:de,manualCutProgress:Ue,manualPlantProgress:De,generalTabCollapsed:vt,minWidth:700,display:B(()=>o(x,null,[ue(Rt),o(we,null,null),o(At,{resource:a,color:t,style:"margin-bottom: 0",productionDisplay:n.gt(je.value,0)?`+${Ce(s.value)}/s average<br/>equilibrium: +${ra([[je.value,"cutting speed"],[Ne.value,"planting speed"],[n.mul(p.value,20),"forest cap"]],"/s",et.apply(1))}`:void 0},null),o(At,{resource:i,color:l,style:"margin-bottom: 0",productionDisplay:zl(dt.value)},null),o(At,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:zl(ge.value)},null),o(we,null,null),_e(ie,$e),o("div",null,[d("Tip: You can hold down on actions to perform them automatically")]),o(we,null,null),_e(...k),_e(...F),_e(...de)]))}});var Na="./assets/tree.35808197.png",Ma="./assets/sws.714ad454.png",Ia="data:image/png;base64,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",Ea="./assets/elf.9fbfa563.png",xa="./assets/paperStacks.4c96ec8c.png",Ba="data:image/png;base64,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",Da="./assets/metal.7407f5d1.png",Pa="./assets/cloth.7bcd7f37.png",Fa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==";const J=Tt("main",function(){const e=be(1),t=C(()=>(+new Date(new Date().getFullYear(),11,e.value)-Q.time)/1e3),l=O(!1),a=O(-1),i=O(""),s=O();function r(m){const y=be(!1),f=be(!1);return bt(()=>{const w=m(),h=it(w.shouldNotify),k=it(()=>u(h)||u(f));return{...w,opened:y,shouldNotify:k,recentlyUpdated:f,[nl]:jo,[al]:function(){const{day:A,layer:S,symbol:oe,opened:I,shouldNotify:N,story:F,completedStory:Se,recentlyUpdated:Te}=this;return{day:A,symbol:oe,layer:S,opened:I,recentlyUpdated:Te,shouldNotify:N,onOpenLore(){var G,Ze;const Z=J.day.value>A;a.value=Z?A-1:-1;const de=u((Ze=(G=ct[S!=null?S:"trees"])==null?void 0:G.name)!=null?Ze:"");i.value=Z?`${de} - Completed!`:de,s.value=Z?`${F}<hr style="
|
|
margin: 10px 0;"/>${Se}`:F,l.value=!0},onOpenLayer(){if(Te.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(Q.tabs.includes(S!=null?S:"trees")){const Z=Q.tabs.lastIndexOf(S!=null?S:"trees");Q.tabs.splice(Z,1)}else Q.tabs.push(S!=null?S:"trees"),J.minimized.value=!0;else Q.tabs.splice(1,1/0,S!=null?S:"trees")},onUnlockLayer(){S&&(I.value=!0,setTimeout(()=>{var Z,de;a.value=-1,i.value=u((de=(Z=ct[S!=null?S:"trees"])==null?void 0:Z.name)!=null?de:""),s.value=F,Q.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[r(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Na,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Ma,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),r(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Ia,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ea,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),r(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:xa,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),r(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Ba,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),r(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Da,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drills and metal clanging join the already loud din as yet another piece of the puzzle fits into place. You're making solid progress, Good Job!"})),r(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:Pa,story:"Another resource you're going to need for gifts is cloth! Fortunately you think this should be pretty easy to prepare using a sheep farm - and as you've already proven with the tree farm, that's something you can handle!",completedStory:"You fall into a pile of wool, sighing contentedly as you look at all the progress you've made today. Good Job!"})),r(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Fa,story:"Looks like you just need one more thing before the toy factory can start running: plastic! Every toy nowadays is made with plastic! But wait, how are you going to get plastic? What can make plastic? Wait that's right, oil! You figured out you might as well repurpose your coal and ore drills into something that can get you oil, but unfortunately you'll need to mine much deeper that you're currently doing, so let's get to work!",completedStory:"It took a while, but you finally got enough oil for the next step! You deserve a good rest after all this digging work - tomorrow will be a busy day! Good Job!"})),r(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){a.value=e.value-1,i.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,J.minimized.value=!1,Q.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:a,loreTitle:i,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:B(()=>o(x,null,[Q.devSpeed===0?o("div",null,[d("Game Paused")]):null,Q.devSpeed&&Q.devSpeed!==1?o("div",null,[d("Dev Speed: "),Ce(Q.devSpeed),d("x")]):null,Q.offlineTime?o("div",null,[d("Offline Time: "),ln(Q.offlineTime)]):null,o(we,null,null),o("div",{class:"advent"},[c.reduce((m,y)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(y),m),[[]]).map(m=>_e(...m))])]))}}),ir=e=>[J,fe,gt,U,Je,Me,kt,ht,qt,ze],En=C(()=>!1);function or(e,t){t.offlineProd=!1}var sr=Object.freeze(Object.defineProperty({__proto__:null,main:J,getInitialLayers:ir,hasWon:En,fixOldSave:or},Symbol.toStringTag,{value:"Module"}));const rr={class:"scene"},ur=["src"],cr=["src"],dr=["src"],pr=["src"],mr=["src"],gr=["src"],hr=["src"],fr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},vr=["src"],yr=["src"],br=le({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(b(),M("div",rr,[e.day>=7?(b(),M("img",{key:0,src:u(Pa),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,ur)):P("",!0),e.day>=0?(b(),M("img",{key:1,src:u(Na),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,cr)):P("",!0),e.day>=1?(b(),M("img",{key:2,src:u(Ma),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,dr)):P("",!0),e.day>=2?(b(),M("img",{key:3,src:u(Ia),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,pr)):P("",!0),e.day>=6?(b(),M("img",{key:4,src:u(Da),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,mr)):P("",!0),e.day>=8?(b(),M("img",{key:5,src:u(Fa),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,gr)):P("",!0),e.day>=3?(b(),M("img",{key:6,src:u(Ea),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,hr)):P("",!0),e.day>=4?(b(),M("div",fr,[e.day>=4?(b(),M("img",{key:0,src:u(xa),class:"scene-item"},null,8,vr)):P("",!0),e.day>=5?(b(),M("img",{key:1,src:u(Ba),class:"scene-item"},null,8,yr)):P("",!0)])):P("",!0)]))}});var wr=Ae(br,[["__scopeId","data-v-09c4ca12"]]);const Cr=le({components:{Context:da},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:q(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:q(Number,String),required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:a,minWidth:i,tab:s}=rt(e),r=Jl(t),c=C(()=>Ie.allowGoBack&&l.value>0&&!a.value);function p(){Q.tabs.splice(u(e.index),1)}ul(()=>y(a.value,u(i.value))),Pt([a,Mo(i)],([f,w])=>y(f,w));function m(f){e.nodes.value=f}function y(f,w){const h=typeof w=="number"||Number.isNaN(parseInt(w))?w+"px":w,k=s.value();k!=null&&(f?(k.style.flexGrow="0",k.style.flexShrink="0",k.style.width="60px",k.style.minWidth=k.style.flexBasis="",k.style.margin="0"):(k.style.flexGrow="",k.style.flexShrink="",k.style.width="",k.style.minWidth=k.style.flexBasis=h,k.style.margin=""))}return{component:r,showGoBack:c,updateNodes:m,unref:u,goBack:p}}});function kr(e,t,l,a,i,s){const r=tl("Context");return b(),M("div",{class:"layer-container",style:Ye({"--layer-color":e.unref(e.color)})},[e.showGoBack?(b(),M("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):P("",!0),e.minimized.value?(b(),M("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[g("div",null,ce(e.unref(e.name)),1)])):(b(),M("div",{key:2,class:Qe(["layer-tab",{showGoBack:e.showGoBack}])},[o(r,{onUpdateNodes:e.updateNodes},{default:K(()=>[(b(),Y(He(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(b(),M("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):P("",!0)],4)}var _r=Ae(Cr,[["render",kr],["__scopeId","data-v-0158bec3"]]);const Ta=e=>(Wt("data-v-4b4bda40"),e=e(),zt(),e),Ar=Ta(()=>g("h2",null,"Changelog",-1)),Sr=Ta(()=>g("details",{open:""},[g("summary",null,[d("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),d(" This is the first release :D "),g("ul",null,[g("li",{class:"feature"},"Did everything"),g("li",{class:"fix"},"Had some fun"),g("li",{class:"breaking"},"Removed everything"),g("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Nr=le({__name:"Changelog",setup(e,{expose:t}){const l=O(!1);return t({open(){l.value=!0}}),(a,i)=>(b(),Y(ft,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s)},{header:K(()=>[Ar]),body:K(()=>[Sr]),_:1},8,["modelValue"]))}});var Mr=Ae(Nr,[["__scopeId","data-v-4b4bda40"]]),Ir=le({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:l,pinned:a}=rt(e),i=O(!1),s=C(()=>(lt(a)||i.value)&&r.value),r=ll(l),c=Mt(ke(B(()=>{const y=lt(t);return y==null?"":Dt(y)})));function p(y){const f=a;y.shiftKey&&f&&(f.value=!f.value,y.stopPropagation(),y.preventDefault())}const m=C(()=>lt(a)&&Dl[Ge.theme].showPin);return{Direction:ye,isHovered:i,isShown:s,comp:r,elementComp:c,unref:u,togglePinned:p,showPin:m}}});const Er={key:0,class:"material-icons pinned"};function xr(e,t,l,a,i,s){return b(),M("div",{class:Qe(["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))},[Bt(e.$slots,"default",{},void 0,!0),e.elementComp?(b(),Y(He(e.elementComp),{key:0})):P("",!0),o(en,{name:"fade"},{default:K(()=>{var r;return[e.isShown?(b(),M("div",{key:0,class:Qe(["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:Ye([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(r=e.unref(e.style))!=null?r:{}])},[e.showPin?(b(),M("span",Er,"push_pin")):P("",!0),e.comp?(b(),Y(He(e.comp),{key:1})):P("",!0)],6)):P("",!0)]}),_:1})],34)}var Ke=Ae(Ir,[["render",xr],["__scopeId","data-v-6102fa3a"]]);const Br={class:"info-modal-header"},Dr=["src","alt"],Pr={class:"info-modal-title"},Fr={key:0},Tr=d(" - "),Rr={key:0},Or={key:0},Ur=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),$r=g("br",null,null,-1),Hr=g("br",null,null,-1),qr=["href"],Vr=g("span",{class:"material-icons info-modal-discord"},"discord",-1),Gr=g("div",null,[g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Paper Pilot Community ")])],-1),Lr=g("div",null,[g("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Modding Tree ")])],-1),Qr=g("br",null,null,-1);var jr=le({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:a,logo:i,author:s,discordName:r,discordLink:c,versionNumber:p,versionTitle:m}=Ie,y=rt(l),f=O(!1),w=C(()=>ln(Q.timePlayed)),h=C(()=>ke(B(()=>o(x,null,[wa.map(ue)]))));t({open(){f.value=!0}});function k(){var A;(A=u(y.changelog))==null||A.open()}return(A,S)=>(b(),Y(ft,{class:"info-modal",modelValue:f.value,"onUpdate:modelValue":S[0]||(S[0]=oe=>f.value=oe)},{header:K(()=>[g("div",Br,[u(i)?(b(),M("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(a)},null,8,Dr)):P("",!0),g("div",Pr,[g("h2",null,"- "+ce(u(a))+" -",1),g("h4",null,[d(" - v"+ce(u(p)),1),u(m)?(b(),M("span",Fr,": "+ce(u(m)),1)):P("",!0),Tr])])])]),body:K(({shown:oe})=>[oe?(b(),M("div",Rr,[u(s)?(b(),M("div",Or,"By "+ce(u(s)),1)):P("",!0),Ur,$r,g("div",{class:"link",onClick:k},"Changelog"),Hr,g("div",null,[u(c)?(b(),M("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[Vr,d(" "+ce(u(r)),1)],8,qr)):P("",!0)]),Gr,Lr,Qr,g("div",null,"Time Played: "+ce(u(w)),1),(b(),Y(He(u(h))))])):P("",!0)]),_:1},8,["modelValue"]))}});const Ra=e=>(Wt("data-v-0d685451"),e=e(),zt(),e),Wr=Ra(()=>g("h2",null,"Options",-1)),zr=Ra(()=>g("hr",null,null,-1));var Kr=le({__name:"Options",setup(e,{expose:t}){const l=O(!1);t({open(){l.value=!0}});const a=Object.keys(Dl).map(h=>({label:ua(h),value:h})),i=C(()=>ke(B(()=>o(x,null,[ba.map(ue)])))),{showTPS:s,theme:r}=rt(Ge),{autosave:c,usingLog:p}=rt(Q),m=C({get(){return Q.devSpeed===0},set(h){Q.devSpeed=h?0:null}}),y=B(()=>o("span",null,[d("Autosave"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})])),f=B(()=>o("span",null,[d("Pause game"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})])),w=B(()=>o("span",null,[d("Use log for progress bar"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})]));return(h,k)=>(b(),Y(ft,{modelValue:l.value,"onUpdate:modelValue":k[5]||(k[5]=A=>l.value=A)},{header:K(()=>[Wr]),body:K(()=>[o(In,{title:"Theme",options:u(a),modelValue:u(r),"onUpdate:modelValue":k[0]||(k[0]=A=>Xe(r)?r.value=A:null)},null,8,["options","modelValue"]),(b(),Y(He(u(i)))),o(Lt,{title:"Show TPS",modelValue:u(s),"onUpdate:modelValue":k[1]||(k[1]=A=>Xe(s)?s.value=A:null)},null,8,["modelValue"]),zr,o(Lt,{title:u(y),modelValue:u(c),"onUpdate:modelValue":k[2]||(k[2]=A=>Xe(c)?c.value=A:null)},null,8,["title","modelValue"]),u(Ie).enablePausing?(b(),Y(Lt,{key:0,title:u(f),modelValue:u(m),"onUpdate:modelValue":k[3]||(k[3]=A=>Xe(m)?m.value=A:null)},null,8,["title","modelValue"])):P("",!0),o(Lt,{title:u(w),modelValue:u(p),"onUpdate:modelValue":k[4]||(k[4]=A=>Xe(p)?p.value=A:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Jr=Ae(Kr,[["__scopeId","data-v-0d685451"]]);const Xr=["onSubmit"],Yr={class:"field"},Zr={key:0,class:"field-title"},eu=["placeholder"],tu=le({__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 l=e,a=ll(Ft(l,"title"),"span"),i=Mt(null);Yl(()=>{var p;(p=i.value)==null||p.focus()});const s=C({get(){return u(l.modelValue)||""},set(p){t("update:modelValue",p)}});function r(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(b(),M("form",{onSubmit:Nl(r,["prevent"])},[g("div",Yr,[u(a)?(b(),M("span",Zr,[(b(),Y(He(u(a))))])):P("",!0),e.textArea?(b(),Y(u(ti),{key:1,modelValue:u(s),"onUpdate:modelValue":m[0]||(m[0]=y=>Xe(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Zl((b(),M("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=y=>Xe(s)?s.value=y:null),placeholder:e.placeholder,class:Qe({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,eu)),[[Ka,u(s)]])])],40,Xr))}});var Oa=Ae(tu,[["__scopeId","data-v-67b44a54"]]);const lu={key:0},nu=["onClick","disabled"],au={key:0},iu=["onClick"],ou=le({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const a=rt(e),i=O(!1);Pt(i,c=>{t("confirmingChanged",c)});function s(){if(u(a.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function r(){i.value=!1}return(c,p)=>(b(),M("span",{class:Qe(["container",{confirming:i.value}])},[i.value?(b(),M("span",lu,"Are you sure?")):P("",!0),g("button",{onClick:Nl(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(b(),M("span",au,"Yes")):Bt(c.$slots,"default",{key:1},void 0,!0)],8,nu),i.value?(b(),M("button",{key:1,class:"button",onClick:Nl(r,["stop"])},"No",8,iu)):P("",!0)],2))}});var su=Ae(ou,[["__scopeId","data-v-2f8ef34c"]]);const ru=["onClick"],uu=le({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=O(!1),a=O(null);function i(){t("click"),a.value&&clearTimeout(a.value),l.value=!1,ul(()=>{l.value=!0,a.value=setTimeout(()=>l.value=!1,500)})}return(s,r)=>(b(),M("button",{onClick:Nl(i,["stop"]),class:Qe(["feedback",{activated:l.value,left:e.left}])},[Bt(s.$slots,"default",{},void 0,!0)],10,ru))}});var cu=Ae(uu,[["__scopeId","data-v-01a1b95c"]]);const Kt=e=>(Wt("data-v-5285ac49"),e=e(),zt(),e),du=Kt(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),pu={key:0,class:"actions"},mu=Kt(()=>g("span",{class:"material-icons"},"content_paste",-1)),gu=Kt(()=>g("span",{class:"material-icons"},"content_copy",-1)),hu=Kt(()=>g("span",{class:"material-icons"},"edit",-1)),fu=Kt(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),vu={key:1,class:"actions"},yu=Kt(()=>g("span",{class:"material-icons"},"check",-1)),bu=Kt(()=>g("span",{class:"material-icons"},"close",-1)),wu={key:2,class:"details"},Cu={class:"save-version"},ku=Kt(()=>g("br",null,null,-1)),_u={key:0},Au={key:1},Su={key:3,class:"details"},Nu={key:4,class:"details error"},Mu=Kt(()=>g("br",null,null,-1)),Iu=le({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:a}=rt(l),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=O(!1),r=O(!1),c=O("");Pt(s,()=>c.value=a.value.name||"");const p=C(()=>a.value&&a.value.id===Q.id),m=C(()=>p.value?Q.time:a.value&&a.value.time||0),y=Jl(C(()=>{var w,h,k,A;return`Day ${(A=(k=(h=(w=a.value)==null?void 0:w.layers)==null?void 0:h.main)==null?void 0:k.day)!=null?A:1}`}));function f(){t("editName",c.value),s.value=!1}return(w,h)=>(b(),M("div",{class:Qe(["save",{active:u(p)}])},[du,s.value?(b(),M("div",vu,[g("button",{onClick:f,class:"button"},[o(Ke,{display:"Save",direction:u(ye).Left,class:"info"},{default:K(()=>[yu]),_:1},8,["direction"])]),g("button",{onClick:h[5]||(h[5]=k=>s.value=!s.value),class:"button"},[o(Ke,{display:"Cancel",direction:u(ye).Left,class:"info"},{default:K(()=>[bu]),_:1},8,["direction"])])])):(b(),M("div",pu,[u(a).error==null&&!r.value?(b(),Y(cu,{key:0,onClick:h[0]||(h[0]=k=>t("export")),class:"button",left:""},{default:K(()=>[o(Ke,{display:"Export",direction:u(ye).Left,class:"info"},{default:K(()=>[mu]),_:1},8,["direction"])]),_:1})):P("",!0),u(a).error==null&&!r.value?(b(),M("button",{key:1,onClick:h[1]||(h[1]=k=>t("duplicate")),class:"button"},[o(Ke,{display:"Duplicate",direction:u(ye).Left,class:"info"},{default:K(()=>[gu]),_:1},8,["direction"])])):P("",!0),u(a).error==null&&!r.value?(b(),M("button",{key:2,onClick:h[2]||(h[2]=k=>s.value=!s.value),class:"button"},[o(Ke,{display:"Edit Name",direction:u(ye).Left,class:"info"},{default:K(()=>[hu]),_:1},8,["direction"])])):P("",!0),o(su,{disabled:u(p),onClick:h[3]||(h[3]=k=>t("delete")),onConfirmingChanged:h[4]||(h[4]=k=>r.value=k)},{default:K(()=>[o(Ke,{display:"Delete",direction:u(ye).Left,class:"info"},{default:K(()=>[fu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(a).error==null&&!s.value?(b(),M("div",wu,[g("button",{class:"button open",onClick:h[6]||(h[6]=k=>t("open"))},[g("h3",null,ce(u(a).name),1)]),g("span",Cu,"v"+ce(u(a).modVersion),1),ku,u(m)?(b(),M("div",_u,"Last played "+ce(u(i).format(u(m))),1)):P("",!0),u(y)?(b(),M("div",Au,[(b(),Y(He(u(y))))])):P("",!0)])):u(a).error==null&&s.value?(b(),M("div",Su,[o(Oa,{modelValue:c.value,"onUpdate:modelValue":h[7]||(h[7]=k=>c.value=k),class:"editname",onSubmit:f},null,8,["modelValue"])])):(b(),M("div",Nu,[d(" Error: Failed to load save with id "+ce(u(a).id),1),Mu,d(ce(u(a).error),1)]))],2))}});var Eu=Ae(Iu,[["__scopeId","data-v-5285ac49"]]);const xn=e=>(Wt("data-v-3b9991aa"),e=e(),zt(),e),xu=xn(()=>g("h2",null,"Saves Manager",-1)),Bu={class:"modal-footer"},Du={class:"field"},Pu=xn(()=>g("span",{class:"field-title"},"Create Save",-1)),Fu={class:"field-buttons"},Tu={class:"footer"},Ru=xn(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),Ou=le({__name:"SavesManager",setup(e,{expose:t}){const l=O(!1),a=O(null);t({open(){l.value=!0}});const i=O(!1),s=O(""),r=O(null);Pt(s,I=>{I?ul(()=>{try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Yt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I),i.value=!0;return}const N=JSON.parse(I);if(typeof N!="object"){i.value=!0;return}const F=Ll();N.id=F,xt(N),s.value="",i.value=!1,Ge.saves.push(F)}catch{i.value=!0}}):i.value=!1});let c={},p=O(Object.keys(c).reduce((I,N)=>(I.push({label:N.split("/").slice(-1)[0].slice(0,-4),value:c[N]}),I),[]));const m=tn({});function y(I){if(m[I]==null){let N=localStorage.getItem(I);if(N==null)m[I]={error:"Save doesn't exist in localStorage",id:I};else if(N==="dW5kZWZpbmVk")m[I]={error:"Save is undefined",id:I};else try{if(N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=Yt.decompressFromUTF16(N);else return console.warn("Unable to determine preset encoding",N),i.value=!0,m[I]={error:"Unable to determine preset encoding",id:I},m[I];m[I]={...JSON.parse(N),id:I}}catch(F){m[I]={error:F,id:I},console.warn(`SavesManager: Failed to load info about save with id ${I}:
|
|
${F}
|
|
${N}`)}}return m[I]}Pt(l,I=>{I&&Object.keys(m).forEach(N=>delete m[N])});const f=C(()=>Ge.saves.reduce((I,N)=>(I[N]=y(N),I),{}));function w(I){let N;switch(Q.id===I?N=fa(Q[Ve]):N=JSON.stringify(f.value[I]),Ie.exportEncoding){default:console.warn(`Unknown save encoding: ${Ie.exportEncoding}. Defaulting to lz`);case"lz":N=Yt.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const F=document.createElement("textarea");F.value=N,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function h(I){Q.id===I&&xt();const N={...f.value[I],id:Ll()};xt(N),Ge.saves.push(N.id)}function k(I){Ge.saves=Ge.saves.filter(N=>N!==I),localStorage.removeItem(I),m[I]=void 0}function A(I){f.value[Q.id].time=Q.time,xt(),m[Q.id]=void 0,rl(f.value[I]),m[I]=void 0}function S(I){if(r.value=I,ul(()=>{r.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Yt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const N=JSON.parse(I);N.id=Ll(),xt(N),Ge.saves.push(N.id),A(N.id)}function oe(I,N){const F=f.value[I];F&&(F.name=N,Q.id===I?(Q.name=N,xt()):(xt(F),m[I]=void 0))}return(I,N)=>(b(),Y(ft,{modelValue:l.value,"onUpdate:modelValue":N[4]||(N[4]=F=>l.value=F),ref_key:"modal",ref:a},{header:K(()=>[xu]),body:K(({shown:F})=>[F?(b(),Y(u(ei),{key:0,list:u(Ge).saves,handle:".handle",itemKey:Se=>Se},{item:K(({element:Se})=>[o(Eu,{save:u(f)[Se],onOpen:Te=>A(Se),onExport:Te=>w(Se),onEditName:Te=>oe(Se,Te),onDuplicate:Te=>h(Se),onDelete:Te=>k(Se)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:K(()=>[g("div",Bu,[o(Oa,{modelValue:s.value,"onUpdate:modelValue":N[0]||(N[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:Qe({importingFailed:i.value})},null,8,["modelValue","class"]),g("div",Du,[Pu,g("div",Fu,[g("button",{class:"button",onClick:N[1]||(N[1]=F=>A(u(vl)().id))},"New Game"),Object.keys(u(p)).length>0?(b(),Y(In,{key:0,options:u(p),modelValue:r.value,"onUpdate:modelValue":N[2]||(N[2]=F=>S(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),g("div",Tu,[Ru,g("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ua=Ae(Ou,[["__scopeId","data-v-3b9991aa"]]);const St=e=>(Wt("data-v-8495e562"),e=e(),zt(),e),Uu=["src","alt"],$u={key:1,class:"title"},Hu=St(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),qu={class:"discord"},Vu={class:"discord-links"},Gu={key:0},Lu=["href"],Qu=St(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ju=St(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Wu={href:"https://forums.moddingtree.com/",target:"_blank"},zu=St(()=>g("span",{class:"material-icons"},"forum",-1)),Ku=St(()=>g("span",{class:"material-icons"},"info",-1)),Ju=St(()=>g("span",{class:"material-icons"},"library_books",-1)),Xu=St(()=>g("span",{class:"material-icons"},"settings",-1)),Yu=St(()=>g("span",{class:"material-icons"},"library_books",-1)),Zu=St(()=>g("span",{class:"material-icons"},"settings",-1)),ec=St(()=>g("span",{class:"material-icons"},"info",-1)),tc={href:"https://forums.moddingtree.com/",target:"_blank"},lc=St(()=>g("span",{class:"material-icons"},"forum",-1)),nc={class:"discord"},ac={class:"discord-links"},ic={key:0},oc=["href"],sc=St(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),rc=St(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),uc=le({__name:"Nav",setup(e){const t=O(null),l=O(null),a=O(null),i=O(null),{useHeader:s,banner:r,title:c,discordName:p,discordLink:m,versionNumber:y}=Ie;function f(){window.open(m,"mywindow")}return(w,h)=>(b(),M(x,null,[u(s)?(b(),M("div",cl({key:0,class:"nav"},w.$attrs),[u(r)?(b(),M("img",{key:0,src:u(r),class:"banner",alt:u(c)},null,8,Uu)):(b(),M("div",$u,ce(u(c)),1)),g("div",{onClick:h[0]||(h[0]=k=>{var A;return(A=i.value)==null?void 0:A.open()}),class:"version-container"},[o(Ke,{display:"Changelog",direction:u(ye).Down,class:"version"},{default:K(()=>[g("span",null,"v"+ce(u(y)),1)]),_:1},8,["direction"])]),Hu,g("div",qu,[g("span",{onClick:f,class:"material-icons"},"discord"),g("ul",Vu,[u(m)?(b(),M("li",Gu,[g("a",{href:u(m),target:"_blank"},ce(u(p)),9,Lu)])):P("",!0),Qu,ju])]),g("div",null,[g("a",Wu,[o(Ke,{display:"Forums",direction:u(ye).Down,yoffset:"5px"},{default:K(()=>[zu]),_:1},8,["direction"])])]),g("div",{onClick:h[1]||(h[1]=k=>{var A;return(A=t.value)==null?void 0:A.open()})},[o(Ke,{display:"Info",direction:u(ye).Down,class:"info"},{default:K(()=>[Ku]),_:1},8,["direction"])]),g("div",{onClick:h[2]||(h[2]=k=>{var A;return(A=l.value)==null?void 0:A.open()})},[o(Ke,{display:"Saves",direction:u(ye).Down,xoffset:"-20px"},{default:K(()=>[Ju]),_:1},8,["direction"])]),g("div",{onClick:h[3]||(h[3]=k=>{var A;return(A=a.value)==null?void 0:A.open()})},[o(Ke,{display:"Options",direction:u(ye).Down,xoffset:"-66px"},{default:K(()=>[Xu]),_:1},8,["direction"])])],16)):(b(),M("div",cl({key:1,class:"overlay-nav"},w.$attrs),[g("div",{onClick:h[4]||(h[4]=k=>{var A;return(A=i.value)==null?void 0:A.open()}),class:"version-container"},[o(Ke,{display:"Changelog",direction:u(ye).Right,xoffset:"25%",class:"version"},{default:K(()=>[g("span",null,"v"+ce(u(y)),1)]),_:1},8,["direction"])]),g("div",{onClick:h[5]||(h[5]=k=>{var A;return(A=l.value)==null?void 0:A.open()})},[o(Ke,{display:"Saves",direction:u(ye).Right},{default:K(()=>[Yu]),_:1},8,["direction"])]),g("div",{onClick:h[6]||(h[6]=k=>{var A;return(A=a.value)==null?void 0:A.open()})},[o(Ke,{display:"Options",direction:u(ye).Right},{default:K(()=>[Zu]),_:1},8,["direction"])]),g("div",{onClick:h[7]||(h[7]=k=>{var A;return(A=t.value)==null?void 0:A.open()})},[o(Ke,{display:"Info",direction:u(ye).Right},{default:K(()=>[ec]),_:1},8,["direction"])]),g("div",null,[g("a",tc,[o(Ke,{display:"Forums",direction:u(ye).Right,xoffset:"7px"},{default:K(()=>[lc]),_:1},8,["direction"])])]),g("div",nc,[g("span",{onClick:f,class:"material-icons"},"discord"),g("ul",ac,[u(m)?(b(),M("li",ic,[g("a",{href:u(m),target:"_blank"},ce(u(p)),9,oc)])):P("",!0),sc,rc])])],16)),o(jr,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),o(Ua,{ref_key:"savesManager",ref:l},null,512),o(Jr,{ref_key:"options",ref:a},null,512),o(Mr,{ref_key:"changelog",ref:i},null,512)],64))}});var $a=Ae(uc,[["__scopeId","data-v-8495e562"]]);const Bn=e=>(Wt("data-v-248e2ebb"),e=e(),zt(),e),cc={class:"inner-tab"},dc={key:1},pc=Bn(()=>g("br",null,null,-1)),mc=d(" You can help continue the "),gc=Bn(()=>g("i",null,"advent",-1)),hc=d("ure at: "),fc=Bn(()=>g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Paper Pilot Community ")],-1)),vc=le({__name:"Game",setup(e){const t=Ft(Q,"tabs"),l=C(()=>Object.keys(ct)),a=Ie.useHeader,i=ll(J.loreBody);function s(r){const{display:c,minimized:p,minWidth:m,name:y,color:f,minimizable:w,nodes:h}=r;return{display:c,minimized:p,minWidth:m,name:y,color:f,minimizable:w,nodes:h}}return(r,c)=>(b(),M("div",{class:Qe(["tabs-container",{useHeader:u(a)}])},[(b(!0),M(x,null,Yn(u(t),(p,m)=>{var y,f;return b(),M("div",{key:m,class:Qe(["tab",u((y=u(ct)[p])==null?void 0:y.classes)]),ref_for:!0,ref:`tab-${m}`,style:Ye(u((f=u(ct)[p])==null?void 0:f.style))},[m===0&&!u(a)?(b(),Y($a,{key:0})):P("",!0),g("div",cc,[u(l).includes(p)?(b(),Y(_r,cl({key:0},s(u(ct)[p]),{index:m,tab:()=>{var w;return(w=r.$refs[`tab-${m}`])==null?void 0:w[0]}}),null,16,["index","tab"])):(b(),Y(He(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),o(ft,{modelValue:u(J).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>u(J).showLoreModal.value=p)},{header:K(()=>[g("h2",null,ce(u(J).loreTitle.value),1)]),body:K(()=>[u(i)?(b(),Y(He(u(i)),{key:0})):P("",!0),u(J).loreScene.value!==-1?(b(),M("div",dc,[o(wr,{day:u(J).loreScene.value},null,8,["day"]),pc,mc,gc,hc,fc])):P("",!0)]),_:1},8,["modelValue"])],2))}});var yc=Ae(vc,[["__scopeId","data-v-248e2ebb"]]);const Tl=e=>(Wt("data-v-4a50ce42"),e=e(),zt(),e),bc={class:"game-over-modal-header"},wc=["src","alt"],Cc={class:"game-over-modal-title"},kc=Tl(()=>g("h2",null,"Congratulations!",-1)),_c={key:0},Ac=Tl(()=>g("br",null,null,-1)),Sc=Tl(()=>g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Nc=Tl(()=>g("br",null,null,-1)),Mc=["href"],Ic=Tl(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Ec=le({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:a,discordLink:i,versionNumber:s,versionTitle:r}=Ie,c=C(()=>ln(Q.timePlayed)),p=C(()=>En.value&&!Q.keepGoing),m=Ft(Q,"autosave");function y(){Q.keepGoing=!0}function f(){rl(vl())}return(w,h)=>(b(),Y(ft,{"model-value":u(p)},{header:K(()=>[g("div",bc,[u(l)?(b(),M("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,wc)):P("",!0),g("div",Cc,[kc,g("h4",null,"You've beaten "+ce(u(t))+" v"+ce(u(s))+": "+ce(u(r)),1)])])]),body:K(({shown:k})=>[k?(b(),M("div",_c,[g("div",null,"It took you "+ce(u(c))+" to beat the game.",1),Ac,Sc,Nc,g("div",null,[g("a",{href:u(i),class:"game-over-modal-discord-link"},[Ic,d(" "+ce(u(a)),1)],8,Mc)]),o(Lt,{title:"Autosave",modelValue:u(m),"onUpdate:modelValue":h[0]||(h[0]=A=>Xe(m)?m.value=A:null)},null,8,["modelValue"])])):P("",!0)]),footer:K(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:y,class:"button"},"Keep Going"),g("button",{onClick:f,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var xc=Ae(Ec,[["__scopeId","data-v-4a50ce42"]]);const sn=e=>(Wt("data-v-3de07c06"),e=e(),zt(),e),Bc=sn(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),Dc={key:0},Pc=sn(()=>g("br",null,null,-1)),Fc=["href"],Tc=sn(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Rc=sn(()=>g("br",null,null,-1)),Oc={class:"nan-footer"},Uc=le({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Ie,a=Ft(Q,"autosave"),i=Ft(Le,"hasNaN"),s=O(null),r=C(()=>{var h;return(h=Le.NaNPath)==null?void 0:h.join(".")}),c=C(()=>{var h;return(h=Le.NaNPath)==null?void 0:h.slice(-1)[0]}),p=C(()=>Le.NaNReceiver&&c.value?Le.NaNReceiver[c.value]:null),m=C({get(){return Q.devSpeed===0},set(h){Q.devSpeed=h?null:0}});function y(){Le.NaNReceiver&&c.value&&(Le.NaNReceiver[c.value]=new n(0),Le.hasNaN=!1)}function f(){Le.NaNReceiver&&c.value&&(Le.NaNReceiver[c.value]=new n(1),Le.hasNaN=!1)}function w(){Le.NaNReceiver&&c.value&&(Le.NaNReceiver[c.value]=new n(NaN),Le.hasNaN=!1)}return(h,k)=>(b(),M(x,null,[o(ft,cl({modelValue:u(i),"onUpdate:modelValue":k[4]||(k[4]=A=>Xe(i)?i.value=A:null)},h.$attrs),{header:K(()=>[Bc]),body:K(()=>[g("div",null,[d(' Attempted to assign "'+ce(u(r))+'" to NaN',1),u(p)?(b(),M("span",Dc,ce(" ")+"(previously "+ce(u(Ce)(u(p)))+")",1)):P("",!0),d(". Auto-saving has been "+ce(u(a)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Pc,g("div",null,[g("a",{href:u(l),class:"nan-modal-discord-link"},[Tc,d(" "+ce(u(t)),1)],8,Fc)]),Rc,o(Lt,{title:"Autosave",modelValue:u(a),"onUpdate:modelValue":k[0]||(k[0]=A=>Xe(a)?a.value=A:null)},null,8,["modelValue"]),u(Ie).enablePausing?(b(),Y(Lt,{key:0,title:"Pause game",modelValue:u(m),"onUpdate:modelValue":k[1]||(k[1]=A=>Xe(m)?m.value=A:null)},null,8,["modelValue"])):P("",!0)]),footer:K(()=>[g("div",Oc,[g("button",{onClick:k[2]||(k[2]=A=>{var S;return(S=s.value)==null?void 0:S.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:y,class:"button"},"Set to 0"),g("button",{onClick:f,class:"button"},"Set to 1"),u(p)&&u(n).neq(u(p),0)&&u(n).neq(u(p),1)?(b(),M("button",{key:0,onClick:k[3]||(k[3]=A=>i.value=!1),class:"button"}," Set to previous ")):P("",!0),g("button",{onClick:w,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Ua,{ref_key:"savesManager",ref:s},null,512)],64))}});var $c=Ae(Uc,[["__scopeId","data-v-3de07c06"]]);const Hc={key:0,class:"tpsDisplay"},qc={key:0,class:"low"},Vc=le({__name:"TPS",setup(e){const t=C(()=>n.div(Le.lastTenTicks.length,Le.lastTenTicks.reduce((s,r)=>s+r,0))),l=O([]);_t(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const a=C(()=>l.value.reduce((s,r)=>n.max(s,r),0)),i=C(()=>n.sub(t.value,a.value).gt(1));return(s,r)=>u(t).isNan()?P("",!0):(b(),M("div",Hc,[d(" TPS: "+ce(u(he)(u(t)))+" ",1),o(en,{name:"fade"},{default:K(()=>[u(i)?(b(),M("span",qc,ce(u(he)(u(a))),1)):P("",!0)]),_:1})]))}});var Gc=Ae(Vc,[["__scopeId","data-v-46a3ed5b"]]);var Lc=le({__name:"App",setup(e){const t=Ie.useHeader,l=C(()=>Dl[Ge.theme].variables),a=Ft(Ge,"showTPS"),i=C(()=>ke(B(()=>o(x,null,[ko.map(ue)]))));return(s,r)=>(b(),M(x,null,[g("div",{id:"modal-root",style:Ye(u(l))},null,4),g("div",{class:Qe(["app",{useHeader:u(t)}]),style:Ye(u(l))},[u(t)?(b(),Y($a,{key:0})):P("",!0),o(yc),u(u(a))?(b(),Y(Gc,{key:1})):P("",!0),o(xc),o($c),(b(),Y(He(u(i))))],6)],64))}});var Qc=Ae(Lc,[["__scopeId","data-v-580927bb"]]);function jc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:a,onRegistered:i,onRegisterError:s}=e;let r,c;const p=async(m=!0)=>{m&&(r==null||r.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),c&&c.waiting&&await ni(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new li("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",m=>{m.isUpdate||a==null||a()});{const m=()=>{l==null||l()};r.addEventListener("waiting",m),r.addEventListener("externalwaiting",m)}r.register({immediate:t}).then(m=>{c=m,i==null||i(m)}).catch(m=>{s==null||s(m)})}return p}function Wc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:a,onRegistered:i,onRegisterError:s}=e,r=O(!1),c=O(!1);return{updateServiceWorker:jc({immediate:t,onNeedRefresh(){r.value=!0,l==null||l()},onOfflineReady(){c.value=!0,a==null||a()},onRegistered:i,onRegisterError:s}),offlineReady:c,needRefresh:r}}document.title=Ie.title;window.projInfo=Ie;if(Ie.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c
|
|
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await vo();const{globalBus:e}=await jl(()=>Promise.resolve().then(function(){return Zi}),void 0),{startGameLoop:t}=await jl(()=>import("./gameLoop.e0ee8a63.js"),["assets/gameLoop.e0ee8a63.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=Ja(Qc);e.emit("setupVue",l),l.mount("#app"),ul(()=>{const a=ea(),{updateServiceWorker:i}=Wc({onNeedRefresh(){a.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){a.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{n as D,jl as _,Le as a,Ie as b,sr as c,qe as g,An as l,Q as p,Ge as s};
|