diff --git a/assets/gameLoop.d514f92e.js b/assets/gameLoop.d7c904c7.js similarity index 91% rename from assets/gameLoop.d514f92e.js rename to assets/gameLoop.d7c904c7.js index f491bd8..66bed1c 100644 --- a/assets/gameLoop.d514f92e.js +++ b/assets/gameLoop.d7c904c7.js @@ -1 +1 @@ -import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.4fa1a689.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.4fa1a689.js").then(function(t){return t.c}),["assets/index.4fa1a689.js","assets/index.734848bb.css","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"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; +import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.3d4863e1.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.3d4863e1.js").then(function(t){return t.c}),["assets/index.3d4863e1.js","assets/index.734848bb.css","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"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; diff --git a/assets/index.4fa1a689.js b/assets/index.3d4863e1.js similarity index 57% rename from assets/index.4fa1a689.js rename to assets/index.3d4863e1.js index e1b23cc..1696136 100644 --- a/assets/index.4fa1a689.js +++ b/assets/index.3d4863e1.js @@ -1,19 +1,19 @@ -/* empty css */import"./vue.92681fcb.js";import{Z as g,l as vt,aa as ce,t as j,ay as oa,ar as _l,aE as w,a0 as D,aK as Lt,a1 as f,O as N,aG as Yl,A as pt,_ as oe,a8 as i,b6 as ue,b8 as sa,bs as rn,C as r,aq as hl,bu as $l,bb as ra,T as ii,a7 as u,u as ua,j as oi,bv as Ea,q as jl,b1 as Jt,G as et,aC as un,w as Rt,b2 as Ft,ao as si,I as it,J as Be,$ as O,aH as rl,aF as ul,z as zt,aN as ze,al as ta,aL as ll,H as ri,aJ as Sa,bn as ui,br as di,be as ci}from"./@vue.4ce677c2.js";import{c as dn}from"./nanoevents.1080beb7.js";import{L as vl}from"./lz-string.731cedc5.js";import{i as pi}from"./is-plain-object.906d88e8.js";import{Y as mi}from"./vue-next-select.a2bfab1d.js";import{s as vi,u as cn}from"./vue-toastification.6f567382.js";import{D as gi}from"./vuedraggable.7949458c.js";import{p as fi}from"./vue-textarea-autosize.35804eaf.js";import{v as hi,n as yi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const d of s.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}};bi();const wi="modulepreload",ja={},Ai="./",la=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${Ai}${n}`,n in ja)return;ja[n]=!0;const o=n.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":wi,o||(d.as="script",d.crossOrigin=""),d.href=n,document.head.appendChild(d),o)return new Promise((c,p)=>{d.addEventListener("load",c),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Ci="./projInfo-schema.json",ki="Advent Incremental",Ei="An incremental game you play a day at a time, leading up to Christmas!",_i="advent-incremental",Si="thepaperpilot and friends",Bi="",Ni="",Ii="0.3",Mi="Initial Commit",Di=!0,xi=!1,Pi=2,Ti=!0,Fi=null,Ui="",Ri=["main"],Oi=3600,Gi=0,$i=!0,qi="base64";var $e={$schema:Ci,title:ki,description:Ei,id:_i,author:Si,discordName:Bi,discordLink:Ni,versionNumber:Ii,versionTitle:Mi,allowGoBack:Di,defaultShowSmall:xi,defaultDecimalsShown:Pi,useHeader:Ti,banner:Fi,logo:Ui,initialTabs:Ri,maxTickLength:Oi,offlineLimit:Gi,enablePausing:$i,exportEncoding:qi};const ya=17,Qi=9e15,Vi=Math.log10(9e15),Li=1/9e15,Hi=308,ji=-324,Wa=5,Wi=function(){const e=[];for(let l=ji+1;l<=Hi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Cl=[2,Math.E,3,4,5,6,7,8,9,10],Ji=[[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]],zi=[[-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]],A=function(t){return a.fromValue_noAlloc(t)},me=function(e,t,l){return a.fromComponents(e,t,l)},Ne=function(t,l,n){return a.fromComponents_noNormalize(t,l,n)},ml=function(t,l){const n=l+1,o=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,n-o))*Math.pow(10,o-n);return parseFloat(s.toFixed(Math.max(n-o,0)))},ba=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Ki=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 n=e*e;let o=e;return l=l+1/(12*o),o=o*n,l=l+1/(360*o),o=o*n,l=l+1/(1260*o),o=o*n,l=l+1/(1680*o),o=o*n,l=l+1/(1188*o),o=o*n,l=l+691/(360360*o),o=o*n,l=l+7/(1092*o),o=o*n,l=l+3617/(122400*o),Math.exp(l)/t},pn=.5671432904097838,Ja=function(e,t=1e-10){let l,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return pn;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let o=0;o<100;++o){if(n=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(n-l).5?1:-1;if(Math.random()*20<1)return Ne(t,0,1);const l=Math.floor(Math.random()*(e+1));let n=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let o=Math.pow(10,n);return Math.random()>.9&&(o=Math.trunc(o)),me(t,l,o)}static affordGeometricSeries_core(e,t,l,n){const o=t.mul(l.pow(n));return I.floor(e.div(o).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,n){return t.mul(l.pow(n)).mul(I.sub(1,l.pow(e))).div(I.sub(1,l))}static affordArithmeticSeries_core(e,t,l,n){const s=t.add(n.mul(l)).sub(l.div(2)),d=s.pow(2);return s.neg().add(d.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,n){const o=t.add(n.mul(l));return e.div(2).mul(o.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=Qi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)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 b=parseFloat(t[0]),v=parseFloat(t[1]),E=t[1].split(";");let _=1;if(E.length===2&&(_=parseFloat(E[1]),isFinite(_)||(_=1)),isFinite(b)&&isFinite(v)){const x=I.pentate(b,v,_);return this.sign=x.sign,this.layer=x.layer,this.mag=x.mag,this}}const l=e.split("^^");if(l.length===2){const b=parseFloat(l[0]),v=parseFloat(l[1]),E=l[1].split(";");let _=1;if(E.length===2&&(_=parseFloat(E[1]),isFinite(_)||(_=1)),isFinite(b)&&isFinite(v)){const x=I.tetrate(b,v,_);return this.sign=x.sign,this.layer=x.layer,this.mag=x.mag,this}}const n=e.split("^");if(n.length===2){const b=parseFloat(n[0]),v=parseFloat(n[1]);if(isFinite(b)&&isFinite(v)){const E=I.pow(b,v);return this.sign=E.sign,this.layer=E.layer,this.mag=E.mag,this}}e=e.trim().toLowerCase();let o,s,d=e.split("pt");if(d.length===2){o=10,s=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let b=parseFloat(d[1]);if(isFinite(b)||(b=1),isFinite(o)&&isFinite(s)){const v=I.tetrate(o,s,b);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(d=e.split("p"),d.length===2){o=10,s=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let b=parseFloat(d[1]);if(isFinite(b)||(b=1),isFinite(o)&&isFinite(s)){const v=I.tetrate(o,s,b);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),p=c.length-1;if(p===0){const b=parseFloat(e);if(isFinite(b))return this.fromNumber(b)}else if(p===1){const b=parseFloat(e);if(isFinite(b)&&b!==0)return this.fromNumber(b)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let b="";for(let v=0;v=43&&E<=57||E===101)b+=m[1].charAt(v);else return this.layer=parseFloat(b),this.mag=parseFloat(m[1].substr(v+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 h=parseFloat(c[c.length-1]);if(p>=2){const b=parseFloat(c[c.length-2]);isFinite(b)&&(h*=Math.sign(b),h+=ba(b))}if(!isFinite(y))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=h;else if(p===1)this.sign=Math.sign(y),this.layer=1,this.mag=h+Math.log10(Math.abs(y));else if(this.sign=Math.sign(y),this.layer=p,p===2){const b=I.mul(me(1,2,h),A(y));return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,this}else this.mag=h;return this.normalize(),this}fromValue(e){return e instanceof I||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:ml(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:ml(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<=Wa?(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):ml(this.m,e)+"e"+ml(this.e,e):this.layer===1?ml(this.m,e)+"e"+ml(this.e,e):this.layer<=Wa?(this.sign===-1?"-":"")+"e".repeat(this.layer)+ml(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+ml(this.mag,e)}abs(){return Ne(this.sign===0?0:1,this.layer,this.mag)}neg(){return Ne(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?I.dZero:this.layer===0?me(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?I.dZero:this.layer===0?me(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?I.dZero:this.layer===0?me(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?I.dZero:this.layer===0?me(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=A(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 Ne(0,0,0);let l,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(I.cmpabs(this,t)>0?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return A(l.sign*l.mag+n.sign*n.mag);const o=l.layer*Math.sign(l.mag),s=n.layer*Math.sign(n.mag);if(o-s>=2)return l;if(o===0&&s===-1){if(Math.abs(n.mag-Math.log10(l.mag))>ya)return l;{const d=Math.pow(10,Math.log10(l.mag)-n.mag),c=n.sign+l.sign*d;return me(Math.sign(c),1,n.mag+Math.log10(Math.abs(c)))}}if(o===1&&s===0){if(Math.abs(l.mag-Math.log10(n.mag))>ya)return l;{const d=Math.pow(10,l.mag-Math.log10(n.mag)),c=n.sign+l.sign*d;return me(Math.sign(c),1,Math.log10(n.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-n.mag)>ya)return l;{const d=Math.pow(10,l.mag-n.mag),c=n.sign+l.sign*d;return me(Math.sign(c),1,n.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(A(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return Ne(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return Ne(this.sign*t.sign,0,1);let l,n;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return A(l.sign*n.sign*l.mag*n.mag);if(l.layer>=3||l.layer-n.layer>=2)return me(l.sign*n.sign,l.layer,l.mag);if(l.layer===1&&n.layer===0)return me(l.sign*n.sign,1,l.mag+Math.log10(n.mag));if(l.layer===1&&n.layer===1)return me(l.sign*n.sign,1,l.mag+n.mag);if(l.layer===2&&n.layer===1){const o=me(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(me(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return me(l.sign*n.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&n.layer===2){const o=me(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(me(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return me(l.sign*n.sign,o.layer+1,o.sign*o.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=A(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?I.dNaN:this.layer===0?me(this.sign,0,1/this.mag):me(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=A(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,n=t.mag>0?t.layer:-t.layer;return l>n?1:lt.mag?1:this.mag0?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=A(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=A(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let n=this.mag,o=l.mag;return this.layer>l.layer&&(o=ba(o)),this.layer0?me(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):me(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?I.dNaN:this.layer>0?me(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):me(this.sign,0,Math.log10(this.mag))}log(e){return e=A(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?I.dNaN:this.layer===0&&e.layer===0?me(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):I.div(this.log10(),e.log10())}log2(){return this.sign<=0?I.dNaN:this.layer===0?me(this.sign,0,Math.log2(this.mag)):this.layer===1?me(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?me(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):me(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?I.dNaN:this.layer===0?me(this.sign,0,Math.log(this.mag)):this.layer===1?me(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?me(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):me(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=A(e),l=this,n=t;if(l.sign===0)return n.eq(0)?Ne(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(n.sign===0)return Ne(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return l;const o=l.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?o.neg():Math.abs(n.toNumber()%2)%2===0?o:I.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return I.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 me(1,0,t);if(e.sign===0)return I.dOne;e=Ne(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?me(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?me(-e.sign,e.layer+1,-e.mag):I.dOne}pow_base(e){return A(e).pow(this)}root(e){const t=A(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?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(Ne(1,0,24)))return A(Ki(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 n=e,o=12*n,s=1/o,d=t+s;if(d===t||(t=d,n=n*l,o=360*n,s=1/o,d=t-s,d===t))return I.exp(t);t=d,n=n*l,o=1260*n;let c=1/o;return t=t+c,n=n*l,o=1680*n,c=1/o,t=t-c,I.exp(t)}else return this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?I.dOne:this.layer===0&&this.mag<=709.7?A(Math.exp(this.sign*this.mag)):this.layer===0?me(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?me(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):me(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return A(Math.sqrt(this.sign*this.mag));if(this.layer===1)return me(1,2,Math.log10(this.mag)-.3010299956639812);{const e=I.div(Ne(this.sign,this.layer-1,this.mag),Ne(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=Ne(1,0,1)){if(e===1)return I.pow(this,t);if(e===0)return new I(t);if(this.eq(I.dOne))return I.dOne;if(this.eq(-1))return I.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new I(Math.E);const s=I.ln(this).neg();return s.lambertw().div(s)}else return o>1.444667861009766?new I(Number.POSITIVE_INFINITY):I.dNaN}if(this.eq(I.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new I(o)}if(e<0)return I.iteratedlog(t,this,-e);t=A(t);const l=e;e=Math.trunc(e);const n=l-e;if(this.gt(I.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o3)return Ne(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=Ne(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return I.tetrate(e,-t,this);e=A(e);let l=A(this);const n=t;t=Math.trunc(t);const o=n-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;s1e4)return l}return o>0&&o<1&&(e.eq(10)?l=l.layeradd10(-o):l=l.layeradd(-o,e)),l}slog(e=10){if(e=A(e),e.lte(I.dZero)||e.eq(I.dOne))return I.dNaN;if(e.lt(I.dOne))return this.eq(I.dOne)?I.dZero:this.eq(I.dZero)?I.dNegOne:I.dNaN;if(this.mag<0||this.eq(I.dZero))return I.dNegOne;let t=0,l=A(this);if(l.layer-e.layer>3){const n=l.layer-e.layer-3;t+=n,l.layer-=n}for(let n=0;n<100;++n)if(l.lt(I.dZero))l=I.pow(e,l),t-=1;else{if(l.lte(I.dOne))return A(t+I.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=I.log(l,e)}return A(t)}static slog_critical(e,t){return e>10?t-1:I.critical_section(e,t,zi)}static tetrate_critical(e,t){return I.critical_section(e,t,Ji)}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 n=0,o=0;for(let c=0;ce){const p=(e-Cl[c])/(Cl[c+1]-Cl[c]);n=l[c][Math.floor(t)]*(1-p)+l[c+1][Math.floor(t)]*p,o=l[c][Math.ceil(t)]*(1-p)+l[c+1][Math.ceil(t)]*p;break}const s=t-Math.floor(t);return n*(1-s)+o*s}layeradd10(e){e=I.fromValue_noAlloc(e).toNumber();const t=A(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 n=0;n<100;++n){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const n=this.slog(t).toNumber()+e;return n>=0?I.tetrate(t,n):Number.isFinite(n)?n>=-1?I.log(I.tetrate(t,n+1),t):I.log(I.log(I.tetrate(t,n+2),t),t):I.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return A(Ja(this.toNumber()));if(this.layer===0)return A(Ja(this.sign*this.mag));if(this.layer===1)return za(this);if(this.layer===2)return za(this);if(this.layer>=3)return Ne(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return Ne(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=Ne(1,0,1)){t=A(t);const l=e;e=Math.trunc(e);const n=l-e;n!==0&&(t.eq(I.dOne)?(++e,t=new I(n)):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let o=0;o10)return t}return t}sin(){return this.mag<0?this:this.layer===0?A(Math.sin(this.sign*this.mag)):Ne(0,0,0)}cos(){return this.mag<0?I.dOne:this.layer===0?A(Math.cos(this.sign*this.mag)):Ne(0,0,0)}tan(){return this.mag<0?this:this.layer===0?A(Math.tan(this.sign*this.mag)):Ne(0,0,0)}asin(){return this.mag<0?this:this.layer===0?A(Math.asin(this.sign*this.mag)):Ne(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?A(Math.acos(this.toNumber())):this.layer===0?A(Math.acos(this.sign*this.mag)):Ne(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?A(Math.atan(this.sign*this.mag)):A(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 I.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return I.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?Ne(Number.NaN,Number.NaN,Number.NaN):I.ln(this.add(1).div(A(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(I.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 a=I;a.dZero=Ne(0,0,0);a.dOne=Ne(1,0,1);a.dNegOne=Ne(-1,0,1);a.dTwo=Ne(1,0,2);a.dTen=Ne(1,0,10);a.dNaN=Ne(Number.NaN,Number.NaN,Number.NaN);a.dInf=Ne(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=Ne(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=me(1,0,Number.MAX_VALUE);a.dNumberMin=me(1,0,Number.MIN_VALUE);const Xi=new a(1);function Ol(e,t,l=!0){let n=a.log10(e).floor(),o=a.div(e,a.pow(10,n));o.toStringWithDecimalPlaces(t)==="10"&&(o=Xi,n=n.add(1));const s=n.gte(1e9)?he(n,Math.max(Math.max(t,3),$e.defaultDecimalsShown)):n.gte(1e4)?aa(n,0):n.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function aa(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const n=e.toStringWithDecimalPlaces(t).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function mn(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),$e.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Yi=new a("eeee1000"),Zi=new a("e100000"),Ka=new a("e1000"),vn=new a(1e9),eo=new a(1e6),to=new a(1e3),lo=new a(.98),ao=new a(.001),gn=new a(0);function he(e,t,l){if(t==null&&(t=$e.defaultDecimalsShown),l=l!=null?l:$e.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+he(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Yi)){const n=e.slog();return n.gte(eo)?"F"+he(n.floor()):a.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+aa(n.floor(),0)}else{if(e.gte(Zi))return Ol(e,0,!1);if(e.gte(Ka))return Ol(e,0);if(e.gte(vn))return Ol(e,t);if(e.gte(to))return aa(e,0);if(e.gte(ao)||!l)return mn(e,t);if(e.eq(gn))return 0 .toFixed(t)}return e=fn(e),e.lt(Ka)?Ol(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):he(e,t)+"\u207B\xB9"}function ve(e){return e=new a(e),e.sign<0?"-"+ve(e.neg()):e.gte(vn)||e.lte(lo)&&!e.eq(gn)?he(e):he(e,0)}function Ba(e,t){return t==null&&(t=$e.defaultDecimalsShown),a.lt(e,0)?"-"+Ba(a.neg(e),t):a.gt(e,2**51)?he(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?he(e)+"s":e<3600?ve(Math.floor(e/60))+"m "+he(e%60,t)+"s":e<86400?ve(Math.floor(e/3600))+"h "+ve(Math.floor(e/60)%60)+"m "+ve(e%60)+"s":e<31536e3?ve(Math.floor(e/84600)%365)+"d "+ve(Math.floor(e/3600)%24)+"h "+ve(Math.floor(e/60)%60)+"m":ve(Math.floor(e/31536e3))+"y "+ve(Math.floor(e/84600)%365)+"d "+ve(Math.floor(e/3600)%24)+"h")}function no(e,t,l){e=new a(e);let n=e.toStringWithDecimalPlaces(t);return new a(n).gte(l)&&(n=a.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),n}function io(e,t){return he(e,t,!0)}function fn(e){let t=a.log10(e).ceil();const l=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(l),e}function hn(e,t,l=a.dOne){let n=e[0][0],o=e[0][1];for(let s=1;s(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Ie||{});const ql=Symbol("DoNotCache");function q(e,t){const l=e[t];_a(l)&&l.length===0&&!l[ql]?e[t]=g(l.bind(e)):_a(l)&&(e[t]=l.bind(e),e[t][ql]=!0)}function ht(e){return _a(e)&&!e[ql]&&(e=g(e)),e}const Kt=Symbol("Component"),al=Symbol("GatherProps");let vo=0;function bl(e="feature-"){return e+vo++}var Je=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Je||{});function S(e){return e[ql]=!0,e}function B(e,t=2){return e?0:t}function gt(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function An(e,...t){const l=[],n=o=>{Object.keys(o).forEach(s=>{const d=o[s];d&&typeof d=="object"&&(t.includes(d.type)?l.push(d):!(d instanceof a)&&!vt(d)&&n(d))})};return n(e),l}const kl={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 Na=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Na||{}),Bl={classic:kl,paper:{...kl,variables:{...kl.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:{...kl,variables:{...kl.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:{...kl,variables:{...kl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const je=dn();document.fonts.onloadingdone=()=>je.emit("fontsLoaded");var go=Object.freeze(Object.defineProperty({__proto__:null,globalBus:je},Symbol.toStringTag,{value:"Module"}));var Te=(e,t)=>{const l=e.__vccOpts||e;for(const[n,o]of t)l[n]=o;return l};const fo=ce({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var y;const l=j({}),n=new ResizeObserver(c),o=j(null);oa(()=>{const h=o.value;h!=null&&n.observe(h)});let s=!0,d=j((y=o.value)==null?void 0:y.getBoundingClientRect());function c(){s&&(s=!1,_l(()=>{var h;d.value=(h=o.value)==null?void 0:h.getBoundingClientRect(),Object.values(l.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",l.value),s=!0}))}je.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};Yl(Ia,(h,b)=>{const v=new MutationObserver(()=>m(h));v.observe(b,p),l.value[h]={element:b,observer:v,rect:b.getBoundingClientRect()},c()}),Yl(Ma,h=>{var b;(b=l.value[h])==null||b.observer.disconnect(),l.value[h]=void 0,c()}),Yl(Da,l),Yl(xa,d);function m(h){const b=l.value[h];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,b)=>(w(),D(N,null,[Lt(h.$slots,"default",{},void 0,!0),f("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var Cn=Te(fo,[["__scopeId","data-v-2b1dc1bc"]]);const ho=["onPointerdown"],yo={class:"modal-wrapper"},bo={class:"modal-container"},wo={class:"modal-header"},Ao=u(" default header "),Co={class:"modal-body"},ko=u(" default body "),Eo={class:"modal-footer"},_o=f("div",{class:"modal-default-flex-grow"},null,-1),yt=ce({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=pt(e),s=g(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=j(!1),p=j(null),m=g(()=>{var y,h;return(h=(y=p.value)==null?void 0:y.nodes)!=null?h:null});return t({isOpen:s,nodes:m}),(y,h)=>(w(),oe(ii,{to:"#modal-root"},[i(ra,{name:"modal",onBeforeEnter:h[0]||(h[0]=b=>c.value=!0),onAfterLeave:h[1]||(h[1]=b=>c.value=!1)},{default:ue(()=>[sa(f("div",hl({class:"modal-mask",onPointerdown:$l(d,["self"])},y.$attrs),[f("div",yo,[f("div",bo,[f("div",wo,[Lt(y.$slots,"header",{shown:r(s)},()=>[Ao])]),f("div",Co,[i(Cn,{ref_key:"contextRef",ref:p},{default:ue(()=>[Lt(y.$slots,"body",{shown:r(s)},()=>[ko])]),_:3},512)]),f("div",Eo,[Lt(y.$slots,"footer",{shown:r(s)},()=>[f("div",{class:"modal-default-footer"},[_o,f("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,ho),[[rn,e.modelValue]])]),_:3})]))}}),Ia=Symbol("RegisterNode"),Ma=Symbol("UnregisterNode"),Da=Symbol("Nodes"),xa=Symbol("Bounds"),Ct=ua({});window.layers=Ct;const Ml={},qt=[];function Ut(e,t){return kt(()=>{const l={},n=l.emitter=dn();if(l.on=n.on.bind(n),l.emit=n.emit.bind(n),l.nodes=j({}),l.id=e,qt.push(e),Ml[e]=new Set,l.minimized=Se(!1),Object.assign(l,t.call(l)),qt[qt.length-1]==null||qt[qt.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen -Stack: ${qt} -Trying to pop ${l.id}`;return qt.pop(),q(l,"color"),q(l,"display"),q(l,"name"),gt(l,"name",l.id),q(l,"minWidth"),gt(l,"minWidth",600),q(l,"minimizable"),gt(l,"minimizable",!0),l})}function kn(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}gt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Ct[e.id]=e,je.emit("addLayer",e,t.layers[e.id])}function So(e){return Ct[e]}function En(e){console.info("Removing layer",e.id),je.emit("removeLayer",e),Ct[e.id]=void 0}function Bo(e){En(e),kn(e,ie)}function No(e){const t=j(!1);return{openModal:()=>t.value=!0,modal:S(()=>i(yt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}je.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 Io=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ia,UnregisterNodeInjectionKey:Ma,NodesInjectionKey:Da,BoundsInjectionKey:xa,layers:Ct,persistentRefs:Ml,addingLayers:qt,createLayer:Ut,addLayer:kn,getLayer:So,removeLayer:En,reloadLayer:Bo,setupLayerModal:No},Symbol.toStringTag,{value:"Module"}));const Pa=Symbol("PersistentState"),fl=Symbol("DefaultValue"),ia=Symbol("StackTrace"),_n=Symbol("Deleted"),Ql=Symbol("NonPersistent"),Gl=Symbol("SaveDataPath");function Mo(){var e;return((e=new Error().stack)==null?void 0:e.split(` +/* empty css */import"./vue.92681fcb.js";import{Z as g,l as vt,aa as ce,t as W,ay as oa,ar as _l,aE as w,a0 as D,aK as Vt,a1 as f,O as N,aG as Yl,A as pt,_ as oe,a8 as i,b6 as ue,b8 as sa,bs as rn,C as r,aq as hl,bu as Gl,bb as ra,T as ii,a7 as u,u as ua,j as oi,bv as Ea,q as jl,b1 as Jt,G as et,aC as un,w as Rt,b2 as Ft,ao as si,I as it,J as Be,$ as q,aH as rl,aF as ul,z as zt,aN as ze,al as ta,aL as ll,H as ri,aJ as Sa,bn as ui,br as di,be as ci}from"./@vue.4ce677c2.js";import{c as dn}from"./nanoevents.1080beb7.js";import{L as vl}from"./lz-string.731cedc5.js";import{i as pi}from"./is-plain-object.906d88e8.js";import{Y as mi}from"./vue-next-select.a2bfab1d.js";import{s as vi,u as cn}from"./vue-toastification.6f567382.js";import{D as gi}from"./vuedraggable.7949458c.js";import{p as fi}from"./vue-textarea-autosize.35804eaf.js";import{v as hi,n as yi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const d of s.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}};bi();const wi="modulepreload",ja={},Ai="./",la=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${Ai}${n}`,n in ja)return;ja[n]=!0;const o=n.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":wi,o||(d.as="script",d.crossOrigin=""),d.href=n,document.head.appendChild(d),o)return new Promise((c,p)=>{d.addEventListener("load",c),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Ci="./projInfo-schema.json",ki="Advent Incremental",Ei="An incremental game you play a day at a time, leading up to Christmas!",_i="advent-incremental",Si="thepaperpilot and friends",Bi="",Ni="",Mi="0.3",Ii="Initial Commit",Di=!0,xi=!1,Pi=2,Ti=!0,Fi=null,Ui="",Ri=["main"],Oi=3600,qi=0,Gi=!0,$i="base64";var Ge={$schema:Ci,title:ki,description:Ei,id:_i,author:Si,discordName:Bi,discordLink:Ni,versionNumber:Mi,versionTitle:Ii,allowGoBack:Di,defaultShowSmall:xi,defaultDecimalsShown:Pi,useHeader:Ti,banner:Fi,logo:Ui,initialTabs:Ri,maxTickLength:Oi,offlineLimit:qi,enablePausing:Gi,exportEncoding:$i};const ya=17,Qi=9e15,Li=Math.log10(9e15),Vi=1/9e15,Hi=308,ji=-324,Wa=5,Wi=function(){const e=[];for(let l=ji+1;l<=Hi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Cl=[2,Math.E,3,4,5,6,7,8,9,10],Ji=[[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]],zi=[[-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]],A=function(t){return a.fromValue_noAlloc(t)},ge=function(e,t,l){return a.fromComponents(e,t,l)},Ne=function(t,l,n){return a.fromComponents_noNormalize(t,l,n)},ml=function(t,l){const n=l+1,o=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,n-o))*Math.pow(10,o-n);return parseFloat(s.toFixed(Math.max(n-o,0)))},ba=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Ki=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 n=e*e;let o=e;return l=l+1/(12*o),o=o*n,l=l+1/(360*o),o=o*n,l=l+1/(1260*o),o=o*n,l=l+1/(1680*o),o=o*n,l=l+1/(1188*o),o=o*n,l=l+691/(360360*o),o=o*n,l=l+7/(1092*o),o=o*n,l=l+3617/(122400*o),Math.exp(l)/t},pn=.5671432904097838,Ja=function(e,t=1e-10){let l,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return pn;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let o=0;o<100;++o){if(n=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(n-l).5?1:-1;if(Math.random()*20<1)return Ne(t,0,1);const l=Math.floor(Math.random()*(e+1));let n=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let o=Math.pow(10,n);return Math.random()>.9&&(o=Math.trunc(o)),ge(t,l,o)}static affordGeometricSeries_core(e,t,l,n){const o=t.mul(l.pow(n));return M.floor(e.div(o).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,n){return t.mul(l.pow(n)).mul(M.sub(1,l.pow(e))).div(M.sub(1,l))}static affordArithmeticSeries_core(e,t,l,n){const s=t.add(n.mul(l)).sub(l.div(2)),d=s.pow(2);return s.neg().add(d.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,n){const o=t.add(n.mul(l));return e.div(2).mul(o.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=Qi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)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 b=parseFloat(t[0]),v=parseFloat(t[1]),E=t[1].split(";");let _=1;if(E.length===2&&(_=parseFloat(E[1]),isFinite(_)||(_=1)),isFinite(b)&&isFinite(v)){const x=M.pentate(b,v,_);return this.sign=x.sign,this.layer=x.layer,this.mag=x.mag,this}}const l=e.split("^^");if(l.length===2){const b=parseFloat(l[0]),v=parseFloat(l[1]),E=l[1].split(";");let _=1;if(E.length===2&&(_=parseFloat(E[1]),isFinite(_)||(_=1)),isFinite(b)&&isFinite(v)){const x=M.tetrate(b,v,_);return this.sign=x.sign,this.layer=x.layer,this.mag=x.mag,this}}const n=e.split("^");if(n.length===2){const b=parseFloat(n[0]),v=parseFloat(n[1]);if(isFinite(b)&&isFinite(v)){const E=M.pow(b,v);return this.sign=E.sign,this.layer=E.layer,this.mag=E.mag,this}}e=e.trim().toLowerCase();let o,s,d=e.split("pt");if(d.length===2){o=10,s=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let b=parseFloat(d[1]);if(isFinite(b)||(b=1),isFinite(o)&&isFinite(s)){const v=M.tetrate(o,s,b);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(d=e.split("p"),d.length===2){o=10,s=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let b=parseFloat(d[1]);if(isFinite(b)||(b=1),isFinite(o)&&isFinite(s)){const v=M.tetrate(o,s,b);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),p=c.length-1;if(p===0){const b=parseFloat(e);if(isFinite(b))return this.fromNumber(b)}else if(p===1){const b=parseFloat(e);if(isFinite(b)&&b!==0)return this.fromNumber(b)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let b="";for(let v=0;v=43&&E<=57||E===101)b+=m[1].charAt(v);else return this.layer=parseFloat(b),this.mag=parseFloat(m[1].substr(v+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 h=parseFloat(c[c.length-1]);if(p>=2){const b=parseFloat(c[c.length-2]);isFinite(b)&&(h*=Math.sign(b),h+=ba(b))}if(!isFinite(y))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=h;else if(p===1)this.sign=Math.sign(y),this.layer=1,this.mag=h+Math.log10(Math.abs(y));else if(this.sign=Math.sign(y),this.layer=p,p===2){const b=M.mul(ge(1,2,h),A(y));return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,this}else this.mag=h;return this.normalize(),this}fromValue(e){return e instanceof M||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:ml(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:ml(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<=Wa?(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):ml(this.m,e)+"e"+ml(this.e,e):this.layer===1?ml(this.m,e)+"e"+ml(this.e,e):this.layer<=Wa?(this.sign===-1?"-":"")+"e".repeat(this.layer)+ml(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+ml(this.mag,e)}abs(){return Ne(this.sign===0?0:1,this.layer,this.mag)}neg(){return Ne(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?M.dZero:this.layer===0?ge(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?M.dZero:this.layer===0?ge(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?M.dZero:this.layer===0?ge(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?M.dZero:this.layer===0?ge(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=A(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 Ne(0,0,0);let l,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(M.cmpabs(this,t)>0?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return A(l.sign*l.mag+n.sign*n.mag);const o=l.layer*Math.sign(l.mag),s=n.layer*Math.sign(n.mag);if(o-s>=2)return l;if(o===0&&s===-1){if(Math.abs(n.mag-Math.log10(l.mag))>ya)return l;{const d=Math.pow(10,Math.log10(l.mag)-n.mag),c=n.sign+l.sign*d;return ge(Math.sign(c),1,n.mag+Math.log10(Math.abs(c)))}}if(o===1&&s===0){if(Math.abs(l.mag-Math.log10(n.mag))>ya)return l;{const d=Math.pow(10,l.mag-Math.log10(n.mag)),c=n.sign+l.sign*d;return ge(Math.sign(c),1,Math.log10(n.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-n.mag)>ya)return l;{const d=Math.pow(10,l.mag-n.mag),c=n.sign+l.sign*d;return ge(Math.sign(c),1,n.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(A(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return Ne(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return Ne(this.sign*t.sign,0,1);let l,n;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return A(l.sign*n.sign*l.mag*n.mag);if(l.layer>=3||l.layer-n.layer>=2)return ge(l.sign*n.sign,l.layer,l.mag);if(l.layer===1&&n.layer===0)return ge(l.sign*n.sign,1,l.mag+Math.log10(n.mag));if(l.layer===1&&n.layer===1)return ge(l.sign*n.sign,1,l.mag+n.mag);if(l.layer===2&&n.layer===1){const o=ge(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ge(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return ge(l.sign*n.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&n.layer===2){const o=ge(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ge(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return ge(l.sign*n.sign,o.layer+1,o.sign*o.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=A(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?M.dNaN:this.layer===0?ge(this.sign,0,1/this.mag):ge(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=A(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,n=t.mag>0?t.layer:-t.layer;return l>n?1:lt.mag?1:this.mag0?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=A(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=A(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let n=this.mag,o=l.mag;return this.layer>l.layer&&(o=ba(o)),this.layer0?ge(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ge(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?M.dNaN:this.layer>0?ge(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ge(this.sign,0,Math.log10(this.mag))}log(e){return e=A(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?M.dNaN:this.layer===0&&e.layer===0?ge(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):M.div(this.log10(),e.log10())}log2(){return this.sign<=0?M.dNaN:this.layer===0?ge(this.sign,0,Math.log2(this.mag)):this.layer===1?ge(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ge(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ge(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?M.dNaN:this.layer===0?ge(this.sign,0,Math.log(this.mag)):this.layer===1?ge(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ge(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ge(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=A(e),l=this,n=t;if(l.sign===0)return n.eq(0)?Ne(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(n.sign===0)return Ne(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return l;const o=l.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?o.neg():Math.abs(n.toNumber()%2)%2===0?o:M.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return M.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 ge(1,0,t);if(e.sign===0)return M.dOne;e=Ne(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ge(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ge(-e.sign,e.layer+1,-e.mag):M.dOne}pow_base(e){return A(e).pow(this)}root(e){const t=A(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?M.exp(M.mul(this,M.ln(this).sub(1))):M.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(Ne(1,0,24)))return A(Ki(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 n=e,o=12*n,s=1/o,d=t+s;if(d===t||(t=d,n=n*l,o=360*n,s=1/o,d=t-s,d===t))return M.exp(t);t=d,n=n*l,o=1260*n;let c=1/o;return t=t+c,n=n*l,o=1680*n,c=1/o,t=t-c,M.exp(t)}else return this.layer===1?M.exp(M.mul(this,M.ln(this).sub(1))):M.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?M.dOne:this.layer===0&&this.mag<=709.7?A(Math.exp(this.sign*this.mag)):this.layer===0?ge(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ge(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ge(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return A(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ge(1,2,Math.log10(this.mag)-.3010299956639812);{const e=M.div(Ne(this.sign,this.layer-1,this.mag),Ne(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=Ne(1,0,1)){if(e===1)return M.pow(this,t);if(e===0)return new M(t);if(this.eq(M.dOne))return M.dOne;if(this.eq(-1))return M.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new M(Math.E);const s=M.ln(this).neg();return s.lambertw().div(s)}else return o>1.444667861009766?new M(Number.POSITIVE_INFINITY):M.dNaN}if(this.eq(M.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new M(o)}if(e<0)return M.iteratedlog(t,this,-e);t=A(t);const l=e;e=Math.trunc(e);const n=l-e;if(this.gt(M.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o3)return Ne(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=Ne(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return M.tetrate(e,-t,this);e=A(e);let l=A(this);const n=t;t=Math.trunc(t);const o=n-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;s1e4)return l}return o>0&&o<1&&(e.eq(10)?l=l.layeradd10(-o):l=l.layeradd(-o,e)),l}slog(e=10){if(e=A(e),e.lte(M.dZero)||e.eq(M.dOne))return M.dNaN;if(e.lt(M.dOne))return this.eq(M.dOne)?M.dZero:this.eq(M.dZero)?M.dNegOne:M.dNaN;if(this.mag<0||this.eq(M.dZero))return M.dNegOne;let t=0,l=A(this);if(l.layer-e.layer>3){const n=l.layer-e.layer-3;t+=n,l.layer-=n}for(let n=0;n<100;++n)if(l.lt(M.dZero))l=M.pow(e,l),t-=1;else{if(l.lte(M.dOne))return A(t+M.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=M.log(l,e)}return A(t)}static slog_critical(e,t){return e>10?t-1:M.critical_section(e,t,zi)}static tetrate_critical(e,t){return M.critical_section(e,t,Ji)}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 n=0,o=0;for(let c=0;ce){const p=(e-Cl[c])/(Cl[c+1]-Cl[c]);n=l[c][Math.floor(t)]*(1-p)+l[c+1][Math.floor(t)]*p,o=l[c][Math.ceil(t)]*(1-p)+l[c+1][Math.ceil(t)]*p;break}const s=t-Math.floor(t);return n*(1-s)+o*s}layeradd10(e){e=M.fromValue_noAlloc(e).toNumber();const t=A(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 n=0;n<100;++n){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const n=this.slog(t).toNumber()+e;return n>=0?M.tetrate(t,n):Number.isFinite(n)?n>=-1?M.log(M.tetrate(t,n+1),t):M.log(M.log(M.tetrate(t,n+2),t),t):M.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return A(Ja(this.toNumber()));if(this.layer===0)return A(Ja(this.sign*this.mag));if(this.layer===1)return za(this);if(this.layer===2)return za(this);if(this.layer>=3)return Ne(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return Ne(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=Ne(1,0,1)){t=A(t);const l=e;e=Math.trunc(e);const n=l-e;n!==0&&(t.eq(M.dOne)?(++e,t=new M(n)):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,this));for(let o=0;o10)return t}return t}sin(){return this.mag<0?this:this.layer===0?A(Math.sin(this.sign*this.mag)):Ne(0,0,0)}cos(){return this.mag<0?M.dOne:this.layer===0?A(Math.cos(this.sign*this.mag)):Ne(0,0,0)}tan(){return this.mag<0?this:this.layer===0?A(Math.tan(this.sign*this.mag)):Ne(0,0,0)}asin(){return this.mag<0?this:this.layer===0?A(Math.asin(this.sign*this.mag)):Ne(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?A(Math.acos(this.toNumber())):this.layer===0?A(Math.acos(this.sign*this.mag)):Ne(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?A(Math.atan(this.sign*this.mag)):A(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 M.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return M.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?Ne(Number.NaN,Number.NaN,Number.NaN):M.ln(this.add(1).div(A(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(M.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 a=M;a.dZero=Ne(0,0,0);a.dOne=Ne(1,0,1);a.dNegOne=Ne(-1,0,1);a.dTwo=Ne(1,0,2);a.dTen=Ne(1,0,10);a.dNaN=Ne(Number.NaN,Number.NaN,Number.NaN);a.dInf=Ne(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=Ne(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=ge(1,0,Number.MAX_VALUE);a.dNumberMin=ge(1,0,Number.MIN_VALUE);const Xi=new a(1);function Ol(e,t,l=!0){let n=a.log10(e).floor(),o=a.div(e,a.pow(10,n));o.toStringWithDecimalPlaces(t)==="10"&&(o=Xi,n=n.add(1));const s=n.gte(1e9)?be(n,Math.max(Math.max(t,3),Ge.defaultDecimalsShown)):n.gte(1e4)?aa(n,0):n.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function aa(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const n=e.toStringWithDecimalPlaces(t).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function mn(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),Ge.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Yi=new a("eeee1000"),Zi=new a("e100000"),Ka=new a("e1000"),vn=new a(1e9),eo=new a(1e6),to=new a(1e3),lo=new a(.98),ao=new a(.001),gn=new a(0);function be(e,t,l){if(t==null&&(t=Ge.defaultDecimalsShown),l=l!=null?l:Ge.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+be(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Yi)){const n=e.slog();return n.gte(eo)?"F"+be(n.floor()):a.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+aa(n.floor(),0)}else{if(e.gte(Zi))return Ol(e,0,!1);if(e.gte(Ka))return Ol(e,0);if(e.gte(vn))return Ol(e,t);if(e.gte(to))return aa(e,0);if(e.gte(ao)||!l)return mn(e,t);if(e.eq(gn))return 0 .toFixed(t)}return e=fn(e),e.lt(Ka)?Ol(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):be(e,t)+"\u207B\xB9"}function fe(e){return e=new a(e),e.sign<0?"-"+fe(e.neg()):e.gte(vn)||e.lte(lo)&&!e.eq(gn)?be(e):be(e,0)}function Ba(e,t){return t==null&&(t=Ge.defaultDecimalsShown),a.lt(e,0)?"-"+Ba(a.neg(e),t):a.gt(e,2**51)?be(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?be(e)+"s":e<3600?fe(Math.floor(e/60))+"m "+be(e%60,t)+"s":e<86400?fe(Math.floor(e/3600))+"h "+fe(Math.floor(e/60)%60)+"m "+fe(e%60)+"s":e<31536e3?fe(Math.floor(e/84600)%365)+"d "+fe(Math.floor(e/3600)%24)+"h "+fe(Math.floor(e/60)%60)+"m":fe(Math.floor(e/31536e3))+"y "+fe(Math.floor(e/84600)%365)+"d "+fe(Math.floor(e/3600)%24)+"h")}function no(e,t,l){e=new a(e);let n=e.toStringWithDecimalPlaces(t);return new a(n).gte(l)&&(n=a.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),n}function io(e,t){return be(e,t,!0)}function fn(e){let t=a.log10(e).ceil();const l=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(l),e}function hn(e,t,l=a.dOne){let n=e[0][0],o=e[0][1];for(let s=1;s(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Me||{});const $l=Symbol("DoNotCache");function Q(e,t){const l=e[t];_a(l)&&l.length===0&&!l[$l]?e[t]=g(l.bind(e)):_a(l)&&(e[t]=l.bind(e),e[t][$l]=!0)}function ht(e){return _a(e)&&!e[$l]&&(e=g(e)),e}const Kt=Symbol("Component"),al=Symbol("GatherProps");let vo=0;function bl(e="feature-"){return e+vo++}var Je=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Je||{});function S(e){return e[$l]=!0,e}function B(e,t=2){return e?0:t}function gt(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function An(e,...t){const l=[],n=o=>{Object.keys(o).forEach(s=>{const d=o[s];d&&typeof d=="object"&&(t.includes(d.type)?l.push(d):!(d instanceof a)&&!vt(d)&&n(d))})};return n(e),l}const kl={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 Na=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Na||{}),Bl={classic:kl,paper:{...kl,variables:{...kl.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:{...kl,variables:{...kl.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:{...kl,variables:{...kl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const je=dn();document.fonts.onloadingdone=()=>je.emit("fontsLoaded");var go=Object.freeze(Object.defineProperty({__proto__:null,globalBus:je},Symbol.toStringTag,{value:"Module"}));var Te=(e,t)=>{const l=e.__vccOpts||e;for(const[n,o]of t)l[n]=o;return l};const fo=ce({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var y;const l=W({}),n=new ResizeObserver(c),o=W(null);oa(()=>{const h=o.value;h!=null&&n.observe(h)});let s=!0,d=W((y=o.value)==null?void 0:y.getBoundingClientRect());function c(){s&&(s=!1,_l(()=>{var h;d.value=(h=o.value)==null?void 0:h.getBoundingClientRect(),Object.values(l.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",l.value),s=!0}))}je.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};Yl(Ma,(h,b)=>{const v=new MutationObserver(()=>m(h));v.observe(b,p),l.value[h]={element:b,observer:v,rect:b.getBoundingClientRect()},c()}),Yl(Ia,h=>{var b;(b=l.value[h])==null||b.observer.disconnect(),l.value[h]=void 0,c()}),Yl(Da,l),Yl(xa,d);function m(h){const b=l.value[h];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,b)=>(w(),D(N,null,[Vt(h.$slots,"default",{},void 0,!0),f("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var Cn=Te(fo,[["__scopeId","data-v-2b1dc1bc"]]);const ho=["onPointerdown"],yo={class:"modal-wrapper"},bo={class:"modal-container"},wo={class:"modal-header"},Ao=u(" default header "),Co={class:"modal-body"},ko=u(" default body "),Eo={class:"modal-footer"},_o=f("div",{class:"modal-default-flex-grow"},null,-1),yt=ce({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=pt(e),s=g(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=W(!1),p=W(null),m=g(()=>{var y,h;return(h=(y=p.value)==null?void 0:y.nodes)!=null?h:null});return t({isOpen:s,nodes:m}),(y,h)=>(w(),oe(ii,{to:"#modal-root"},[i(ra,{name:"modal",onBeforeEnter:h[0]||(h[0]=b=>c.value=!0),onAfterLeave:h[1]||(h[1]=b=>c.value=!1)},{default:ue(()=>[sa(f("div",hl({class:"modal-mask",onPointerdown:Gl(d,["self"])},y.$attrs),[f("div",yo,[f("div",bo,[f("div",wo,[Vt(y.$slots,"header",{shown:r(s)},()=>[Ao])]),f("div",Co,[i(Cn,{ref_key:"contextRef",ref:p},{default:ue(()=>[Vt(y.$slots,"body",{shown:r(s)},()=>[ko])]),_:3},512)]),f("div",Eo,[Vt(y.$slots,"footer",{shown:r(s)},()=>[f("div",{class:"modal-default-footer"},[_o,f("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,ho),[[rn,e.modelValue]])]),_:3})]))}}),Ma=Symbol("RegisterNode"),Ia=Symbol("UnregisterNode"),Da=Symbol("Nodes"),xa=Symbol("Bounds"),Ct=ua({});window.layers=Ct;const Il={},$t=[];function Ut(e,t){return kt(()=>{const l={},n=l.emitter=dn();if(l.on=n.on.bind(n),l.emit=n.emit.bind(n),l.nodes=W({}),l.id=e,$t.push(e),Il[e]=new Set,l.minimized=Se(!1),Object.assign(l,t.call(l)),$t[$t.length-1]==null||$t[$t.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen +Stack: ${$t} +Trying to pop ${l.id}`;return $t.pop(),Q(l,"color"),Q(l,"display"),Q(l,"name"),gt(l,"name",l.id),Q(l,"minWidth"),gt(l,"minWidth",600),Q(l,"minimizable"),gt(l,"minimizable",!0),l})}function kn(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}gt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Ct[e.id]=e,je.emit("addLayer",e,t.layers[e.id])}function So(e){return Ct[e]}function En(e){console.info("Removing layer",e.id),je.emit("removeLayer",e),Ct[e.id]=void 0}function Bo(e){En(e),kn(e,ie)}function No(e){const t=W(!1);return{openModal:()=>t.value=!0,modal:S(()=>i(yt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}je.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 Mo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ma,UnregisterNodeInjectionKey:Ia,NodesInjectionKey:Da,BoundsInjectionKey:xa,layers:Ct,persistentRefs:Il,addingLayers:$t,createLayer:Ut,addLayer:kn,getLayer:So,removeLayer:En,reloadLayer:Bo,setupLayerModal:No},Symbol.toStringTag,{value:"Module"}));const Pa=Symbol("PersistentState"),fl=Symbol("DefaultValue"),ia=Symbol("StackTrace"),_n=Symbol("Deleted"),Ql=Symbol("NonPersistent"),ql=Symbol("SaveDataPath");function Io(){var e;return((e=new Error().stack)==null?void 0:e.split(` `).slice(3,5).map(t=>t.trim()).join(` -`))||""}function Se(e){const t=vt(e)?e:j(e);t[Pa]=t,t[fl]=vt(e)?e.value:e,t[ia]=Mo(),t[_n]=!1;const l=g({get(){return t.value},set(n){t.value=n}});return l[fl]=t[fl],t[Ql]=l,t[Gl]=void 0,qt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` +`))||""}function Se(e){const t=vt(e)?e:W(e);t[Pa]=t,t[fl]=vt(e)?e.value:e,t[ia]=Io(),t[_n]=!1;const l=g({get(){return t.value},set(n){t.value=n}});return l[fl]=t[fl],t[Ql]=l,t[ql]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` Created at: -`+t[ia]):Ml[qt[qt.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&Pa in e}function T(e){return e[Ql]}je.on("addLayer",(e,t)=>{const l=[],n=(o,s=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let p=o[c];if(p&&typeof p=="object")if(ut in p&&(p=p[ut]),Do(p)){if(d=!0,p[_n]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,` +`+t[ia]):Il[$t[$t.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&Pa in e}function T(e){return e[Ql]}je.on("addLayer",(e,t)=>{const l=[],n=(o,s=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let p=o[c];if(p&&typeof p=="object")if(ut in p&&(p=p[ut]),Do(p)){if(d=!0,p[_n]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,` Created at: -`+p[ia]);return}Ml[e.id].delete(p);const m=[e.id,...s,c];p[Gl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Gl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Gl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Gl]=m;const y=s.reduce((b,v)=>(v in b||(b[v]={}),b[v]),t),h=y[c];y[c]=p[Pa],oi(y)?h!=null?y[c]=h:y[c]=p[fl]:h!=null?y[c].value=h:y[c].value=p[fl]}else!(p instanceof a)&&!vt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,c])&&(Ea(p)&&!Ea(o)?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.",ut in o?o[ut]:o,c):d=!0))}),d};n(e[ut]),Ml[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,` +`+p[ia]);return}Il[e.id].delete(p);const m=[e.id,...s,c];p[ql]!=null&&JSON.stringify(m)!==JSON.stringify(p[ql])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[ql].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[ql]=m;const y=s.reduce((b,v)=>(v in b||(b[v]={}),b[v]),t),h=y[c];y[c]=p[Pa],oi(y)?h!=null?y[c]=h:y[c]=p[fl]:h!=null?y[c].value=h:y[c].value=p[fl]}else!(p instanceof a)&&!vt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,c])&&(Ea(p)&&!Ea(o)?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.",ut in o?o[ut]:o,c):d=!0))}),d};n(e[ut]),Il[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,` Created at: -`+o[ia])}),Ml[e.id].clear()});const ut=Symbol("ProxyState"),Il=Symbol("ProxyPath");function kt(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(s,d){if(d===ut)return o();const c=o()[d];return c&&typeof c=="object"&&Ql in c?c[Ql]:c},set(s,d,c){return o()[d]=c,!0},has(s,d){return d===ut?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,d){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(s,d)}})}var dt=window.state=ua({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Sn=jl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Bn(e){return JSON.stringify(e,(t,l)=>r(l))}const Nn={get(e,t){var n;if(t===ut||t===Il)return e[t];const l=e[ut][t];if(t!=="value"&&(pi(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[ut])){const o=[...e[Il],t];e[t]=new Proxy({[ut]:l,[Il]:o},Nn)}return e[t]}return l},set(e,t,l,n){if(!dt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[ut][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Sn.autosave=!1,dt.hasNaN=!0,dt.NaNPath=[...e[Il],t],dt.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Il],t],e[ut]),"Attempted to set NaN value. See above for details"}return e[ut][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[ut])},has(e,t){return Reflect.has(e[ut],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ut],t)}};var ie=window.player=new Proxy({[ut]:Sn,[Il]:["player"]},Nn);function In(e={}){return Object.assign({id:`${$e.id}-0`,name:"Default Save",tabs:$e.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:$e.id,modVersion:$e.versionNumber,layers:{}},e)}function Qt(e){const t=vl.compressToUTF16(Bn(e!=null?e:ie[ut]));return localStorage.setItem((e!=null?e:ie[ut]).id,t),t}async function xo(){To();try{let e=localStorage.getItem(tt.active);if(e==null){await El(Dl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==$e.id){await El(Dl());return}t.id=tt.active,await El(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await El(Dl())}}function Dl(){const e=ea(),t=In({id:e});return Qt(t),tt.saves.push(e),t}function ea(){let e,t=0;do e=`${$e.id}-${t++}`;while(localStorage.getItem(e));return e}const Ta=j(!1);async function El(e){console.info("Loading save",e),Ta.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await la(()=>Promise.resolve().then(function(){return Io}),void 0),{fixOldSave:o,getInitialLayers:s}=await la(()=>Promise.resolve().then(function(){return Ur}),void 0);for(const d in t){const c=t[d];c&&l(c)}s(e).forEach(d=>n(d,e)),e=In(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,$e.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==$e.versionNumber&&o(e.modVersion,e),Object.assign(ie,e),tt.active=ie.id,je.emit("onLoad")}setInterval(()=>{ie.autosave&&Qt()},1e3);window.onbeforeunload=()=>{ie.autosave&&Qt()};window.save=Qt;const Po=window.hardReset=async()=>{await El(Dl())},Vl=jl({active:"",saves:[],showTPS:!0,theme:Na.Nordic,unthrottled:!1});Jt(Vl,e=>{const t=vl.compressToUTF16(JSON.stringify(e));localStorage.setItem($e.id,t)},{deep:!0});var tt=window.settings=Vl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Na.Nordic};je.emit("loadSettings",e),Object.assign(Vl,e),Po()};function To(){try{let e=localStorage.getItem($e.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Vl,t)}je.emit("loadSettings",Vl)}catch{}}const Mn=jl([]);function Fo(e){Mn.push(e)}const Dn=jl([]);function Uo(e){Dn.push(e)}const Ro=jl([]),Oo={class:"table"},Pt=ce({__name:"Column",setup(e){const t=g(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",Oo,[f("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Lt(l.$slots,"default")],2)]))}}),Go={class:"table"},Pl=ce({__name:"Row",setup(e){const t=g(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",Go,[f("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Lt(l.$slots,"default")],2)]))}});function Fa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!si(e)}function Pe(e,t="span"){return typeof e=="function"?ce({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),ce({template:e})):ce({render:()=>({})}):e}function ee(e){if($t(e))return typeof e=="function"?e():Pe(e);const t=e[Kt];return i(t,e[al](),null)}function We(...e){let t;return i(Pl,null,Fa(t=e.map(ee))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Pt,null,Fa(t=e.map(ee))?t:{default:()=>[t]})}function Sl(...e){return i("div",{class:"table-grid"},[e.map(t=>i("div",{class:{["row-grid"]:!0,mergeAdjacent:Bl[tt.theme].mergeAdjacent}},[t.map(ee)]))])}function jt(e){if($t(e))return typeof e=="function"?e():typeof e=="string"?i(N,null,[e]):i(e,null,null);const t=e[Kt];return i(t,e[al](),null)}function $o(...e){let t;return i(Pt,null,Fa(t=e.map(jt))?t:{default:()=>[t]})}function $t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ql]===!0}function xn(e,t,l){const n=j(null),o=j(void 0);function s(p){n.value||(n.value=setInterval(c,250)),o.value=p,l&&(l.value=!0)}function d(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return un(d),{start:s,stop:d,handleHolding:c}}function qo(e,t){const l=g(()=>e.filter(n=>r(n.visibility)===Je.Visible&&t(n)));return{firstFeature:g(()=>l.value[0]),collapsedContent:S(()=>Ht(...l.value.slice(1))),hasCollapsedContent:g(()=>l.value.length>1)}}function Tl(e,t="div"){const l=Rt();return Ft(()=>{l.value=Pe(ot(e),t)}),l}function yl(e,t="div"){const l=Rt(null);return Ft(()=>{const n=ot(e);l.value=n==null?null:Pe(n,t)}),l}function Qo(e){return g(()=>ot(e))}function ot(e){return r(r(e))}function Q(...e){return e.includes(Object)||e.push(Object),e}const ye=ce({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(w(),D("div",{style:it({width:e.width,height:e.height})},null,4))}});const Vo={},Lo={class:"notif"};function Ho(e,t){return w(),D("div",Lo,"!")}var Xa=Te(Vo,[["render",Ho],["__scopeId","data-v-66323fd4"]]);const ca=e=>(rl("data-v-9de19f28"),e=e(),ul(),e),jo={key:0,class:"day feature dontMerge opened"},Wo={class:"date"},Jo=u("Dec"),zo=ca(()=>f("br",null,null,-1)),Ko={class:"date"},Xo=u("Dec"),Yo=ca(()=>f("br",null,null,-1)),Zo=ca(()=>f("div",{class:"doors"},null,-1)),es={class:"date"},ts=u("Dec"),ls=ca(()=>f("br",null,null,-1)),as={key:0,class:"material-icons lock"},ns={key:1,class:"timer"},is={key:2,class:"timer"},os=ce({__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,n=g(()=>l.layer&&a.gte(X.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){n.value&&t("unlockLayer")}return(s,d)=>e.opened.value?(w(),D("div",jo,[i(ra,{appear:"",name:"door"},{default:ue(()=>[f("div",{class:"doors",onClick:d[0]||(d[0]=c=>t("openLayer"))},[f("div",Wo,[Jo,zo,u(Be(e.day),1)]),f("div",Ko,[Xo,Yo,u(Be(e.day),1)])])]),_:1}),f("div",{class:"icon",style:it({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:d[1]||(d[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(w(),oe(Xa,{key:0})):O("",!0)])):(w(),D("div",{key:1,class:et(["day feature dontMerge",{can:r(n),locked:!r(n),canOpen:r(n)}]),onClick:o},[Zo,f("div",es,[ts,ls,u(Be(e.day),1)]),r(n)?O("",!0):(w(),D("div",as,"lock")),r(X).day.value===e.day&&!r(n)?(w(),D("div",ns,Be(r(Ba)(r(X).timeUntilNewDay.value,0)),1)):r(X).day.value===e.day&&e.layer==null?(w(),D("div",is,"NYI")):O("",!0),r(n)?(w(),oe(Xa,{key:3})):O("",!0)],2))}});var ss=Te(os,[["__scopeId","data-v-9de19f28"]]);const rs=ce({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=Tl(zt(t,"display")),n=Tl(zt(t,"content"));return(o,s)=>(w(),oe(Pt,{class:"collapsible-container"},{default:ue(()=>[f("button",{onClick:s[0]||(s[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(w(),oe(ze(r(l))))]),e.collapsed.value?O("",!0):(w(),oe(ze(r(n)),{key:0}))]),_:1}))}});var us=Te(rs,[["__scopeId","data-v-a72c16aa"]]);const ds={key:0},cs={key:0,class:"mark star"},ps=["src"],ms=ce({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(w(),D("div",ds,[e.mark===!0?(w(),D("div",cs)):(w(),D("img",{key:1,class:"mark",src:e.mark},null,8,ps))])):O("",!0)}});var pa=Te(ms,[["__scopeId","data-v-2207999f"]]);const vs=ce({__name:"Node",props:{id:null},setup(e){const l=pt(e),n=ta(Ia,()=>{}),o=ta(Ma,()=>{}),s=Rt(null),d=g(()=>s.value&&s.value.parentElement);return Jt([d,l.id],([c,p],[m,y])=>{m&&o(r(y)),c&&n(p,c)}),un(()=>o(r(l.id))),(c,p)=>(w(),D("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Wl=Te(vs,[["__scopeId","data-v-a48cb382"]]);const gs=ce({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:pa,Node:Wl},setup(e){const{progress:t,width:l,height:n,direction:o,display:s}=pt(e),d=g(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=g(()=>{const m={width:ot(l)+.5+"px",height:ot(n)+.5+"px"};switch(r(o)){case Ie.Up:m.clipPath=`inset(${d.value}% -2px -2px -2px)`,m.width=ot(l)+2+"px";break;case Ie.Down:m.clipPath=`inset(-2px -2px ${d.value}% -2px)`,m.width=ot(l)+2+"px";break;case Ie.Right:m.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Ie.Left:m.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Ie.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=yl(s);return{normalizedProgress:d,barStyle:c,component:p,unref:r,Visibility:Je}}});function fs(e,t,l,n,o,s){var p,m,y,h,b,v,E;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:it([{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:et({bar:!0,...e.unref(e.classes)})},[f("div",{class:"overlayTextContainer border",style:it([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(w(),D("span",{key:0,class:"overlayText",style:it(e.unref(e.textStyle))},[(w(),oe(ze(e.component)))],4)):O("",!0)],4),f("div",{class:"border",style:it([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(y=e.unref(e.style))!=null?y:{},(h=e.unref(e.baseStyle))!=null?h:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[f("div",{class:"fill",style:it([e.barStyle,(v=e.unref(e.style))!=null?v:{},(E=e.unref(e.fillStyle))!=null?E:{}])},null,4)],4),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],6)):O("",!0)}var hs=Te(gs,[["render",fs],["__scopeId","data-v-730cc7a0"]]);const ys=Symbol("Bar");function Wt(e){return kt(()=>{const t=e();return t.id=bl("bar-"),t.type=ys,t[Kt]=hs,q(t,"visibility"),gt(t,"visibility",Je.Visible),q(t,"width"),q(t,"height"),q(t,"direction"),q(t,"style"),q(t,"classes"),q(t,"borderStyle"),q(t,"baseStyle"),q(t,"textStyle"),q(t,"fillStyle"),q(t,"progress"),q(t,"display"),q(t,"mark"),t[al]=function(){const{progress:l,width:n,height:o,direction:s,display:d,visibility:c,style:p,classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:v,mark:E,id:_}=this;return{progress:l,width:n,height:o,direction:s,display:d,visibility:c,style:r(p),classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:v,mark:E,id:_}},t})}var bs=ce({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:Wl,MarkNode:pa},setup(e){const{display:t,onClick:l,onHold:n}=pt(e),o=Rt("");Ft(()=>{const c=ot(t);if(c==null){o.value="";return}if($t(c)){o.value=Pe(c);return}const p=Pe(c.title||"","h3"),m=Pe(c.description,"div");o.value=Pe(S(()=>i("span",null,[c.title?i("div",null,[i(p,null,null)]):null,i(m,null,null)])))});const{start:s,stop:d}=xn(l,n,e.isHolding);return{start:s,stop:d,comp:o,Visibility:Je,unref:r}}});function ws(e,t,l,n,o,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:it([{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:et({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)?(w(),oe(ze(e.unref(e.comp)),{key:0})):O("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],38)):O("",!0)}var Pn=Te(bs,[["render",ws],["__scopeId","data-v-8cedd7da"]]);const As=Symbol("Clickable");function Tt(e){return kt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=bl("clickable-"),t.type=As,t[Kt]=Pn,t.isHolding=j(!1),q(t,"visibility"),gt(t,"visibility",Je.Visible),q(t,"canClick"),gt(t,"canClick",!0),q(t,"classes"),q(t,"style"),q(t,"mark"),q(t,"display"),t.onClick){const n=t.onClick.bind(t);t.onClick=function(o){r(t.canClick)&&n(o)}}if(t.onHold){const n=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&n()}}return t[al]=function(){const{display:n,visibility:o,style:s,classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:v}=this;return{display:n,visibility:o,style:r(s),classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:v}},t})}function ct(e,t="points",l=0,n=void 0){const o=vt(e)?e:Se(e);if(o.displayName=t,o.precision=l,o.small=n,!vt(e)){const s=o[Ql];s.displayName=t,s.precision=l,s.small=n}return o}function Ya(e){const t=Se(e.value);return Jt(e,l=>{Ta.value||a.gt(l,t.value)&&(t.value=l)}),t}function Cs(e){const t=Se(e.value);return Jt(e,(l,n)=>{Ta.value||a.gt(l,n)&&(t.value=a.add(t.value,a.sub(l,n)))}),t}new a("10^^8");new a("1e100");function Jl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?te(e.small?l:a.floor(l)):V(l,e.precision,e.small)}const ks=["x1","y1","x2","y2"],Es=ce({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=pt(e),n=g(()=>{const s=l.startNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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}),o=g(()=>{const s=l.endNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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,d)=>(w(),D("line",hl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(n).x,y1:r(n).y,x2:r(o).x,y2:r(o).y}),null,16,ks))}});const _s=ce({__name:"Links",props:{links:null},setup(e){var p;const l=zt(e,"links"),n=j(null),o=ta(Da,j({})),s=ta(xa,j(void 0)),d=j((p=n.value)==null?void 0:p.getBoundingClientRect());Jt(s,()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()}),oa(()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()});const c=g(()=>{var y,h;const m=o.value;return(h=(y=l.value)==null?void 0:y.filter(b=>{var v,E;return((v=m[b.startNode.id])==null?void 0:v.rect)&&((E=m[b.startNode.id])==null?void 0:E.rect)}))!=null?h:[]});return(m,y)=>(w(),D(N,null,[r(c)?(w(),D("svg",ri(hl({key:0},m.$attrs)),[(w(!0),D(N,null,Sa(r(c),(h,b)=>(w(),oe(Es,{key:b,link:h,boundingRect:d.value,startNode:r(o)[h.startNode.id],endNode:r(o)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):O("",!0),f("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var Ss=Te(_s,[["__scopeId","data-v-063f6d6b"]]);ce({props:{nodes:{type:Q(Array),required:!0},leftSideNodes:Q(Array),rightSideNodes:Q(Array),branches:Q(Array)},components:{Links:Ss},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:n}=pt(e),o=Rt();Ft(()=>{const c=ot(t);o.value=Pe(S(()=>i(N,null,[c.map(p=>i("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(jt)]))])))});const s=Rt();Ft(()=>{const c=ot(l);s.value=c?Pe(S(()=>i("span",{class:"left-side-nodes small"},[c.map(jt)]))):""});const d=Rt();return Ft(()=>{const c=ot(n);d.value=c?Pe(S(()=>i("span",{class:"side-nodes small"},[c.map(jt)]))):""}),{unref:r,nodesComp:o,leftNodesComp:s,rightNodesComp:d}}});ce({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:pa,Node:Wl},setup(e){const{onClick:t,onHold:l,display:n}=pt(e),o=yl(n),{start:s,stop:d}=xn(t,l);return{start:s,stop:d,comp:o,unref:r,Visibility:Je,isCoercableComponent:$t}}});function nl(e){const t=[],l={};let n=!1;function o(){return n||(t.push(...e()),l.base=t.map(c=>ht(c.base)),l.baseText=t.map(c=>ht(c.baseText)),l.visible=t.map(c=>ht(c.visible)),n=!0),t}const s=Se({});return[S(()=>{const c=o();let p=!0;const m=c.map((y,h)=>{var _,x,J;if(r(l.visible[h])===!1)return null;const b=i("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[i("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[u("\u25BC")]),y.title,y.subtitle?i("span",{class:"subtitle"},[u(" ("),y.subtitle,u(")")]):null]),v=r(s.value[h])?null:i(N,null,[i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[jt((_=r(l.baseText[h]))!=null?_:"Base")]),i("span",{class:"modifier-amount"},[V((x=r(l.base[h]))!=null?x:1),y.unit])]),jt(r(y.modifier.description))]),E=!p;return p=!1,i(N,null,[E?i("br",null,null):null,i("div",null,[b,i("br",null,null),v,i("hr",null,null),i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[u("Total")]),i("span",{class:"modifier-amount"},[V(y.modifier.apply((J=r(l.base[h]))!=null?J:1)),y.unit])])])])});return i(N,null,[m])}),s]}function Ll(e){const t=Object.values(e).reverse(),l=Se(!0),n=g(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:o,collapsedContent:s,hasCollapsedContent:d}=qo(t,p=>p.earned.value),c=S(()=>{const p=[...n.value];return o.value&&p.push(o.value),$o(...p,S(()=>sa(i(us,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[rn,r(d)]])))});return{collapseMilestones:l,display:c}}function dl(e){const t=e.ignoreTotal?e.resource:Cs(e.resource),l=()=>{var c,p;if(X.day.value!==e.day)return 1;let s=a.add(t.value,1),d=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:ie.usingLog)&&(s=s.log10(),d=a.log10(d)),a.div(s,d)},n=Wt(()=>({direction:Ie.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:S(()=>X.day.value===e.day?i(N,null,[ve(t.value),u("/"),ve(e.goal)]):"")})),o=S(()=>i(N,null,[i("div",null,[X.day.value===e.day?i(N,null,[u("Reach "),ve(e.goal),u(" "),e.ignoreTotal?"":"total ",e.resource.displayName,u(" to complete the day")]):i(N,null,[e.name,u(" Complete!")]),e.modal?i(N,null,[" ",u("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[u("Check Modifiers")])]):void 0]),ee(n),e.modal?ee(e.modal.display):void 0]));return Ft(()=>{X.day.value===e.day&&a.gte(t.value,e.goal)&&X.completeDay()}),{total:t,trackerDisplay:o}}function Vt(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Tt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),n=Tt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Tt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),s=Tt(()=>({display:"Max",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:n,add:o,max:s}}const Bs=Symbol("Buyable");function xe(e){const t=Se(0);return kt(()=>{var s,d,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=Bs,l[Kt]=Pn,l.amount=t,l.amount[fl]=(s=l.initialValue)!=null?s:0,l.canAfford=g(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&a.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=g(()=>r(l.visibility)===Je.Visible&&r(l.canAfford)&&a.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=g(()=>a.gte(l.amount.value,r(l.purchaseLimit))),q(l,"classes");const n=l.classes;l.classes=g(()=>{const p=r(n)||{};return l.maxed.value&&(p.bought=!0),p}),q(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var y;const p=l;if(!r(p.canPurchase))return;const m=r(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=a.sub(p.resource.value,m),p.amount.value=a.add(p.amount.value,1)),(y=p.onPurchase)==null||y.call(p,m)},q(l,"display");const o=l.display;return l.display=S(()=>{const p=r(o);if($t(p)){const m=Pe(p);return i(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,y=Pe(p.title||"","h3"),h=Pe(p.description||""),b=Pe(p.effectDisplay||"");return i("span",null,[p.title?i("div",null,[i(y,null,null)]):null,p.description?i(h,null,null):null,p.showAmount===!1?null:i("div",null,[i("br",null,null),r(m.purchaseLimit)===a.dInf?i(N,null,[u("Amount: "),te(m.amount.value)]):i(N,null,[u("Amount: "),te(m.amount.value),u(" /")," ",te(r(m.purchaseLimit))])]),p.effectDisplay?i("div",null,[i("br",null,null),u("Currently: "),i(b,null,null)]):null,m.cost&&!m.maxed.value?i("div",null,[u("Cost: "),V(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),q(l,"visibility"),gt(l,"visibility",Je.Visible),q(l,"cost"),q(l,"resource"),q(l,"purchaseLimit"),gt(l,"purchaseLimit",a.dInf),q(l,"style"),q(l,"mark"),q(l,"small"),l[al]=function(){const{display:p,visibility:m,style:y,classes:h,onClick:b,canClick:v,small:E,mark:_,id:x}=this;return{display:p,visibility:m,style:r(y),classes:h,onClick:b,canClick:v,small:E,mark:_,id:x}},l})}const ma=ua({}),Ua=Symbol("Hotkey");function xl(e){return kt(()=>{const t=e();return t.type=Ua,q(t,"enabled"),gt(t,"enabled",!0),q(t,"description"),t})}je.on("addLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=t})});je.on("removeLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=void 0})});document.onkeydown=function(e){var n;if(((n=e.target)==null?void 0:n.tagName)==="INPUT"||$a.value&&!ie.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=ma[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};Uo(S(()=>{const e=Object.values(ma).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":i("div",null,[i("br",null,null),i("h4",null,[u("Hotkeys")]),e.map(t=>i("div",null,[t==null?void 0:t.key,u(": "),t==null?void 0:t.description]))])}));const Ns=ce({__name:"Sticky",setup(e){const t=j("0"),l=new ResizeObserver(o),n=Rt(null);function o(){let s=n.value;if(s==null)return;let d=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(d+=c.offsetHeight),s=c}t.value=d+"px"}return _l(o),document.fonts.ready.then(o),oa(()=>{var d;const s=(d=n.value)==null?void 0:d.parentElement;s&&l.observe(s)}),(s,d)=>(w(),D("div",{class:"sticky",style:it({top:t.value}),ref_key:"element",ref:n,"data-v-sticky":""},[Lt(s.$slots,"default",{},void 0,!0)],4))}});var Tn=Te(Ns,[["__scopeId","data-v-cccac690"]]);const Za=ce({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=g(()=>Jl(t.resource));return(n,o)=>(w(),D("h2",{style:it({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Be(r(l)),5))}});const Is={class:"main-display"},Ms={key:0},Ds={key:1},xs=u(", "),Ps={key:2},Ts=f("br",null,null,-1),Fs={class:"main-display"},Us={key:0},Rs={key:1},Os=u(", "),Gs={key:2},$s=f("br",null,null,-1),It=ce({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=pt(e),n=j(null),o=yl(l.effectDisplay),s=j(null),d=yl(l.productionDisplay),c=g(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var y,h;return e.sticky?(w(),oe(Tn,{key:0},{default:ue(()=>{var b,v,E,_;return[f("div",{class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:it([{"min-height":`${((E=(v=n.value)==null?void 0:v.$el.clientHeight)!=null?E:0)+50}px`},(_=e.style)!=null?_:{}])},[f("div",Is,[r(c)?(w(),D("span",Ms,"You have ")):O("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Be(e.resource.displayName),1),r(o)?(w(),D("span",Ds,[xs,(w(),oe(ze(r(o)),{ref_key:"effectRef",ref:n},null,512))])):O("",!0),r(d)?(w(),D("span",Ps,[Ts,(w(),oe(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):O("",!0)])],6)]}),_:1})):(w(),D("div",{key:1,class:et(["main-display-container",(y=e.classes)!=null?y:{}]),style:it([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[f("div",Fs,[r(c)?(w(),D("span",Us,"You have ")):O("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Be(e.resource.displayName),1),r(o)?(w(),D("span",Rs,[Os,(w(),oe(ze(r(o)),{ref_key:"effectRef",ref:n},null,512))])):O("",!0),r(d)?(w(),D("span",Gs,[$s,(w(),oe(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):O("",!0)])],6))}}});var qs=ce({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:Wl,MarkNode:pa},setup(e){const{display:t,cost:l}=pt(e),n=Rt("");return Ft(()=>{const o=ot(t);if(o==null){n.value="";return}if($t(o)){n.value=Pe(o);return}const s=ot(l),d=Pe(o.title||"","h3"),c=Pe(o.description,"div"),p=Pe(o.effectDisplay||"");n.value=Pe(S(()=>{var m;return i("span",null,[o.title?i("div",null,[i(d,null,null)]):null,i(c,null,null),o.effectDisplay?i("div",null,[u("Currently: "),i(p,null,null)]):null,e.resource!=null&&o.showCost!==!1?i(N,null,[i("br",null,null),u("Cost: "),e.resource&&Jl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:n,unref:r,Visibility:Je}}});const Qs=["disabled"];function Vs(e,t,l,n,o,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:it([{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:et({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)?(w(),oe(ze(e.unref(e.component)),{key:0})):O("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],14,Qs)):O("",!0)}var Ls=Te(qs,[["render",Vs],["__scopeId","data-v-7f411ac8"]]);const Hs=Symbol("Upgrade");function G(e){const t=Se(!1);return kt(()=>{const l=e();return l.id=bl("upgrade-"),l.type=Hs,l[Kt]=Ls,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=g(()=>{const n=l;return n.resource!=null&&n.cost!=null&&a.gte(n.resource.value,r(n.cost))}):q(l,"canAfford"),l.canPurchase=g(()=>r(l.visibility)===Je.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var o;const n=l;!r(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=a.sub(n.resource.value,r(n.cost))),t.value=!0,(o=n.onPurchase)==null||o.call(n))},q(l,"visibility"),gt(l,"visibility",Je.Visible),q(l,"classes"),q(l,"style"),q(l,"display"),q(l,"mark"),q(l,"cost"),q(l,"resource"),l[al]=function(){const{display:n,visibility:o,style:s,classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:v}=this;return{display:n,visibility:o,style:r(s),classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:v}},l})}function re(e){return kt(()=>{const{addend:t,description:l,enabled:n}=e(),o=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.add(c,r(o)),revert:c=>a.sub(c,r(o)),enabled:d,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[jt(r(s))]):null,i("span",{class:"modifier-amount"},[a.gte(r(o),0)?"+":"",V(r(o))])]))}})}function C(e){return kt(()=>{const{multiplier:t,description:l,enabled:n}=e(),o=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.times(c,r(o)),revert:c=>a.div(c,r(o)),enabled:d,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[jt(r(s))]):null,i("span",{class:"modifier-amount"},[u("\xD7"),V(r(o))])]))}})}function Fn(e){return kt(()=>{const{exponent:t,description:l,enabled:n,supportLowNumbers:o}=e(),s=ht(t),d=ht(l),c=n==null?void 0:ht(n);return{apply:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.pow(m,r(s)),o&&(m=a.sub(m,1)),m},revert:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.root(m,r(s)),o&&(m=a.sub(m,1)),m},enabled:c,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(d)?i("span",{class:"modifier-description"},[jt(r(d)),o?" (+1 effective)":null]):null,i("span",{class:"modifier-amount"},[u("^"),V(r(s))])]))}})}function Z(e){return kt(()=>{const t=e();return{apply:l=>t.filter(n=>r(n.enabled)!==!1).reduce((n,o)=>o.apply(n),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(n=>r(n.enabled)!==!1).reduceRight((n,o)=>o.revert(n),l):void 0,enabled:g(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:S(()=>i(N,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(jt)]))}})}function Un(e){return kt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=g(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=g(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.nextAt==null&&(t.nextAt=g(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.convert==null&&(t.convert=function(){var o;const l=r(t.currentGain),n=r(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),q(t,"currentGain"),q(t,"actualGain"),q(t,"currentAt"),q(t,"nextAt"),q(t,"buyMax"),gt(t,"buyMax",!0),q(t,"roundUpCost"),gt(t,"roundUpCost",!0),t})}function Ra(e,t){const l=ht(e),n=ht(t);return{currentGain(o){let s=r(o.baseResource.value);if(o.costModifier&&(s=o.costModifier.apply(s)),a.lt(s,r(l)))return 0;const d=a.div(s,r(l)).pow(r(n));return d.isNan()?new a(0):d},currentAt(o){let s=r(o.currentGain);return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s},nextAt(o){let s=a.add(r(o.currentGain),1).floor();return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)).max(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s}}}function Rn(e){return Un(e)}function js(e){return Un(()=>{const t=e();return gt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=g(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(a.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=g(()=>{let l=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),gt(t,"convert",function(){var o;const l=r(t.actualGain),n=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t})}const Ws={},Js={style:{"white-space":"nowrap"}},zs=f("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ks={style:{"text-decoration":"overline"}};function Xs(e,t){return w(),D("span",Js,[zs,f("span",Ks,[Lt(e.$slots,"default")])])}var Oa=Te(Ws,[["render",Xs]]);const Ys={class:"field"},Zs={key:0,class:"field-title"},Ga=ce({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var d;const l=e,n=yl(zt(l,"title"),"span"),o=j((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);Jt(zt(l,"modelValue"),c=>{var p;ot(o)!==c&&(o.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(w(),D("div",Ys,[r(n)?(w(),D("span",Zs,[(w(),oe(ze(r(n))))])):O("",!0),i(r(mi),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>o.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 er=ce({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:Wl},setup(e){const{display:t}=pt(e),l=Rt("");return Ft(()=>{const n=ot(t);if(n==null){l.value="";return}if($t(n)){l.value=Pe(n);return}const o=Pe(n.requirement,"h3"),s=Pe(n.effectDisplay||"","b"),d=Pe(n.optionsDisplay||"","span");l.value=Pe(S(()=>i("span",null,[i(o,null,null),n.effectDisplay?i("div",null,[i(s,null,null)]):null,n.optionsDisplay?i("div",{class:"equal-spaced"},[i(d,null,null)]):null])))}),{comp:l,unref:r,Visibility:Je}}});function tr(e,t,l,n,o,s){var c;const d=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:et({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(w(),oe(ze(e.unref(e.comp)))),i(d,{id:e.id},null,8,["id"])],6)):O("",!0)}var lr=Te(er,[["render",tr],["__scopeId","data-v-f4e8794e"]]);je.on("setupVue",e=>e.use(vi));function ar(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const en=cn(),nr=Symbol("Milestone");let gl;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(gl||(gl={}));function W(e){const t=Se(!1);return kt(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=bl("milestone-"),l.type=nr,l[Kt]=lr,l.earned=t,l.complete=function(){var d;const s=l;if(t.value=!0,(d=s.onComplete)==null||d.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=Pe($t(c)?c:c.requirement);en(i(N,null,[i("h3",null,[u("Milestone earned!")]),i("div",null,[i(p,null,null)])]))}},q(l,"visibility"),gt(l,"visibility",Je.Visible);const n=l.visibility;if(l.visibility=g(()=>{const s=r(l.display);switch(tt.msDisplay){default:case gl.All:return r(n);case gl.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?Je.None:r(n);case gl.Incomplete:return r(l.earned)?Je.None:r(n);case gl.None:return Je.None}}),q(l,"style"),q(l,"classes"),q(l,"display"),q(l,"showPopups"),l[al]=function(){const{visibility:s,display:d,style:c,classes:p,earned:m,id:y}=this;return{visibility:s,display:d,style:r(c),classes:p,earned:m,id:y}},l.shouldEarn){const s=l;Ft(()=>{var d,c;if(tt.active===ie.id&&!s.earned.value&&r(s.visibility)===Je.Visible&&((d=s.shouldEarn)==null?void 0:d.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Pe($t(p)?p:p.requirement);en(i(N,null,[i("h3",null,[u("Milestone earned!")]),i("div",null,[i(m,null,null)])]))}})}return l})}je.on("loadSettings",e=>{gt(e,"msDisplay",gl.All)});const ir=Object.values(gl).map(e=>({label:wn(e),value:e}));Fo(S(()=>i(Ga,{title:"Show Milestones",options:ir,"onUpdate:modelValue":e=>tt.msDisplay=e,modelValue:tt.msDisplay},null)));const or=ce({props:{visibility:{type:Q(Number),required:!0},display:{type:Q(Object,String,Function),required:!0},style:Q(String,Object,Array),classes:Q(Object),glowColor:Q(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:l,glowColor:n,floating:o}=pt(e),s=Tl(l),d=g(()=>{const p=ot(n);return p?r(o)?ar(p):{boxShadow:`0px 9px 5px -6px ${p}`}:{}});function c(){t("selectTab")}return{selectTab:c,component:s,glowColorStyle:d,unref:r,Visibility:Je}}});function sr(e,t,l,n,o,s){var d;return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,onClick:t[0]||(t[0]=(...c)=>e.selectTab&&e.selectTab(...c)),class:et(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(d=e.unref(e.style))!=null?d:{}])},[(w(),oe(ze(e.component)))],6)):O("",!0)}var On=Te(or,[["render",sr],["__scopeId","data-v-610a2549"]]);const rr=ce({props:{visibility:{type:Q(Number),required:!0},activeTab:{type:Q(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:Q(Object),required:!0},style:Q(String,Object,Array),classes:Q(Object),buttonContainerStyle:Q(String,Object,Array),buttonContainerClasses:Q(Object)},components:{Sticky:Tn,TabButton:On},setup(e){const{activeTab:t}=pt(e),l=g(()=>Bl[tt.theme].floatingTabs),n=Rt("");Ft(()=>{const c=ot(t);if(c==null){n.value="";return}if($t(c)){n.value=Pe(c);return}n.value=Pe(r(c.display))});const o=g(()=>{const c=ot(t);return $t(c)||!c?void 0:r(c.classes)}),s=g(()=>{const c=ot(t);return $t(c)||!c?void 0:r(c.style)});function d(c){const{display:p,style:m,classes:y,glowColor:h,visibility:b}=c;return{display:p,style:r(m),classes:y,glowColor:h,visibility:b}}return{floating:l,tabClasses:o,tabStyle:s,Visibility:Je,component:n,gatherButtonProps:d,unref:r}}});function ur(e,t,l,n,o,s){var p,m;const d=ll("TabButton"),c=ll("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,class:et(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[],(m=e.tabStyle)!=null?m:[]])},[i(c,{class:et(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:it(e.unref(e.buttonContainerStyle))},{default:ue(()=>[f("div",{class:et(["tab-buttons",{floating:e.floating}])},[(w(!0),D(N,null,Sa(e.unref(e.tabs),(y,h)=>(w(),oe(d,hl({onSelectTab:b=>e.selected.value=h,floating:e.floating,key:h,active:e.unref(y.tab)===e.unref(e.activeTab)},e.gatherButtonProps(y)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(w(),oe(ze(e.unref(e.component)),{key:0})):O("",!0)],6)):O("",!0)}var dr=Te(rr,[["render",ur],["__scopeId","data-v-11575f45"]]);const cr=Symbol("TabButton"),pr=Symbol("TabFamily");function mr(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const l=Se(Object.keys(e)[0]);return kt(()=>{var s;const n=(s=t==null?void 0:t())!=null?s:{};n.id=bl("tabFamily-"),n.type=pr,n[Kt]=dr,n.tabs=Object.keys(e).reduce((d,c)=>{const p=e[c]();return p.type=cr,p[Kt]=On,q(p,"visibility"),gt(p,"visibility",Je.Visible),q(p,"tab"),q(p,"display"),q(p,"classes"),q(p,"style"),q(p,"glowColor"),d[c]=p,d},{}),n.selected=l,n.activeTab=g(()=>{const d=r(o.tabs);if(l.value in d&&r(d[l.value].visibility)===Je.Visible)return r(d[l.value].tab);const c=Object.values(d).find(p=>r(p.visibility)===Je.Visible);return c?r(c.tab):null}),q(n,"visibility"),gt(n,"visibility",Je.Visible),q(n,"classes"),q(n,"style"),q(n,"buttonContainerClasses"),q(n,"buttonContainerStyle"),n[al]=function(){const{visibility:d,activeTab:c,selected:p,tabs:m,style:y,classes:h,buttonContainerClasses:b,buttonContainerStyle:v}=this;return{visibility:d,activeTab:c,selected:p,tabs:m,style:r(y),classes:h,buttonContainerClasses:b,buttonContainerStyle:v}};const o=n;return o})}const vr=ce({__name:"Tab",props:{display:null},setup(e){const t=e,{display:l}=pt(t),n=Tl(l);return(o,s)=>(w(),oe(ze(r(n))))}}),gr=Symbol("Tab");function wa(e){return kt(()=>{const t=e();return t.id=bl("tab-"),t.type=gr,t[Kt]=vr,t[al]=function(){const{display:l}=this;return{display:l}},t})}const fr={class:"field"},hr=ce({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,n=g(()=>Pe(r(l.title)||"","span")),o=g({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,d)=>(w(),D("label",fr,[sa(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>vt(o)?o.value=c:null)},null,512),[[ui,r(o)]]),(w(),oe(ze(r(n))))]))}});var sl=Te(hr,[["__scopeId","data-v-33d57459"]]);const yr=Symbol("Reset");function br(e){return kt(()=>{const t=e();return t.id=bl("reset-"),t.type=yr,t.reset=function(){var n;const l=o=>{if(o&&typeof o=="object")if(fl in o){const s=o;s.value=s[fl]}else!(o instanceof a)&&!vt(o)&&Object.values(o).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),je.emit("reset",t),(n=t.onReset)==null||n.call(t)},q(t,"thingsToReset"),t})}const Zl={};je.on("removeLayer",e=>{var t;(t=Zl[e.id])==null||t.call(Zl),Zl[e.id]=void 0});const wr="dyes",Ar=11,Ve=Ut(wr,function(){const e="Dyes",t="#D4D4F4";function l(v){const E=ct(0,v.name),_=Z(()=>[re(()=>({addend:()=>a.add(J.amount.value,1),description:`${v.name} Chambers`})),C(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1",enabled:v.color=="red"||v.color=="yellow"})),C(()=>({multiplier:o.green1,description:"Green Dye Boost 1",enabled:v.color=="yellow"||v.color=="blue"})),C(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1",enabled:v.color=="red"||v.color=="blue"})),C(()=>({multiplier:2,description:"Wetter Dyes",enabled:()=>c.yellowDyeUpg.bought.value&&(v.color=="red"||v.color=="yellow"||v.color=="blue")}))]),x=g(()=>_.apply(0)),J=xe(()=>{const M=ht(v.costs);return{...v,style:()=>({backgroundColor:r(J.canPurchase)?t:"#545454",minWidth:"200px"}),display:S(()=>i("span",null,[i("h3",null,[v.name,u(" Chambers")]),i("br",null,null),u("Create "),V(x.value),u(" "),v.name,v.dyesToReset.length>0?", but reset "+v.dyesToReset.map(k=>k.name).join(", "):"",u("."),i("br",null,null),i("br",null,null),i("span",{class:"white-space: pre-wrap"},[u("Currently:")," ",v.listedBoosts.filter(k=>r(k.visible)).map(k=>ee(S(()=>i("div",null,[r(k.desc)]))))]),i("br",null,null),i("div",null,[u("Cost:")," ",r(M).map(k=>ee(S(()=>{var F,Y;return i("div",null,[V(r(a.pow((F=r(J.cost))!=null?F:a.dInf,r((Y=k.root)!=null?Y:1)).times(r(k.base))))," ",k.res.displayName,i("br",null,null)])})))])])),cost(){let k=J.amount.value;return a.gte(k,25)&&(k=a.pow(k,2).div(20)),a.gte(k,10)&&(k=a.pow(k,2).div(5)),a.div(k,10).plus(1)},canPurchase:g(k=>{var Y;if(r(J.visibility)!=Je.Visible)return!1;const F=(Y=k!=null?k:r(J.cost))!=null?Y:a.dInf;return r(M).every(be=>{var L;return a.div(be.res.value,r(be.base)).root(r((L=be.root)!=null?L:1)).gte(F)})}),onPurchase(k){var Y;const F=(Y=k!=null?k:r(J.cost))!=null?Y:a.dInf;r(M).forEach(be=>{var L;be.res.value=a.sub(be.res.value,a.pow(F,r((L=be.root)!=null?L:1)).times(r(be.base)))}),E.value=a.add(E.value,x.value),J.amount.value=a.add(J.amount.value,1),v.dyesToReset.forEach(be=>be.reset())}}});return{name:v.name,amount:E,buyable:J,toGenerate:_,computedToGenerate:x,display:S(()=>i(It,{resource:E,color:v.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const n={red:l({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`+${V(o.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:l({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`+${te(o.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:n.red.amount},{base:10,root:2,res:n.yellow.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:g(()=>`/${V(o.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:n.yellow.amount},{base:10,root:2,res:n.blue.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:g(()=>`+${te(a.sub(o.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:n.blue.amount},{base:10,root:2,res:n.red.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:g(()=>`x${V(o.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}}]})},o={red1:g(()=>a.pow(a.add(n.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:g(()=>a.add(n.yellow.amount.value,1).log2().plus(1)),blue1:g(()=>a.add(n.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:g(()=>a.pow(2,a.add(n.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:g(()=>a.add(n.orange.amount.value,1).log2().plus(1)),green1:g(()=>a.pow(2,a.add(n.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:g(()=>a.add(n.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:g(()=>a.pow(2,a.add(n.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:g(()=>a.add(n.purple.amount.value,1).log2().plus(1))},[s,d]=nl(()=>[{title:"Red Dye Creation",modifier:n.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:n.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:n.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:n.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:n.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:n.purple.toGenerate,base:0}]),c={blueDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:S(()=>i(N,null,[u("Multiply Log gain by log"),i("sub",null,[u("10")]),u("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),redDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:S(()=>i(N,null,[u("Multiply Ore Purity by log"),i("sub",null,[u("10")]),u("(Cloth)+1.")]))},cost:1500,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),yellowDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(100)||c.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:T(n.yellow.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),yellowDyeUpg2:G(()=>({visibility:()=>B(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:T(n.yellow.amount),onPurchase(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}})),redDyeUpg2:G(()=>({visibility:()=>B(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:S(()=>i(N,null,[u("Multiply Smelting Speed by "),i(Oa,null,{default:()=>[u("Refineries+1")]}),u(".")]))},cost:6e3,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),blueDyeUpg2:G(()=>({visibility:()=>B(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),coalUpg:G(()=>({visibility:()=>B(c.blueDyeUpg2.bought.value&&c.redDyeUpg2.bought.value&&c.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:R.coal,onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}}))},p=j(!1),m=S(()=>i(yt,{modelValue:p.value,"onUpdate:modelValue":v=>p.value=v},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:s})),y=ct(g(()=>Object.values(n).reduce((v,E)=>a.add(v,E.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:b}=dl({resource:y,goal:6e4,name:e,day:Ar,color:t,textColor:"var(--feature-foreground)",modal:{show:p,display:m},ignoreTotal:!0});return{name:e,color:t,dyes:n,dyeSum:y,boosts:o,totalDyeSum:h,minWidth:700,generalTabCollapsed:d,upgrades:c,display:S(()=>i(N,null,[ee(b),i(ye,null,null),i("div",{style:"width: 620px"},[We(n.red.display,n.yellow.display,n.blue.display),We(n.red.buyable,n.yellow.buyable,n.blue.buyable),i(ye,null,null),We(n.orange.display,n.green.display,n.purple.display),We(n.orange.buyable,n.green.buyable,n.purple.buyable)]),i(ye,null,null),i("div",{class:"row",style:"vertical-align: top"},[Ht(c.redDyeUpg,c.redDyeUpg2),Ht(c.yellowDyeUpg,c.yellowDyeUpg2),Ht(c.blueDyeUpg,c.blueDyeUpg2)]),ee(c.coalUpg)]))}}),Cr="plastic",tn=10,Ue=Ut(Cr,function(){const e="Plastic",t="#DCD9CD",l=ct(0,"plastic"),[n,o]=nl(()=>[{title:"Plastic Gain",modifier:Ce,base:0}]),s=j(!1),d=S(()=>i(yt,{modelValue:s.value,"onUpdate:modelValue":z=>s.value=z},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:n})),c=Se(0),p=g(()=>a.times(c.value,100)),m=xe(()=>({resource:nt.metal,cost(){const z=new a(this.amount.value);return a.pow(1.2,z).times(1e7)},display:S(()=>i(N,null,[i("h3",null,[u("Refinery")]),i("br",null,null),u("Refines oil into plastic pellets"),i("br",null,null),u("Consumes 100 oil/s to create 1 plastic/s"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(p.value),u(" oil/sec"),i("br",null,null),u("+"),V(c.value),u(" plastic/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:y,max:h,add:b,remove:v}=Vt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),E=g(()=>a.pow(5,a.add([...Object.values(M),...Object.values(be)].filter(z=>z.bought.value).length,2))),_=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!_.bought.value})})),x=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!x.bought.value})})),J=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!J.bought.value})})),M={paperTools:_,boxTools:x,clothTools:J},k=G(()=>({resource:T(l),cost:E,visibility:()=>B(_.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!k.bought.value})})),F=G(()=>({resource:T(l),cost:E,visibility:()=>B(x.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),Y=G(()=>({resource:T(l),cost:E,visibility:()=>B(J.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!Y.bought.value})})),be={paperElf:k,boxElf:F,clothElf:Y},L=xe(()=>({resource:T(l),cost(){const z=this.amount.value;return a.pow(1.3,z).times(100)},visibility:()=>B(k.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:S(()=>i(N,null,[te(L.amount.value),u("%")])),showAmount:!1}})),we=xe(()=>({resource:T(l),cost(){const z=this.amount.value;return a.pow(1.3,z).times(100)},visibility:()=>B(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:S(()=>i(N,null,[te(we.amount.value),u("%")])),showAmount:!1}})),ae=xe(()=>({resource:T(l),cost(){const z=this.amount.value;return a.pow(1.3,z).times(100)},visibility:()=>B(Y.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:S(()=>i(N,null,[te(a.times(ae.amount.value,10)),u("%")])),showAmount:!1}})),Le={passivePaper:L,passiveBoxes:we,clothGains:ae},Ce=Z(()=>[re(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),C(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:k.bought})),C(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),C(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:Y.bought})),C(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:Ze.row2Upgrades.plasticUpgrade.bought})),C(()=>({multiplier:()=>Ye.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ye.oilEffectiveness.value,1)})),C(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),ge=g(()=>Ce.apply(0));je.on("update",z=>{a.lt(X.day.value,tn)||(l.value=a.times(z,ge.value).add(l.value))});const{total:Me,trackerDisplay:Re}=dl({resource:l,goal:25e4,name:e,day:tn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:d}});return{name:e,color:t,plastic:l,totalPlastic:Me,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:be,buyables:Le,generalTabCollapsed:o,minWidth:700,display:S(()=>i(N,null,[ee(Re),i(ye,null,null),i(It,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ge.value,0)?`+${V(ge.value)}/s`:void 0},null),i(ye,null,null),i(Pt,null,{default:()=>[ee(m),i("div",null,[te(a.floor(c.value)),u("/"),te(a.floor(m.amount.value))]),We(y,v,b,h)]}),i(Pl,null,{default:()=>[Ht(_,k,L),Ht(x,F,we),Ht(J,Y,ae)]})]))}}),kr="oil",Aa=9,Ye=Ut(kr,function(){const e="Oil",t="#000000",l="var(--foreground)",n=ct(0,"oil"),o=ct(0,"depth"),s=Se(0),d=g(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function c(){if(a.lt(o.value,990)){const Xe=a.min(a.affordArithmeticSeries(s.value,10,1,o.value),a.sub(990,o.value)),Bt=a.sumArithmeticSeries(Xe,10,1,o.value);s.value=a.sub(s.value,Bt),o.value=a.add(o.value,Xe)}if(a.gte(o.value,990)){const Xe=a.affordGeometricSeries(s.value,1e3,1.001,a.sub(o.value,990)),Bt=a.sumGeometricSeries(Xe,1e3,1.001,a.sub(o.value,990));s.value=a.sub(s.value,Bt),o.value=a.add(o.value,Xe)}}const p=Se(0),m=g(()=>a.times(a.pow(p.value,J.value).pow(2),1e14)),y=g(()=>a.times(a.pow(p.value,J.value),1)),h=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(1.3,Xe).times(25e3)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Drill")]),i("br",null,null),u("A large drill specialized at deep mining."),i("br",null,null),u("Consumes 1e14*(Heavy Drills amount)"),i("sup",null,[u("2")]),u(" coal/sec for (Heavy Drills amount) drill power."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),he(m.value),u(" coal/sec"),i("br",null,null),u("+"),he(y.value),u(" drill power"),i("br",null,null),i("br",null,null),u("Cost: "),ve(r(h.cost)),u(" "),h.resource.displayName])),onPurchase(){p.value=a.add(p.value,1)},style:{color:l,width:"160px"}})),{min:b,max:v,add:E,remove:_}=Vt({buyable:h,active:p}),x=Se(0),J=g(()=>a.add(x.value,Math.E).ln()),M=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(1e5)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Drill Drill")]),i("br",null,null),u("Attach extra drills to Heavy Drills to make them faster"),i("br",null,null),u("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),i("br",null,null),u("(also affects coal consumption)."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("^"),he(J.value),u(" Heavy Drill amount"),i("br",null,null),i("br",null,null),u("Cost: "),ve(r(M.cost)),u(" "),M.resource.displayName])),onPurchase(){x.value=a.add(x.value,1)},style:{color:l,width:"160px"}})),{min:k,max:F,add:Y,remove:be}=Vt({buyable:M,active:x}),L=Se(0),we=g(()=>a.pow(1/3,L.value)),ae=g(()=>a.pow(2,L.value)),Le=g(()=>a.pow(1.2,L.value)),Ce=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(8,Xe).times(2e5)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Extractor")]),i("br",null,null),u("Attach extractors to the drill to mine coal and ore, but with a price."),i("br",null,null),u("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("\xD7"),he(we.value),u(" drill power"),i("br",null,null),u("\xD7"),he(ae.value),u(" coal/sec"),i("br",null,null),u("\xD7"),he(Le.value),u(" ore/sec"),i("br",null,null),i("br",null,null),u("Cost: "),ve(r(Ce.cost))," ",Ce.resource.displayName])),onPurchase(){L.value=a.add(L.value,1)},style:{color:l,width:"160px"}})),{min:ge,max:Me,add:Re,remove:z}=Vt({buyable:Ce,active:L}),ke=Se(0),Ae=g(()=>a.pow(wt[3].bought.value?4:5,ke.value)),Ee=g(()=>a.add(ke.value,Ha.value).pow(2).mul(p.value).mul(a.add(x.value,1)).mul(L.value).mul(o.value).div(1e5)),Oe=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(16,Xe).times(2e6);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:S(()=>i(N,null,[i("h3",null,[u("Oil Pump")]),i("br",null,null),u("Pump that oil from the ground."),i("br",null,null),u("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),wt[3].bought.value?4:5,u("\xD7."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("\xD7"),he(Ae.value),u(" coal usage"),i("br",null,null),u("+"),he(Ee.value),u(" oil/sec"),i("br",null,null),i("br",null,null),u("Cost: "),ve(r(Oe.cost)),u(" "),Oe.resource.displayName])),onPurchase(){ke.value=a.add(ke.value,1)},style:{color:l,width:"160px"}})),{max:Fe,min:at,add:qe,remove:At}=Vt({buyable:Oe,active:ke}),pe=Se(0),$=g(()=>a.pow(pe.value,2)),De=g(()=>a.pow(pe.value,3).mul(1e19)),le=g(()=>a.add(pe.value,1)),fe=xe(()=>({resource:T(n),cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(50)},display:S(()=>i(N,null,[i("h3",null,[u("Oil Burner")]),i("br",null,null),u("Burn oil as fuel."),i("br",null,null),u("(Oil Burner Amount)"),i("sup",null,[u("2")]),u(" unit of oil can give 1e19*(Oil Burner Amount)"),i("sup",null,[u("3")]),u(" units of coal."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),he($.value),u(" oil/sec"),i("br",null,null),u("-"),he(De.value),u(" coal consumption"),wt[2].bought.value?i(N,null,[i("br",null,null),u("\xD7"),he(le.value),u(" to auto smelting multi")]):"",i("br",null,null),i("br",null,null),u("Cost: "),ve(r(fe.cost)),u(" "),fe.resource.displayName])),onPurchase(){pe.value=a.add(pe.value,1)},style:{color:l,width:"160px"}})),{max:st,min:Ke,add:Ge,remove:ft}=Vt({buyable:fe,active:pe}),Qe=Se(0),Mt=g(()=>a.pow(Qe.value,2).mul(100)),U=g(()=>a.add(Qe.value,1)),He=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(10,Xe).times(1e7);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:S(()=>i(N,null,[i("h3",null,[u("Oil Smelter")]),i("br",null,null),u("Use oil as a crucible fuel."),i("br",null,null),u("Burn 100x"),i("sup",null,[u("2")]),u(" oil to smelt +100% faster."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),he(Mt.value),u(" oil/sec"),i("br",null,null),u("\xD7"),he(U.value),u(" smelting speed"),i("br",null,null),i("br",null,null),u("Cost: "),ve(r(He.cost)),u(" "),He.resource.displayName])),onPurchase(){Qe.value=a.add(Qe.value,1)},style:{color:l,width:"160px"}})),{max:ne,min:H,add:Dt,remove:Et}=Vt({buyable:He,active:Qe}),rt=[W(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>a.gte(o.value,5)})),W(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>B(rt[0].earned.value)})),W(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>B(rt[1].earned.value)})),W(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>B(rt[2].earned.value)})),W(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>a.gte(o.value,150),visibility:()=>B(rt[3].earned.value)})),W(()=>({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:()=>a.gte(o.value,350),visibility:()=>B(rt[4].earned.value)})),W(()=>({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:()=>a.gte(o.value,1e3),visibility:()=>B(a.gte(o.value,1e3))})),W(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(o.value,3e3),visibility:()=>B(a.gte(o.value,2e3))}))],{collapseMilestones:se,display:_t}=Ll(rt),St=[W(()=>({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:()=>a.gte(Al.value,100)})),W(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Al.value,500),visibility:()=>B(St[0].earned.value)})),W(()=>({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:()=>a.gte(Al.value,1e4),visibility:()=>B(St[1].earned.value)}))],{collapseMilestones:Xt,display:Yt}=Ll(St),xt=[G(()=>({resource:R.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:S(()=>i(N,null,[u("x"),he(bt[0].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:S(()=>i(N,null,[u("x"),he(bt[1].value)]))},style:{color:l}})),G(()=>({resource:R.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:S(()=>i(N,null,[u("x"),he(bt[2].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:S(()=>i(N,null,[u("x"),he(bt[3].value)]))},style:{color:l}})),G(()=>({resource:T(n),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:S(()=>i(N,null,[u("+"),he(a.mul(bt[4].value,100)),u("%")]))},style:{color:l}}))],bt=[g(()=>a.mul(R.buildDrill.amount.value,a.add(.04,ol.value)).add(1)),g(()=>a.mul(nt.oreDrill.amount.value,a.add(.04,ol.value)).add(1)),g(()=>a.mul(a.max(R.coal.value,1).log10().floor(),a.add(.06,ol.value)).add(1)),g(()=>a.mul(a.max(nt.metal.value,1).log10().floor(),a.add(.1,ol.value)).add(1)),g(()=>a.mul(h.amount.value,.001))],wt=[G(()=>({resource:T(n),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),G(()=>({resource:T(n),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}})),G(()=>({resource:T(n),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),G(()=>({resource:T(n),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),G(()=>({resource:T(n),cost:5e4,display:{title:"Be One with the Oil",description:S(()=>i(N,null,[u("Divide metal ingot prices of oil buildings by "),i("sup",null,[u("6")]),i(Oa,null,{default:()=>[u("total oil + 1")]})]))},style:{color:l}}))],il=Z(()=>[re(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:Ae,description:"Oil Pump",enabled:()=>a.gt(ke.value,0)})),re(()=>({addend:ga,description:"Oil to Coal Substitution",enabled:()=>a.gt(ga.value,0)}))]),Gt=g(()=>il.apply(0)),Zt=Z(()=>[re(()=>({addend:y,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:we,description:"Heavy Extractor",enabled:()=>a.gt(L.value,0)})),C(()=>({multiplier:bt[0],description:"Coal Drill Synergy",enabled:xt[0].bought})),C(()=>({multiplier:bt[1],description:"Metal Drill Synergy",enabled:xt[1].bought})),C(()=>({multiplier:bt[2],description:"Coal Drill Upgrade",enabled:xt[2].bought})),C(()=>({multiplier:bt[3],description:"Metal Drill Upgrade",enabled:xt[3].bought})),C(()=>({multiplier:2,description:"Guide to drilling",enabled:K.upgrades.drillingUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),el=g(()=>Zt.apply(0)),wl=Z(()=>[re(()=>({addend:bt[4],description:"Drill Oil",enabled:xt[4].bought}))]),ol=g(()=>wl.apply(0)),Kl=Z(()=>[re(()=>({addend:Ee,description:"Oil Pump",enabled:()=>a.gt(ke.value,0)})),C(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:wt[0].bought})),C(()=>({multiplier:2,description:"3000m Well Depth",enabled:rt[7].earned})),C(()=>({multiplier:2,description:"Oil and where to find it",enabled:K.upgrades.oilUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),Nl=g(()=>Kl.apply(0)),Xl=Z(()=>[re(()=>({addend:()=>a.negate($.value),description:"Oil Burner",enabled:()=>a.gt(pe.value,0)})),re(()=>({addend:()=>a.negate(Mt.value),description:"Oil Smelter",enabled:()=>a.gt(Qe.value,0)})),re(()=>({addend:()=>a.negate(Ue.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(Ue.activeRefinery.value,0)}))]),P=g(()=>Xl.apply(0)),Va=Z(()=>[re(()=>({addend:De,description:"Oil Burner",enabled:()=>a.gt(pe.value,0)})),C(()=>({multiplier:()=>pl.value,description:"Effectiveness",enabled:()=>a.lt(pl.value,1)}))]),ga=g(()=>Va.apply(0)),La=Z(()=>[re(()=>({addend:Ve.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Ve.dyes.red.amount.value,1)}))]),Ha=g(()=>La.apply(0)),[ti,li]=nl(()=>[{title:"Coal Consumption",modifier:il,unit:"/s",base:0},{title:"Drill Power",modifier:Zt,base:0},{title:"Upgrade Bonus",modifier:wl,base:0,visible(){return a.gt(ol.value,0)}},{title:"Oil Speed",modifier:Kl,unit:"/s",base:0,visible(){return a.gt(Nl.value,0)}},{title:"Oil Consumption",modifier:Xl,unit:"/s",base:0,visible(){return a.lt(P.value,0)}},{title:"Oil to Coal Substitution",modifier:Va,unit:"/s",base:0,visible(){return a.gt(ga.value,0)}},{title:"Extra Oil Pumps",modifier:La,base:0,visible(){return a.gt(Ha.value,0)}}]),fa=j(!1),ai=S(()=>i(yt,{modelValue:fa.value,"onUpdate:modelValue":Xe=>fa.value=Xe},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:ti})),tl=j(a.dOne),pl=j(a.dOne);je.on("update",Xe=>{if(a.lt(X.day.value,Aa))return;const Bt=a.negate(Gt.value);a.gt(Bt,0)?(tl.value=a.min(a.div(R.coal.value,Bt),1),R.coal.value=a.sub(R.coal.value,a.mul(Bt,tl.value).mul(Xe))):tl.value=a.dOne,s.value=a.add(s.value,a.mul(el.value,Xe)),n.value=a.add(n.value,a.mul(Nl.value,Xe)),c();const ha=a.negate(P.value);a.gt(ha,0)?(pl.value=a.min(a.div(n.value,ha),1),n.value=a.sub(n.value,a.mul(ha,pl.value).mul(Xe)).max(0)):pl.value=a.dOne});const{total:Al,trackerDisplay:ni}=dl({resource:n,goal:25e4,name:e,day:Aa,color:t,modal:{show:fa,display:ai}});return{name:e,day:Aa,color:t,oil:n,totalOil:Al,depth:o,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:x,buildHeavy2:M,activeExtractor:L,buildExtractor:Ce,activePump:ke,buildPump:Oe,activeBurner:pe,buildBurner:fe,activeSmelter:Qe,buildSmelter:He,extractorCoal:ae,extractorOre:Le,coalEffectiveness:tl,oilEffectiveness:pl,depthMilestones:rt,collapsedDepthMilestones:se,row1Upgrades:xt,row2Upgrades:wt,minWidth:700,oilMilestones:St,collapsedOilMilestones:Xt,generalTabCollapsed:li,display:S(()=>i(N,null,[ee(ni),i(ye,null,null),a.lt(tl.value,1)?i("div",null,[u("Coal efficiency: "),he(a.mul(tl.value,100)),u("%")]):null,a.lt(pl.value,1)?i("div",null,[u("Oil efficiency: "),he(a.mul(pl.value,100)),u("%")]):null,i(It,{resource:n,color:t,sticky:!0,productionDisplay:S(()=>i(N,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":i(N,null,[na(a.add(Nl.value,P.value))])]))},null),a.eq(Nl.value,0)?i(N,null,[u("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),i("br",null,null)]):"",i(Pl,null,{default:()=>[rt[6].earned.value?i(Pt,null,{default:()=>[ee(Oe),i("div",null,[ve(a.floor(ke.value)),u("/"),ve(a.floor(Oe.amount.value))]),We(at,At,qe,Fe)]}):null,St[0].earned.value?i(Pt,null,{default:()=>[ee(fe),i("div",null,[ve(a.floor(pe.value)),u("/"),ve(a.floor(fe.amount.value))]),We(Ke,ft,Ge,st)]}):null,St[2].earned.value?i(Pt,null,{default:()=>[ee(He),i("div",null,[ve(a.floor(Qe.value)),u("/"),ve(a.floor(He.amount.value))]),We(H,Et,Dt,ne)]}):null]}),i("br",null,null),i("div",null,[i("span",null,[u("The well is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[ve(o.value)]),u("m deep"),i("br",null,null),u("Next at "),he(a.sub(d.value,s.value)),u(" drill power seconds")]),i("div",null,[i("span",null,[u("Your drill power is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[he(el.value)])]),i(ye,null,null),i(Pl,null,{default:()=>[i(Pt,null,{default:()=>[ee(h),i("div",null,[ve(a.floor(p.value)),u("/"),ve(a.floor(h.amount.value))]),We(b,_,E,v)]}),rt[3].earned.value?i(Pt,null,{default:()=>[ee(M),i("div",null,[ve(a.floor(x.value)),u("/"),ve(a.floor(M.amount.value))]),We(k,be,Y,F)]}):null,rt[5].earned.value?i(Pt,null,{default:()=>[ee(Ce),i("div",null,[ve(a.floor(L.value)),u("/"),ve(a.floor(Ce.amount.value))]),We(ge,z,Re,Me)]}):null]}),i(ye,null,null),Sl(...St[1].earned.value?rt[1].earned.value?[xt,wt]:[xt]:[]),i(ye,null,null),_t(),a.gte(Al.value,50)?Yt():""]))}}),Er="metal",ln=7,nt=Ut(Er,function(){const e="Metal",t="#888B8D",l=ct(0,"metal ingots",void 0,!0),n=Ya(l),o=ct(0,"ore"),s=Ya(o),d=Z(()=>[C(()=>({multiplier:5,description:"Crucible",enabled:Me.bought})),C(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(Ee.amount.value,1)})),C(()=>({multiplier:2,description:"Industrial Furnace",enabled:z.bought})),C(()=>({multiplier:()=>a.add(at.value,1),description:"Hotter Forges",enabled:()=>a.gte(Fe.amount.value,1)})),C(()=>({multiplier:2,description:"Carry metal in boxes",enabled:Ze.row2Upgrades.metalUpgrade.bought})),C(()=>({multiplier:Ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Ve.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(lt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Ve.upgrades.redDyeUpg.bought}))]),c=g(()=>d.apply(.1)),p=Z(()=>[re(()=>({addend:()=>a.times(Ee.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(Ee.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),C(()=>({multiplier:()=>a.mul(Ye.activeSmelter.value,Ye.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ye.activeSmelter.value,0)})),C(()=>({multiplier:Ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Ve.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(Ue.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Ve.upgrades.redDyeUpg2.bought}))]),m=g(()=>p.apply(0)),y=Z(()=>[C(()=>({multiplier:3,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),C(()=>({multiplier:()=>a.add(Ye.activeBurner.value,1).mul(Ye.oilEffectiveness.value),description:"Blaster Burner",enabled:Ye.row2Upgrades[2].bought}))]),h=g(()=>y.apply(1)),b=1e10,v=g(()=>a.min(o.value,a.div(R.coal.value,b)).floor().max(0)),E=Tt(()=>({display:S(()=>{const fe=a.gte(v.value,1)?v.value:a.add(v.value,1);return i(N,null,[i("span",{style:"font-size: large"},[u("Smelt "),he(a.times(v.value,c.value))," ",l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost: "),ve(fe),u(" "),o.displayName,u(";")," ",ve(a.times(fe,b)),u(" "),R.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!r(this.canClick)||_(v.value)},style:{width:"600px",minHeight:"unset"}}));function _(fe,st=1){const[Ke,Ge,ft]=[a.times(fe,c.value).times(st),fe,a.times(fe,b)];l.value=a.add(l.value,Ke),o.value=a.sub(o.value,Ge),R.coal.value=a.sub(R.coal.value,ft)}const x=Z(()=>[re(()=>({addend:()=>Ae.amount.value,description:"Mining Drills",enabled:()=>a.gte(Ae.amount.value,1)})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ye.depthMilestones[2].earned})),C(()=>({multiplier:Ye.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)})),C(()=>({multiplier:2,description:"Carry ore in boxes",enabled:Ze.row2Upgrades.oreUpgrade.bought}))]),J=g(()=>x.apply(1)),M=Z(()=>[C(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Ce.bought})),C(()=>({multiplier:2,description:"Double Pickaxe",enabled:ge.bought})),C(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(Ae.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Drills",enabled:ke.bought})),C(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ye.row2Upgrades[1].bought}))]),k=g(()=>M.apply(a.recip(Y))),F=Se(0),Y=10,be=Wt(()=>({width:400,height:25,direction:Ie.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),L=Z(()=>[re(()=>({addend:J})),C(()=>({multiplier:k}))]),we=g(()=>L.apply(0)),ae=Z(()=>[re(()=>({addend:we})),re(()=>({addend:()=>a.negate(m.value),enabled:Oe}))]),Le=g(()=>ae.apply(0)),Ce=G(()=>({resource:T(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),ge=G(()=>({resource:T(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?

Halve the time to mine ore, again"},visibility:()=>B(ge.bought.value)})),Me=G(()=>({resource:T(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!

Increase the metal extracted per ore by 5x"},visibility:()=>B(Me.bought.value||a.div(s.value,c.value).plus(n.value).gte(1))})),Re=G(()=>({resource:T(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:()=>B(a.gte(Ae.amount.value,1)&&(Re.bought.value||X.days[7].opened.value||a.lt(R.computedCoalGain.value,a.times(J.value,k.value).times(b)))),onPurchase(){X.days[2].recentlyUpdated.value=!0}})),z=G(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(R.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),R.coal.value=a.sub(R.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 +`+o[ia])}),Il[e.id].clear()});const ut=Symbol("ProxyState"),Ml=Symbol("ProxyPath");function kt(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(s,d){if(d===ut)return o();const c=o()[d];return c&&typeof c=="object"&&Ql in c?c[Ql]:c},set(s,d,c){return o()[d]=c,!0},has(s,d){return d===ut?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,d){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(s,d)}})}var dt=window.state=ua({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Sn=jl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Bn(e){return JSON.stringify(e,(t,l)=>r(l))}const Nn={get(e,t){var n;if(t===ut||t===Ml)return e[t];const l=e[ut][t];if(t!=="value"&&(pi(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[ut])){const o=[...e[Ml],t];e[t]=new Proxy({[ut]:l,[Ml]:o},Nn)}return e[t]}return l},set(e,t,l,n){if(!dt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[ut][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Sn.autosave=!1,dt.hasNaN=!0,dt.NaNPath=[...e[Ml],t],dt.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Ml],t],e[ut]),"Attempted to set NaN value. See above for details"}return e[ut][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[ut])},has(e,t){return Reflect.has(e[ut],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ut],t)}};var ie=window.player=new Proxy({[ut]:Sn,[Ml]:["player"]},Nn);function Mn(e={}){return Object.assign({id:`${Ge.id}-0`,name:"Default Save",tabs:Ge.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ge.id,modVersion:Ge.versionNumber,layers:{}},e)}function Qt(e){const t=vl.compressToUTF16(Bn(e!=null?e:ie[ut]));return localStorage.setItem((e!=null?e:ie[ut]).id,t),t}async function xo(){To();try{let e=localStorage.getItem(tt.active);if(e==null){await El(Dl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ge.id){await El(Dl());return}t.id=tt.active,await El(t)}catch(e){console.error(`Failed to load save. Falling back to new save. +`,e),await El(Dl())}}function Dl(){const e=ea(),t=Mn({id:e});return Qt(t),tt.saves.push(e),t}function ea(){let e,t=0;do e=`${Ge.id}-${t++}`;while(localStorage.getItem(e));return e}const Ta=W(!1);async function El(e){console.info("Loading save",e),Ta.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await la(()=>Promise.resolve().then(function(){return Mo}),void 0),{fixOldSave:o,getInitialLayers:s}=await la(()=>Promise.resolve().then(function(){return Ur}),void 0);for(const d in t){const c=t[d];c&&l(c)}s(e).forEach(d=>n(d,e)),e=Mn(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,Ge.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ge.versionNumber&&o(e.modVersion,e),Object.assign(ie,e),tt.active=ie.id,je.emit("onLoad")}setInterval(()=>{ie.autosave&&Qt()},1e3);window.onbeforeunload=()=>{ie.autosave&&Qt()};window.save=Qt;const Po=window.hardReset=async()=>{await El(Dl())},Ll=jl({active:"",saves:[],showTPS:!0,theme:Na.Nordic,unthrottled:!1});Jt(Ll,e=>{const t=vl.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ge.id,t)},{deep:!0});var tt=window.settings=Ll;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Na.Nordic};je.emit("loadSettings",e),Object.assign(Ll,e),Po()};function To(){try{let e=localStorage.getItem(Ge.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Ll,t)}je.emit("loadSettings",Ll)}catch{}}const In=jl([]);function Fo(e){In.push(e)}const Dn=jl([]);function Uo(e){Dn.push(e)}const Ro=jl([]),Oo={class:"table"},Pt=ce({__name:"Column",setup(e){const t=g(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",Oo,[f("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),qo={class:"table"},Pl=ce({__name:"Row",setup(e){const t=g(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",qo,[f("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function Fa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!si(e)}function Pe(e,t="span"){return typeof e=="function"?ce({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),ce({template:e})):ce({render:()=>({})}):e}function ee(e){if(Gt(e))return typeof e=="function"?e():Pe(e);const t=e[Kt];return i(t,e[al](),null)}function We(...e){let t;return i(Pl,null,Fa(t=e.map(ee))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Pt,null,Fa(t=e.map(ee))?t:{default:()=>[t]})}function Sl(...e){return i("div",{class:"table-grid"},[e.map(t=>i("div",{class:{["row-grid"]:!0,mergeAdjacent:Bl[tt.theme].mergeAdjacent}},[t.map(ee)]))])}function jt(e){if(Gt(e))return typeof e=="function"?e():typeof e=="string"?i(N,null,[e]):i(e,null,null);const t=e[Kt];return i(t,e[al](),null)}function Go(...e){let t;return i(Pt,null,Fa(t=e.map(jt))?t:{default:()=>[t]})}function Gt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[$l]===!0}function xn(e,t,l){const n=W(null),o=W(void 0);function s(p){n.value||(n.value=setInterval(c,250)),o.value=p,l&&(l.value=!0)}function d(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return un(d),{start:s,stop:d,handleHolding:c}}function $o(e,t){const l=g(()=>e.filter(n=>r(n.visibility)===Je.Visible&&t(n)));return{firstFeature:g(()=>l.value[0]),collapsedContent:S(()=>Ht(...l.value.slice(1))),hasCollapsedContent:g(()=>l.value.length>1)}}function Tl(e,t="div"){const l=Rt();return Ft(()=>{l.value=Pe(ot(e),t)}),l}function yl(e,t="div"){const l=Rt(null);return Ft(()=>{const n=ot(e);l.value=n==null?null:Pe(n,t)}),l}function Qo(e){return g(()=>ot(e))}function ot(e){return r(r(e))}function L(...e){return e.includes(Object)||e.push(Object),e}const we=ce({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(w(),D("div",{style:it({width:e.width,height:e.height})},null,4))}});const Lo={},Vo={class:"notif"};function Ho(e,t){return w(),D("div",Vo,"!")}var Xa=Te(Lo,[["render",Ho],["__scopeId","data-v-66323fd4"]]);const ca=e=>(rl("data-v-9de19f28"),e=e(),ul(),e),jo={key:0,class:"day feature dontMerge opened"},Wo={class:"date"},Jo=u("Dec"),zo=ca(()=>f("br",null,null,-1)),Ko={class:"date"},Xo=u("Dec"),Yo=ca(()=>f("br",null,null,-1)),Zo=ca(()=>f("div",{class:"doors"},null,-1)),es={class:"date"},ts=u("Dec"),ls=ca(()=>f("br",null,null,-1)),as={key:0,class:"material-icons lock"},ns={key:1,class:"timer"},is={key:2,class:"timer"},os=ce({__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,n=g(()=>l.layer&&a.gte(X.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){n.value&&t("unlockLayer")}return(s,d)=>e.opened.value?(w(),D("div",jo,[i(ra,{appear:"",name:"door"},{default:ue(()=>[f("div",{class:"doors",onClick:d[0]||(d[0]=c=>t("openLayer"))},[f("div",Wo,[Jo,zo,u(Be(e.day),1)]),f("div",Ko,[Xo,Yo,u(Be(e.day),1)])])]),_:1}),f("div",{class:"icon",style:it({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:d[1]||(d[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(w(),oe(Xa,{key:0})):q("",!0)])):(w(),D("div",{key:1,class:et(["day feature dontMerge",{can:r(n),locked:!r(n),canOpen:r(n)}]),onClick:o},[Zo,f("div",es,[ts,ls,u(Be(e.day),1)]),r(n)?q("",!0):(w(),D("div",as,"lock")),r(X).day.value===e.day&&!r(n)?(w(),D("div",ns,Be(r(Ba)(r(X).timeUntilNewDay.value,0)),1)):r(X).day.value===e.day&&e.layer==null?(w(),D("div",is,"NYI")):q("",!0),r(n)?(w(),oe(Xa,{key:3})):q("",!0)],2))}});var ss=Te(os,[["__scopeId","data-v-9de19f28"]]);const rs=ce({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=Tl(zt(t,"display")),n=Tl(zt(t,"content"));return(o,s)=>(w(),oe(Pt,{class:"collapsible-container"},{default:ue(()=>[f("button",{onClick:s[0]||(s[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(w(),oe(ze(r(l))))]),e.collapsed.value?q("",!0):(w(),oe(ze(r(n)),{key:0}))]),_:1}))}});var us=Te(rs,[["__scopeId","data-v-a72c16aa"]]);const ds={key:0},cs={key:0,class:"mark star"},ps=["src"],ms=ce({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(w(),D("div",ds,[e.mark===!0?(w(),D("div",cs)):(w(),D("img",{key:1,class:"mark",src:e.mark},null,8,ps))])):q("",!0)}});var pa=Te(ms,[["__scopeId","data-v-2207999f"]]);const vs=ce({__name:"Node",props:{id:null},setup(e){const l=pt(e),n=ta(Ma,()=>{}),o=ta(Ia,()=>{}),s=Rt(null),d=g(()=>s.value&&s.value.parentElement);return Jt([d,l.id],([c,p],[m,y])=>{m&&o(r(y)),c&&n(p,c)}),un(()=>o(r(l.id))),(c,p)=>(w(),D("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Wl=Te(vs,[["__scopeId","data-v-a48cb382"]]);const gs=ce({props:{progress:{type:L(String,Object,Number),required:!0},width:{type:L(Number),required:!0},height:{type:L(Number),required:!0},direction:{type:L(String),required:!0},display:L(Object,String,Function),visibility:{type:L(Number),required:!0},style:L(Object,String,Array),classes:L(Object),borderStyle:L(Object,String,Array),textStyle:L(Object,String,Array),baseStyle:L(Object,String,Array),fillStyle:L(Object,String,Array),mark:L(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:pa,Node:Wl},setup(e){const{progress:t,width:l,height:n,direction:o,display:s}=pt(e),d=g(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=g(()=>{const m={width:ot(l)+.5+"px",height:ot(n)+.5+"px"};switch(r(o)){case Me.Up:m.clipPath=`inset(${d.value}% -2px -2px -2px)`,m.width=ot(l)+2+"px";break;case Me.Down:m.clipPath=`inset(-2px -2px ${d.value}% -2px)`,m.width=ot(l)+2+"px";break;case Me.Right:m.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Me.Left:m.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Me.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=yl(s);return{normalizedProgress:d,barStyle:c,component:p,unref:r,Visibility:Je}}});function fs(e,t,l,n,o,s){var p,m,y,h,b,v,E;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:it([{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:et({bar:!0,...e.unref(e.classes)})},[f("div",{class:"overlayTextContainer border",style:it([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(w(),D("span",{key:0,class:"overlayText",style:it(e.unref(e.textStyle))},[(w(),oe(ze(e.component)))],4)):q("",!0)],4),f("div",{class:"border",style:it([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(y=e.unref(e.style))!=null?y:{},(h=e.unref(e.baseStyle))!=null?h:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[f("div",{class:"fill",style:it([e.barStyle,(v=e.unref(e.style))!=null?v:{},(E=e.unref(e.fillStyle))!=null?E:{}])},null,4)],4),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],6)):q("",!0)}var hs=Te(gs,[["render",fs],["__scopeId","data-v-730cc7a0"]]);const ys=Symbol("Bar");function Wt(e){return kt(()=>{const t=e();return t.id=bl("bar-"),t.type=ys,t[Kt]=hs,Q(t,"visibility"),gt(t,"visibility",Je.Visible),Q(t,"width"),Q(t,"height"),Q(t,"direction"),Q(t,"style"),Q(t,"classes"),Q(t,"borderStyle"),Q(t,"baseStyle"),Q(t,"textStyle"),Q(t,"fillStyle"),Q(t,"progress"),Q(t,"display"),Q(t,"mark"),t[al]=function(){const{progress:l,width:n,height:o,direction:s,display:d,visibility:c,style:p,classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:v,mark:E,id:_}=this;return{progress:l,width:n,height:o,direction:s,display:d,visibility:c,style:r(p),classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:v,mark:E,id:_}},t})}var bs=ce({props:{display:{type:L(Object,String,Function),required:!0},visibility:{type:L(Number),required:!0},style:L(Object,String,Array),classes:L(Object),onClick:Function,onHold:Function,canClick:{type:L(Boolean),required:!0},small:Boolean,mark:L(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Wl,MarkNode:pa},setup(e){const{display:t,onClick:l,onHold:n}=pt(e),o=Rt("");Ft(()=>{const c=ot(t);if(c==null){o.value="";return}if(Gt(c)){o.value=Pe(c);return}const p=Pe(c.title||"","h3"),m=Pe(c.description,"div");o.value=Pe(S(()=>i("span",null,[c.title?i("div",null,[i(p,null,null)]):null,i(m,null,null)])))});const{start:s,stop:d}=xn(l,n,e.isHolding);return{start:s,stop:d,comp:o,Visibility:Je,unref:r}}});function ws(e,t,l,n,o,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:it([{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:et({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)?(w(),oe(ze(e.unref(e.comp)),{key:0})):q("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],38)):q("",!0)}var Pn=Te(bs,[["render",ws],["__scopeId","data-v-8cedd7da"]]);const As=Symbol("Clickable");function Tt(e){return kt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=bl("clickable-"),t.type=As,t[Kt]=Pn,t.isHolding=W(!1),Q(t,"visibility"),gt(t,"visibility",Je.Visible),Q(t,"canClick"),gt(t,"canClick",!0),Q(t,"classes"),Q(t,"style"),Q(t,"mark"),Q(t,"display"),t.onClick){const n=t.onClick.bind(t);t.onClick=function(o){r(t.canClick)&&n(o)}}if(t.onHold){const n=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&n()}}return t[al]=function(){const{display:n,visibility:o,style:s,classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:v}=this;return{display:n,visibility:o,style:r(s),classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:v}},t})}function ct(e,t="points",l=0,n=void 0){const o=vt(e)?e:Se(e);if(o.displayName=t,o.precision=l,o.small=n,!vt(e)){const s=o[Ql];s.displayName=t,s.precision=l,s.small=n}return o}function Ya(e){const t=Se(e.value);return Jt(e,l=>{Ta.value||a.gt(l,t.value)&&(t.value=l)}),t}function Cs(e){const t=Se(e.value);return Jt(e,(l,n)=>{Ta.value||a.gt(l,n)&&(t.value=a.add(t.value,a.sub(l,n)))}),t}new a("10^^8");new a("1e100");function Jl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?te(e.small?l:a.floor(l)):V(l,e.precision,e.small)}const ks=["x1","y1","x2","y2"],Es=ce({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=pt(e),n=g(()=>{const s=l.startNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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}),o=g(()=>{const s=l.endNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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,d)=>(w(),D("line",hl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(n).x,y1:r(n).y,x2:r(o).x,y2:r(o).y}),null,16,ks))}});const _s=ce({__name:"Links",props:{links:null},setup(e){var p;const l=zt(e,"links"),n=W(null),o=ta(Da,W({})),s=ta(xa,W(void 0)),d=W((p=n.value)==null?void 0:p.getBoundingClientRect());Jt(s,()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()}),oa(()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()});const c=g(()=>{var y,h;const m=o.value;return(h=(y=l.value)==null?void 0:y.filter(b=>{var v,E;return((v=m[b.startNode.id])==null?void 0:v.rect)&&((E=m[b.startNode.id])==null?void 0:E.rect)}))!=null?h:[]});return(m,y)=>(w(),D(N,null,[r(c)?(w(),D("svg",ri(hl({key:0},m.$attrs)),[(w(!0),D(N,null,Sa(r(c),(h,b)=>(w(),oe(Es,{key:b,link:h,boundingRect:d.value,startNode:r(o)[h.startNode.id],endNode:r(o)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):q("",!0),f("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var Ss=Te(_s,[["__scopeId","data-v-063f6d6b"]]);ce({props:{nodes:{type:L(Array),required:!0},leftSideNodes:L(Array),rightSideNodes:L(Array),branches:L(Array)},components:{Links:Ss},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:n}=pt(e),o=Rt();Ft(()=>{const c=ot(t);o.value=Pe(S(()=>i(N,null,[c.map(p=>i("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(jt)]))])))});const s=Rt();Ft(()=>{const c=ot(l);s.value=c?Pe(S(()=>i("span",{class:"left-side-nodes small"},[c.map(jt)]))):""});const d=Rt();return Ft(()=>{const c=ot(n);d.value=c?Pe(S(()=>i("span",{class:"side-nodes small"},[c.map(jt)]))):""}),{unref:r,nodesComp:o,leftNodesComp:s,rightNodesComp:d}}});ce({props:{display:L(Object,String,Function),visibility:{type:L(Number),required:!0},style:L(String,Object,Array),classes:L(Object),onClick:Function,onHold:Function,color:L(String),glowColor:L(String),canClick:{type:L(Boolean),required:!0},mark:L(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:pa,Node:Wl},setup(e){const{onClick:t,onHold:l,display:n}=pt(e),o=yl(n),{start:s,stop:d}=xn(t,l);return{start:s,stop:d,comp:o,unref:r,Visibility:Je,isCoercableComponent:Gt}}});function nl(e){const t=[],l={};let n=!1;function o(){return n||(t.push(...e()),l.base=t.map(c=>ht(c.base)),l.baseText=t.map(c=>ht(c.baseText)),l.visible=t.map(c=>ht(c.visible)),n=!0),t}const s=Se({});return[S(()=>{const c=o();let p=!0;const m=c.map((y,h)=>{var _,x,z;if(r(l.visible[h])===!1)return null;const b=i("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[i("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[u("\u25BC")]),y.title,y.subtitle?i("span",{class:"subtitle"},[u(" ("),y.subtitle,u(")")]):null]),v=r(s.value[h])?null:i(N,null,[i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[jt((_=r(l.baseText[h]))!=null?_:"Base")]),i("span",{class:"modifier-amount"},[V((x=r(l.base[h]))!=null?x:1),y.unit])]),jt(r(y.modifier.description))]),E=!p;return p=!1,i(N,null,[E?i("br",null,null):null,i("div",null,[b,i("br",null,null),v,i("hr",null,null),i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[u("Total")]),i("span",{class:"modifier-amount"},[V(y.modifier.apply((z=r(l.base[h]))!=null?z:1)),y.unit])])])])});return i(N,null,[m])}),s]}function Vl(e){const t=Object.values(e).reverse(),l=Se(!0),n=g(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:o,collapsedContent:s,hasCollapsedContent:d}=$o(t,p=>p.earned.value),c=S(()=>{const p=[...n.value];return o.value&&p.push(o.value),Go(...p,S(()=>sa(i(us,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[rn,r(d)]])))});return{collapseMilestones:l,display:c}}function dl(e){const t=e.ignoreTotal?e.resource:Cs(e.resource),l=()=>{var c,p;if(X.day.value!==e.day)return 1;let s=a.add(t.value,1),d=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:ie.usingLog)&&(s=s.log10(),d=a.log10(d)),a.div(s,d)},n=Wt(()=>({direction:Me.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:S(()=>X.day.value===e.day?i(N,null,[fe(t.value),u("/"),fe(e.goal)]):"")})),o=S(()=>i(N,null,[i("div",null,[X.day.value===e.day?i(N,null,[u("Reach "),fe(e.goal),u(" "),e.ignoreTotal?"":"total ",e.resource.displayName,u(" to complete the day")]):i(N,null,[e.name,u(" Complete!")]),e.modal?i(N,null,[" ",u("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[u("Check Modifiers")])]):void 0]),ee(n),e.modal?ee(e.modal.display):void 0]));return Ft(()=>{X.day.value===e.day&&a.gte(t.value,e.goal)&&X.completeDay()}),{total:t,trackerDisplay:o}}function Lt(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Tt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),n=Tt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Tt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),s=Tt(()=>({display:"Max",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:n,add:o,max:s}}const Bs=Symbol("Buyable");function xe(e){const t=Se(0);return kt(()=>{var s,d,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=Bs,l[Kt]=Pn,l.amount=t,l.amount[fl]=(s=l.initialValue)!=null?s:0,l.canAfford=g(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&a.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=g(()=>r(l.visibility)===Je.Visible&&r(l.canAfford)&&a.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=g(()=>a.gte(l.amount.value,r(l.purchaseLimit))),Q(l,"classes");const n=l.classes;l.classes=g(()=>{const p=r(n)||{};return l.maxed.value&&(p.bought=!0),p}),Q(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var y;const p=l;if(!r(p.canPurchase))return;const m=r(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=a.sub(p.resource.value,m),p.amount.value=a.add(p.amount.value,1)),(y=p.onPurchase)==null||y.call(p,m)},Q(l,"display");const o=l.display;return l.display=S(()=>{const p=r(o);if(Gt(p)){const m=Pe(p);return i(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,y=Pe(p.title||"","h3"),h=Pe(p.description||""),b=Pe(p.effectDisplay||"");return i("span",null,[p.title?i("div",null,[i(y,null,null)]):null,p.description?i(h,null,null):null,p.showAmount===!1?null:i("div",null,[i("br",null,null),r(m.purchaseLimit)===a.dInf?i(N,null,[u("Amount: "),te(m.amount.value)]):i(N,null,[u("Amount: "),te(m.amount.value),u(" /")," ",te(r(m.purchaseLimit))])]),p.effectDisplay?i("div",null,[i("br",null,null),u("Currently: "),i(b,null,null)]):null,m.cost&&!m.maxed.value?i("div",null,[u("Cost: "),V(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),Q(l,"visibility"),gt(l,"visibility",Je.Visible),Q(l,"cost"),Q(l,"resource"),Q(l,"purchaseLimit"),gt(l,"purchaseLimit",a.dInf),Q(l,"style"),Q(l,"mark"),Q(l,"small"),l[al]=function(){const{display:p,visibility:m,style:y,classes:h,onClick:b,canClick:v,small:E,mark:_,id:x}=this;return{display:p,visibility:m,style:r(y),classes:h,onClick:b,canClick:v,small:E,mark:_,id:x}},l})}const ma=ua({}),Ua=Symbol("Hotkey");function xl(e){return kt(()=>{const t=e();return t.type=Ua,Q(t,"enabled"),gt(t,"enabled",!0),Q(t,"description"),t})}je.on("addLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=t})});je.on("removeLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=void 0})});document.onkeydown=function(e){var n;if(((n=e.target)==null?void 0:n.tagName)==="INPUT"||Ga.value&&!ie.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=ma[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};Uo(S(()=>{const e=Object.values(ma).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":i("div",null,[i("br",null,null),i("h4",null,[u("Hotkeys")]),e.map(t=>i("div",null,[t==null?void 0:t.key,u(": "),t==null?void 0:t.description]))])}));const Ns=ce({__name:"Sticky",setup(e){const t=W("0"),l=new ResizeObserver(o),n=Rt(null);function o(){let s=n.value;if(s==null)return;let d=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(d+=c.offsetHeight),s=c}t.value=d+"px"}return _l(o),document.fonts.ready.then(o),oa(()=>{var d;const s=(d=n.value)==null?void 0:d.parentElement;s&&l.observe(s)}),(s,d)=>(w(),D("div",{class:"sticky",style:it({top:t.value}),ref_key:"element",ref:n,"data-v-sticky":""},[Vt(s.$slots,"default",{},void 0,!0)],4))}});var Tn=Te(Ns,[["__scopeId","data-v-cccac690"]]);const Za=ce({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=g(()=>Jl(t.resource));return(n,o)=>(w(),D("h2",{style:it({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Be(r(l)),5))}});const Ms={class:"main-display"},Is={key:0},Ds={key:1},xs=u(", "),Ps={key:2},Ts=f("br",null,null,-1),Fs={class:"main-display"},Us={key:0},Rs={key:1},Os=u(", "),qs={key:2},Gs=f("br",null,null,-1),Mt=ce({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=pt(e),n=W(null),o=yl(l.effectDisplay),s=W(null),d=yl(l.productionDisplay),c=g(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var y,h;return e.sticky?(w(),oe(Tn,{key:0},{default:ue(()=>{var b,v,E,_;return[f("div",{class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:it([{"min-height":`${((E=(v=n.value)==null?void 0:v.$el.clientHeight)!=null?E:0)+50}px`},(_=e.style)!=null?_:{}])},[f("div",Ms,[r(c)?(w(),D("span",Is,"You have ")):q("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Be(e.resource.displayName),1),r(o)?(w(),D("span",Ds,[xs,(w(),oe(ze(r(o)),{ref_key:"effectRef",ref:n},null,512))])):q("",!0),r(d)?(w(),D("span",Ps,[Ts,(w(),oe(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):q("",!0)])],6)]}),_:1})):(w(),D("div",{key:1,class:et(["main-display-container",(y=e.classes)!=null?y:{}]),style:it([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[f("div",Fs,[r(c)?(w(),D("span",Us,"You have ")):q("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Be(e.resource.displayName),1),r(o)?(w(),D("span",Rs,[Os,(w(),oe(ze(r(o)),{ref_key:"effectRef",ref:n},null,512))])):q("",!0),r(d)?(w(),D("span",qs,[Gs,(w(),oe(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):q("",!0)])],6))}}});var $s=ce({props:{display:{type:L(String,Object,Function),required:!0},visibility:{type:L(Number),required:!0},style:L(String,Object,Array),classes:L(Object),resource:Object,cost:L(String,Object,Number),canPurchase:{type:L(Boolean),required:!0},bought:{type:L(Boolean),required:!0},mark:L(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Wl,MarkNode:pa},setup(e){const{display:t,cost:l}=pt(e),n=Rt("");return Ft(()=>{const o=ot(t);if(o==null){n.value="";return}if(Gt(o)){n.value=Pe(o);return}const s=ot(l),d=Pe(o.title||"","h3"),c=Pe(o.description,"div"),p=Pe(o.effectDisplay||"");n.value=Pe(S(()=>{var m;return i("span",null,[o.title?i("div",null,[i(d,null,null)]):null,i(c,null,null),o.effectDisplay?i("div",null,[u("Currently: "),i(p,null,null)]):null,e.resource!=null&&o.showCost!==!1?i(N,null,[i("br",null,null),u("Cost: "),e.resource&&Jl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:n,unref:r,Visibility:Je}}});const Qs=["disabled"];function Ls(e,t,l,n,o,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:it([{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:et({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)?(w(),oe(ze(e.unref(e.component)),{key:0})):q("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],14,Qs)):q("",!0)}var Vs=Te($s,[["render",Ls],["__scopeId","data-v-7f411ac8"]]);const Hs=Symbol("Upgrade");function G(e){const t=Se(!1);return kt(()=>{const l=e();return l.id=bl("upgrade-"),l.type=Hs,l[Kt]=Vs,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=g(()=>{const n=l;return n.resource!=null&&n.cost!=null&&a.gte(n.resource.value,r(n.cost))}):Q(l,"canAfford"),l.canPurchase=g(()=>r(l.visibility)===Je.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var o;const n=l;!r(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=a.sub(n.resource.value,r(n.cost))),t.value=!0,(o=n.onPurchase)==null||o.call(n))},Q(l,"visibility"),gt(l,"visibility",Je.Visible),Q(l,"classes"),Q(l,"style"),Q(l,"display"),Q(l,"mark"),Q(l,"cost"),Q(l,"resource"),l[al]=function(){const{display:n,visibility:o,style:s,classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:v}=this;return{display:n,visibility:o,style:r(s),classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:v}},l})}function re(e){return kt(()=>{const{addend:t,description:l,enabled:n}=e(),o=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.add(c,r(o)),revert:c=>a.sub(c,r(o)),enabled:d,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[jt(r(s))]):null,i("span",{class:"modifier-amount"},[a.gte(r(o),0)?"+":"",V(r(o))])]))}})}function C(e){return kt(()=>{const{multiplier:t,description:l,enabled:n}=e(),o=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.times(c,r(o)),revert:c=>a.div(c,r(o)),enabled:d,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[jt(r(s))]):null,i("span",{class:"modifier-amount"},[u("\xD7"),V(r(o))])]))}})}function Fn(e){return kt(()=>{const{exponent:t,description:l,enabled:n,supportLowNumbers:o}=e(),s=ht(t),d=ht(l),c=n==null?void 0:ht(n);return{apply:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.pow(m,r(s)),o&&(m=a.sub(m,1)),m},revert:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.root(m,r(s)),o&&(m=a.sub(m,1)),m},enabled:c,description:l==null?void 0:S(()=>i("div",{class:"modifier-container"},[r(d)?i("span",{class:"modifier-description"},[jt(r(d)),o?" (+1 effective)":null]):null,i("span",{class:"modifier-amount"},[u("^"),V(r(s))])]))}})}function Z(e){return kt(()=>{const t=e();return{apply:l=>t.filter(n=>r(n.enabled)!==!1).reduce((n,o)=>o.apply(n),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(n=>r(n.enabled)!==!1).reduceRight((n,o)=>o.revert(n),l):void 0,enabled:g(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:S(()=>i(N,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(jt)]))}})}function Un(e){return kt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=g(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=g(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.nextAt==null&&(t.nextAt=g(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.convert==null&&(t.convert=function(){var o;const l=r(t.currentGain),n=r(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),Q(t,"currentGain"),Q(t,"actualGain"),Q(t,"currentAt"),Q(t,"nextAt"),Q(t,"buyMax"),gt(t,"buyMax",!0),Q(t,"roundUpCost"),gt(t,"roundUpCost",!0),t})}function Ra(e,t){const l=ht(e),n=ht(t);return{currentGain(o){let s=r(o.baseResource.value);if(o.costModifier&&(s=o.costModifier.apply(s)),a.lt(s,r(l)))return 0;const d=a.div(s,r(l)).pow(r(n));return d.isNan()?new a(0):d},currentAt(o){let s=r(o.currentGain);return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s},nextAt(o){let s=a.add(r(o.currentGain),1).floor();return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)).max(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s}}}function Rn(e){return Un(e)}function js(e){return Un(()=>{const t=e();return gt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=g(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(a.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=g(()=>{let l=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),gt(t,"convert",function(){var o;const l=r(t.actualGain),n=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t})}const Ws={},Js={style:{"white-space":"nowrap"}},zs=f("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ks={style:{"text-decoration":"overline"}};function Xs(e,t){return w(),D("span",Js,[zs,f("span",Ks,[Vt(e.$slots,"default")])])}var Oa=Te(Ws,[["render",Xs]]);const Ys={class:"field"},Zs={key:0,class:"field-title"},qa=ce({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var d;const l=e,n=yl(zt(l,"title"),"span"),o=W((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);Jt(zt(l,"modelValue"),c=>{var p;ot(o)!==c&&(o.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(w(),D("div",Ys,[r(n)?(w(),D("span",Zs,[(w(),oe(ze(r(n))))])):q("",!0),i(r(mi),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>o.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 er=ce({props:{visibility:{type:L(Number),required:!0},display:{type:L(String,Object,Function),required:!0},style:L(String,Object,Array),classes:L(Object),earned:{type:L(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Wl},setup(e){const{display:t}=pt(e),l=Rt("");return Ft(()=>{const n=ot(t);if(n==null){l.value="";return}if(Gt(n)){l.value=Pe(n);return}const o=Pe(n.requirement,"h3"),s=Pe(n.effectDisplay||"","b"),d=Pe(n.optionsDisplay||"","span");l.value=Pe(S(()=>i("span",null,[i(o,null,null),n.effectDisplay?i("div",null,[i(s,null,null)]):null,n.optionsDisplay?i("div",{class:"equal-spaced"},[i(d,null,null)]):null])))}),{comp:l,unref:r,Visibility:Je}}});function tr(e,t,l,n,o,s){var c;const d=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:et({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(w(),oe(ze(e.unref(e.comp)))),i(d,{id:e.id},null,8,["id"])],6)):q("",!0)}var lr=Te(er,[["render",tr],["__scopeId","data-v-f4e8794e"]]);je.on("setupVue",e=>e.use(vi));function ar(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const en=cn(),nr=Symbol("Milestone");let gl;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(gl||(gl={}));function R(e){const t=Se(!1);return kt(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=bl("milestone-"),l.type=nr,l[Kt]=lr,l.earned=t,l.complete=function(){var d;const s=l;if(t.value=!0,(d=s.onComplete)==null||d.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=Pe(Gt(c)?c:c.requirement);en(i(N,null,[i("h3",null,[u("Milestone earned!")]),i("div",null,[i(p,null,null)])]))}},Q(l,"visibility"),gt(l,"visibility",Je.Visible);const n=l.visibility;if(l.visibility=g(()=>{const s=r(l.display);switch(tt.msDisplay){default:case gl.All:return r(n);case gl.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?Je.None:r(n);case gl.Incomplete:return r(l.earned)?Je.None:r(n);case gl.None:return Je.None}}),Q(l,"style"),Q(l,"classes"),Q(l,"display"),Q(l,"showPopups"),l[al]=function(){const{visibility:s,display:d,style:c,classes:p,earned:m,id:y}=this;return{visibility:s,display:d,style:r(c),classes:p,earned:m,id:y}},l.shouldEarn){const s=l;Ft(()=>{var d,c;if(tt.active===ie.id&&!s.earned.value&&r(s.visibility)===Je.Visible&&((d=s.shouldEarn)==null?void 0:d.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Pe(Gt(p)?p:p.requirement);en(i(N,null,[i("h3",null,[u("Milestone earned!")]),i("div",null,[i(m,null,null)])]))}})}return l})}je.on("loadSettings",e=>{gt(e,"msDisplay",gl.All)});const ir=Object.values(gl).map(e=>({label:wn(e),value:e}));Fo(S(()=>i(qa,{title:"Show Milestones",options:ir,"onUpdate:modelValue":e=>tt.msDisplay=e,modelValue:tt.msDisplay},null)));const or=ce({props:{visibility:{type:L(Number),required:!0},display:{type:L(Object,String,Function),required:!0},style:L(String,Object,Array),classes:L(Object),glowColor:L(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:l,glowColor:n,floating:o}=pt(e),s=Tl(l),d=g(()=>{const p=ot(n);return p?r(o)?ar(p):{boxShadow:`0px 9px 5px -6px ${p}`}:{}});function c(){t("selectTab")}return{selectTab:c,component:s,glowColorStyle:d,unref:r,Visibility:Je}}});function sr(e,t,l,n,o,s){var d;return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,onClick:t[0]||(t[0]=(...c)=>e.selectTab&&e.selectTab(...c)),class:et(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(d=e.unref(e.style))!=null?d:{}])},[(w(),oe(ze(e.component)))],6)):q("",!0)}var On=Te(or,[["render",sr],["__scopeId","data-v-610a2549"]]);const rr=ce({props:{visibility:{type:L(Number),required:!0},activeTab:{type:L(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:L(Object),required:!0},style:L(String,Object,Array),classes:L(Object),buttonContainerStyle:L(String,Object,Array),buttonContainerClasses:L(Object)},components:{Sticky:Tn,TabButton:On},setup(e){const{activeTab:t}=pt(e),l=g(()=>Bl[tt.theme].floatingTabs),n=Rt("");Ft(()=>{const c=ot(t);if(c==null){n.value="";return}if(Gt(c)){n.value=Pe(c);return}n.value=Pe(r(c.display))});const o=g(()=>{const c=ot(t);return Gt(c)||!c?void 0:r(c.classes)}),s=g(()=>{const c=ot(t);return Gt(c)||!c?void 0:r(c.style)});function d(c){const{display:p,style:m,classes:y,glowColor:h,visibility:b}=c;return{display:p,style:r(m),classes:y,glowColor:h,visibility:b}}return{floating:l,tabClasses:o,tabStyle:s,Visibility:Je,component:n,gatherButtonProps:d,unref:r}}});function ur(e,t,l,n,o,s){var p,m;const d=ll("TabButton"),c=ll("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,class:et(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:it([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[],(m=e.tabStyle)!=null?m:[]])},[i(c,{class:et(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:it(e.unref(e.buttonContainerStyle))},{default:ue(()=>[f("div",{class:et(["tab-buttons",{floating:e.floating}])},[(w(!0),D(N,null,Sa(e.unref(e.tabs),(y,h)=>(w(),oe(d,hl({onSelectTab:b=>e.selected.value=h,floating:e.floating,key:h,active:e.unref(y.tab)===e.unref(e.activeTab)},e.gatherButtonProps(y)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(w(),oe(ze(e.unref(e.component)),{key:0})):q("",!0)],6)):q("",!0)}var dr=Te(rr,[["render",ur],["__scopeId","data-v-11575f45"]]);const cr=Symbol("TabButton"),pr=Symbol("TabFamily");function mr(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const l=Se(Object.keys(e)[0]);return kt(()=>{var s;const n=(s=t==null?void 0:t())!=null?s:{};n.id=bl("tabFamily-"),n.type=pr,n[Kt]=dr,n.tabs=Object.keys(e).reduce((d,c)=>{const p=e[c]();return p.type=cr,p[Kt]=On,Q(p,"visibility"),gt(p,"visibility",Je.Visible),Q(p,"tab"),Q(p,"display"),Q(p,"classes"),Q(p,"style"),Q(p,"glowColor"),d[c]=p,d},{}),n.selected=l,n.activeTab=g(()=>{const d=r(o.tabs);if(l.value in d&&r(d[l.value].visibility)===Je.Visible)return r(d[l.value].tab);const c=Object.values(d).find(p=>r(p.visibility)===Je.Visible);return c?r(c.tab):null}),Q(n,"visibility"),gt(n,"visibility",Je.Visible),Q(n,"classes"),Q(n,"style"),Q(n,"buttonContainerClasses"),Q(n,"buttonContainerStyle"),n[al]=function(){const{visibility:d,activeTab:c,selected:p,tabs:m,style:y,classes:h,buttonContainerClasses:b,buttonContainerStyle:v}=this;return{visibility:d,activeTab:c,selected:p,tabs:m,style:r(y),classes:h,buttonContainerClasses:b,buttonContainerStyle:v}};const o=n;return o})}const vr=ce({__name:"Tab",props:{display:null},setup(e){const t=e,{display:l}=pt(t),n=Tl(l);return(o,s)=>(w(),oe(ze(r(n))))}}),gr=Symbol("Tab");function wa(e){return kt(()=>{const t=e();return t.id=bl("tab-"),t.type=gr,t[Kt]=vr,t[al]=function(){const{display:l}=this;return{display:l}},t})}const fr={class:"field"},hr=ce({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,n=g(()=>Pe(r(l.title)||"","span")),o=g({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,d)=>(w(),D("label",fr,[sa(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>vt(o)?o.value=c:null)},null,512),[[ui,r(o)]]),(w(),oe(ze(r(n))))]))}});var sl=Te(hr,[["__scopeId","data-v-33d57459"]]);const yr=Symbol("Reset");function br(e){return kt(()=>{const t=e();return t.id=bl("reset-"),t.type=yr,t.reset=function(){var n;const l=o=>{if(o&&typeof o=="object")if(fl in o){const s=o;s.value=s[fl]}else!(o instanceof a)&&!vt(o)&&Object.values(o).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),je.emit("reset",t),(n=t.onReset)==null||n.call(t)},Q(t,"thingsToReset"),t})}const Zl={};je.on("removeLayer",e=>{var t;(t=Zl[e.id])==null||t.call(Zl),Zl[e.id]=void 0});const wr="dyes",Ar=11,Le=Ut(wr,function(){const e="Dyes",t="#D4D4F4";function l(v){const E=ct(0,v.name),_=Z(()=>[re(()=>({addend:()=>a.add(z.amount.value,1),description:`${v.name} Chambers`})),C(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1",enabled:v.color=="red"||v.color=="yellow"})),C(()=>({multiplier:o.green1,description:"Green Dye Boost 1",enabled:v.color=="yellow"||v.color=="blue"})),C(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1",enabled:v.color=="red"||v.color=="blue"})),C(()=>({multiplier:2,description:"Wetter Dyes",enabled:()=>c.yellowDyeUpg.bought.value&&(v.color=="red"||v.color=="yellow"||v.color=="blue")}))]),x=g(()=>_.apply(0)),z=xe(()=>{const I=ht(v.costs);return{...v,style:()=>({backgroundColor:r(z.canPurchase)?t:"#545454",minWidth:"200px"}),display:S(()=>i("span",null,[i("h3",null,[v.name,u(" Chambers")]),i("br",null,null),u("Create "),V(x.value),u(" "),v.name,v.dyesToReset.length>0?", but reset "+v.dyesToReset.map(k=>k.name).join(", "):"",u("."),i("br",null,null),i("br",null,null),i("span",{class:"white-space: pre-wrap"},[u("Currently:")," ",v.listedBoosts.filter(k=>r(k.visible)).map(k=>ee(S(()=>i("div",null,[r(k.desc)]))))]),i("br",null,null),i("div",null,[u("Cost:")," ",r(I).map(k=>ee(S(()=>{var F,Y;return i("div",null,[V(r(a.pow((F=r(z.cost))!=null?F:a.dInf,r((Y=k.root)!=null?Y:1)).times(r(k.base))))," ",k.res.displayName,i("br",null,null)])})))])])),cost(){let k=z.amount.value;return a.gte(k,25)&&(k=a.pow(k,2).div(20)),a.gte(k,10)&&(k=a.pow(k,2).div(5)),a.div(k,10).plus(1)},canPurchase:g(k=>{var Y;if(r(z.visibility)!=Je.Visible)return!1;const F=(Y=k!=null?k:r(z.cost))!=null?Y:a.dInf;return r(I).every(Ae=>{var H;return a.div(Ae.res.value,r(Ae.base)).root(r((H=Ae.root)!=null?H:1)).gte(F)})}),onPurchase(k){var Y;const F=(Y=k!=null?k:r(z.cost))!=null?Y:a.dInf;r(I).forEach(Ae=>{var H;Ae.res.value=a.sub(Ae.res.value,a.pow(F,r((H=Ae.root)!=null?H:1)).times(r(Ae.base)))}),E.value=a.add(E.value,x.value),z.amount.value=a.add(z.amount.value,1),v.dyesToReset.forEach(Ae=>Ae.reset())}}});return{name:v.name,amount:E,buyable:z,toGenerate:_,computedToGenerate:x,display:S(()=>i(Mt,{resource:E,color:v.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const n={red:l({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`+${V(o.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:l({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:de.logs},{base:g(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:g(()=>`+${te(o.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:n.red.amount},{base:10,root:2,res:n.yellow.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:g(()=>`/${V(o.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:n.yellow.amount},{base:10,root:2,res:n.blue.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:g(()=>`+${te(a.sub(o.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:n.blue.amount},{base:10,root:2,res:n.red.amount}],listedBoosts:[{visible:!0,desc:g(()=>`x${V(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:g(()=>`x${V(o.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}}]})},o={red1:g(()=>a.pow(a.add(n.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:g(()=>a.add(n.yellow.amount.value,1).log2().plus(1)),blue1:g(()=>a.add(n.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:g(()=>a.pow(2,a.add(n.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:g(()=>a.add(n.orange.amount.value,1).log2().plus(1)),green1:g(()=>a.pow(2,a.add(n.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:g(()=>a.add(n.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:g(()=>a.pow(2,a.add(n.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:g(()=>a.add(n.purple.amount.value,1).log2().plus(1))},[s,d]=nl(()=>[{title:"Red Dye Creation",modifier:n.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:n.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:n.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:n.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:n.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:n.purple.toGenerate,base:0}]),c={blueDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:S(()=>i(N,null,[u("Multiply Log gain by log"),i("sub",null,[u("10")]),u("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),redDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:S(()=>i(N,null,[u("Multiply Ore Purity by log"),i("sub",null,[u("10")]),u("(Cloth)+1.")]))},cost:1500,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),yellowDyeUpg:G(()=>({visibility:()=>B(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(100)||c.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:T(n.yellow.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),yellowDyeUpg2:G(()=>({visibility:()=>B(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:T(n.yellow.amount),onPurchase(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}})),redDyeUpg2:G(()=>({visibility:()=>B(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:S(()=>i(N,null,[u("Multiply Smelting Speed by "),i(Oa,null,{default:()=>[u("Refineries+1")]}),u(".")]))},cost:6e3,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),blueDyeUpg2:G(()=>({visibility:()=>B(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),coalUpg:G(()=>({visibility:()=>B(c.blueDyeUpg2.bought.value&&c.redDyeUpg2.bought.value&&c.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:O.coal,onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}}))},p=W(!1),m=S(()=>i(yt,{modelValue:p.value,"onUpdate:modelValue":v=>p.value=v},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:s})),y=ct(g(()=>Object.values(n).reduce((v,E)=>a.add(v,E.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:b}=dl({resource:y,goal:6e4,name:e,day:Ar,color:t,textColor:"var(--feature-foreground)",modal:{show:p,display:m},ignoreTotal:!0});return{name:e,color:t,dyes:n,dyeSum:y,boosts:o,totalDyeSum:h,minWidth:700,generalTabCollapsed:d,upgrades:c,display:S(()=>i(N,null,[ee(b),i(we,null,null),i("div",{style:"width: 620px"},[We(n.red.display,n.yellow.display,n.blue.display),We(n.red.buyable,n.yellow.buyable,n.blue.buyable),i(we,null,null),We(n.orange.display,n.green.display,n.purple.display),We(n.orange.buyable,n.green.buyable,n.purple.buyable)]),i(we,null,null),i("div",{class:"row",style:"vertical-align: top"},[Ht(c.redDyeUpg,c.redDyeUpg2),Ht(c.yellowDyeUpg,c.yellowDyeUpg2),Ht(c.blueDyeUpg,c.blueDyeUpg2)]),ee(c.coalUpg)]))}}),Cr="plastic",tn=10,Ue=Ut(Cr,function(){const e="Plastic",t="#DCD9CD",l=ct(0,"plastic"),[n,o]=nl(()=>[{title:"Plastic Gain",modifier:ke,base:0}]),s=W(!1),d=S(()=>i(yt,{modelValue:s.value,"onUpdate:modelValue":J=>s.value=J},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:n})),c=Se(0),p=g(()=>a.times(c.value,100)),m=xe(()=>({resource:nt.metal,cost(){const J=new a(this.amount.value);return a.pow(1.2,J).times(1e7)},display:S(()=>i(N,null,[i("h3",null,[u("Refinery")]),i("br",null,null),u("Refines oil into plastic pellets"),i("br",null,null),u("Consumes 100 oil/s to create 1 plastic/s"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(p.value),u(" oil/sec"),i("br",null,null),u("+"),V(c.value),u(" plastic/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:y,max:h,add:b,remove:v}=Lt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),E=g(()=>a.pow(5,a.add([...Object.values(I),...Object.values(Ae)].filter(J=>J.bought.value).length,2))),_=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!_.bought.value})})),x=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!x.bought.value})})),z=G(()=>({resource:T(l),cost:E,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!z.bought.value})})),I={paperTools:_,boxTools:x,clothTools:z},k=G(()=>({resource:T(l),cost:E,visibility:()=>B(_.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!k.bought.value})})),F=G(()=>({resource:T(l),cost:E,visibility:()=>B(x.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),Y=G(()=>({resource:T(l),cost:E,visibility:()=>B(z.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!Y.bought.value})})),Ae={paperElf:k,boxElf:F,clothElf:Y},H=xe(()=>({resource:T(l),cost(){const J=this.amount.value;return a.pow(1.3,J).times(100)},visibility:()=>B(k.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:S(()=>i(N,null,[te(H.amount.value),u("%")])),showAmount:!1}})),Ce=xe(()=>({resource:T(l),cost(){const J=this.amount.value;return a.pow(1.3,J).times(100)},visibility:()=>B(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:S(()=>i(N,null,[te(Ce.amount.value),u("%")])),showAmount:!1}})),ae=xe(()=>({resource:T(l),cost(){const J=this.amount.value;return a.pow(1.3,J).times(100)},visibility:()=>B(Y.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:S(()=>i(N,null,[te(a.times(ae.amount.value,10)),u("%")])),showAmount:!1}})),Ve={passivePaper:H,passiveBoxes:Ce,clothGains:ae},ke=Z(()=>[re(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),C(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:k.bought})),C(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),C(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:Y.bought})),C(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:Ze.row2Upgrades.plasticUpgrade.bought})),C(()=>({multiplier:()=>Ye.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ye.oilEffectiveness.value,1)})),C(()=>({multiplier:Le.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Le.dyes.yellow.amount.value,1)}))]),he=g(()=>ke.apply(0));je.on("update",J=>{a.lt(X.day.value,tn)||(l.value=a.times(J,he.value).add(l.value))});const{total:Ie,trackerDisplay:Re}=dl({resource:l,goal:25e4,name:e,day:tn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:d}});return{name:e,color:t,plastic:l,totalPlastic:Ie,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:I,elfUpgrades:Ae,buyables:Ve,generalTabCollapsed:o,minWidth:700,display:S(()=>i(N,null,[ee(Re),i(we,null,null),i(Mt,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(he.value,0)?`+${V(he.value)}/s`:void 0},null),i(we,null,null),i(Pt,null,{default:()=>[ee(m),i("div",null,[te(a.floor(c.value)),u("/"),te(a.floor(m.amount.value))]),We(y,v,b,h)]}),i(Pl,null,{default:()=>[Ht(_,k,H),Ht(x,F,Ce),Ht(z,Y,ae)]})]))}}),kr="oil",Aa=9,Ye=Ut(kr,function(){const e="Oil",t="#000000",l="var(--foreground)",n=ct(0,"oil"),o=ct(0,"depth"),s=Se(0),d=g(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function c(){if(a.lt(o.value,990)){const Xe=a.min(a.affordArithmeticSeries(s.value,10,1,o.value),a.sub(990,o.value)),Bt=a.sumArithmeticSeries(Xe,10,1,o.value);s.value=a.sub(s.value,Bt),o.value=a.add(o.value,Xe)}if(a.gte(o.value,990)){const Xe=a.affordGeometricSeries(s.value,1e3,1.001,a.sub(o.value,990)),Bt=a.sumGeometricSeries(Xe,1e3,1.001,a.sub(o.value,990));s.value=a.sub(s.value,Bt),o.value=a.add(o.value,Xe)}}const p=Se(0),m=g(()=>a.times(a.pow(p.value,z.value).pow(2),1e14)),y=g(()=>a.times(a.pow(p.value,z.value),1)),h=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(1.3,Xe).times(25e3)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Drill")]),i("br",null,null),u("A large drill specialized at deep mining."),i("br",null,null),u("Consumes 1e14*(Heavy Drills amount)"),i("sup",null,[u("2")]),u(" coal/sec for (Heavy Drills amount) drill power."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),be(m.value),u(" coal/sec"),i("br",null,null),u("+"),be(y.value),u(" drill power"),i("br",null,null),i("br",null,null),u("Cost: "),fe(r(h.cost)),u(" "),h.resource.displayName])),onPurchase(){p.value=a.add(p.value,1)},style:{color:l,width:"160px"}})),{min:b,max:v,add:E,remove:_}=Lt({buyable:h,active:p}),x=Se(0),z=g(()=>a.add(x.value,Math.E).ln()),I=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(1e5)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Drill Drill")]),i("br",null,null),u("Attach extra drills to Heavy Drills to make them faster"),i("br",null,null),u("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),i("br",null,null),u("(also affects coal consumption)."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("^"),be(z.value),u(" Heavy Drill amount"),i("br",null,null),i("br",null,null),u("Cost: "),fe(r(I.cost)),u(" "),I.resource.displayName])),onPurchase(){x.value=a.add(x.value,1)},style:{color:l,width:"160px"}})),{min:k,max:F,add:Y,remove:Ae}=Lt({buyable:I,active:x}),H=Se(0),Ce=g(()=>a.pow(1/3,H.value)),ae=g(()=>a.pow(2,H.value)),Ve=g(()=>a.pow(1.2,H.value)),ke=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(8,Xe).times(2e5)},display:S(()=>i(N,null,[i("h3",null,[u("Heavy Extractor")]),i("br",null,null),u("Attach extractors to the drill to mine coal and ore, but with a price."),i("br",null,null),u("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("\xD7"),be(Ce.value),u(" drill power"),i("br",null,null),u("\xD7"),be(ae.value),u(" coal/sec"),i("br",null,null),u("\xD7"),be(Ve.value),u(" ore/sec"),i("br",null,null),i("br",null,null),u("Cost: "),fe(r(ke.cost))," ",ke.resource.displayName])),onPurchase(){H.value=a.add(H.value,1)},style:{color:l,width:"160px"}})),{min:he,max:Ie,add:Re,remove:J}=Lt({buyable:ke,active:H}),ve=Se(0),pe=g(()=>a.pow(wt[3].bought.value?4:5,ve.value)),Ee=g(()=>a.add(ve.value,Ha.value).pow(2).mul(p.value).mul(a.add(x.value,1)).mul(H.value).mul(o.value).div(1e5)),Oe=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(16,Xe).times(2e6);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:S(()=>i(N,null,[i("h3",null,[u("Oil Pump")]),i("br",null,null),u("Pump that oil from the ground."),i("br",null,null),u("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),wt[3].bought.value?4:5,u("\xD7."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("\xD7"),be(pe.value),u(" coal usage"),i("br",null,null),u("+"),be(Ee.value),u(" oil/sec"),i("br",null,null),i("br",null,null),u("Cost: "),fe(r(Oe.cost)),u(" "),Oe.resource.displayName])),onPurchase(){ve.value=a.add(ve.value,1)},style:{color:l,width:"160px"}})),{max:Fe,min:at,add:$e,remove:At}=Lt({buyable:Oe,active:ve}),me=Se(0),$=g(()=>a.pow(me.value,2)),De=g(()=>a.pow(me.value,3).mul(1e19)),le=g(()=>a.add(me.value,1)),ye=xe(()=>({resource:T(n),cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(50)},display:S(()=>i(N,null,[i("h3",null,[u("Oil Burner")]),i("br",null,null),u("Burn oil as fuel."),i("br",null,null),u("(Oil Burner Amount)"),i("sup",null,[u("2")]),u(" unit of oil can give 1e19*(Oil Burner Amount)"),i("sup",null,[u("3")]),u(" units of coal."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),be($.value),u(" oil/sec"),i("br",null,null),u("-"),be(De.value),u(" coal consumption"),wt[2].bought.value?i(N,null,[i("br",null,null),u("\xD7"),be(le.value),u(" to auto smelting multi")]):"",i("br",null,null),i("br",null,null),u("Cost: "),fe(r(ye.cost)),u(" "),ye.resource.displayName])),onPurchase(){me.value=a.add(me.value,1)},style:{color:l,width:"160px"}})),{max:st,min:Ke,add:qe,remove:ft}=Lt({buyable:ye,active:me}),Qe=Se(0),It=g(()=>a.pow(Qe.value,2).mul(100)),U=g(()=>a.add(Qe.value,1)),He=xe(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(10,Xe).times(1e7);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:S(()=>i(N,null,[i("h3",null,[u("Oil Smelter")]),i("br",null,null),u("Use oil as a crucible fuel."),i("br",null,null),u("Burn 100x"),i("sup",null,[u("2")]),u(" oil to smelt +100% faster."),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),be(It.value),u(" oil/sec"),i("br",null,null),u("\xD7"),be(U.value),u(" smelting speed"),i("br",null,null),i("br",null,null),u("Cost: "),fe(r(He.cost)),u(" "),He.resource.displayName])),onPurchase(){Qe.value=a.add(Qe.value,1)},style:{color:l,width:"160px"}})),{max:ne,min:j,add:Dt,remove:Et}=Lt({buyable:He,active:Qe}),rt=[R(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>a.gte(o.value,5)})),R(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>B(rt[0].earned.value)})),R(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>B(rt[1].earned.value)})),R(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>B(rt[2].earned.value)})),R(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>a.gte(o.value,150),visibility:()=>B(rt[3].earned.value)})),R(()=>({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:()=>a.gte(o.value,350),visibility:()=>B(rt[4].earned.value)})),R(()=>({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:()=>a.gte(o.value,1e3),visibility:()=>B(a.gte(o.value,1e3))})),R(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(o.value,3e3),visibility:()=>B(a.gte(o.value,2e3))}))],{collapseMilestones:se,display:_t}=Vl(rt),St=[R(()=>({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:()=>a.gte(Al.value,100)})),R(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Al.value,500),visibility:()=>B(St[0].earned.value)})),R(()=>({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:()=>a.gte(Al.value,1e4),visibility:()=>B(St[1].earned.value)}))],{collapseMilestones:Xt,display:Yt}=Vl(St),xt=[G(()=>({resource:O.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:S(()=>i(N,null,[u("x"),be(bt[0].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:S(()=>i(N,null,[u("x"),be(bt[1].value)]))},style:{color:l}})),G(()=>({resource:O.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:S(()=>i(N,null,[u("x"),be(bt[2].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:S(()=>i(N,null,[u("x"),be(bt[3].value)]))},style:{color:l}})),G(()=>({resource:T(n),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:S(()=>i(N,null,[u("+"),be(a.mul(bt[4].value,100)),u("%")]))},style:{color:l}}))],bt=[g(()=>a.mul(O.buildDrill.amount.value,a.add(.04,ol.value)).add(1)),g(()=>a.mul(nt.oreDrill.amount.value,a.add(.04,ol.value)).add(1)),g(()=>a.mul(a.max(O.coal.value,1).log10().floor(),a.add(.06,ol.value)).add(1)),g(()=>a.mul(a.max(nt.metal.value,1).log10().floor(),a.add(.1,ol.value)).add(1)),g(()=>a.mul(h.amount.value,.001))],wt=[G(()=>({resource:T(n),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),G(()=>({resource:T(n),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}})),G(()=>({resource:T(n),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),G(()=>({resource:T(n),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),G(()=>({resource:T(n),cost:5e4,display:{title:"Be One with the Oil",description:S(()=>i(N,null,[u("Divide metal ingot prices of oil buildings by "),i("sup",null,[u("6")]),i(Oa,null,{default:()=>[u("total oil + 1")]})]))},style:{color:l}}))],il=Z(()=>[re(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:pe,description:"Oil Pump",enabled:()=>a.gt(ve.value,0)})),re(()=>({addend:ga,description:"Oil to Coal Substitution",enabled:()=>a.gt(ga.value,0)}))]),qt=g(()=>il.apply(0)),Zt=Z(()=>[re(()=>({addend:y,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:Ce,description:"Heavy Extractor",enabled:()=>a.gt(H.value,0)})),C(()=>({multiplier:bt[0],description:"Coal Drill Synergy",enabled:xt[0].bought})),C(()=>({multiplier:bt[1],description:"Metal Drill Synergy",enabled:xt[1].bought})),C(()=>({multiplier:bt[2],description:"Coal Drill Upgrade",enabled:xt[2].bought})),C(()=>({multiplier:bt[3],description:"Metal Drill Upgrade",enabled:xt[3].bought})),C(()=>({multiplier:2,description:"Guide to drilling",enabled:K.upgrades.drillingUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),el=g(()=>Zt.apply(0)),wl=Z(()=>[re(()=>({addend:bt[4],description:"Drill Oil",enabled:xt[4].bought}))]),ol=g(()=>wl.apply(0)),Kl=Z(()=>[re(()=>({addend:Ee,description:"Oil Pump",enabled:()=>a.gt(ve.value,0)})),C(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:wt[0].bought})),C(()=>({multiplier:2,description:"3000m Well Depth",enabled:rt[7].earned})),C(()=>({multiplier:2,description:"Oil and where to find it",enabled:K.upgrades.oilUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),Nl=g(()=>Kl.apply(0)),Xl=Z(()=>[re(()=>({addend:()=>a.negate($.value),description:"Oil Burner",enabled:()=>a.gt(me.value,0)})),re(()=>({addend:()=>a.negate(It.value),description:"Oil Smelter",enabled:()=>a.gt(Qe.value,0)})),re(()=>({addend:()=>a.negate(Ue.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(Ue.activeRefinery.value,0)}))]),P=g(()=>Xl.apply(0)),La=Z(()=>[re(()=>({addend:De,description:"Oil Burner",enabled:()=>a.gt(me.value,0)})),C(()=>({multiplier:()=>pl.value,description:"Effectiveness",enabled:()=>a.lt(pl.value,1)}))]),ga=g(()=>La.apply(0)),Va=Z(()=>[re(()=>({addend:Le.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Le.dyes.red.amount.value,1)}))]),Ha=g(()=>Va.apply(0)),[ti,li]=nl(()=>[{title:"Coal Consumption",modifier:il,unit:"/s",base:0},{title:"Drill Power",modifier:Zt,base:0},{title:"Upgrade Bonus",modifier:wl,base:0,visible(){return a.gt(ol.value,0)}},{title:"Oil Speed",modifier:Kl,unit:"/s",base:0,visible(){return a.gt(Nl.value,0)}},{title:"Oil Consumption",modifier:Xl,unit:"/s",base:0,visible(){return a.lt(P.value,0)}},{title:"Oil to Coal Substitution",modifier:La,unit:"/s",base:0,visible(){return a.gt(ga.value,0)}},{title:"Extra Oil Pumps",modifier:Va,base:0,visible(){return a.gt(Ha.value,0)}}]),fa=W(!1),ai=S(()=>i(yt,{modelValue:fa.value,"onUpdate:modelValue":Xe=>fa.value=Xe},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:ti})),tl=W(a.dOne),pl=W(a.dOne);je.on("update",Xe=>{if(a.lt(X.day.value,Aa))return;const Bt=a.negate(qt.value);a.gt(Bt,0)?(tl.value=a.min(a.div(O.coal.value,Bt),1),O.coal.value=a.sub(O.coal.value,a.mul(Bt,tl.value).mul(Xe))):tl.value=a.dOne,s.value=a.add(s.value,a.mul(el.value,Xe)),n.value=a.add(n.value,a.mul(Nl.value,Xe)),c();const ha=a.negate(P.value);a.gt(ha,0)?(pl.value=a.min(a.div(n.value,ha),1),n.value=a.sub(n.value,a.mul(ha,pl.value).mul(Xe)).max(0)):pl.value=a.dOne});const{total:Al,trackerDisplay:ni}=dl({resource:n,goal:25e4,name:e,day:Aa,color:t,modal:{show:fa,display:ai}});return{name:e,day:Aa,color:t,oil:n,totalOil:Al,depth:o,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:x,buildHeavy2:I,activeExtractor:H,buildExtractor:ke,activePump:ve,buildPump:Oe,activeBurner:me,buildBurner:ye,activeSmelter:Qe,buildSmelter:He,extractorCoal:ae,extractorOre:Ve,coalEffectiveness:tl,oilEffectiveness:pl,depthMilestones:rt,collapsedDepthMilestones:se,row1Upgrades:xt,row2Upgrades:wt,minWidth:700,oilMilestones:St,collapsedOilMilestones:Xt,generalTabCollapsed:li,display:S(()=>i(N,null,[ee(ni),i(we,null,null),a.lt(tl.value,1)?i("div",null,[u("Coal efficiency: "),be(a.mul(tl.value,100)),u("%")]):null,a.lt(pl.value,1)?i("div",null,[u("Oil efficiency: "),be(a.mul(pl.value,100)),u("%")]):null,i(Mt,{resource:n,color:t,sticky:!0,productionDisplay:S(()=>i(N,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":i(N,null,[na(a.add(Nl.value,P.value))])]))},null),a.eq(Nl.value,0)?i(N,null,[u("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),i("br",null,null)]):"",i(Pl,null,{default:()=>[rt[6].earned.value?i(Pt,null,{default:()=>[ee(Oe),i("div",null,[fe(a.floor(ve.value)),u("/"),fe(a.floor(Oe.amount.value))]),We(at,At,$e,Fe)]}):null,St[0].earned.value?i(Pt,null,{default:()=>[ee(ye),i("div",null,[fe(a.floor(me.value)),u("/"),fe(a.floor(ye.amount.value))]),We(Ke,ft,qe,st)]}):null,St[2].earned.value?i(Pt,null,{default:()=>[ee(He),i("div",null,[fe(a.floor(Qe.value)),u("/"),fe(a.floor(He.amount.value))]),We(j,Et,Dt,ne)]}):null]}),i("br",null,null),i("div",null,[i("span",null,[u("The well is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[fe(o.value)]),u("m deep"),i("br",null,null),u("Next at "),be(a.sub(d.value,s.value)),u(" drill power seconds")]),i("div",null,[i("span",null,[u("Your drill power is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[be(el.value)])]),i(we,null,null),i(Pl,null,{default:()=>[i(Pt,null,{default:()=>[ee(h),i("div",null,[fe(a.floor(p.value)),u("/"),fe(a.floor(h.amount.value))]),We(b,_,E,v)]}),rt[3].earned.value?i(Pt,null,{default:()=>[ee(I),i("div",null,[fe(a.floor(x.value)),u("/"),fe(a.floor(I.amount.value))]),We(k,Ae,Y,F)]}):null,rt[5].earned.value?i(Pt,null,{default:()=>[ee(ke),i("div",null,[fe(a.floor(H.value)),u("/"),fe(a.floor(ke.amount.value))]),We(he,J,Re,Ie)]}):null]}),i(we,null,null),Sl(...St[1].earned.value?rt[1].earned.value?[xt,wt]:[xt]:[]),i(we,null,null),_t(),a.gte(Al.value,50)?Yt():""]))}}),Er="metal",ln=7,nt=Ut(Er,function(){const e="Metal",t="#888B8D",l=ct(0,"metal ingots",void 0,!0),n=Ya(l),o=ct(0,"ore"),s=Ya(o),d=Z(()=>[C(()=>({multiplier:5,description:"Crucible",enabled:Ie.bought})),C(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(Ee.amount.value,1)})),C(()=>({multiplier:2,description:"Industrial Furnace",enabled:J.bought})),C(()=>({multiplier:()=>a.add(at.value,1),description:"Hotter Forges",enabled:()=>a.gte(Fe.amount.value,1)})),C(()=>({multiplier:2,description:"Carry metal in boxes",enabled:Ze.row2Upgrades.metalUpgrade.bought})),C(()=>({multiplier:Le.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Le.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(lt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Le.upgrades.redDyeUpg.bought}))]),c=g(()=>d.apply(.1)),p=Z(()=>[re(()=>({addend:()=>a.times(Ee.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(Ee.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Crucibles",enabled:O.efficientSmelther.bought})),C(()=>({multiplier:()=>a.mul(Ye.activeSmelter.value,Ye.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ye.activeSmelter.value,0)})),C(()=>({multiplier:Le.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Le.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(Ue.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Le.upgrades.redDyeUpg2.bought}))]),m=g(()=>p.apply(0)),y=Z(()=>[C(()=>({multiplier:3,description:"Efficient Crucibles",enabled:O.efficientSmelther.bought})),C(()=>({multiplier:()=>a.add(Ye.activeBurner.value,1).mul(Ye.oilEffectiveness.value),description:"Blaster Burner",enabled:Ye.row2Upgrades[2].bought}))]),h=g(()=>y.apply(1)),b=1e10,v=g(()=>a.min(o.value,a.div(O.coal.value,b)).floor().max(0)),E=Tt(()=>({display:S(()=>{const ye=a.gte(v.value,1)?v.value:a.add(v.value,1);return i(N,null,[i("span",{style:"font-size: large"},[u("Smelt "),be(a.times(v.value,c.value))," ",l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost: "),fe(ye),u(" "),o.displayName,u(";")," ",fe(a.times(ye,b)),u(" "),O.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!r(this.canClick)||_(v.value)},style:{width:"600px",minHeight:"unset"}}));function _(ye,st=1){const[Ke,qe,ft]=[a.times(ye,c.value).times(st),ye,a.times(ye,b)];l.value=a.add(l.value,Ke),o.value=a.sub(o.value,qe),O.coal.value=a.sub(O.coal.value,ft)}const x=Z(()=>[re(()=>({addend:()=>pe.amount.value,description:"Mining Drills",enabled:()=>a.gte(pe.amount.value,1)})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ye.depthMilestones[2].earned})),C(()=>({multiplier:Ye.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)})),C(()=>({multiplier:2,description:"Carry ore in boxes",enabled:Ze.row2Upgrades.oreUpgrade.bought}))]),z=g(()=>x.apply(1)),I=Z(()=>[C(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:ke.bought})),C(()=>({multiplier:2,description:"Double Pickaxe",enabled:he.bought})),C(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(pe.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Drills",enabled:ve.bought})),C(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ye.row2Upgrades[1].bought}))]),k=g(()=>I.apply(a.recip(Y))),F=Se(0),Y=10,Ae=Wt(()=>({width:400,height:25,direction:Me.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),H=Z(()=>[re(()=>({addend:z})),C(()=>({multiplier:k}))]),Ce=g(()=>H.apply(0)),ae=Z(()=>[re(()=>({addend:Ce})),re(()=>({addend:()=>a.negate(m.value),enabled:Oe}))]),Ve=g(()=>ae.apply(0)),ke=G(()=>({resource:T(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),he=G(()=>({resource:T(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?

Halve the time to mine ore, again"},visibility:()=>B(he.bought.value)})),Ie=G(()=>({resource:T(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!

Increase the metal extracted per ore by 5x"},visibility:()=>B(Ie.bought.value||a.div(s.value,c.value).plus(n.value).gte(1))})),Re=G(()=>({resource:T(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:()=>B(a.gte(pe.amount.value,1)&&(Re.bought.value||X.days[7].opened.value||a.lt(O.computedCoalGain.value,a.times(z.value,k.value).times(b)))),onPurchase(){X.days[2].recentlyUpdated.value=!0}})),J=G(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(O.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),O.coal.value=a.sub(O.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

- Cost: 50 ${l.displayName}
${he(1e11)} ${R.coal.displayName}`}})),ke=G(()=>({resource:T(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."},visibility:()=>B(Ye.depthMilestones[4].earned.value)})),Ae=xe(()=>({resource:T(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:S(()=>i(N,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",ve(Ae.amount.value),u(" ore per operation")]))},visibility:()=>B(a.gte(Ae.amount.value,1)||a.div(s.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),Ee=xe(()=>({resource:T(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:S(()=>i(N,null,[u("Automatically smelts")," ",ve(a.times(Ee.amount.value,10)),u(" ore per second")]))},visibility:()=>B(a.gte(Ee.amount.value,1)||a.gte(Ae.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Oe=Se(!0),Fe=xe(()=>({resource:R.coal,cost(){return a.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:S(()=>i(N,null,[u("Gain "),ve(a.times(at.value,100)),u("% more metal per ore")]))},visibility:()=>B(a.gte(Fe.amount.value,1)||z.bought.value),style:{width:"200px"}})),at=g(()=>a.times(Fe.amount.value,.25));je.on("update",fe=>{F.value=a.times(fe,k.value).plus(F.value);const st=F.value.trunc();F.value=F.value.minus(st),o.value=a.add(o.value,a.times(st,J.value)),Oe.value&&_(a.min(v.value,a.times(m.value,fe)),h.value)});const[qe,At]=nl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Ee.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),pe=j(!1),$=S(()=>i(yt,{modelValue:pe.value,"onUpdate:modelValue":fe=>pe.value=fe},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:qe})),{total:De,trackerDisplay:le}=dl({resource:l,goal:25e3,name:e,day:ln,color:t,modal:{show:pe,display:$}});return{name:e,day:ln,color:t,ore:o,bestOre:s,oreProgress:F,metal:l,bestMetal:n,totalMetal:De,simplePickaxe:Ce,doublePickaxe:ge,crucible:Me,coalDrill:Re,industrialFurnace:z,efficientDrill:ke,oreDrill:Ae,industrialCrucible:Ee,autoSmeltEnabled:Oe,hotterForge:Fe,generalTabCollapsed:At,minWidth:700,display:S(()=>i(N,null,[ee(le),i(ye,null,null),i(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>i(N,null,[Oe.value&&a.gte(Ee.amount.value,1)?`+${hn([[m.value,"smelting speed"],[we.value,"ore gain"],[a.div(R.computedCoalGain.value,b),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),i(ye,null,null),ee(E),a.gte(Ee.amount.value,1)?i("div",{style:{width:"150px"}},[i(sl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":fe=>Oe.value=fe},null)]):void 0,i(ye,null,null),i(It,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>i(N,null,[yn(Le.value)]))},null),i(ye,null,null),i("div",null,[u("Currently mining "),he(J.value),u(" ore every")," ",he(a.recip(k.value)),u(" seconds")]),ee(be),i(ye,null,null),We(Ce,ge,Me,Re,z,ke),We(Ae,Ee,Fe)]))}}),_r="coal",an=3,R=Ut(_r,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",o=ct(0,"coal"),s=ct(0,"ash"),d=Se(0),c=g(()=>a.times(d.value,1e3)),p=g(()=>a.times(d.value,.1)),m=g(()=>a.times(d.value,50)),y=xe(()=>({resource:de.logs,cost(){let P=a.times(F.amount.value,r(F.cost)).plus(this.amount.value);return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.smallFireBook.amount.value).times(P),P.pow(1.5).times(1e4)},display:S(()=>i(N,null,[i("h3",null,[u("Small Fire")]),i("br",null,null),u("Burn 1000 logs for 0.1 coal and 50 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(c.value),u(" logs/sec"),i("br",null,null),u("+"),V(p.value),u(" coal/sec"),i("br",null,null),u("+"),V(m.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(y.cost)),u(" "),y.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:n,width:"160px"}})),{min:h,max:b,add:v,remove:E}=Vt({active:d,buyable:y}),_=ct(y.amount,"small fires"),x=Se(0),J=g(()=>a.times(x.value,1e4)),M=g(()=>a.times(x.value,10)),k=g(()=>a.times(x.value,1e3)),F=xe(()=>({resource:_,cost(){return a.pow(.95,K.books.bonfireBook.amount.value).times(10)},display:S(()=>i(N,null,[i("h3",null,[u("Bonfire")]),i("br",null,null),u("Burn 10,000 logs for 10 coal and 1000 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(J.value),u(" logs/sec"),i("br",null,null),u("+"),V(M.value),u(" coal/sec"),i("br",null,null),u("+"),V(k.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(F.cost)),u(" "),F.resource.displayName])),onPurchase(P){d.value=a.sub(d.value,P).max(0),x.value=a.add(x.value,1)},style:{color:n,width:"160px"},visibility:()=>B(fe.bought.value)})),{min:Y,max:be,add:L,remove:we}=Vt({buyable:F,active:x}),ae=Se(0),Le=g(()=>a.times(ae.value,1e6)),Ce=g(()=>a.times(ae.value,1e4)),ge=g(()=>a.times(ae.value,1e4)),Me=xe(()=>({resource:de.logs,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.kilnBook.amount.value).times(P),a.pow(1.1,P).times(1e7)},display:S(()=>i(N,null,[i("h3",null,[u("Charcoal Kiln")]),i("br",null,null),u("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(Le.value),u(" logs/sec"),i("br",null,null),u("+"),V(Ce.value),u(" coal/sec"),i("br",null,null),u("+"),V(ge.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(Me.cost)),u(" "),Me.resource.displayName])),onPurchase(){ae.value=a.add(ae.value,1)},style:{color:n,width:"160px"},visibility:()=>B(Qe.bought.value)})),{min:Re,max:z,add:ke,remove:Ae}=Vt({buyable:Me,active:ae}),Ee=Se(0),Oe=g(()=>a.times(a.pow(Ee.value,Ye.row2Upgrades[1].bought.value?2:1),5e7).times(nt.efficientDrill.bought.value?2:1)),Fe=xe(()=>({resource:nt.metal,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),a.pow(1.15,P).times(10)},display:S(()=>i(N,null,[i("h3",null,[u("Mining Drill")]),i("br",null,null),u("Dig through the ground to find 50,000,000 coal"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("+"),V(Oe.value),u(" coal/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(Fe.cost)),u(" "),Fe.resource.displayName])),onPurchase(){Ee.value=a.add(Ee.value,1)},style:{color:n,width:"160px"},visibility:()=>B(nt.coalDrill.bought.value)})),{max:at,min:qe,add:At,remove:pe}=Vt({buyable:Fe,active:Ee}),$=G(()=>({resource:T(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),De=G(()=>({resource:T(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),le=G(()=>({resource:T(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),fe=G(()=>({resource:_,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){_.value=a.add(_.value,this.cost)},style:{color:n}})),st=[$,De,le,fe],Ke=G(()=>({resource:T(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>B(fe.bought.value)})),Ge=G(()=>({resource:T(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>B(fe.bought.value)})),ft=G(()=>({canAfford(){return a.gte(de.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){de.logs.value=a.sub(de.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:S(()=>i(N,null,[i("h3",null,[u("Mulched Soil")]),i("br",null,null),u("Double the bonus from Fertilized Soil"),i("br",null,null),i("br",null,null),u("Cost: "),te(1e5),u(" "),de.logs.displayName,i("br",null,null),te(1e5),u(" "),s.displayName])),style:{color:n},visibility:()=>B(fe.bought.value)})),Qe=G(()=>({resource:de.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:n},visibility:()=>B(fe.bought.value)})),Mt=[Ke,Ge,ft,Qe],U=G(()=>({resource:T(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>B(Ye.depthMilestones[4].earned.value)})),He=[U],ne=xe(()=>({resource:T(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedCuttersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:S(()=>i(N,null,[u("Cutters cut down trees "),V(se.value),u("x faster")]))},style:{color:n},visibility:()=>B($.bought.value)})),H=xe(()=>({resource:T(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedPlantersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:S(()=>i(N,null,[u("Planters plant trees "),V(St.value),u("x faster")]))},style:{color:n},visibility:()=>B(De.bought.value)})),Dt=xe(()=>({resource:T(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.fertilizerBook.amount.value).times(P),a.add(P,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:S(()=>i(N,null,[u("Trees give "),V(Yt.value),u("x more logs")]))},style:{color:n},visibility:()=>B(le.bought.value)})),Et=[ne,H,Dt],rt=Z(()=>[re(()=>({addend(){return a.times(ne.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(ne.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Ke.bought}))]),se=g(()=>rt.apply(1)),_t=Z(()=>[re(()=>({addend(){return a.times(H.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(H.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Ge.bought}))]),St=g(()=>_t.apply(1)),Xt=Z(()=>[re(()=>({addend(){return a.times(Dt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(Dt.amount.value,0)}})),C(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),Yt=g(()=>Xt.apply(1)),xt=Z(()=>[re(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return M.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return Ce.value},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}})),re(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(Ee.value,0)}})),C(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Me.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought})),C(()=>({multiplier:2,description:"Mining overalls",enabled:lt.metalUpgrades.metalUpgrade2.bought})),C(()=>({multiplier:3,description:"Mining helmet",enabled:lt.metalUpgrades.metalUpgrade3.bought})),C(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:lt.metalUpgrades.metalUpgrade4.bought})),C(()=>({multiplier:2,description:"12 Elves Trained",enabled:_e.milestones[11].earned})),Fn(()=>({exponent:1.25,description:"3 Elves Trained",enabled:_e.milestones[2].earned,supportLowNumbers:!0})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ye.depthMilestones[0].earned})),C(()=>({multiplier:Ye.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)}))]),bt=g(()=>xt.apply(0)),wt=Z(()=>[re(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return k.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return ge.value},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}})),C(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Me.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought})),C(()=>({multiplier:4,description:"Mining boots",enabled:lt.metalUpgrades.metalUpgrade1.bought}))]),il=g(()=>wt.apply(0)),Gt=Z(()=>[re(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return a.negate(J.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return a.negate(Le.value)},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}}))]),Zt=g(()=>Gt.apply(0)),[el,wl]=nl(()=>[{title:"Log Consumption",modifier:Gt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}},{title:"Coal Gain",modifier:xt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}},{title:"Ash Gain",modifier:wt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}}]),ol=j(!1),Kl=S(()=>i(yt,{modelValue:ol.value,"onUpdate:modelValue":P=>ol.value=P},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:el}));je.on("update",P=>{a.lt(X.day.value,an)||a.times(P,Zt.value).negate().gt(de.logs.value)||(de.logs.value=a.times(P,Zt.value).plus(de.logs.value),o.value=a.times(P,bt.value).plus(o.value),s.value=a.times(P,il.value).plus(s.value),d.value=a.max(d.value,0))});const{total:Nl,trackerDisplay:Xl}=dl({resource:o,goal:1e7,name:e,day:an,color:t,modal:{show:ol,display:Kl}});return{name:e,color:t,coal:o,totalCoal:Nl,computedCoalGain:bt,ash:s,activeFires:d,buildFire:y,activeBonfires:x,buildBonfire:F,activeKilns:ae,buildKiln:Me,activeDrills:Ee,buildDrill:Fe,warmerCutters:$,warmerPlanters:De,basicFertilizer:le,unlockBonfire:fe,dedicatedCutters:Ke,dedicatedPlanters:Ge,betterFertilizer:ft,unlockKiln:Qe,efficientSmelther:U,heatedCutters:ne,heatedPlanters:H,moreFertilizer:Dt,computedHeatedCutterEffect:se,computedHeatedPlanterEffect:St,computedFertilizerEffect:Yt,generalTabCollapsed:wl,minWidth:700,display:S(()=>i(N,null,[ee(Xl),i(ye,null,null),i(It,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${V(bt.value)}/s`:void 0},null),i(ye,null,null),i(It,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(il.value,0)?`+${V(il.value)}/s`:void 0},null),i(ye,null,null),i(Pl,null,{default:()=>[i(Pt,null,{default:()=>[ee(y),i("div",null,[te(a.floor(d.value)),u("/"),te(a.floor(y.amount.value))]),We(h,E,v,b)]}),fe.bought.value?i(N,null,[i(ye,null,null),i(Pt,null,{default:()=>[ee(F),i("div",null,[te(x.value),u("/"),te(F.amount.value)]),We(Y,we,L,be)]})]):void 0,Qe.bought.value?i(N,null,[i(ye,null,null),i(Pt,null,{default:()=>[ee(Me),i("div",null,[te(ae.value),u("/"),te(Me.amount.value)]),We(Re,Ae,ke,z)]})]):void 0,nt.coalDrill.bought.value?i(N,null,[i(ye,null,null),i(Pt,null,{default:()=>[ee(Fe),i("div",null,[te(Ee.value),u("/"),te(Fe.amount.value)]),We(qe,pe,At,at)]})]):void 0]}),i(ye,null,null),Sl(st,Mt,He),We(...Et)]))}}),Sr="workshop",Fl=2,Nt=Ut(Sr,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=ct(0,"foundation progress"),o=js(()=>({scaling:Ra(250,1.5),baseResource:de.logs,gainResource:T(n),roundUpCost:!0,buyMax:!1,spend(F,Y){de.logs.value=a.sub(de.logs.value,Y)}})),s=Tt(()=>({display:S(()=>i(N,null,[i("b",{style:"font-size: x-large"},[u("Build part of the foundation")]),i("br",null,null),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost:")," ",Jl(de.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",de.logs.displayName])])),visibility:()=>B(a.lt(n.value,100)),canClick:()=>a.gte(o.actualGain.value,1)&&a.lt(n.value,100),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=xl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=g(()=>!_e.milestones[6].earned.value),p=W(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:c})),m=W(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(n.value,10),visibility:()=>B(p.earned.value),showPopups:c})),y=W(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(n.value,20),visibility:()=>B(m.earned.value),showPopups:c})),h=W(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>B(y.earned.value),showPopups:c})),b=W(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>B(h.earned.value),showPopups:c})),v=W(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>B(b.earned.value),showPopups:c})),E=W(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(n.value,75),visibility:()=>B(v.earned.value),showPopups:c})),_=W(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>B(E.earned.value),showPopups:c})),x={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:y,autoCutMilestone2:h,autoPlantMilestone2:b,logGainMilestone2:v,morePlantsMilestone1:E,logGainMilestone3:_},{collapseMilestones:J,display:M}=Ll(x),k=Wt(()=>({direction:Ie.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>X.day.value===Fl?a.div(n.value,100):1,display:S(()=>X.day.value===Fl?i(N,null,[te(n.value),u("%")]):"")}));return Ft(()=>{X.day.value===Fl&&a.gte(n.value,100)&&X.completeDay()}),{name:e,day:Fl,color:t,foundationProgress:n,foundationConversion:o,milestones:x,collapseMilestones:J,minWidth:700,buildFoundationHK:d,display:S(()=>i(N,null,[i("div",null,[X.day.value===Fl?"Complete the foundation to complete the day":`${e} Complete!`]),ee(k),i(ye,null,null),i("div",null,[i("span",null,[u("The foundation is ")]),i("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[te(n.value)]),u("% completed")]),a.lt(n.value,100)?i(ye,null,null):null,ee(s),i(ye,null,null),M()]))}}),Br="elves",Ul=4,_e=Ut(Br,function(){const e="Elves",t="red",l="#911D21",o=Wt(()=>({direction:Ie.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>X.day.value===Ul?a.div($.value,6).times(.8333333333333334).add(a.div(a.add(R.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:S(()=>X.day.value===Ul?a.lt($.value,6)?i(N,null,[te($.value),u("/6 elves")]):i(N,null,[te(R.coal.value),u("/"),te(1e9),u(" coal")]):"")})),s=br(()=>({thingsToReset:[de,Nt,R],onReset(){setTimeout(()=>{Mt.earned.value?(de.row1Upgrades.forEach(se=>se.bought.value=!0),de.row2Upgrades.forEach(se=>se.bought.value=!0)):le.earned.value&&(de.row1Upgrades[4].bought.value=!0,de.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Nt.foundationProgress.value=100),He.earned.value&&(R.warmerCutters.bought.value=!0,R.warmerPlanters.bought.value=!0,R.basicFertilizer.bought.value=!0,R.unlockBonfire.bought.value=!0,R.dedicatedCutters.bought.value=!0,R.dedicatedPlanters.bought.value=!0,R.betterFertilizer.bought.value=!0,R.unlockKiln.bought.value=!0,R.efficientSmelther.bought.value=!0)})}})),d=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(K.books.cuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),c=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(K.books.plantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),p=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(K.books.expandersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),m=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(K.books.heatedCuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),y=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(K.books.heatedPlantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),h=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(K.books.fertilizerBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),b=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(K.books.smallFireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),v=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(K.books.bonfireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),E=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(K.books.kilnBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),_=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(K.books.paperBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),x=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(K.books.boxBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),J=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(K.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(K.books.clothBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),[M,k]=nl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:pe.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:pe.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:pe.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:pe.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:pe.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:pe.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:pe.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:pe.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:E,base:10,unit:"/s",visible:pe.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:pe.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:pe.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:J,base:10,unit:"/s",visible:pe.clothElf.bought}]),F=j(!1),Y=S(()=>i(yt,{modelValue:F.value,"onUpdate:modelValue":se=>F.value=se},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:M})),be=g(()=>{let se=a.pow(4,$.value).times(1e6);return a.gte($.value,9)&&(se=a.times(se,1e15)),se});function L(se){var il;const _t=Se(0),St=Se(0),Xt=se.hasToggle?Se(!1):j(!0),Yt=g(()=>se.cooldownModifier.apply(10)),xt=ht((il=se.canBuy)!=null?il:!0);function bt(Gt){if(wt.bought.value&&r(xt)){_t.value=a.add(_t.value,Gt);const Zt=a.recip(Yt.value);St.value+=Gt/Zt.toNumber(),(Ea(se.buyable)?se.buyable:[se.buyable]).forEach(el=>{var wl;for(;a.gte(_t.value,Zt);)if(se.customCost==null?r(el.canPurchase):a.gte(el.resource.value,se.customCost(el.amount.value)))el.amount.value=a.add(el.amount.value,1),_t.value=a.sub(_t.value,Zt),(wl=se.onAutoPurchase)==null||wl.call(se);else{_t.value=Zt;break}})}}const wt=G(()=>({...se,buyable:void 0,toggle:Xt,buyProgress:_t,update:bt,resource:R.coal,cost:be,computedAutoBuyCooldown:Yt,amountOfTimesDone:St,name:se.name,display:()=>({title:se.name,description:S(()=>i(N,null,[se.description,wt.bought.value?null:i(N,null,[" ",u("Training this elf will require resetting all your progress from days 1-3.")]),wt.bought.value&&se.hasToggle===!0?i(N,null,[i(sl,{title:se.toggleDesc,"onUpdate:modelValue":Gt=>Xt.value=Gt,modelValue:Xt.value},null)]):null])),showCost:!wt.bought.value}),style:"width: 190px",onPurchase(){var Gt;(Gt=se.onPurchase)==null||Gt.call(se),s.reset()}}));return wt}const we=L({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:de.row1Buyables[0],cooldownModifier:d}),ae=L({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:de.row1Buyables[1],cooldownModifier:c}),Le=L({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:de.row1Buyables[2],cooldownModifier:p}),Ce=[we,ae,Le],ge=L({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Me=L({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:y}),Re=L({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),z=[ge,Me,Re],ke=L({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:R.buildFire,cooldownModifier:b,visibility:()=>B(Ze.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){ke.toggle.value&&(R.activeFires.value=a.add(R.activeFires.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0}}),Ae=L({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:R.buildBonfire,cooldownModifier:v,visibility:()=>B(Ze.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const se=r(this.buyable.cost);R.activeFires.value=a.sub(R.activeFires.value,se).max(0),R.buildFire.amount.value=a.sub(R.buildFire.amount.value,se).max(0),Ae.toggle.value&&(R.activeBonfires.value=a.add(R.activeBonfires.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),Ee=L({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:R.buildKiln,cooldownModifier:E,visibility:()=>B(Ze.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Ee.toggle.value&&(R.activeKilns.value=a.add(R.activeKilns.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),Oe=[ke,Ae,Ee],Fe=L({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(K.books),cooldownModifier:_,visibility:()=>B(Ue.elfUpgrades.paperElf.bought.value)}),at=L({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(Ze.buyables),cooldownModifier:x,visibility:()=>B(Ue.elfUpgrades.boxElf.bought.value)}),qe=L({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[lt.buildPens,lt.betterShears,lt.fasterSpinning],cooldownModifier:J,visibility:()=>B(Ue.elfUpgrades.clothElf.bought.value)}),At=[Fe,at,qe],pe={cuttersElf:we,plantersElf:ae,expandersElf:Le,heatedCuttersElf:ge,heatedPlantersElf:Me,fertilizerElf:Re,smallFireElf:ke,bonfireElf:Ae,kilnElf:Ee,paperElf:Fe,boxElf:at,clothElf:qe},$=g(()=>Object.values(pe).filter(se=>se.bought.value).length),De=W(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte($.value,1)})),le=W(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte($.value,2),visibility:()=>B(De.earned.value)})),fe=W(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte($.value,3),visibility:()=>B(le.earned.value)})),st=W(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte($.value,4),visibility:()=>B(fe.earned.value)})),Ke=W(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte($.value,5),visibility:()=>B(st.earned.value)})),Ge=W(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte($.value,6),visibility:()=>B(Ke.earned.value)})),ft=W(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte($.value,7),visibility:()=>B(Ge.earned.value&&X.day.value>5)})),Qe=W(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte($.value,8),visibility:()=>B(ft.earned.value)})),Mt=W(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,9),visibility:()=>B(Qe.earned.value)})),U=W(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte($.value,10),visibility:()=>B(X.day.value>=10)})),He=W(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,11),visibility:()=>B(U.earned.value)})),ne=W(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte($.value,12),visibility:()=>B(He.earned.value)})),H=[De,le,fe,st,Ke,Ge,ft,Qe,Mt,U,He,ne],Dt={manualMilestone:De,researchMilestone:le,coalGainMilestone:fe,logGainMilestone:st,forestMilestone:Ke,elvesMilestone:Ge,foundationMilestone:ft,forestMilestone2:Qe,treeUpgradesMilestone:Mt,elvesMilestone2:U,coalUpgradesMilestone:He,coalGainMilestone2:ne},{collapseMilestones:Et,display:rt}=Ll(Dt);return je.on("update",se=>{a.lt(X.day.value,Ul)||Object.values(pe).forEach(_t=>_t.update(se))}),Ft(()=>{X.day.value===Ul&&a.gte($.value,6)&&a.gte(R.coal.value,1e9)&&X.completeDay()}),{name:e,color:t,elves:pe,totalElves:$,milestones:H,collapseMilestones:Et,generalTabCollapsed:k,minWidth:700,display:S(()=>i(N,null,[i("div",null,[X.day.value===Ul?`Reach ${te(6)} trained elves and ${te(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",u("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>F.value=!0},[u("Check Modifiers")])]),ee(o),ee(Y),i(ye,null,null),i("div",{style:"width: 600px"},[Sl(Ce,z,Oe,At)]),rt()]))}}),Nr="management",Rl=12,Hl=Ut(Nr,()=>{const e="Management",t="green",l=Wt(()=>({direction:Ie.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>X.day.value===Rl?n.value/(_e.totalElves.value*5):1,display:S(()=>X.day.value===Rl?i(N,null,[te(n.value),u("/"),te(_e.totalElves.value*5)," ",u("elf levels")]):"")})),n=g(()=>{let U=0;for(const He of Object.values(At))U+=He.level.value;return U}),o=G(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:de.logs,cost:1e21})),s=G(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},resource:Ze.boxes,style:"width: 150px",cost:1e13})),d=Z(()=>[C(()=>({multiplier:()=>fe.value,description:"Classroom Effect",enabled:()=>s.bought.value}))]),c=d.apply(1);function p(U,He,...ne){const H=Se(0),Dt=g(()=>a.pow(10,Et.value).mul(1e4)),Et=g(()=>a.min(a.mul(9,H.value).div(1e4).add(1).log10().floor(),De.amount.value).toNumber()),rt=g(()=>a.sub(H.value,a.pow(10,Et.value).sub(1).div(9).mul(1e4))),se=Wt(()=>({direction:Ie.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(rt.value,Dt.value)})),{collapseMilestones:_t,display:St}=Ll(He),Xt=Z(()=>[C(()=>({multiplier:c,description:"Global XP Multiplier"})),...ne]),Yt=g(()=>Xt.apply(1));return Tt(()=>({display:{title:U.name,description:S(()=>i(N,null,[U.name,u(" is currently at level "),te(Et.value),u("! They have achieved a total of "),V(H.value),u(" XP, and have")," ",V(rt.value),u("/"),V(Dt.value),u(" XP. They buy buyables "),te(U.computedAutoBuyCooldown.value),u(" times per second, gaining")," ",a.gte(Et.value,De.amount.value)?0:V(a.mul(Yt.value,U.computedAutoBuyCooldown.value))," ",u("XP/sec.")," ",a.gte(Et.value,De.amount.value)?i("div",{style:"color: red"},[u("This elf cannot gain any XP because it has exceeded the maximum level from schools.")]):void 0,Y.value!==U.name?"Click to see this elf's milestones.":void 0,ee(se)]))},style:"width: 190px",onClick(){Y.value=U.name},canClick(){return Y.value!==U.name},state:_t,displayMilestone:St,level:Et,exp:H,milestones:He,timeForExp:U.computedAutoBuyCooldown,amountOfTimesDone:U.amountOfTimesDone,elfXPGainComputed:Yt,elfXPGain:Xt}))}const m=[W(()=>({display:()=>({requirement:"Holly Level 1",effectDisplay:"Cutting speed multiplies log gain."}),shouldEarn:()=>L.level.value>=1})),W(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>B(m[0].earned.value),shouldEarn:()=>L.level.value>=2})),W(()=>({display:{requirement:"Holly Level 3",effectDisplay:"Cutting speed multiplies cloth gain, wool gain (increasing the requirement as well), and sheep gain."},visibility:()=>B(m[1].earned.value),shouldEarn:()=>L.level.value>=3})),W(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply cutting speed by 1.1 per day completed"},visibility:()=>B(m[1].earned.value),shouldEarn:()=>L.level.value>=4})),W(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Reduce workshop expansion cost by ^0.95"},visibility:()=>B(m[1].earned.value),shouldEarn:()=>L.level.value>=5}))],y=[W(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>we.level.value>=1})),W(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>B(y[0].earned.value),shouldEarn:()=>we.level.value>=2})),W(()=>({display:{requirement:"Ivy Level 3",effectDisplay:"2^(log(logs)^0.2) multiplies planting speed"},visibility:()=>B(y[1].earned.value),shouldEarn:()=>we.level.value>=3})),W(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>B(y[2].earned.value),shouldEarn:()=>we.level.value>=4})),W(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"Boost planting/cutting speed based on which is falling behind"},visibility:()=>B(y[3].earned.value),shouldEarn:()=>we.level.value>=5}))],h=[W(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Planting speed boosts forest size"},shouldEarn:()=>ae.level.value>=1})),W(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},shouldEarn:()=>ae.level.value>=2})),W(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster."},shouldEarn:()=>ae.level.value>=3})),W(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},shouldEarn:()=>ae.level.value>=4})),W(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},shouldEarn:()=>ae.level.value>=5}))],b=[W(()=>({display:{requirement:"Jack Level 1",effectDisplay:"Heated cutters are less expensive."},shouldEarn:()=>Ce.level.value>=1})),W(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},shouldEarn:()=>Ce.level.value>=2})),W(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},shouldEarn:()=>Ce.level.value>=3})),W(()=>({display:{requirement:"Jack Level 4",effectDisplay:"Oil gain is multiplied based on total elf levels."},shouldEarn:()=>Ce.level.value>=4})),W(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil buyables."},shouldEarn:()=>Ce.level.value>=5}))],v=[W(()=>({display:{requirement:"Mary Level 1",effectDisplay:"Heated planters are less expensive."},shouldEarn:()=>ge.level.value>=1})),W(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Double tree planting speed"},shouldEarn:()=>ge.level.value>=2})),W(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},shouldEarn:()=>ge.level.value>=3})),W(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Metal gain is raised to the 1.1."},shouldEarn:()=>ge.level.value>=4})),W(()=>({display:{requirement:"Mary Level 5",effectDisplay:"Auto smelting speed is multiplied by (total XP/1000)^0.5"},shouldEarn:()=>ge.level.value>=5}))],E=[W(()=>({display:{requirement:"Noel Level 1",effectDisplay:"Log gain is increased based on total elf level."},shouldEarn:()=>ge.level.value>=1})),W(()=>({display:{requirement:"Noel Level 2",effectDisplay:"Fertilized soil is less expensive"},shouldEarn:()=>ge.level.value>=2})),W(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost based on total logs produced"},shouldEarn:()=>ge.level.value>=3})),W(()=>({display:{requirement:"Noel Level 4",effectDisplay:"Plastic\xB2 subtracts from oil refinery cost"},shouldEarn:()=>ge.level.value>=4})),W(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},shouldEarn:()=>ge.level.value>=5}))],_=[],x=[],J=[],M=[],k=[],F=[],Y=Se("Holly"),be=g(()=>{let U={displayMilestone:S(()=>"")};switch(Y.value){case"Holly":U=L;break;case"Ivy":U=we;break;case"Hope":U=ae;break;case"Jack":U=Ce;break;case"Mary":U=ge;break;case"Noel":U=Me;break;case"Joy":U=z;break;case"Faith":U=ke;break;case"Snowball":U=Ae;break;case"Star":U=Oe;break;case"Bell":U=Fe;break;case"Gingersnap":U=at;break;default:console.warn("This should not happen.",Y.value);break}return{name:Y.value,disp:U.displayMilestone}}),L=p(_e.elves.cuttersElf,m),we=p(_e.elves.plantersElf,y),ae=p(_e.elves.expandersElf,h),Le=[L,we,ae],Ce=p(_e.elves.heatedCuttersElf,b),ge=p(_e.elves.heatedPlantersElf,v),Me=p(_e.elves.fertilizerElf,E),Re=[Ce,ge,Me],z=p(_e.elves.smallFireElf,_),ke=p(_e.elves.bonfireElf,x),Ae=p(_e.elves.kilnElf,J),Ee=[z,ke,Ae],Oe=p(_e.elves.paperElf,M),Fe=p(_e.elves.boxElf,k),at=p(_e.elves.clothElf,F),qe=[Oe,Fe,at],At={cutterElfTraining:L,planterElfTraining:we,expandersElfTraining:ae,heatedCutterElfTraining:Ce,heatedPlanterElfTraining:ge,fertilizerElfTraining:Me,smallfireElfTraining:z,bonfireElfTraining:ke,kilnElfTraining:Ae,paperElfTraining:Oe,boxElfTraining:Fe,clothElfTraining:at};je.on("update",()=>{if(!(X.day.value=1&&(U.amountOfTimesDone.value-=He,a.lt(U.level.value,De.amount.value)&&(U.exp.value=a.mul(U.elfXPGainComputed.value,He).add(U.exp.value)))}});const pe=S(()=>i(N,null,[be.value.name,u("'s milestones: "),be.value.disp()])),$=g(()=>{const U=a.pow(10,De.amount.value);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:a.add(De.amount.value,1).mul(1e4)}}),De=xe(()=>({display:S(()=>i(N,null,[i("h3",null,[u("Build a School")]),i("div",null,[u("You gotta start somewhere, right? Each school increases the maximum level for elves by 1. Maximum of 5.")]),i("div",null,[u("You have "),te(De.amount.value),u(" schools.")]),i("div",null,[u("They are currently letting elves learn up to level")," ",te(De.amount.value),u(".")]),i("div",null,[u("Costs "),V($.value.wood),u(" logs, "),V($.value.coal)," ",u("coal, "),V($.value.paper),u(" paper, "),V($.value.boxes)," ",u("boxes, "),V($.value.metalIngots),u(" metal ingots,")," ",V($.value.cloth),u(" cloth, "),V($.value.plastic)," ",u("plastic, and requires "),V($.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return $.value.wood.lte(de.logs.value)&&$.value.coal.lte(R.coal.value)&&$.value.paper.lte(K.paper.value)&&$.value.boxes.lte(Ze.boxes.value)&&$.value.metalIngots.lte(nt.metal.value)&&$.value.cloth.lte(lt.cloth.value)&&$.value.plastic.lte(Ue.plastic.value)&&$.value.dye.lte(Ve.dyes.blue.amount.value)&&$.value.dye.lte(Ve.dyes.red.amount.value)&&$.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){de.logs.value=a.sub(de.logs.value,$.value.wood),R.coal.value=a.sub(R.coal.value,$.value.coal),K.paper.value=a.sub(K.paper.value,$.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,$.value.boxes),nt.metal.value=a.sub(nt.metal.value,$.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,$.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,$.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:g(()=>B(o.bought.value)),style:"width: 600px"})),le=g(()=>{const U=a.add(De.amount.value,1).pow(1.5);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:U.mul(1e4)}}),fe=g(()=>a.add(st.amount.value,1).sqrt()),st=xe(()=>({display:S(()=>i(N,null,[i("h3",null,[u("Build a Classroom")]),i("div",null,[u("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",i(Oa,null,{default:()=>[u("Classrooms + 1")]}),u(".")]),i("div",null,[u("You have "),te(De.amount.value),u(" classrooms.")]),i("div",null,[u("They are currently multiplying elves' XP gain by "),V(fe.value)]),i("div",null,[u("Costs "),V(le.value.wood),u(" logs,")," ",V(le.value.coal),u(" coal, "),V(le.value.paper)," ",u("paper, "),V(le.value.boxes),u(" boxes,")," ",V(le.value.metalIngots),u(" metal ingots,")," ",V(le.value.cloth),u(" cloth, "),V(le.value.plastic)," ",u("plastic, and requires "),V(le.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return le.value.wood.lte(de.logs.value)&&le.value.coal.lte(R.coal.value)&&le.value.paper.lte(K.paper.value)&&le.value.boxes.lte(Ze.boxes.value)&&le.value.metalIngots.lte(nt.metal.value)&&le.value.cloth.lte(lt.cloth.value)&&le.value.plastic.lte(Ue.plastic.value)&&le.value.dye.lte(Ve.dyes.blue.amount.value)&&le.value.dye.lte(Ve.dyes.red.amount.value)&&le.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){de.logs.value=a.sub(de.logs.value,le.value.wood),R.coal.value=a.sub(R.coal.value,le.value.coal),K.paper.value=a.sub(K.paper.value,le.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,le.value.boxes),nt.metal.value=a.sub(nt.metal.value,le.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,le.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,le.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:g(()=>B(s.bought.value)),style:"width: 600px"})),Ke=mr({training:()=>({tab:wa(()=>({display:S(()=>i(N,null,[Sl(Le,Re,Ee,qe),i(ye,null,null),pe()]))})),display:"Elf Training"}),teaching:()=>({tab:wa(()=>({display:S(()=>i(N,null,[ee(De),u(" "),ee(st)," ",Sl([o,s])]))})),display:"The Schools"}),info:()=>({tab:wa(()=>({display:S(()=>i(N,null,[u("Each elf gains experience points (XP) every time they perform their action (they don't have to buy anything though). When they get enough XP, they can level up, granting special rewards.")]))})),display:"Info"})}),[Ge,ft]=nl(()=>[{title:"Global XP Gain",modifier:d,unit:" XP"},{title:"Holly XP Gain per Action",modifier:L.elfXPGain,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:we.elfXPGain,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ae.elfXPGain,unit:" XP"},{title:"Jack XP Gain per Action",modifier:Ce.elfXPGain,unit:" XP"},{title:"Mary XP Gain per Action",modifier:ge.elfXPGain,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Me.elfXPGain,unit:" XP"},{title:"Joy XP Gain per Action",modifier:z.elfXPGain,unit:" XP"},{title:"Faith XP Gain per Action",modifier:ke.elfXPGain,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:Ae.elfXPGain,unit:" XP"},{title:"Star XP Gain per Action",modifier:Oe.elfXPGain,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Fe.elfXPGain,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:at.elfXPGain,unit:" XP"}]),Qe=j(!1),Mt=S(()=>i(yt,{modelValue:Qe.value,"onUpdate:modelValue":U=>Qe.value=U},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:Ge}));return{name:e,day:Rl,color:t,minWidth:700,elfTraining:At,currentShown:Y,tabs:Ke,generalTabCollapsed:ft,teaching:o,schools:De,classrooms:st,classroomUpgrade:s,display:S(()=>i(N,null,[X.day.value===Rl?"Get all elves to level 5.":`${e} Complete!`," ",u("-"),i("button",{class:"button",style:"display: inline-block;",onClick:()=>Qe.value=!0},[u("Check Modifiers")]),ee(Mt),ee(l),ee(Ke)]))}}),Ir="cloth",nn=8,lt=Ut(Ir,function(){const e="Cloth",t="white",l=ct(0,"cloth"),n=ct(0,"wool"),o=ct(10,"sheep"),s=Se(0),d=Wt(()=>({direction:Ie.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:()=>a.div(s.value,qe.value)})),c=Tt(()=>({display:{title:"Breed sheep",description:S(()=>i(N,null,[u("Breed "),ve(a.floor(Fe.value)),u(" sheep"),i("br",null,null),ee(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,qe.value),onClick(){if(a.lt(s.value,qe.value))return;const ne=a.floor(Fe.value);o.value=a.add(o.value,ne),s.value=0}})),p=Se(0),m=Wt(()=>({direction:Ie.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:()=>a.div(p.value,De.value)})),y=Tt(()=>({display:{title:"Shear sheep",description:S(()=>i(N,null,[u("Shear up to "),ve(a.floor(pe.value)),u(" sheep"),i("br",null,null),ee(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,De.value),onClick(){if(a.lt(p.value,De.value))return;const ne=a.min(o.value,pe.value).floor();n.value=a.add(n.value,ne),p.value=0}})),h=Se(0),b=Wt(()=>({direction:Ie.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:()=>a.div(h.value,Ke.value)})),v=Tt(()=>({display:{title:"Spinning wool",description:S(()=>i(N,null,[u("Spin "),ve(a.floor(fe.value)),u(" wool"),i("br",null,null),ee(b)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Ke.value),onClick(){if(a.lt(h.value,Ke.value))return;const ne=a.min(n.value,fe.value).floor();l.value=a.add(l.value,ne),n.value=a.sub(n.value,ne),h.value=0}})),E=xl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),_=xl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),x=xl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),J=xe(()=>({resource:de.logs,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.5,ne).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=xe(()=>({resource:nt.metal,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.4,ne).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),k=xe(()=>({resource:K.paper,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.3,ne).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=G(()=>({resource:T(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Y=G(()=>({resource:T(n),cost:150,visibility:()=>B(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),be=G(()=>({resource:T(o),cost:200,visibility:()=>B(Y.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),we={treesUpgrade4:G(()=>({resource:T(l),cost:1e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:be,treesUpgrade2:Y,treesUpgrade1:F},ae=G(()=>({resource:T(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Le=G(()=>({resource:T(n),cost:225,visibility:()=>B(ae.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Ce=G(()=>({resource:T(o),cost:300,visibility:()=>B(Le.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Me={metalUpgrade4:G(()=>({resource:T(l),cost:2e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Ce,metalUpgrade2:Le,metalUpgrade1:ae},Re=G(()=>({resource:T(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),z=G(()=>({resource:T(n),cost:200,visibility:()=>B(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),ke=G(()=>({resource:T(o),cost:400,visibility:()=>B(z.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),Ee={paperUpgrade4:G(()=>({resource:T(l),cost:4e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:ke,paperUpgrade2:z,paperUpgrade1:Re},Oe=Z(()=>[re(()=>({addend:J.amount,description:"Build more pens"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought}))]),Fe=g(()=>Oe.apply(1)),at=Z(()=>[]),qe=g(()=>at.apply(1)),At=Z(()=>[re(()=>({addend:M.amount,description:"Make stronger shears"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(de.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Hl.elfTraining.cutterElfTraining.milestones[2].earned}))]),pe=g(()=>At.apply(1)),$=Z(()=>[]),De=g(()=>$.apply(1)),le=Z(()=>[re(()=>({addend:k.amount,description:"Learn how to spin"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(de.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Hl.elfTraining.cutterElfTraining.milestones[2].earned}))]),fe=g(()=>le.apply(1)),st=Z(()=>[]),Ke=g(()=>st.apply(1)),[Ge,ft]=nl(()=>[{title:"Sheep Gain",modifier:Oe,base:1},{title:"Sheep Breeding Cooldown",modifier:at,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:At,base:1},{title:"Shearing Cooldown",modifier:$,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:le,base:1},{title:"Spinning Cooldown",modifier:st,base:1,visible:!1,unit:"s"}]),Qe=j(!1),Mt=S(()=>i(yt,{modelValue:Qe.value,"onUpdate:modelValue":ne=>Qe.value=ne},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:Ge}));je.on("update",ne=>{a.lt(X.day.value,nn)||(a.gte(s.value,qe.value)?s.value=qe.value:(s.value=a.add(s.value,ne),c.isHolding.value&&c.onClick()),a.gte(p.value,De.value)?p.value=De.value:(p.value=a.add(p.value,ne),y.isHolding.value&&y.onClick()),a.gte(h.value,Ke.value)?h.value=Ke.value:(h.value=a.add(h.value,ne),v.isHolding.value&&v.onClick()))});const{total:U,trackerDisplay:He}=dl({resource:l,goal:1e3,name:e,day:nn,color:t,textColor:"var(--feature-foreground)",modal:{show:Qe,display:Mt}});return{name:e,color:t,cloth:l,totalCloth:U,wool:n,sheep:o,buildPens:J,betterShears:M,fasterSpinning:k,treesUpgrades:we,metalUpgrades:Me,paperUpgrades:Ee,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:E,shearSheepHK:_,spinWoolHK:x,minWidth:700,display:S(()=>i(N,null,[ee(He),i(ye,null,null),i(It,{resource:l,style:"margin-bottom: 0"},null),i(It,{resource:n,style:"margin-bottom: 0"},null),i(It,{resource:o,style:"margin-bottom: 0"},null),We(c,y,v),We(J,M,k),i(ye,null,null),i(Pl,null,{default:()=>[Ht(...Object.values(we)),Ht(...Object.values(Me)),Ht(...Object.values(Ee))]})]))}}),Mr="paper",Ca=5,K=Ut(Mr,function(){const e="Paper",t="#E8DCB8",l=ct(0,"paper"),n=ct(g(()=>a.min(a.div(de.logs.value,1e9),a.div(R.ash.value,1e6))),"pulp"),o=Rn(()=>({scaling:Ra(1,1.2),baseResource:n,gainResource:T(l),roundUpCost:!0,spend(z,ke){de.logs.value=a.sub(de.logs.value,a.times(ke,1e9)),R.ash.value=a.sub(R.ash.value,a.times(ke,1e6))},gainModifier:we})),s=Tt(()=>({display:S(()=>{const z=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return i(N,null,[i("span",{style:"font-size: large"},[u("Create "),te(o.currentGain.value),u(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost: "),Jl(de.logs,z),u(" "),n.displayName,u(" ("),te(a.times(z,1e9)),u(" "),de.logs.displayName,u(";")," ",te(a.times(z,1e6)),u(" "),R.ash.displayName,u(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function d(z){const ke=xe(()=>({...z,display:{title:z.name,description:`Print a copy of "${z.name}", which ${z.elfName} will use to improve their skills! Each copy printed will reduce the "${z.buyableName}" price scaling by 0.95x and make ${z.elfName} purchase +10% faster!`,effectDisplay:S(()=>i(N,null,[V(a.pow(.95,ke.amount.value)),u("x price scaling,")," ",V(a.div(ke.amount.value,10).add(1)),u("x auto-purchase speed")])),showAmount:!1},resource:T(l),cost(){let Ae=this.amount.value;return(z.elfName==="Star"||z.elfName==="Bell")&&(Ae=a.pow(Ae,2)),a.gte(Ae,100)&&(Ae=a.pow(Ae,2).div(100)),a.gte(Ae,1e4)&&(Ae=a.pow(Ae,2).div(1e4)),Ae=a.pow(.95,x.amount.value).times(Ae),a.pow(5,Ae).times(10)},style:"width: 600px"}));return ke}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>B(_e.elves.smallFireElf.bought.value)}),E=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>B(_e.elves.bonfireElf.bought.value)}),_=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>B(_e.elves.kilnElf.bought.value)}),x=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>B(_e.elves.paperElf.bought.value)}),J=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>B(_e.elves.boxElf.bought.value)}),M=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>B(_e.elves.clothElf.bought.value)}),k={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:y,heatedPlantersBook:h,fertilizerBook:b,smallFireBook:v,bonfireBook:E,kilnBook:_,paperBook:x,boxBook:J,clothBook:M},F=G(()=>({resource:T(l),cost:1e8,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),Y=G(()=>({resource:T(l),cost:1e9,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),be=G(()=>({resource:T(l),cost:1e10,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),L={clothUpgrade:F,drillingUpgrade:Y,oilUpgrade:be},we=Z(()=>[C(()=>({multiplier:2,description:"Scholar's shoes",enabled:lt.paperUpgrades.paperUpgrade1.bought})),C(()=>({multiplier:2,description:"Scholar's slacks",enabled:lt.paperUpgrades.paperUpgrade2.bought})),C(()=>({multiplier:2,description:"Scholar's jacket",enabled:lt.paperUpgrades.paperUpgrade3.bought})),C(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:lt.paperUpgrades.paperUpgrade4.bought})),C(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),[ae,Le]=nl(()=>[{title:"Paper Gain",modifier:we,base:1}]),Ce=j(!1),ge=S(()=>i(yt,{modelValue:Ce.value,"onUpdate:modelValue":z=>Ce.value=z},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:ae}));je.on("update",z=>{a.lt(X.day.value,Ca)||(l.value=a.times(z,Ue.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:Me,trackerDisplay:Re}=dl({resource:l,goal:5e3,name:e,day:Ca,color:t,textColor:"var(--feature-foreground)",modal:{show:Ce,display:ge}});return{name:e,day:Ca,color:t,paper:l,totalPaper:Me,paperConversion:o,books:k,upgrades:L,generalTabCollapsed:Le,minWidth:700,display:S(()=>i(N,null,[ee(Re),i(ye,null,null),i(It,{resource:l,color:t,style:"margin-bottom: 0"},null),i(ye,null,null),ee(s),i(ye,null,null),We(...Object.values(L)),i(ye,null,null),Ht(...Object.values(k))]))}}),Dr="boxes",ka=6,Ze=Ut(Dr,function(){const e="Boxes",t="#964B00",l=ct(0,"boxes"),n=Rn(()=>({scaling:Ra(1e10,1),baseResource:de.logs,gainResource:T(l),roundUpCost:!0})),o=Tt(()=>({display:S(()=>i(N,null,[i("span",{style:"font-size: large"},[u("Create "),te(n.currentGain.value),u(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost:")," ",Jl(de.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",de.logs.displayName])])),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),s=G(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:100})),d=G(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:1e3})),c=G(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:d,coalUpgrade:c},m=G(()=>({resource:T(l),cost:1e8,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),y=G(()=>({resource:T(l),cost:1e9,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=G(()=>({resource:T(l),cost:1e10,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),b={oreUpgrade:m,metalUpgrade:y,plasticUpgrade:h},v=xe(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:S(()=>i(N,null,[V(a.div(v.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(3,k).times(100).div(Ve.boosts.orange2.value)},visibility:()=>B(s.bought.value)})),E=xe(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:S(()=>i(N,null,[V(a.div(E.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(5,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>B(d.bought.value)})),_=xe(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:S(()=>i(N,null,[V(a.div(_.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(7,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>B(c.bought.value)})),x={logBoxesBuyable:v,ashBoxesBuyable:E,coalBoxesBuyable:_};je.on("update",k=>{a.lt(X.day.value,ka)||(l.value=a.times(k,Ue.buyables.passiveBoxes.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:J,trackerDisplay:M}=dl({resource:l,goal:5e4,name:e,day:ka,color:t});return{name:e,day:ka,color:t,boxes:l,totalBoxes:J,boxesConversion:n,upgrades:p,row2Upgrades:b,buyables:x,minWidth:700,display:S(()=>i(N,null,[ee(M),i(ye,null,null),i(It,{resource:l,color:t,style:"margin-bottom: 0"},null),i(ye,null,null),ee(o),i(ye,null,null),Sl(Object.values(p),Object.values(b)),i(ye,null,null),We(...Object.values(x))]))}}),xr="trees",on=1,sn=.1,de=Ut(xr,function(){const e="Trees",t="#4BDC13",l="green",n=ct(0,"logs"),o=ct(0,"saplings"),s=j(0),d=Z(()=>[re(()=>({addend:()=>a.times(L.amount.value,10),description:"Expand Forest",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Nt.milestones.morePlantsMilestone1.earned})),C(()=>({multiplier:2,description:"5 Elves Trained",enabled:_e.milestones[4].earned})),C(()=>({multiplier:2,description:"8 Elves Trained",enabled:_e.milestones[7].earned})),C(()=>({multiplier:4,description:"Lumberjack Boots",enabled:lt.treesUpgrades.treesUpgrade1.bought})),re(()=>({addend:Ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Ve.dyes.blue.amount.value,1)}))]),c=ct(g(()=>a.sub(d.apply(10),o.value)),"trees"),p=g(()=>d.apply(10)),m=G(()=>({resource:T(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=G(()=>({resource:T(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=G(()=>({resource:T(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=G(()=>({resource:T(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=G(()=>({resource:T(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),E=[m,y,h,b,v],_=G(()=>({resource:T(n),cost:50,visibility:()=>B(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=G(()=>({resource:T(n),cost:50,visibility:()=>B(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),J=G(()=>({resource:T(n),cost:150,visibility:()=>B(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),M=G(()=>({resource:T(n),cost:150,visibility:()=>B(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),k=G(()=>({resource:T(n),cost:300,visibility:()=>B(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[_,x,J,M,k],Y=xe(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,K.books.cuttersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>B(k.bought.value)})),be=xe(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,K.books.plantersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>B(k.bought.value)})),L=xe(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,100)&&(H=a.pow(H,2).div(100)),a.gte(H,1e5)&&(H=a.pow(H,2).div(1e5)),H=a.pow(.95,K.books.expandersBook.amount.value).times(H),a.pow(a.add(H,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>B(k.bought.value)})),we=[Y,be,L],ae=Z(()=>[re(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),re(()=>({addend:Re,description:"Smart Knives",enabled:J.bought}))]),Le=g(()=>ae.apply(1)),Ce=Z(()=>[C(()=>({multiplier:.5,description:"Sharper Fingers",enabled:_.bought})),C(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),ge=g(()=>Ce.apply(1)),Me=Z(()=>[re(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),re(()=>({addend:Y.amount,description:"Generic Cutters",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Nt.milestones.autoCutMilestone1.earned})),C(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Nt.milestones.autoCutMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Cutters",enabled:R.warmerCutters.bought})),C(()=>({multiplier:R.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(R.heatedCutters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:lt.treesUpgrades.treesUpgrade2.bought}))]),Re=g(()=>Me.apply(0)),z=Z(()=>[re(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),re(()=>({addend:Fe,description:"Smart Spades",enabled:M.bought}))]),ke=g(()=>z.apply(1)),Ae=Z(()=>[C(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),C(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),Ee=g(()=>Ae.apply(1)),Oe=Z(()=>[re(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),re(()=>({addend:()=>a.div(be.amount.value,2),description:"Generic Planters",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone1.earned})),C(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Planters",enabled:R.warmerPlanters.bought})),C(()=>({multiplier:R.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(R.heatedPlanters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:lt.treesUpgrades.treesUpgrade3.bought})),C(()=>({multiplier:2,description:"Ivy Level 1",enabled:Hl.elfTraining.planterElfTraining.milestones[0].earned}))]),Fe=g(()=>Oe.apply(0)),at=Z(()=>[C(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),C(()=>({multiplier:1.25,description:"Research II",enabled:k.bought})),C(()=>({multiplier:()=>a.div(Nt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Nt.milestones.logGainMilestone1.earned})),C(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Nt.milestones.logGainMilestone2.earned})),C(()=>({multiplier:1.25,description:"Ashy Soil",enabled:R.basicFertilizer.bought})),C(()=>({multiplier:R.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(R.moreFertilizer.amount.value,0)})),C(()=>({multiplier:2,description:"4 Elves Trained",enabled:_e.milestones[3].earned})),C(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:lt.treesUpgrades.treesUpgrade4.bought})),C(()=>({multiplier:g(()=>a.add(Re.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Ve.upgrades.blueDyeUpg.bought})),C(()=>({multiplier:g(()=>a.add(Re.value,1).log10().plus(1)),description:"Holly Level 1",enabled:Hl.elfTraining.cutterElfTraining.milestones[0].earned})),Fn(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Nt.milestones.logGainMilestone3.earned}))]),qe=Se(0),At=Wt(()=>({direction:Ie.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(qe.value,ge.value)})),pe=Tt(()=>({display:{title:"Cut trees",description:S(()=>i(N,null,[u("Cut down up to "),te(a.floor(Le.value))," ",u("tree"),a.eq(Le.value,1)?"":"s",u(" at once!"),i("br",null,null),ee(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(qe.value,ge.value),onClick(){if(a.lt(qe.value,ge.value))return;const H=a.floor(a.min(c.value,a.times(Le.value,a.div(qe.value,ge.value).floor())));n.value=a.add(n.value,a.times(at.apply(1),H)),o.value=a.add(o.value,H),qe.value=0}})),$=Se(0),De=Wt(()=>({direction:Ie.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($.value,Ee.value)})),le=Tt(()=>({display:{title:"Plant trees",description:S(()=>i(N,null,[u("Plant up to "),te(a.floor(ke.value))," ",u("tree"),a.eq(ke.value,1)?"":"s",u(" at once!"),i("br",null,null),ee(De)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte($.value,Ee.value),onClick(){if(a.lt($.value,Ee.value))return;const H=a.floor(a.min(o.value,a.times(ke.value,a.div($.value,Ee.value).floor())));o.value=a.sub(o.value,H),$.value=0}})),[fe,st]=nl(()=>[{title:"Logs per Tree",modifier:at,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ae,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Ce,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:z,base:1,visible:y.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:Ae,base:1,visible:y.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Me,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oe,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:k.bought}]),Ke=j(!1),Ge=S(()=>i(yt,{modelValue:Ke.value,"onUpdate:modelValue":H=>Ke.value=H},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:fe}));je.on("update",H=>{if(a.lt(X.day.value,on))return;a.gte(qe.value,ge.value)?qe.value=ge.value:(qe.value=a.add(qe.value,H),pe.isHolding.value&&pe.onClick()),a.gte($.value,Ee.value)?$.value=Ee.value:($.value=a.add($.value,H),le.isHolding.value&&le.onClick());const Dt=a.min(c.value,a.times(Re.value,H)),Et=a.mul(at.apply(1),Dt),rt=a.div(Et,H);s.value=a.mul(rt,sn).add(a.mul(s.value,a.dOne.sub(sn))),n.value=a.add(n.value,Et),o.value=a.add(o.value,Dt);const se=a.min(o.value,a.times(Fe.value,H));o.value=a.sub(o.value,se)});const ft=g(()=>a.sub(Re.value,Fe.value)),Qe=g(()=>a.sub(Fe.value,Re.value)),Mt=xl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{pe.canClick.value&&pe.onClick()}})),U=xl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{le.canClick.value&&le.onClick()}})),{total:He,trackerDisplay:ne}=dl({resource:n,goal:1e4,name:e,day:on,color:l,modal:{show:Ke,display:Ge}});return{name:e,color:t,logs:n,totalLogs:He,trees:c,saplings:o,cutTree:pe,plantTree:le,cutTreeHK:Mt,plantTreeHK:U,row1Upgrades:E,row2Upgrades:F,row1Buyables:we,manualCutProgress:qe,manualPlantProgress:$,generalTabCollapsed:st,computedAutoCuttingAmount:Re,minWidth:700,display:S(()=>i(N,null,[ee(ne),i(ye,null,null),i(It,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Re.value,0)?`+${V(s.value)}/s average
equilibrium: +${bn([[Re.value,"cutting speed"],[Fe.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",at.apply(1))}`:void 0},null),i(It,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:na(ft.value)},null),i(It,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:na(Qe.value)},null),i(ye,null,null),We(pe,le),i("div",null,[u("Tip: You can hold down on actions to perform them automatically")]),i(ye,null,null),Sl(E,F),i(ye,null,null),We(...we)]))}});var Gn="./assets/tree.35808197.png",$n="./assets/sws.714ad454.png",qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAMuElEQVR42u3dO4zkSAEG4L/Kr5me6dl1QkJAjkDiElJISAiO7CQSyCBHQis08QQrXUJISExKxCNBguQICJCIkBAZOqlmH0LbPW27CKa78XjtabddZVeV/z/ZXe12r11V39TDdllorcEwTHsEgTAMgTAMgTAMgTAMgTAMgTAMgTz5z4Ro/c+01oJVwSwaSBcOQmEWD6QPDiJhFgnkHBxEwiwKyBAcBMIQCIEwBDIcCJEwBEIgDIEQCEMgBMIQCIEwBOIQECJhggfCXoQhEAJhCIRAGAIhEIbxCQiRMARCIMySgXCYxRAIgTAEQiAMgRAIw/gEhEiY4IGwF2EIhEAYAiEQhkAIhGF8AkIkDIEQCLNkIBxmMQRCIAyBEAhDIATCMD4BIRImeCDsRRgCIRCGQAiEIRACYQjEJyBEwhAIgTBLBsJhFkMgBMIQCIEwBEIgDIH4BIRImOCBsBdhCIRAGAIhEIZACIQhEE7UGYZAGMYPIBxmMQRCIAyBEAhDIATCEAgn6gzjEBD2IgyBEAhDIATCEAiBMATCiTrDEAjD+AGEwyyGQAiEIRACYQiEQBgC4USdYRwCwl6EIRACYQiEQBgCIRCGQDhRZxgCYRg/gHCYxRAIgTAEQiAMgRAIQyCcqDME4hAQ9iIMgRAIQyAEwhCIs0CGfgeBMUEDsRGiIRD3DsoxJMRCIARCJK318Nz5ttVTaOVDIERitex9LysngRBJeGXua3k5C4RIwixr38qMQAhk8rL2qdw4xCKS2crah7LjJJ1IZi1v18uOFwoJZPYyz/P820qpLwgkQBwhIHGh3PM8/41S6jMCmaiSbm9fnfXv7+5eLxKJSz+U8jz/m1LqEwKxUEnngqhlB0AAkPtfi7u71wmBzAJkB+BzAL9USv2HQObHUQCo9jB0rTdJl9CLuDikzfN8A+AHSqnfEYiBShqBowJQ7mEcGvXh9zp0JKZw7H/qxwBwf38vDH3n35VS31w8EAM46o37nJR7IM3P16EMRuL80uXAcs/zvM/nxP39fTALILMBmRGHrgFpw1H/d+Lu7nXsK5JmGWutxZhyPwHko/M1DWWOcvUSyO3tq3rjPrfAqlrv0fX5Iz7fgNicV+R5fuxd9+Vz8hxtIJmyfGcBMhJH2VI5fQtL14ZYuu9nXUcyxWR7j6NZjr3Oz2ckkwMxgKOtYsSZSIoeFfykEQxBYrsCp1qFauAYFF+ReAPk9vbVrmVYJQYg0bVhlujTW9zevtq5dG1k6uVZE0BsIrEJZVIgI3HgxLCqfi2jAHBo0LLja4uxQ6g5Ks5XHL4i8QXIA9pXmXTHSoro+PeHv4vxuIw7yRzBRMXNcVHPNA7bQKz8QJoKyMjeQ7c09CYKWfv7LhyHHiOZsqGNrbRQcBCI4UquzTvaeouuIVcTSP1zwuZwykbFhYTDRySTABnRe1QNHBrdV79PZi4cQyttZhxDL8QGhcRZIHscBwBVA0l9Ut61kqX3KCI4knMrbUogtnuNqcF4A2Rk79HsIQ4XCWXHfOTQU0g4mHMqbUk4bKExsjjiIpAOHJ3l4DqMWkP8XCn18x5l9msAP1oiCpNQlgDk5DxjqqVagw3zT0qp77SU0wrAdwF8CuCnBsq9OJS9lBJpmsrdblcB0HEci4uLi8RmA+0LsOu7m5+fC4lVIANxoDEhb4OiXe8tTjScPwP4sVLqn/ty+iqAvwD4F4AbAN8a+v1SygKAllKiLMt6XUAIgTiORZqmMo5jaQPGOVhOfb8JJCED6UTiW6/RUukawKdKqd8KIb4B4PcAHgB8ZT/Puhrw1UWtzMVj29BHHFEUIU1TmWVZr0ULG6tM9Qbf9/uHfMYkEqeAnHo60MTGClNVSh8kWuufvXnz5ocAPsH/V+vSAeVcPG0P+ohCSikA6Kqq9Hq9TufCYaAuNAY+jOUkEAO9x+w4bA853r17V1ZVVWito9rw8axlaSllUVUVhHj8eBw/XuqpqkoLIbBer8+6a8AlHG1AhhxjnufXSqn/eg3EBRx9J5djG1Ge59hsNtXDw4Muy1I0hpHRmeVcRFEEIQS01ojjWMRxLJIkGTRHcw1IY1iKIb1InudfAvi+UuqvwQFxDYephpRlWVkUBfZAjh3CkOFVkiQyyzIRx/GouZmLOBpAxJjjzPP8a0qpfwc1xHJhaGWjUa1Wq+rDhw/Yl//gFbn9PANJkiDLMoQGpOvWl6km7E4DcR3HmMqK47gqimIUjn05I4oiXFxcIEmSoHA8VzdjjvesOxpcXcUyjSNN0w9XV1eXzYI9A0fbLfd638DFXA1MCAEpJW5ubkLuPYwec57nN0qp994B2SM57Ek1+kKglHKzX/LUUkq9Xq9XI76ueUdxs7JmuylSSokXL14QiIVexEUgFYBqzK3pQoiN1loeGrOUUqdpqi8vL1cjcOhnehQA0Pf397PcTp9lGVarVVBA9ntwtd2xbeyY+yBx7l6s29tX5dBb1GswjkunQogqSRJcXV1djG0seZ5XDSD1JdpZgAghsD+/SYHYmBs0cDw5TQIZn+3jfyeOJ34YWt3c3GSmGkoDyZOeZOph1mH+kWXZ5CtYNq4XPbNzo5hrmBUKkK14fOu9kFKiqqoDkCrLMnF5eZmYbCQtPQn2E3U5B5CxE3RbQPp+f489f8VccxGnH7k9I81tgQ6/VnmeJ6YbSEsvUv+eyZBEUWQEx8AyMHkqeiiOsVCWBOSj59SjKNI3NzexhcbRtYnEpEBevnx5vAcrUCDC5jksCUhzK1EhhNBxHIvr62srzz109SJLADICR9eKlDaBw1sgEyApmwUrpUQURTgFZCCOrnPRPgPpuUhhqqcQzwARtpEvEYhoTmDTNBWr1cr4CshzQKbqRQ6Tc9NAniuXATiab+/CM0B6v1JhynmIF1uP9kh9k4djpcRxjPV6bXwN/cSqyyS9iOkJ+gQx1ktM2YuECKTZiIQpGH2AmHpP34lyRBRFWK/XvuKwCsVbIBaRVF0FnSQJdrudsUo4tWZvG8hh84U0TXF5eekyCHHizwQyIRBjy4RnAPloRWaK3qPH8bnYW1iZkAcJxAKS5uvArO0p2+g9nAQyM5I+y7Xe9B4hANG2Ctq1oZVHUE6tVh3LqnbHLoEYRjLZioivOBwCcrKMTB7ngHvKcqXUG+eAGEQyKw6XgcyARA8tn7neg5jn+deVUv8IEYj1XF9fI0kS7SuOGcDoMeUzx94AeZ7/QSn1PSeBuIwkSRJUVYU4jrFarXQoQCxi0SbKY8wxjbgz4hcAvlBK/dE5IC4iOVxrONzGcXju4urqSoeCwzQU2xtd2z6Orsm6E0Bc7kkO+05VVQUp5fERVykl3r9/j1AypGHaeo59IJLBe/cSiIEepf4rAFRVhdAy5c6SlnoR40icAeLDpL0OxqVym7pxTrEDysA7h0cNfZ0H4hOSkDPFDveGkYxaPXsOiXDxJyGREMgZQDrvwzPxbIhwdahAJO4hmWNzuR5IjAJpIhEuj6WJhEB6HOOzd3KP7UWE65NNInECyOgJsMXjPPmow5gbGIUPqzFEMjsSZ4F0HeeigBCKO73IECC2X4pqemHBWyBE4sQwq9fkd+qVMAIhFGeAPNfoGnOC1tcX2AJSliU2mw2klNi//xFCiLPveggCCJFMDuQjJB1/1zZZ1mPnBVMmGCCE4hSQNiTNHqRXL0QghOIbkHM3WuhTDzaQGHnK1HkgQxr6k5MiFFNAxmyn9NFni6IQVVVBCIGHhwcUReHkXdFOAzHRuOtvmGIzH9V7jNpvbLfbHX+/3W6Pd0DvX3/NOcjcQyT2KtMD2W63xycwt9styrJEWZZenftigLSdMMGczmq1OrzzsPd7O7bbLaSUeHh4gNYaZVl6+1CZk0BsN9iTG4QRTHNi3jWXEG09RlEU0FpDa/1kaEUgHuDoi2TJcA6bVGRZhouLi15ANpsNiqKAEAK73e74pKXvK6OLBTIUyVKgSCkhpUSSJCeRFEWB7Xb7pLcI4ZKBcw9MzdHwzkWypOFXkiSIoqjt1QpProW8ffsWQHibVzgDZO5Gdw6SJQGRUj4ZcjX3BwNwXJkKbeOK2TdtcKmhEQjjBBBXGxeBMH3ag1UgLjcsAmH6tAVrQFxvVATC9GkHVoD40KAIhOnTBowDCQ0HgSwXh3EgIeIgkGXCWCSQoVfRiWR5MBYHZAwOIlkWCgIhEIIgEHsFRyhhNH4CsViwRBIWhEmAuNRwpixoYgkThxUgLjSYOQuaWAjE2cbiXPdMLF7jsA7EdsNxtVCJLJw6FKG+rXXpCfWuBgJhpob0EwC/IgwCYWbqgXweChMIwxAIwxAIwxAIwxAIwxAIwxAIwxAIw4Sa/wGDtUAHUuMNRQAAAABJRU5ErkJggg==",Qn="./assets/elf.9fbfa563.png",Vn="./assets/paperStacks.4c96ec8c.png",Ln="data:image/png;base64,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",Hn="./assets/metal.7407f5d1.png",jn="./assets/cloth.7bcd7f37.png",Wn="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==",Jn="./assets/plastic.b8ac74ff.png",zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAH30lEQVR42u3dMXIdRRAGYOkARBShCmdOCXwH38EXICHhJCQkvgB30B0InJJBOaQc+QAiQriw3u7M7MxO9873R69cKqm8o296Vm/79f3T09OdiLyce0BEABEBRAQQEUBEABEBRAQQEUBEABERQEQAiXvR7++fnp6e7kv/XQBZCsfe10ACCBgFAQUQMEABBIw+AQUQMEABBA5IAIEDEkBkFg5IAIEDEkAAAQQQOCABBBBAABFAABFABBBABBBABJDEQP7++de77375CRBAIBkFBA5ALgtpC4hffECWrzJ7FQQSQJauHv9GFQEEjhs4IAEEjB0ce0hAAWQJHEeAQALI0jggAWRZGKU4SpGAAsiSMEABZBkYR3HUIAEFkDQoeuKoRQILIKFR9IZxFAosgEwHcQaMHlCAAeRUEDNg9IQCDCCXqRgqCiDL319kvU+58sSsZYHU4MiAogeWll/mq0/MCg9k1O7U+jBh9vR6GHKViVmhgYzcnV763leGUQKl5FquNjErJJDRu1NNj8ZqleTWdVx1YlYoIGftTqtXj5oqsvrErBBAzt6dACkDYmLWZCAzdifHq7JjlolZk4HM2p1UjzIksxINyRQgM3cnQGIDiYbkdCCz5/kBAkhYIJE+7BkOSAABBJAsQCLiAAQQQAABBBBAAAEEEEAAASQ3kPfff7j78a8fAAEEkFFAlnwfpAeQT59f3337zR+AnABk75f01npuAdEwNRgJIDGAbK3jXgXJhiRVw9QWEH0g84G8//7D8+urVJFwQLZ2p70K0nIsAKQOSAmOKyFJA+TT59fPr1urCCDtQPaOVbeS/biVouX2SxxHkADSBmTv3rEVSAYk4VtuX8Kxh+TWhddNWIbjy+t3BMcVkEwHsrcArUBqkADy9XUr+YtjCY5SJFGhhO5J38LRiiTqG5aZUgMjO5SwLbclOEqR1J6pZQyOGiRRoIR7o7AGRgsUmYujFslsLKcAKd2xj+CAJAeMo1DOxjIMSO0xpgcOSPLA6AHlDDBdgbSc7XvC6AEl/TyLDvdXZ8LoCWXEGh4CcmQxRsLoWVHSPTt0YE1mwohaUaqA9HpkfVZ6HL16XPwZM08yoIh4n3IakJkwIlWUUTNPatYmA4oeWLpsZqVAot1fZLtPmTXzJDuII2BOA1KzuBlQ9MBSevFnzjy5MowSKCGAZAZxBExrS+oIKDU9GqtVksNH4lYgV4ZRAuXMUWV7P3v16jGyiuwCqenRWK2SzHwQcu/ZMkAmAlkJR2kVmTXzxPFq7DELkA5Aoj0dvCKOUVVkE4jjVdkNe7QAMhHIijiyIQEEEEDgOAUJIIAA0gIEjpxIAAEEEEAAAQQQQAABBBBAtvLu8eHut7cfAQEEEEAAWRJIa7/GHpCWR+oBASQdkK1ntfYqSO2n1QMCyGWAvHt8eH7dUkUAASQ9kBIcrUgAASQtkL1j1a3UHLcAASQlkL3+kFYg//9ZgACSDsgRHLVIdBOW4QAkAJCSrsISHKVItn4uIH1wVANZHUnrm4Q1MFqgyP5G0h2IKtIHyBEckMzF0QREzsUBSeAKAsl8GKCoIGCAEhKHCpIQxggo2adqjUz3T3cHIx8UQA4Cuex/vgF+JBQ9sRydbDViYhYgSXBkQNEDy6jBQJmRhAcyY55fZhBHwPSaaHUlKKGBjNydXvreV4ZRAuVIZ+RVoYQEMmue3+pAtq7jmROzAJm8O61ePWqqyIyJWYBM3p0AKQMya2IWIBN3J8ersmPWrIlZgEzenVSPMiSzEg3JFCAzdydAYgOJhuR0IDMfW7l1dAAEkBBAIj7TtTIOSAABBJAcQKI+EQwIIIAAAggggAACCCCAAAJIXiCPbx7u3v7+ERBAABkFZMn3QXoAeXj1ePfxz7eAnACkdebJFhANU4ORABIDyNY67lWQbEhSNUxtAdEHMh/I45v/ruVVqkg4IFu7014FaTkWAFIHpATHlZCkAfLw6vH5dWsVAaQdyN6x6layH7dStNx+ieMIEkDagOzdO7YCyYAkfMvtSzj2kNy68LoJy3B8ef2O4LgCkulA9hagFUgNEkC+vm4lf3EswVGKJCqU0D3pWzhakfic4eOpgZEdStiW2xIcpUhqz9QyBkcNkihQwr1RWAOjBYrMxVGLZDaWU4CU7thHcECSA8ZRKGdjGQak9hjTAwckeWD0gHIGmK5AWs72PWH0gJJ+nkWH+6szYfSEMmINDwE5shgjYfSsKOmeHTqwJjNhRK0oVUB6PbI+Kz2OXqHf1GpYn0goIt6nnAZkJowVKkrN2mRA0QPLKVNuo95fuE8pX5/MII6AOQ1IDY4MKHpgCfchyy+s0ZVhlEAJASQziCNgQj0OUdGjsVolObpOzUCuDKMESnQgK+EYWUV2gdT0aKxWScJ8NA0gsYCshCN6FXG8GnvMAuSCQFbEMaqKbAJxvIp/zAIkGJAVcUSuIoAAAggc05AAAgggLUDgiI8EEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEkDFAVkfSu6sQkMRAVJGx1aMayOpIInYVGga0Hw1Ti1YPSMbiaAIisYBYo4kVxALExmGNVBBIIJm6NirIBXDIwI2n96e7wyHLAREBREQAEQFEBBARQEQAEQFEBBARQEQAERFARAARAUQEEBFARAARAUQkef4Ba6BLB9lPZTIAAAAASUVORK5CYII=",Pr="./assets/elfManagement.436c8744.png";const X=Ut("main",function(){const e=Se(1),t=g(()=>(+new Date(new Date().getFullYear(),11,e.value)-ie.time)/1e3),l=j(!1),n=j(-1),o=j(""),s=j();function d(m){const y=Se(!1),h=Se(!1);return kt(()=>{const b=m(),v=ht(b.shouldNotify),E=ht(()=>r(v)||r(h));return{...b,opened:y,shouldNotify:E,recentlyUpdated:h,[Kt]:ss,[al]:function(){const{day:_,layer:x,symbol:J,opened:M,shouldNotify:k,story:F,completedStory:Y,recentlyUpdated:be}=this;return{day:_,symbol:J,layer:x,opened:M,recentlyUpdated:be,shouldNotify:k,onOpenLore(){var ae,Le;const L=X.day.value>_;n.value=L?_-1:-1;const we=r((Le=(ae=Ct[x!=null?x:"trees"])==null?void 0:ae.name)!=null?Le:"");o.value=L?`${we} - Completed!`:we,s.value=L?`${F}
${Y}`:F,l.value=!0},onOpenLayer(){if(be.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ie.tabs.includes(x!=null?x:"trees")){const L=ie.tabs.lastIndexOf(x!=null?x:"trees");ie.tabs.splice(L,1)}else ie.tabs.push(x!=null?x:"trees"),X.minimized.value=!0;else ie.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(M.value=!0,setTimeout(()=>{var L,we;n.value=-1,o.value=r((we=(L=Ct[x!=null?x:"trees"])==null?void 0:L.name)!=null?we:""),s.value=F,ie.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Gn,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!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:$n,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!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:qn,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!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Qn,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!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Vn,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!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Ln,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!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Hn,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!"})),d(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:jn,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!"})),d(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Wn,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!"})),d(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Jn,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),d(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:zn,story:"To make toys, we're going to need some color to make them look nice and enticing! We can't just give kids clear toys after all! To add some color to our toys, we'll need some dyes!",completedStory:"After all that effort, you finally have a rainbow of dyes to choose from! Now the children won't be able to resist the toys you have to offer, once you get them made of course..."})),d(()=>({day:12,shouldNotify:!1,layer:"management",symbol:Pr,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:""})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){n.value=e.value-1,o.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,X.minimized.value=!1,ie.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:n,loreTitle:o,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:S(()=>i(N,null,[ie.devSpeed===0?i("div",null,[u("Game Paused")]):null,ie.devSpeed&&ie.devSpeed!==1?i("div",null,[u("Dev Speed: "),V(ie.devSpeed),u("x")]):null,ie.offlineTime?i("div",null,[u("Offline Time: "),da(ie.offlineTime)]):null,i(ye,null,null),i("div",{class:"advent"},[c.reduce((m,y)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(y),m),[[]]).map(m=>We(...m))])]))}}),Tr=e=>[X,de,Nt,R,_e,K,Ze,nt,lt,Ye,Ue,Ve,Hl],$a=g(()=>!1);function Fr(e,t){t.offlineProd=!1}var Ur=Object.freeze(Object.defineProperty({__proto__:null,main:X,getInitialLayers:Tr,hasWon:$a,fixOldSave:Fr},Symbol.toStringTag,{value:"Module"}));const Rr={class:"scene"},Or=["src"],Gr=["src"],$r=["src"],qr=["src"],Qr=["src"],Vr=["src"],Lr=["src"],Hr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},jr=["src"],Wr=["src"],Jr=["src"],zr=["src"],Kr=ce({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(w(),D("div",Rr,[e.day>=7?(w(),D("img",{key:0,src:r(jn),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Or)):O("",!0),e.day>=0?(w(),D("img",{key:1,src:r(Gn),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Gr)):O("",!0),e.day>=1?(w(),D("img",{key:2,src:r($n),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,$r)):O("",!0),e.day>=2?(w(),D("img",{key:3,src:r(qn),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,qr)):O("",!0),e.day>=6?(w(),D("img",{key:4,src:r(Hn),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Qr)):O("",!0),e.day>=8?(w(),D("img",{key:5,src:r(Wn),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Vr)):O("",!0),e.day>=3?(w(),D("img",{key:6,src:r(Qn),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Lr)):O("",!0),e.day>=4?(w(),D("div",Hr,[e.day>=4?(w(),D("img",{key:0,src:r(Vn),class:"scene-item"},null,8,jr)):O("",!0),e.day>=5?(w(),D("img",{key:1,src:r(Ln),class:"scene-item"},null,8,Wr)):O("",!0),e.day>=9?(w(),D("img",{key:2,src:r(Jn),class:"scene-item"},null,8,Jr)):O("",!0),e.day>=10?(w(),D("img",{key:3,src:r(zn),class:"scene-item"},null,8,zr)):O("",!0)])):O("",!0)]))}});var Xr=Te(Kr,[["__scopeId","data-v-47b4d886"]]);const Yr=ce({components:{Context:Cn},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:n,minWidth:o,tab:s}=pt(e),d=Tl(t),c=g(()=>$e.allowGoBack&&l.value>0&&!n.value);function p(){ie.tabs.splice(r(e.index),1)}_l(()=>y(n.value,r(o.value))),Jt([n,Qo(o)],([h,b])=>y(h,b));function m(h){e.nodes.value=h}function y(h,b){const v=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,E=s.value();E!=null&&(h?(E.style.flexGrow="0",E.style.flexShrink="0",E.style.width="60px",E.style.minWidth=E.style.flexBasis="",E.style.margin="0"):(E.style.flexGrow="",E.style.flexShrink="",E.style.width="",E.style.minWidth=E.style.flexBasis=v,E.style.margin=""))}return{component:d,showGoBack:c,updateNodes:m,unref:r,goBack:p}}});function Zr(e,t,l,n,o,s){const d=ll("Context");return w(),D("div",{class:"layer-container",style:it({"--layer-color":e.unref(e.color)})},[e.showGoBack?(w(),D("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):O("",!0),e.minimized.value?(w(),D("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,Be(e.unref(e.name)),1)])):(w(),D("div",{key:2,class:et(["layer-tab",{showGoBack:e.showGoBack}])},[i(d,{onUpdateNodes:e.updateNodes},{default:ue(()=>[(w(),oe(ze(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(w(),D("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):O("",!0)],4)}var eu=Te(Yr,[["render",Zr],["__scopeId","data-v-0158bec3"]]);const Kn=e=>(rl("data-v-4b4bda40"),e=e(),ul(),e),tu=Kn(()=>f("h2",null,"Changelog",-1)),lu=Kn(()=>f("details",{open:""},[f("summary",null,[u("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),u(" This is the first release :D "),f("ul",null,[f("li",{class:"feature"},"Did everything"),f("li",{class:"fix"},"Had some fun"),f("li",{class:"breaking"},"Removed everything"),f("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),au=ce({__name:"Changelog",setup(e,{expose:t}){const l=j(!1);return t({open(){l.value=!0}}),(n,o)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value=s)},{header:ue(()=>[tu]),body:ue(()=>[lu]),_:1},8,["modelValue"]))}});var nu=Te(au,[["__scopeId","data-v-4b4bda40"]]),iu=ce({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:n}=pt(e),o=j(!1),s=g(()=>(ot(n)||o.value)&&d.value),d=yl(l),c=Rt(Pe(S(()=>{const y=ot(t);return y==null?"":jt(y)})));function p(y){const h=n;y.shiftKey&&h&&(h.value=!h.value,y.stopPropagation(),y.preventDefault())}const m=g(()=>ot(n)&&Bl[tt.theme].showPin);return{Direction:Ie,isHovered:o,isShown:s,comp:d,elementComp:c,unref:r,togglePinned:p,showPin:m}}});const ou={key:0,class:"material-icons pinned"};function su(e,t,l,n,o,s){return w(),D("div",{class:et(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=d=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=d=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...d)=>e.togglePinned&&e.togglePinned(...d))},[Lt(e.$slots,"default",{},void 0,!0),e.elementComp?(w(),oe(ze(e.elementComp),{key:0})):O("",!0),i(ra,{name:"fade"},{default:ue(()=>{var d;return[e.isShown?(w(),D("div",{key:0,class:et(["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:it([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(w(),D("span",ou,"push_pin")):O("",!0),e.comp?(w(),oe(ze(e.comp),{key:1})):O("",!0)],6)):O("",!0)]}),_:1})],34)}var mt=Te(iu,[["render",su],["__scopeId","data-v-6102fa3a"]]);const ru={class:"info-modal-header"},uu=["src","alt"],du={class:"info-modal-title"},cu={key:0},pu=u(" - "),mu={key:0},vu={key:0},gu=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),fu=f("br",null,null,-1),hu=f("br",null,null,-1),yu=["href"],bu=f("span",{class:"material-icons info-modal-discord"},"discord",-1),wu=f("div",null,[f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")])],-1),Au=f("div",null,[f("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Modding Tree ")])],-1),Cu=f("br",null,null,-1);var ku=ce({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:n,logo:o,author:s,discordName:d,discordLink:c,versionNumber:p,versionTitle:m}=$e,y=pt(l),h=j(!1),b=g(()=>da(ie.timePlayed)),v=g(()=>Pe(S(()=>i(N,null,[Dn.map(ee)]))));t({open(){h.value=!0}});function E(){var _;(_=r(y.changelog))==null||_.open()}return(_,x)=>(w(),oe(yt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=J=>h.value=J)},{header:ue(()=>[f("div",ru,[r(o)?(w(),D("img",{key:0,class:"info-modal-logo",src:r(o),alt:r(n)},null,8,uu)):O("",!0),f("div",du,[f("h2",null,"- "+Be(r(n))+" -",1),f("h4",null,[u(" - v"+Be(r(p)),1),r(m)?(w(),D("span",cu,": "+Be(r(m)),1)):O("",!0),pu])])])]),body:ue(({shown:J})=>[J?(w(),D("div",mu,[r(s)?(w(),D("div",vu,"By "+Be(r(s)),1)):O("",!0),gu,fu,f("div",{class:"link",onClick:E},"Changelog"),hu,f("div",null,[r(c)?(w(),D("a",{key:0,href:r(c),class:"info-modal-discord-link",target:"_blank"},[bu,u(" "+Be(r(d)),1)],8,yu)):O("",!0)]),wu,Au,Cu,f("div",null,"Time Played: "+Be(r(b)),1),(w(),oe(ze(r(v))))])):O("",!0)]),_:1},8,["modelValue"]))}});const Xn=e=>(rl("data-v-0d685451"),e=e(),ul(),e),Eu=Xn(()=>f("h2",null,"Options",-1)),_u=Xn(()=>f("hr",null,null,-1));var Su=ce({__name:"Options",setup(e,{expose:t}){const l=j(!1);t({open(){l.value=!0}});const n=Object.keys(Bl).map(v=>({label:wn(v),value:v})),o=g(()=>Pe(S(()=>i(N,null,[Mn.map(ee)])))),{showTPS:s,theme:d}=pt(tt),{autosave:c,usingLog:p}=pt(ie),m=g({get(){return ie.devSpeed===0},set(v){ie.devSpeed=v?0:null}}),y=S(()=>i("span",null,[u("Autosave"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),h=S(()=>i("span",null,[u("Pause game"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),b=S(()=>i("span",null,[u("Use log for progress bar"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})]));return(v,E)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":E[5]||(E[5]=_=>l.value=_)},{header:ue(()=>[Eu]),body:ue(()=>[i(Ga,{title:"Theme",options:r(n),modelValue:r(d),"onUpdate:modelValue":E[0]||(E[0]=_=>vt(d)?d.value=_:null)},null,8,["options","modelValue"]),(w(),oe(ze(r(o)))),i(sl,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":E[1]||(E[1]=_=>vt(s)?s.value=_:null)},null,8,["modelValue"]),_u,i(sl,{title:r(y),modelValue:r(c),"onUpdate:modelValue":E[2]||(E[2]=_=>vt(c)?c.value=_:null)},null,8,["title","modelValue"]),r($e).enablePausing?(w(),oe(sl,{key:0,title:r(h),modelValue:r(m),"onUpdate:modelValue":E[3]||(E[3]=_=>vt(m)?m.value=_:null)},null,8,["title","modelValue"])):O("",!0),i(sl,{title:r(b),modelValue:r(p),"onUpdate:modelValue":E[4]||(E[4]=_=>vt(p)?p.value=_:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Bu=Te(Su,[["__scopeId","data-v-0d685451"]]);const Nu=["onSubmit"],Iu={class:"field"},Mu={key:0,class:"field-title"},Du=["placeholder"],xu=ce({__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,n=yl(zt(l,"title"),"span"),o=Rt(null);oa(()=>{var p;(p=o.value)==null||p.focus()});const s=g({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(w(),D("form",{onSubmit:$l(d,["prevent"])},[f("div",Iu,[r(n)?(w(),D("span",Mu,[(w(),oe(ze(r(n))))])):O("",!0),e.textArea?(w(),oe(r(fi),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=y=>vt(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):sa((w(),D("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=y=>vt(s)?s.value=y:null),placeholder:e.placeholder,class:et({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,Du)),[[di,r(s)]])])],40,Nu))}});var Yn=Te(xu,[["__scopeId","data-v-67b44a54"]]);const Pu={key:0},Tu=["onClick","disabled"],Fu={key:0},Uu=["onClick"],Ru=ce({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=pt(e),o=j(!1);Jt(o,c=>{t("confirmingChanged",c)});function s(){if(r(n.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function d(){o.value=!1}return(c,p)=>(w(),D("span",{class:et(["container",{confirming:o.value}])},[o.value?(w(),D("span",Pu,"Are you sure?")):O("",!0),f("button",{onClick:$l(s,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(w(),D("span",Fu,"Yes")):Lt(c.$slots,"default",{key:1},void 0,!0)],8,Tu),o.value?(w(),D("button",{key:1,class:"button",onClick:$l(d,["stop"])},"No",8,Uu)):O("",!0)],2))}});var Ou=Te(Ru,[["__scopeId","data-v-2f8ef34c"]]);const Gu=["onClick"],$u=ce({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=j(!1),n=j(null);function o(){t("click"),n.value&&clearTimeout(n.value),l.value=!1,_l(()=>{l.value=!0,n.value=setTimeout(()=>l.value=!1,500)})}return(s,d)=>(w(),D("button",{onClick:$l(o,["stop"]),class:et(["feedback",{activated:l.value,left:e.left}])},[Lt(s.$slots,"default",{},void 0,!0)],10,Gu))}});var qu=Te($u,[["__scopeId","data-v-01a1b95c"]]);const cl=e=>(rl("data-v-5285ac49"),e=e(),ul(),e),Qu=cl(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),Vu={key:0,class:"actions"},Lu=cl(()=>f("span",{class:"material-icons"},"content_paste",-1)),Hu=cl(()=>f("span",{class:"material-icons"},"content_copy",-1)),ju=cl(()=>f("span",{class:"material-icons"},"edit",-1)),Wu=cl(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ju={key:1,class:"actions"},zu=cl(()=>f("span",{class:"material-icons"},"check",-1)),Ku=cl(()=>f("span",{class:"material-icons"},"close",-1)),Xu={key:2,class:"details"},Yu={class:"save-version"},Zu=cl(()=>f("br",null,null,-1)),ed={key:0},td={key:1},ld={key:3,class:"details"},ad={key:4,class:"details error"},nd=cl(()=>f("br",null,null,-1)),id=ce({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:n}=pt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=j(!1),d=j(!1),c=j("");Jt(s,()=>c.value=n.value.name||"");const p=g(()=>n.value&&n.value.id===ie.id),m=g(()=>p.value?ie.time:n.value&&n.value.time||0),y=Tl(g(()=>{var b,v,E,_;return`Day ${(_=(E=(v=(b=n.value)==null?void 0:b.layers)==null?void 0:v.main)==null?void 0:E.day)!=null?_:1}`}));function h(){t("editName",c.value),s.value=!1}return(b,v)=>(w(),D("div",{class:et(["save",{active:r(p)}])},[Qu,s.value?(w(),D("div",Ju,[f("button",{onClick:h,class:"button"},[i(mt,{display:"Save",direction:r(Ie).Left,class:"info"},{default:ue(()=>[zu]),_:1},8,["direction"])]),f("button",{onClick:v[5]||(v[5]=E=>s.value=!s.value),class:"button"},[i(mt,{display:"Cancel",direction:r(Ie).Left,class:"info"},{default:ue(()=>[Ku]),_:1},8,["direction"])])])):(w(),D("div",Vu,[r(n).error==null&&!d.value?(w(),oe(qu,{key:0,onClick:v[0]||(v[0]=E=>t("export")),class:"button",left:""},{default:ue(()=>[i(mt,{display:"Export",direction:r(Ie).Left,class:"info"},{default:ue(()=>[Lu]),_:1},8,["direction"])]),_:1})):O("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:1,onClick:v[1]||(v[1]=E=>t("duplicate")),class:"button"},[i(mt,{display:"Duplicate",direction:r(Ie).Left,class:"info"},{default:ue(()=>[Hu]),_:1},8,["direction"])])):O("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:2,onClick:v[2]||(v[2]=E=>s.value=!s.value),class:"button"},[i(mt,{display:"Edit Name",direction:r(Ie).Left,class:"info"},{default:ue(()=>[ju]),_:1},8,["direction"])])):O("",!0),i(Ou,{disabled:r(p),onClick:v[3]||(v[3]=E=>t("delete")),onConfirmingChanged:v[4]||(v[4]=E=>d.value=E)},{default:ue(()=>[i(mt,{display:"Delete",direction:r(Ie).Left,class:"info"},{default:ue(()=>[Wu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(n).error==null&&!s.value?(w(),D("div",Xu,[f("button",{class:"button open",onClick:v[6]||(v[6]=E=>t("open"))},[f("h3",null,Be(r(n).name),1)]),f("span",Yu,"v"+Be(r(n).modVersion),1),Zu,r(m)?(w(),D("div",ed,"Last played "+Be(r(o).format(r(m))),1)):O("",!0),r(y)?(w(),D("div",td,[(w(),oe(ze(r(y))))])):O("",!0)])):r(n).error==null&&s.value?(w(),D("div",ld,[i(Yn,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=E=>c.value=E),class:"editname",onSubmit:h},null,8,["modelValue"])])):(w(),D("div",ad,[u(" Error: Failed to load save with id "+Be(r(n).id),1),nd,u(Be(r(n).error),1)]))],2))}});var od=Te(id,[["__scopeId","data-v-5285ac49"]]);const qa=e=>(rl("data-v-3b9991aa"),e=e(),ul(),e),sd=qa(()=>f("h2",null,"Saves Manager",-1)),rd={class:"modal-footer"},ud={class:"field"},dd=qa(()=>f("span",{class:"field-title"},"Create Save",-1)),cd={class:"field-buttons"},pd={class:"footer"},md=qa(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),vd=ce({__name:"SavesManager",setup(e,{expose:t}){const l=j(!1),n=j(null);t({open(){l.value=!0}});const o=j(!1),s=j(""),d=j(null);Jt(s,M=>{M?_l(()=>{try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=vl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M),o.value=!0;return}const k=JSON.parse(M);if(typeof k!="object"){o.value=!0;return}const F=ea();k.id=F,Qt(k),s.value="",o.value=!1,tt.saves.push(F)}catch{o.value=!0}}):o.value=!1});let c={},p=j(Object.keys(c).reduce((M,k)=>(M.push({label:k.split("/").slice(-1)[0].slice(0,-4),value:c[k]}),M),[]));const m=ua({});function y(M){if(m[M]==null){let k=localStorage.getItem(M);if(k==null)m[M]={error:"Save doesn't exist in localStorage",id:M};else if(k==="dW5kZWZpbmVk")m[M]={error:"Save is undefined",id:M};else try{if(k[0]!=="{")if(k[0]==="e")k=decodeURIComponent(escape(atob(k)));else if(k[0]==="\u1BE1")k=vl.decompressFromUTF16(k);else return console.warn("Unable to determine preset encoding",k),o.value=!0,m[M]={error:"Unable to determine preset encoding",id:M},m[M];m[M]={...JSON.parse(k),id:M}}catch(F){m[M]={error:F,id:M},console.warn(`SavesManager: Failed to load info about save with id ${M}: + Cost: 50 ${l.displayName}
${be(1e11)} ${O.coal.displayName}`}})),ve=G(()=>({resource:T(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."},visibility:()=>B(Ye.depthMilestones[4].earned.value)})),pe=xe(()=>({resource:T(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:S(()=>i(N,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",fe(pe.amount.value),u(" ore per operation")]))},visibility:()=>B(a.gte(pe.amount.value,1)||a.div(s.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),Ee=xe(()=>({resource:T(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:S(()=>i(N,null,[u("Automatically smelts")," ",fe(a.times(Ee.amount.value,10)),u(" ore per second")]))},visibility:()=>B(a.gte(Ee.amount.value,1)||a.gte(pe.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Oe=Se(!0),Fe=xe(()=>({resource:O.coal,cost(){return a.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:S(()=>i(N,null,[u("Gain "),fe(a.times(at.value,100)),u("% more metal per ore")]))},visibility:()=>B(a.gte(Fe.amount.value,1)||J.bought.value),style:{width:"200px"}})),at=g(()=>a.times(Fe.amount.value,.25));je.on("update",ye=>{F.value=a.times(ye,k.value).plus(F.value);const st=F.value.trunc();F.value=F.value.minus(st),o.value=a.add(o.value,a.times(st,z.value)),Oe.value&&_(a.min(v.value,a.times(m.value,ye)),h.value)});const[$e,At]=nl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Ee.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:I,base:.1,unit:"/s"}]),me=W(!1),$=S(()=>i(yt,{modelValue:me.value,"onUpdate:modelValue":ye=>me.value=ye},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:$e})),{total:De,trackerDisplay:le}=dl({resource:l,goal:25e3,name:e,day:ln,color:t,modal:{show:me,display:$}});return{name:e,day:ln,color:t,ore:o,bestOre:s,oreProgress:F,metal:l,bestMetal:n,totalMetal:De,simplePickaxe:ke,doublePickaxe:he,crucible:Ie,coalDrill:Re,industrialFurnace:J,efficientDrill:ve,oreDrill:pe,industrialCrucible:Ee,autoSmeltEnabled:Oe,hotterForge:Fe,generalTabCollapsed:At,minWidth:700,display:S(()=>i(N,null,[ee(le),i(we,null,null),i(Mt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>i(N,null,[Oe.value&&a.gte(Ee.amount.value,1)?`+${hn([[m.value,"smelting speed"],[Ce.value,"ore gain"],[a.div(O.computedCoalGain.value,b),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),i(we,null,null),ee(E),a.gte(Ee.amount.value,1)?i("div",{style:{width:"150px"}},[i(sl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":ye=>Oe.value=ye},null)]):void 0,i(we,null,null),i(Mt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>i(N,null,[yn(Ve.value)]))},null),i(we,null,null),i("div",null,[u("Currently mining "),be(z.value),u(" ore every")," ",be(a.recip(k.value)),u(" seconds")]),ee(Ae),i(we,null,null),We(ke,he,Ie,Re,J,ve),We(pe,Ee,Fe)]))}}),_r="coal",an=3,O=Ut(_r,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",o=ct(0,"coal"),s=ct(0,"ash"),d=Se(0),c=g(()=>a.times(d.value,1e3)),p=g(()=>a.times(d.value,.1)),m=g(()=>a.times(d.value,50)),y=xe(()=>({resource:de.logs,cost(){let P=a.times(F.amount.value,r(F.cost)).plus(this.amount.value);return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.smallFireBook.amount.value).times(P),P.pow(1.5).times(1e4)},display:S(()=>i(N,null,[i("h3",null,[u("Small Fire")]),i("br",null,null),u("Burn 1000 logs for 0.1 coal and 50 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(c.value),u(" logs/sec"),i("br",null,null),u("+"),V(p.value),u(" coal/sec"),i("br",null,null),u("+"),V(m.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(y.cost)),u(" "),y.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:n,width:"160px"}})),{min:h,max:b,add:v,remove:E}=Lt({active:d,buyable:y}),_=ct(y.amount,"small fires"),x=Se(0),z=g(()=>a.times(x.value,1e4)),I=g(()=>a.times(x.value,10)),k=g(()=>a.times(x.value,1e3)),F=xe(()=>({resource:_,cost(){return a.pow(.95,K.books.bonfireBook.amount.value).times(10)},display:S(()=>i(N,null,[i("h3",null,[u("Bonfire")]),i("br",null,null),u("Burn 10,000 logs for 10 coal and 1000 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(z.value),u(" logs/sec"),i("br",null,null),u("+"),V(I.value),u(" coal/sec"),i("br",null,null),u("+"),V(k.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(F.cost)),u(" "),F.resource.displayName])),onPurchase(P){d.value=a.sub(d.value,P).max(0),x.value=a.add(x.value,1)},style:{color:n,width:"160px"},visibility:()=>B(ye.bought.value)})),{min:Y,max:Ae,add:H,remove:Ce}=Lt({buyable:F,active:x}),ae=Se(0),Ve=g(()=>a.times(ae.value,1e6)),ke=g(()=>a.times(ae.value,1e4)),he=g(()=>a.times(ae.value,1e4)),Ie=xe(()=>({resource:de.logs,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.kilnBook.amount.value).times(P),a.pow(1.1,P).times(1e7)},display:S(()=>i(N,null,[i("h3",null,[u("Charcoal Kiln")]),i("br",null,null),u("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("-"),V(Ve.value),u(" logs/sec"),i("br",null,null),u("+"),V(ke.value),u(" coal/sec"),i("br",null,null),u("+"),V(he.value),u(" ash/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(Ie.cost)),u(" "),Ie.resource.displayName])),onPurchase(){ae.value=a.add(ae.value,1)},style:{color:n,width:"160px"},visibility:()=>B(Qe.bought.value)})),{min:Re,max:J,add:ve,remove:pe}=Lt({buyable:Ie,active:ae}),Ee=Se(0),Oe=g(()=>a.times(a.pow(Ee.value,Ye.row2Upgrades[1].bought.value?2:1),5e7).times(nt.efficientDrill.bought.value?2:1)),Fe=xe(()=>({resource:nt.metal,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),a.pow(1.15,P).times(10)},display:S(()=>i(N,null,[i("h3",null,[u("Mining Drill")]),i("br",null,null),u("Dig through the ground to find 50,000,000 coal"),i("br",null,null),i("br",null,null),u("Currently:"),i("br",null,null),u("+"),V(Oe.value),u(" coal/sec"),i("br",null,null),i("br",null,null),u("Cost: "),te(r(Fe.cost)),u(" "),Fe.resource.displayName])),onPurchase(){Ee.value=a.add(Ee.value,1)},style:{color:n,width:"160px"},visibility:()=>B(nt.coalDrill.bought.value)})),{max:at,min:$e,add:At,remove:me}=Lt({buyable:Fe,active:Ee}),$=G(()=>({resource:T(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),De=G(()=>({resource:T(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),le=G(()=>({resource:T(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),ye=G(()=>({resource:_,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){_.value=a.add(_.value,this.cost)},style:{color:n}})),st=[$,De,le,ye],Ke=G(()=>({resource:T(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>B(ye.bought.value)})),qe=G(()=>({resource:T(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>B(ye.bought.value)})),ft=G(()=>({canAfford(){return a.gte(de.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){de.logs.value=a.sub(de.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:S(()=>i(N,null,[i("h3",null,[u("Mulched Soil")]),i("br",null,null),u("Double the bonus from Fertilized Soil"),i("br",null,null),i("br",null,null),u("Cost: "),te(1e5),u(" "),de.logs.displayName,i("br",null,null),te(1e5),u(" "),s.displayName])),style:{color:n},visibility:()=>B(ye.bought.value)})),Qe=G(()=>({resource:de.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:n},visibility:()=>B(ye.bought.value)})),It=[Ke,qe,ft,Qe],U=G(()=>({resource:T(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>B(Ye.depthMilestones[4].earned.value)})),He=[U],ne=xe(()=>({resource:T(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedCuttersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:S(()=>i(N,null,[u("Cutters cut down trees "),V(se.value),u("x faster")]))},style:{color:n},visibility:()=>B($.bought.value)})),j=xe(()=>({resource:T(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedPlantersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:S(()=>i(N,null,[u("Planters plant trees "),V(St.value),u("x faster")]))},style:{color:n},visibility:()=>B(De.bought.value)})),Dt=xe(()=>({resource:T(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.fertilizerBook.amount.value).times(P),a.add(P,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:S(()=>i(N,null,[u("Trees give "),V(Yt.value),u("x more logs")]))},style:{color:n},visibility:()=>B(le.bought.value)})),Et=[ne,j,Dt],rt=Z(()=>[re(()=>({addend(){return a.times(ne.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(ne.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Ke.bought}))]),se=g(()=>rt.apply(1)),_t=Z(()=>[re(()=>({addend(){return a.times(j.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(j.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:qe.bought}))]),St=g(()=>_t.apply(1)),Xt=Z(()=>[re(()=>({addend(){return a.times(Dt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(Dt.amount.value,0)}})),C(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),Yt=g(()=>Xt.apply(1)),xt=Z(()=>[re(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return I.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return ke.value},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}})),re(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(Ee.value,0)}})),C(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ie.amount.value,100).times(Le.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought})),C(()=>({multiplier:2,description:"Mining overalls",enabled:lt.metalUpgrades.metalUpgrade2.bought})),C(()=>({multiplier:3,description:"Mining helmet",enabled:lt.metalUpgrades.metalUpgrade3.bought})),C(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:lt.metalUpgrades.metalUpgrade4.bought})),C(()=>({multiplier:2,description:"12 Elves Trained",enabled:_e.milestones[11].earned})),Fn(()=>({exponent:1.25,description:"3 Elves Trained",enabled:_e.milestones[2].earned,supportLowNumbers:!0})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ye.depthMilestones[0].earned})),C(()=>({multiplier:Ye.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)}))]),bt=g(()=>xt.apply(0)),wt=Z(()=>[re(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return k.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return he.value},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}})),C(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ie.amount.value,100).times(Le.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought})),C(()=>({multiplier:4,description:"Mining boots",enabled:lt.metalUpgrades.metalUpgrade1.bought}))]),il=g(()=>wt.apply(0)),qt=Z(()=>[re(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),re(()=>({addend(){return a.negate(z.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),re(()=>({addend(){return a.negate(Ve.value)},description:"Charcoal Kilns",enabled(){return a.gt(ae.value,0)}}))]),Zt=g(()=>qt.apply(0)),[el,wl]=nl(()=>[{title:"Log Consumption",modifier:qt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}},{title:"Coal Gain",modifier:xt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}},{title:"Ash Gain",modifier:wt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ae.value,0)}}]),ol=W(!1),Kl=S(()=>i(yt,{modelValue:ol.value,"onUpdate:modelValue":P=>ol.value=P},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:el}));je.on("update",P=>{a.lt(X.day.value,an)||a.times(P,Zt.value).negate().gt(de.logs.value)||(de.logs.value=a.times(P,Zt.value).plus(de.logs.value),o.value=a.times(P,bt.value).plus(o.value),s.value=a.times(P,il.value).plus(s.value),d.value=a.max(d.value,0))});const{total:Nl,trackerDisplay:Xl}=dl({resource:o,goal:1e7,name:e,day:an,color:t,modal:{show:ol,display:Kl}});return{name:e,color:t,coal:o,totalCoal:Nl,computedCoalGain:bt,ash:s,activeFires:d,buildFire:y,activeBonfires:x,buildBonfire:F,activeKilns:ae,buildKiln:Ie,activeDrills:Ee,buildDrill:Fe,warmerCutters:$,warmerPlanters:De,basicFertilizer:le,unlockBonfire:ye,dedicatedCutters:Ke,dedicatedPlanters:qe,betterFertilizer:ft,unlockKiln:Qe,efficientSmelther:U,heatedCutters:ne,heatedPlanters:j,moreFertilizer:Dt,computedHeatedCutterEffect:se,computedHeatedPlanterEffect:St,computedFertilizerEffect:Yt,generalTabCollapsed:wl,minWidth:700,display:S(()=>i(N,null,[ee(Xl),i(we,null,null),i(Mt,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${V(bt.value)}/s`:void 0},null),i(we,null,null),i(Mt,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(il.value,0)?`+${V(il.value)}/s`:void 0},null),i(we,null,null),i(Pl,null,{default:()=>[i(Pt,null,{default:()=>[ee(y),i("div",null,[te(a.floor(d.value)),u("/"),te(a.floor(y.amount.value))]),We(h,E,v,b)]}),ye.bought.value?i(N,null,[i(we,null,null),i(Pt,null,{default:()=>[ee(F),i("div",null,[te(x.value),u("/"),te(F.amount.value)]),We(Y,Ce,H,Ae)]})]):void 0,Qe.bought.value?i(N,null,[i(we,null,null),i(Pt,null,{default:()=>[ee(Ie),i("div",null,[te(ae.value),u("/"),te(Ie.amount.value)]),We(Re,pe,ve,J)]})]):void 0,nt.coalDrill.bought.value?i(N,null,[i(we,null,null),i(Pt,null,{default:()=>[ee(Fe),i("div",null,[te(Ee.value),u("/"),te(Fe.amount.value)]),We($e,me,At,at)]})]):void 0]}),i(we,null,null),Sl(st,It,He),We(...Et)]))}}),Sr="workshop",Fl=2,Nt=Ut(Sr,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=ct(0,"foundation progress"),o=js(()=>({scaling:Ra(250,1.5),baseResource:de.logs,gainResource:T(n),roundUpCost:!0,buyMax:!1,spend(F,Y){de.logs.value=a.sub(de.logs.value,Y)}})),s=Tt(()=>({display:S(()=>i(N,null,[i("b",{style:"font-size: x-large"},[u("Build part of the foundation")]),i("br",null,null),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost:")," ",Jl(de.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",de.logs.displayName])])),visibility:()=>B(a.lt(n.value,100)),canClick:()=>a.gte(o.actualGain.value,1)&&a.lt(n.value,100),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=xl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=g(()=>!_e.milestones[6].earned.value),p=R(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:c})),m=R(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(n.value,10),visibility:()=>B(p.earned.value),showPopups:c})),y=R(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(n.value,20),visibility:()=>B(m.earned.value),showPopups:c})),h=R(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>B(y.earned.value),showPopups:c})),b=R(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>B(h.earned.value),showPopups:c})),v=R(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>B(b.earned.value),showPopups:c})),E=R(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(n.value,75),visibility:()=>B(v.earned.value),showPopups:c})),_=R(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>B(E.earned.value),showPopups:c})),x={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:y,autoCutMilestone2:h,autoPlantMilestone2:b,logGainMilestone2:v,morePlantsMilestone1:E,logGainMilestone3:_},{collapseMilestones:z,display:I}=Vl(x),k=Wt(()=>({direction:Me.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>X.day.value===Fl?a.div(n.value,100):1,display:S(()=>X.day.value===Fl?i(N,null,[te(n.value),u("%")]):"")}));return Ft(()=>{X.day.value===Fl&&a.gte(n.value,100)&&X.completeDay()}),{name:e,day:Fl,color:t,foundationProgress:n,foundationConversion:o,milestones:x,collapseMilestones:z,minWidth:700,buildFoundationHK:d,display:S(()=>i(N,null,[i("div",null,[X.day.value===Fl?"Complete the foundation to complete the day":`${e} Complete!`]),ee(k),i(we,null,null),i("div",null,[i("span",null,[u("The foundation is ")]),i("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[te(n.value)]),u("% completed")]),a.lt(n.value,100)?i(we,null,null):null,ee(s),i(we,null,null),I()]))}}),Br="elves",Ul=4,_e=Ut(Br,function(){const e="Elves",t="red",l="#911D21",o=Wt(()=>({direction:Me.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>X.day.value===Ul?a.div($.value,6).times(.8333333333333334).add(a.div(a.add(O.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:S(()=>X.day.value===Ul?a.lt($.value,6)?i(N,null,[te($.value),u("/6 elves")]):i(N,null,[te(O.coal.value),u("/"),te(1e9),u(" coal")]):"")})),s=br(()=>({thingsToReset:[de,Nt,O],onReset(){setTimeout(()=>{It.earned.value?(de.row1Upgrades.forEach(se=>se.bought.value=!0),de.row2Upgrades.forEach(se=>se.bought.value=!0)):le.earned.value&&(de.row1Upgrades[4].bought.value=!0,de.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Nt.foundationProgress.value=100),He.earned.value&&(O.warmerCutters.bought.value=!0,O.warmerPlanters.bought.value=!0,O.basicFertilizer.bought.value=!0,O.unlockBonfire.bought.value=!0,O.dedicatedCutters.bought.value=!0,O.dedicatedPlanters.bought.value=!0,O.betterFertilizer.bought.value=!0,O.unlockKiln.bought.value=!0,O.efficientSmelther.bought.value=!0)})}})),d=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(K.books.cuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),c=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(K.books.plantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),p=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(K.books.expandersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),m=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(K.books.heatedCuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),y=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(K.books.heatedPlantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),h=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(K.books.fertilizerBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),b=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(K.books.smallFireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),v=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(K.books.bonfireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),E=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(K.books.kilnBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),_=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(K.books.paperBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),x=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(K.books.boxBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),z=Z(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:qe.earned})),C(()=>({multiplier:()=>a.times(K.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(K.books.clothBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),[I,k]=nl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:me.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:me.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:me.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:me.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:me.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:me.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:me.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:me.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:E,base:10,unit:"/s",visible:me.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:me.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:me.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:z,base:10,unit:"/s",visible:me.clothElf.bought}]),F=W(!1),Y=S(()=>i(yt,{modelValue:F.value,"onUpdate:modelValue":se=>F.value=se},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:I})),Ae=g(()=>{let se=a.pow(4,$.value).times(1e6);return a.gte($.value,9)&&(se=a.times(se,1e15)),se});function H(se){var il;const _t=Se(0),St=Se(0),Xt=se.hasToggle?Se(!1):W(!0),Yt=g(()=>se.cooldownModifier.apply(10)),xt=ht((il=se.canBuy)!=null?il:!0);function bt(qt){if(wt.bought.value&&r(xt)){_t.value=a.add(_t.value,qt);const Zt=a.recip(Yt.value);St.value+=qt/Zt.toNumber(),(Ea(se.buyable)?se.buyable:[se.buyable]).forEach(el=>{var wl;for(;a.gte(_t.value,Zt);)if(se.customCost==null?r(el.canPurchase):a.gte(el.resource.value,se.customCost(el.amount.value)))el.amount.value=a.add(el.amount.value,1),_t.value=a.sub(_t.value,Zt),(wl=se.onAutoPurchase)==null||wl.call(se);else{_t.value=Zt;break}})}}const wt=G(()=>({...se,buyable:void 0,toggle:Xt,buyProgress:_t,update:bt,resource:O.coal,cost:Ae,computedAutoBuyCooldown:Yt,amountOfTimesDone:St,name:se.name,display:()=>({title:se.name,description:S(()=>i(N,null,[se.description,wt.bought.value?null:i(N,null,[" ",u("Training this elf will require resetting all your progress from days 1-3.")]),wt.bought.value&&se.hasToggle===!0?i(N,null,[i(sl,{title:se.toggleDesc,"onUpdate:modelValue":qt=>Xt.value=qt,modelValue:Xt.value},null)]):null])),showCost:!wt.bought.value}),style:"width: 190px",onPurchase(){var qt;(qt=se.onPurchase)==null||qt.call(se),s.reset()}}));return wt}const Ce=H({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:de.row1Buyables[0],cooldownModifier:d}),ae=H({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:de.row1Buyables[1],cooldownModifier:c}),Ve=H({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:de.row1Buyables[2],cooldownModifier:p}),ke=[Ce,ae,Ve],he=H({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:O.heatedCutters,cooldownModifier:m}),Ie=H({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:O.heatedPlanters,cooldownModifier:y}),Re=H({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:O.moreFertilizer,cooldownModifier:h}),J=[he,Ie,Re],ve=H({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:O.buildFire,cooldownModifier:b,visibility:()=>B(Ze.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){ve.toggle.value&&(O.activeFires.value=a.add(O.activeFires.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0}}),pe=H({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:O.buildBonfire,cooldownModifier:v,visibility:()=>B(Ze.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const se=r(this.buyable.cost);O.activeFires.value=a.sub(O.activeFires.value,se).max(0),O.buildFire.amount.value=a.sub(O.buildFire.amount.value,se).max(0),pe.toggle.value&&(O.activeBonfires.value=a.add(O.activeBonfires.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0},canBuy:O.unlockBonfire.bought}),Ee=H({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:O.buildKiln,cooldownModifier:E,visibility:()=>B(Ze.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Ee.toggle.value&&(O.activeKilns.value=a.add(O.activeKilns.value,1))},onPurchase(){X.days[4].recentlyUpdated.value=!0},canBuy:O.unlockKiln.bought}),Oe=[ve,pe,Ee],Fe=H({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(K.books),cooldownModifier:_,visibility:()=>B(Ue.elfUpgrades.paperElf.bought.value)}),at=H({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(Ze.buyables),cooldownModifier:x,visibility:()=>B(Ue.elfUpgrades.boxElf.bought.value)}),$e=H({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[lt.buildPens,lt.betterShears,lt.fasterSpinning],cooldownModifier:z,visibility:()=>B(Ue.elfUpgrades.clothElf.bought.value)}),At=[Fe,at,$e],me={cuttersElf:Ce,plantersElf:ae,expandersElf:Ve,heatedCuttersElf:he,heatedPlantersElf:Ie,fertilizerElf:Re,smallFireElf:ve,bonfireElf:pe,kilnElf:Ee,paperElf:Fe,boxElf:at,clothElf:$e},$=g(()=>Object.values(me).filter(se=>se.bought.value).length),De=R(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte($.value,1)})),le=R(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte($.value,2),visibility:()=>B(De.earned.value)})),ye=R(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte($.value,3),visibility:()=>B(le.earned.value)})),st=R(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte($.value,4),visibility:()=>B(ye.earned.value)})),Ke=R(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte($.value,5),visibility:()=>B(st.earned.value)})),qe=R(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte($.value,6),visibility:()=>B(Ke.earned.value)})),ft=R(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte($.value,7),visibility:()=>B(qe.earned.value&&X.day.value>5)})),Qe=R(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte($.value,8),visibility:()=>B(ft.earned.value)})),It=R(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,9),visibility:()=>B(Qe.earned.value)})),U=R(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte($.value,10),visibility:()=>B(X.day.value>=10)})),He=R(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,11),visibility:()=>B(U.earned.value)})),ne=R(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte($.value,12),visibility:()=>B(He.earned.value)})),j=[De,le,ye,st,Ke,qe,ft,Qe,It,U,He,ne],Dt={manualMilestone:De,researchMilestone:le,coalGainMilestone:ye,logGainMilestone:st,forestMilestone:Ke,elvesMilestone:qe,foundationMilestone:ft,forestMilestone2:Qe,treeUpgradesMilestone:It,elvesMilestone2:U,coalUpgradesMilestone:He,coalGainMilestone2:ne},{collapseMilestones:Et,display:rt}=Vl(Dt);return je.on("update",se=>{a.lt(X.day.value,Ul)||Object.values(me).forEach(_t=>_t.update(se))}),Ft(()=>{X.day.value===Ul&&a.gte($.value,6)&&a.gte(O.coal.value,1e9)&&X.completeDay()}),{name:e,color:t,elves:me,totalElves:$,milestones:j,collapseMilestones:Et,generalTabCollapsed:k,minWidth:700,display:S(()=>i(N,null,[i("div",null,[X.day.value===Ul?`Reach ${te(6)} trained elves and ${te(1e9)} ${O.coal.displayName} to complete the day`:`${e} Complete!`," ",u("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>F.value=!0},[u("Check Modifiers")])]),ee(o),ee(Y),i(we,null,null),i("div",{style:"width: 600px"},[Sl(ke,J,Oe,At)]),rt()]))}}),Nr="management",Rl=12,Hl=Ut(Nr,()=>{const e="Management",t="green",l=Wt(()=>({direction:Me.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>X.day.value===Rl?n.value/(_e.totalElves.value*5):1,display:S(()=>X.day.value===Rl?i(N,null,[te(n.value),u("/"),te(_e.totalElves.value*5)," ",u("elf levels")]):"")})),n=g(()=>{let U=0;for(const He of Object.values(At))U+=He.level.value;return U}),o=G(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:de.logs,cost:1e21})),s=G(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},resource:Ze.boxes,style:"width: 150px",cost:1e13})),d=Z(()=>[C(()=>({multiplier:()=>ye.value,description:"Classroom Effect",enabled:()=>s.bought.value}))]),c=d.apply(1);function p(U,He,...ne){const j=Se(0),Dt=g(()=>a.pow(10,Et.value).mul(1e4)),Et=g(()=>a.min(a.mul(9,j.value).div(1e4).add(1).log10().floor(),De.amount.value).toNumber()),rt=g(()=>a.sub(j.value,a.pow(10,Et.value).sub(1).div(9).mul(1e4))),se=Wt(()=>({direction:Me.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(rt.value,Dt.value)})),{collapseMilestones:_t,display:St}=Vl(He),Xt=Z(()=>[C(()=>({multiplier:c,description:"Global XP Multiplier"})),...ne]),Yt=g(()=>Xt.apply(1));return Tt(()=>({display:{title:U.name,description:S(()=>i(N,null,[U.name,u(" is currently at level "),te(Et.value),u("! They have achieved a total of "),V(j.value),u(" XP, and have")," ",V(rt.value),u("/"),V(Dt.value),u(" XP. They buy buyables "),te(U.computedAutoBuyCooldown.value),u(" times per second, gaining")," ",a.gte(Et.value,De.amount.value)?0:V(a.mul(Yt.value,U.computedAutoBuyCooldown.value))," ",u("XP/sec.")," ",a.gte(Et.value,De.amount.value)?i("div",{style:"color: red"},[u("This elf cannot gain any XP because it has exceeded the maximum level from schools.")]):void 0,Y.value!==U.name?"Click to see this elf's milestones.":void 0,ee(se)]))},style:"width: 190px",onClick(){Y.value=U.name},canClick(){return Y.value!==U.name},state:_t,displayMilestone:St,level:Et,exp:j,milestones:He,timeForExp:U.computedAutoBuyCooldown,amountOfTimesDone:U.amountOfTimesDone,elfXPGainComputed:Yt,elfXPGain:Xt}))}const m=[R(()=>({display:()=>({requirement:"Holly Level 1",effectDisplay:"Cutting speed multiplies log gain."}),shouldEarn:()=>H.level.value>=1})),R(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>B(m[0].earned.value),shouldEarn:()=>H.level.value>=2})),R(()=>({display:{requirement:"Holly Level 3",effectDisplay:"Cutting speed multiplies cloth gain, wool gain (increasing the requirement as well), and sheep gain."},visibility:()=>B(m[1].earned.value),shouldEarn:()=>H.level.value>=3})),R(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply cutting speed by 1.1 per day completed"},visibility:()=>B(m[1].earned.value),shouldEarn:()=>H.level.value>=4})),R(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Reduce workshop expansion cost by ^0.95"},visibility:()=>B(m[1].earned.value),shouldEarn:()=>H.level.value>=5}))],y=[R(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>Ce.level.value>=1})),R(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>B(y[0].earned.value),shouldEarn:()=>Ce.level.value>=2})),R(()=>({display:{requirement:"Ivy Level 3",effectDisplay:"2^(log(logs)^0.2) multiplies planting speed"},visibility:()=>B(y[1].earned.value),shouldEarn:()=>Ce.level.value>=3})),R(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>B(y[2].earned.value),shouldEarn:()=>Ce.level.value>=4})),R(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"Boost planting/cutting speed based on which is falling behind"},visibility:()=>B(y[3].earned.value),shouldEarn:()=>Ce.level.value>=5}))],h=[R(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Planting speed boosts forest size"},shouldEarn:()=>ae.level.value>=1})),R(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},shouldEarn:()=>ae.level.value>=2})),R(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster."},shouldEarn:()=>ae.level.value>=3})),R(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},shouldEarn:()=>ae.level.value>=4})),R(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},shouldEarn:()=>ae.level.value>=5}))],b=[R(()=>({display:{requirement:"Jack Level 1",effectDisplay:"Heated cutters are less expensive."},shouldEarn:()=>ke.level.value>=1})),R(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},shouldEarn:()=>ke.level.value>=2})),R(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},shouldEarn:()=>ke.level.value>=3})),R(()=>({display:{requirement:"Jack Level 4",effectDisplay:"Oil gain is multiplied based on total elf levels."},shouldEarn:()=>ke.level.value>=4})),R(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil buyables."},shouldEarn:()=>ke.level.value>=5}))],v=[R(()=>({display:{requirement:"Mary Level 1",effectDisplay:"Heated planters are less expensive."},shouldEarn:()=>he.level.value>=1})),R(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Double tree planting speed"},shouldEarn:()=>he.level.value>=2})),R(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},shouldEarn:()=>he.level.value>=3})),R(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Metal gain is raised to the 1.1."},shouldEarn:()=>he.level.value>=4})),R(()=>({display:{requirement:"Mary Level 5",effectDisplay:"Auto smelting speed is multiplied by (total XP/1000)^0.5"},shouldEarn:()=>he.level.value>=5}))],E=[R(()=>({display:{requirement:"Noel Level 1",effectDisplay:"Log gain is increased based on total elf level."},shouldEarn:()=>he.level.value>=1})),R(()=>({display:{requirement:"Noel Level 2",effectDisplay:"Fertilized soil is less expensive"},shouldEarn:()=>he.level.value>=2})),R(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost based on total logs produced"},shouldEarn:()=>he.level.value>=3})),R(()=>({display:{requirement:"Noel Level 4",effectDisplay:"Plastic\xB2 subtracts from oil refinery cost"},shouldEarn:()=>he.level.value>=4})),R(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},shouldEarn:()=>he.level.value>=5}))],_=[R(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Multiply small fire efficiency by 5."},shouldEarn:()=>J.level.value>=1})),R(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},shouldEarn:()=>J.level.value>=2})),R(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},shouldEarn:()=>J.level.value>=3})),R(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},shouldEarn:()=>J.level.value>=4})),R(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},shouldEarn:()=>J.level.value>=5}))],x=[R(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>ve.level.value>=1})),R(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},shouldEarn:()=>ve.level.value>=2})),R(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},shouldEarn:()=>ve.level.value>=3})),R(()=>({display:{requirement:"FaithJoy Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},shouldEarn:()=>ve.level.value>=4})),R(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},shouldEarn:()=>ve.level.value>=5}))],z=[R(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>pe.level.value>=1})),R(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},shouldEarn:()=>pe.level.value>=2})),R(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},shouldEarn:()=>pe.level.value>=3})),R(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},shouldEarn:()=>pe.level.value>=4})),R(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},shouldEarn:()=>pe.level.value>=5}))],I=[],k=[],F=[],Y=Se("Holly"),Ae=g(()=>{let U={displayMilestone:S(()=>"")};switch(Y.value){case"Holly":U=H;break;case"Ivy":U=Ce;break;case"Hope":U=ae;break;case"Jack":U=ke;break;case"Mary":U=he;break;case"Noel":U=Ie;break;case"Joy":U=J;break;case"Faith":U=ve;break;case"Snowball":U=pe;break;case"Star":U=Oe;break;case"Bell":U=Fe;break;case"Gingersnap":U=at;break;default:console.warn("This should not happen.",Y.value);break}return{name:Y.value,disp:U.displayMilestone}}),H=p(_e.elves.cuttersElf,m),Ce=p(_e.elves.plantersElf,y),ae=p(_e.elves.expandersElf,h),Ve=[H,Ce,ae],ke=p(_e.elves.heatedCuttersElf,b),he=p(_e.elves.heatedPlantersElf,v),Ie=p(_e.elves.fertilizerElf,E),Re=[ke,he,Ie],J=p(_e.elves.smallFireElf,_),ve=p(_e.elves.bonfireElf,x),pe=p(_e.elves.kilnElf,z),Ee=[J,ve,pe],Oe=p(_e.elves.paperElf,I),Fe=p(_e.elves.boxElf,k),at=p(_e.elves.clothElf,F),$e=[Oe,Fe,at],At={cutterElfTraining:H,planterElfTraining:Ce,expandersElfTraining:ae,heatedCutterElfTraining:ke,heatedPlanterElfTraining:he,fertilizerElfTraining:Ie,smallfireElfTraining:J,bonfireElfTraining:ve,kilnElfTraining:pe,paperElfTraining:Oe,boxElfTraining:Fe,clothElfTraining:at};je.on("update",()=>{if(!(X.day.value=1&&(U.amountOfTimesDone.value-=He,a.lt(U.level.value,De.amount.value)&&(U.exp.value=a.mul(U.elfXPGainComputed.value,He).add(U.exp.value)))}});const me=S(()=>i(N,null,[Ae.value.name,u("'s milestones: "),Ae.value.disp()])),$=g(()=>{const U=a.pow(10,De.amount.value);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:a.add(De.amount.value,1).mul(1e4)}}),De=xe(()=>({display:S(()=>i(N,null,[i("h3",null,[u("Build a School")]),i("div",null,[u("You gotta start somewhere, right? Each school increases the maximum level for elves by 1. Maximum of 5.")]),i("div",null,[u("You have "),te(De.amount.value),u(" schools.")]),i("div",null,[u("They are currently letting elves learn up to level")," ",te(De.amount.value),u(".")]),i("div",null,[u("Costs "),V($.value.wood),u(" logs, "),V($.value.coal)," ",u("coal, "),V($.value.paper),u(" paper, "),V($.value.boxes)," ",u("boxes, "),V($.value.metalIngots),u(" metal ingots,")," ",V($.value.cloth),u(" cloth, "),V($.value.plastic)," ",u("plastic, and requires "),V($.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return $.value.wood.lte(de.logs.value)&&$.value.coal.lte(O.coal.value)&&$.value.paper.lte(K.paper.value)&&$.value.boxes.lte(Ze.boxes.value)&&$.value.metalIngots.lte(nt.metal.value)&&$.value.cloth.lte(lt.cloth.value)&&$.value.plastic.lte(Ue.plastic.value)&&$.value.dye.lte(Le.dyes.blue.amount.value)&&$.value.dye.lte(Le.dyes.red.amount.value)&&$.value.dye.lte(Le.dyes.yellow.amount.value)},onPurchase(){de.logs.value=a.sub(de.logs.value,$.value.wood),O.coal.value=a.sub(O.coal.value,$.value.coal),K.paper.value=a.sub(K.paper.value,$.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,$.value.boxes),nt.metal.value=a.sub(nt.metal.value,$.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,$.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,$.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:g(()=>B(o.bought.value)),style:"width: 600px"})),le=g(()=>{const U=a.add(De.amount.value,1).pow(1.5);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:U.mul(1e4)}}),ye=g(()=>a.add(st.amount.value,1).sqrt()),st=xe(()=>({display:S(()=>i(N,null,[i("h3",null,[u("Build a Classroom")]),i("div",null,[u("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",i(Oa,null,{default:()=>[u("Classrooms + 1")]}),u(".")]),i("div",null,[u("You have "),te(De.amount.value),u(" classrooms.")]),i("div",null,[u("They are currently multiplying elves' XP gain by "),V(ye.value)]),i("div",null,[u("Costs "),V(le.value.wood),u(" logs,")," ",V(le.value.coal),u(" coal, "),V(le.value.paper)," ",u("paper, "),V(le.value.boxes),u(" boxes,")," ",V(le.value.metalIngots),u(" metal ingots,")," ",V(le.value.cloth),u(" cloth, "),V(le.value.plastic)," ",u("plastic, and requires "),V(le.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return le.value.wood.lte(de.logs.value)&&le.value.coal.lte(O.coal.value)&&le.value.paper.lte(K.paper.value)&&le.value.boxes.lte(Ze.boxes.value)&&le.value.metalIngots.lte(nt.metal.value)&&le.value.cloth.lte(lt.cloth.value)&&le.value.plastic.lte(Ue.plastic.value)&&le.value.dye.lte(Le.dyes.blue.amount.value)&&le.value.dye.lte(Le.dyes.red.amount.value)&&le.value.dye.lte(Le.dyes.yellow.amount.value)},onPurchase(){de.logs.value=a.sub(de.logs.value,le.value.wood),O.coal.value=a.sub(O.coal.value,le.value.coal),K.paper.value=a.sub(K.paper.value,le.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,le.value.boxes),nt.metal.value=a.sub(nt.metal.value,le.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,le.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,le.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:g(()=>B(s.bought.value)),style:"width: 600px"})),Ke=mr({training:()=>({tab:wa(()=>({display:S(()=>i(N,null,[Sl(Ve,Re,Ee,$e),i(we,null,null),me()]))})),display:"Elf Training"}),teaching:()=>({tab:wa(()=>({display:S(()=>i(N,null,[ee(De),u(" "),ee(st)," ",Sl([o,s])]))})),display:"The Schools"}),info:()=>({tab:wa(()=>({display:S(()=>i(N,null,[u("Each elf gains experience points (XP) every time they perform their action (they don't have to buy anything though). When they get enough XP, they can level up, granting special rewards.")]))})),display:"Info"})}),[qe,ft]=nl(()=>[{title:"Global XP Gain",modifier:d,unit:" XP"},{title:"Holly XP Gain per Action",modifier:H.elfXPGain,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:Ce.elfXPGain,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ae.elfXPGain,unit:" XP"},{title:"Jack XP Gain per Action",modifier:ke.elfXPGain,unit:" XP"},{title:"Mary XP Gain per Action",modifier:he.elfXPGain,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Ie.elfXPGain,unit:" XP"},{title:"Joy XP Gain per Action",modifier:J.elfXPGain,unit:" XP"},{title:"Faith XP Gain per Action",modifier:ve.elfXPGain,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:pe.elfXPGain,unit:" XP"},{title:"Star XP Gain per Action",modifier:Oe.elfXPGain,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Fe.elfXPGain,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:at.elfXPGain,unit:" XP"}]),Qe=W(!1),It=S(()=>i(yt,{modelValue:Qe.value,"onUpdate:modelValue":U=>Qe.value=U},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:qe}));return{name:e,day:Rl,color:t,minWidth:700,elfTraining:At,currentShown:Y,tabs:Ke,generalTabCollapsed:ft,teaching:o,schools:De,classrooms:st,classroomUpgrade:s,display:S(()=>i(N,null,[X.day.value===Rl?"Get all elves to level 5.":`${e} Complete!`," ",u("-"),i("button",{class:"button",style:"display: inline-block;",onClick:()=>Qe.value=!0},[u("Check Modifiers")]),ee(It),ee(l),ee(Ke)]))}}),Mr="cloth",nn=8,lt=Ut(Mr,function(){const e="Cloth",t="white",l=ct(0,"cloth"),n=ct(0,"wool"),o=ct(10,"sheep"),s=Se(0),d=Wt(()=>({direction:Me.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:()=>a.div(s.value,$e.value)})),c=Tt(()=>({display:{title:"Breed sheep",description:S(()=>i(N,null,[u("Breed "),fe(a.floor(Fe.value)),u(" sheep"),i("br",null,null),ee(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,$e.value),onClick(){if(a.lt(s.value,$e.value))return;const ne=a.floor(Fe.value);o.value=a.add(o.value,ne),s.value=0}})),p=Se(0),m=Wt(()=>({direction:Me.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:()=>a.div(p.value,De.value)})),y=Tt(()=>({display:{title:"Shear sheep",description:S(()=>i(N,null,[u("Shear up to "),fe(a.floor(me.value)),u(" sheep"),i("br",null,null),ee(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,De.value),onClick(){if(a.lt(p.value,De.value))return;const ne=a.min(o.value,me.value).floor();n.value=a.add(n.value,ne),p.value=0}})),h=Se(0),b=Wt(()=>({direction:Me.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:()=>a.div(h.value,Ke.value)})),v=Tt(()=>({display:{title:"Spinning wool",description:S(()=>i(N,null,[u("Spin "),fe(a.floor(ye.value)),u(" wool"),i("br",null,null),ee(b)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Ke.value),onClick(){if(a.lt(h.value,Ke.value))return;const ne=a.min(n.value,ye.value).floor();l.value=a.add(l.value,ne),n.value=a.sub(n.value,ne),h.value=0}})),E=xl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),_=xl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),x=xl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),z=xe(()=>({resource:de.logs,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.5,ne).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),I=xe(()=>({resource:nt.metal,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.4,ne).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),k=xe(()=>({resource:K.paper,cost(){let ne=this.amount.value;return a.gte(ne,100)&&(ne=a.pow(ne,2).div(100)),ne=a.pow(.95,K.books.clothBook.amount.value).times(ne),a.pow(1.3,ne).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=G(()=>({resource:T(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Y=G(()=>({resource:T(n),cost:150,visibility:()=>B(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),Ae=G(()=>({resource:T(o),cost:200,visibility:()=>B(Y.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ce={treesUpgrade4:G(()=>({resource:T(l),cost:1e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:Ae,treesUpgrade2:Y,treesUpgrade1:F},ae=G(()=>({resource:T(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Ve=G(()=>({resource:T(n),cost:225,visibility:()=>B(ae.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),ke=G(()=>({resource:T(o),cost:300,visibility:()=>B(Ve.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ie={metalUpgrade4:G(()=>({resource:T(l),cost:2e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:ke,metalUpgrade2:Ve,metalUpgrade1:ae},Re=G(()=>({resource:T(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),J=G(()=>({resource:T(n),cost:200,visibility:()=>B(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),ve=G(()=>({resource:T(o),cost:400,visibility:()=>B(J.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),Ee={paperUpgrade4:G(()=>({resource:T(l),cost:4e3,visibility:()=>B(Ue.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:ve,paperUpgrade2:J,paperUpgrade1:Re},Oe=Z(()=>[re(()=>({addend:z.amount,description:"Build more pens"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought}))]),Fe=g(()=>Oe.apply(1)),at=Z(()=>[]),$e=g(()=>at.apply(1)),At=Z(()=>[re(()=>({addend:I.amount,description:"Make stronger shears"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(de.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Hl.elfTraining.cutterElfTraining.milestones[2].earned}))]),me=g(()=>At.apply(1)),$=Z(()=>[]),De=g(()=>$.apply(1)),le=Z(()=>[re(()=>({addend:k.amount,description:"Learn how to spin"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(de.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Hl.elfTraining.cutterElfTraining.milestones[2].earned}))]),ye=g(()=>le.apply(1)),st=Z(()=>[]),Ke=g(()=>st.apply(1)),[qe,ft]=nl(()=>[{title:"Sheep Gain",modifier:Oe,base:1},{title:"Sheep Breeding Cooldown",modifier:at,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:At,base:1},{title:"Shearing Cooldown",modifier:$,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:le,base:1},{title:"Spinning Cooldown",modifier:st,base:1,visible:!1,unit:"s"}]),Qe=W(!1),It=S(()=>i(yt,{modelValue:Qe.value,"onUpdate:modelValue":ne=>Qe.value=ne},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:qe}));je.on("update",ne=>{a.lt(X.day.value,nn)||(a.gte(s.value,$e.value)?s.value=$e.value:(s.value=a.add(s.value,ne),c.isHolding.value&&c.onClick()),a.gte(p.value,De.value)?p.value=De.value:(p.value=a.add(p.value,ne),y.isHolding.value&&y.onClick()),a.gte(h.value,Ke.value)?h.value=Ke.value:(h.value=a.add(h.value,ne),v.isHolding.value&&v.onClick()))});const{total:U,trackerDisplay:He}=dl({resource:l,goal:1e3,name:e,day:nn,color:t,textColor:"var(--feature-foreground)",modal:{show:Qe,display:It}});return{name:e,color:t,cloth:l,totalCloth:U,wool:n,sheep:o,buildPens:z,betterShears:I,fasterSpinning:k,treesUpgrades:Ce,metalUpgrades:Ie,paperUpgrades:Ee,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:E,shearSheepHK:_,spinWoolHK:x,minWidth:700,display:S(()=>i(N,null,[ee(He),i(we,null,null),i(Mt,{resource:l,style:"margin-bottom: 0"},null),i(Mt,{resource:n,style:"margin-bottom: 0"},null),i(Mt,{resource:o,style:"margin-bottom: 0"},null),We(c,y,v),We(z,I,k),i(we,null,null),i(Pl,null,{default:()=>[Ht(...Object.values(Ce)),Ht(...Object.values(Ie)),Ht(...Object.values(Ee))]})]))}}),Ir="paper",Ca=5,K=Ut(Ir,function(){const e="Paper",t="#E8DCB8",l=ct(0,"paper"),n=ct(g(()=>a.min(a.div(de.logs.value,1e9),a.div(O.ash.value,1e6))),"pulp"),o=Rn(()=>({scaling:Ra(1,1.2),baseResource:n,gainResource:T(l),roundUpCost:!0,spend(J,ve){de.logs.value=a.sub(de.logs.value,a.times(ve,1e9)),O.ash.value=a.sub(O.ash.value,a.times(ve,1e6))},gainModifier:Ce})),s=Tt(()=>({display:S(()=>{const J=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return i(N,null,[i("span",{style:"font-size: large"},[u("Create "),te(o.currentGain.value),u(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost: "),Jl(de.logs,J),u(" "),n.displayName,u(" ("),te(a.times(J,1e9)),u(" "),de.logs.displayName,u(";")," ",te(a.times(J,1e6)),u(" "),O.ash.displayName,u(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function d(J){const ve=xe(()=>({...J,display:{title:J.name,description:`Print a copy of "${J.name}", which ${J.elfName} will use to improve their skills! Each copy printed will reduce the "${J.buyableName}" price scaling by 0.95x and make ${J.elfName} purchase +10% faster!`,effectDisplay:S(()=>i(N,null,[V(a.pow(.95,ve.amount.value)),u("x price scaling,")," ",V(a.div(ve.amount.value,10).add(1)),u("x auto-purchase speed")])),showAmount:!1},resource:T(l),cost(){let pe=this.amount.value;return(J.elfName==="Star"||J.elfName==="Bell")&&(pe=a.pow(pe,2)),a.gte(pe,100)&&(pe=a.pow(pe,2).div(100)),a.gte(pe,1e4)&&(pe=a.pow(pe,2).div(1e4)),pe=a.pow(.95,x.amount.value).times(pe),a.pow(5,pe).times(10)},style:"width: 600px"}));return ve}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>B(_e.elves.smallFireElf.bought.value)}),E=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>B(_e.elves.bonfireElf.bought.value)}),_=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>B(_e.elves.kilnElf.bought.value)}),x=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>B(_e.elves.paperElf.bought.value)}),z=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>B(_e.elves.boxElf.bought.value)}),I=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>B(_e.elves.clothElf.bought.value)}),k={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:y,heatedPlantersBook:h,fertilizerBook:b,smallFireBook:v,bonfireBook:E,kilnBook:_,paperBook:x,boxBook:z,clothBook:I},F=G(()=>({resource:T(l),cost:1e8,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),Y=G(()=>({resource:T(l),cost:1e9,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),Ae=G(()=>({resource:T(l),cost:1e10,visibility:()=>B(Ue.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),H={clothUpgrade:F,drillingUpgrade:Y,oilUpgrade:Ae},Ce=Z(()=>[C(()=>({multiplier:2,description:"Scholar's shoes",enabled:lt.paperUpgrades.paperUpgrade1.bought})),C(()=>({multiplier:2,description:"Scholar's slacks",enabled:lt.paperUpgrades.paperUpgrade2.bought})),C(()=>({multiplier:2,description:"Scholar's jacket",enabled:lt.paperUpgrades.paperUpgrade3.bought})),C(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:lt.paperUpgrades.paperUpgrade4.bought})),C(()=>({multiplier:Le.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Le.dyes.yellow.amount.value,1)}))]),[ae,Ve]=nl(()=>[{title:"Paper Gain",modifier:Ce,base:1}]),ke=W(!1),he=S(()=>i(yt,{modelValue:ke.value,"onUpdate:modelValue":J=>ke.value=J},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:ae}));je.on("update",J=>{a.lt(X.day.value,Ca)||(l.value=a.times(J,Ue.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:Ie,trackerDisplay:Re}=dl({resource:l,goal:5e3,name:e,day:Ca,color:t,textColor:"var(--feature-foreground)",modal:{show:ke,display:he}});return{name:e,day:Ca,color:t,paper:l,totalPaper:Ie,paperConversion:o,books:k,upgrades:H,generalTabCollapsed:Ve,minWidth:700,display:S(()=>i(N,null,[ee(Re),i(we,null,null),i(Mt,{resource:l,color:t,style:"margin-bottom: 0"},null),i(we,null,null),ee(s),i(we,null,null),We(...Object.values(H)),i(we,null,null),Ht(...Object.values(k))]))}}),Dr="boxes",ka=6,Ze=Ut(Dr,function(){const e="Boxes",t="#964B00",l=ct(0,"boxes"),n=Rn(()=>({scaling:Ra(1e10,1),baseResource:de.logs,gainResource:T(l),roundUpCost:!0})),o=Tt(()=>({display:S(()=>i(N,null,[i("span",{style:"font-size: large"},[u("Create "),te(n.currentGain.value),u(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[u("Cost:")," ",Jl(de.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",de.logs.displayName])])),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),s=G(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:100})),d=G(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:1e3})),c=G(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){X.days[3].recentlyUpdated.value=!0},resource:T(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:d,coalUpgrade:c},m=G(()=>({resource:T(l),cost:1e8,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),y=G(()=>({resource:T(l),cost:1e9,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=G(()=>({resource:T(l),cost:1e10,visibility:()=>B(Ue.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),b={oreUpgrade:m,metalUpgrade:y,plasticUpgrade:h},v=xe(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:S(()=>i(N,null,[V(a.div(v.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(3,k).times(100).div(Le.boosts.orange2.value)},visibility:()=>B(s.bought.value)})),E=xe(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:S(()=>i(N,null,[V(a.div(E.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(5,k).times(1e3).div(Le.boosts.orange2.value)},visibility:()=>B(d.bought.value)})),_=xe(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:S(()=>i(N,null,[V(a.div(_.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,K.books.boxBook.amount.value).times(k),a.pow(7,k).times(1e3).div(Le.boosts.orange2.value)},visibility:()=>B(c.bought.value)})),x={logBoxesBuyable:v,ashBoxesBuyable:E,coalBoxesBuyable:_};je.on("update",k=>{a.lt(X.day.value,ka)||(l.value=a.times(k,Ue.buyables.passiveBoxes.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:z,trackerDisplay:I}=dl({resource:l,goal:5e4,name:e,day:ka,color:t});return{name:e,day:ka,color:t,boxes:l,totalBoxes:z,boxesConversion:n,upgrades:p,row2Upgrades:b,buyables:x,minWidth:700,display:S(()=>i(N,null,[ee(I),i(we,null,null),i(Mt,{resource:l,color:t,style:"margin-bottom: 0"},null),i(we,null,null),ee(o),i(we,null,null),Sl(Object.values(p),Object.values(b)),i(we,null,null),We(...Object.values(x))]))}}),xr="trees",on=1,sn=.1,de=Ut(xr,function(){const e="Trees",t="#4BDC13",l="green",n=ct(0,"logs"),o=ct(0,"saplings"),s=W(0),d=Z(()=>[re(()=>({addend:()=>a.times(H.amount.value,10),description:"Expand Forest",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Nt.milestones.morePlantsMilestone1.earned})),C(()=>({multiplier:2,description:"5 Elves Trained",enabled:_e.milestones[4].earned})),C(()=>({multiplier:2,description:"8 Elves Trained",enabled:_e.milestones[7].earned})),C(()=>({multiplier:4,description:"Lumberjack Boots",enabled:lt.treesUpgrades.treesUpgrade1.bought})),re(()=>({addend:Le.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Le.dyes.blue.amount.value,1)}))]),c=ct(g(()=>a.sub(d.apply(10),o.value)),"trees"),p=g(()=>d.apply(10)),m=G(()=>({resource:T(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=G(()=>({resource:T(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=G(()=>({resource:T(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=G(()=>({resource:T(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=G(()=>({resource:T(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),E=[m,y,h,b,v],_=G(()=>({resource:T(n),cost:50,visibility:()=>B(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=G(()=>({resource:T(n),cost:50,visibility:()=>B(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),z=G(()=>({resource:T(n),cost:150,visibility:()=>B(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),I=G(()=>({resource:T(n),cost:150,visibility:()=>B(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),k=G(()=>({resource:T(n),cost:300,visibility:()=>B(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[_,x,z,I,k],Y=xe(()=>({resource:T(n),cost(){let j=this.amount.value;return a.gte(j,50)&&(j=a.pow(j,2).div(50)),a.gte(j,200)&&(j=a.pow(j,2).div(200)),a.gte(j,2e6)&&(j=a.pow(j,2).div(2e6)),j=a.pow(.95,K.books.cuttersBook.amount.value).times(j),a.times(100,j).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>B(k.bought.value)})),Ae=xe(()=>({resource:T(n),cost(){let j=this.amount.value;return a.gte(j,50)&&(j=a.pow(j,2).div(50)),a.gte(j,200)&&(j=a.pow(j,2).div(200)),a.gte(j,2e6)&&(j=a.pow(j,2).div(2e6)),j=a.pow(.95,K.books.plantersBook.amount.value).times(j),a.times(100,j).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>B(k.bought.value)})),H=xe(()=>({resource:T(n),cost(){let j=this.amount.value;return a.gte(j,100)&&(j=a.pow(j,2).div(100)),a.gte(j,1e5)&&(j=a.pow(j,2).div(1e5)),j=a.pow(.95,K.books.expandersBook.amount.value).times(j),a.pow(a.add(j,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>B(k.bought.value)})),Ce=[Y,Ae,H],ae=Z(()=>[re(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),re(()=>({addend:Re,description:"Smart Knives",enabled:z.bought}))]),Ve=g(()=>ae.apply(1)),ke=Z(()=>[C(()=>({multiplier:.5,description:"Sharper Fingers",enabled:_.bought})),C(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),he=g(()=>ke.apply(1)),Ie=Z(()=>[re(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),re(()=>({addend:Y.amount,description:"Generic Cutters",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Nt.milestones.autoCutMilestone1.earned})),C(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Nt.milestones.autoCutMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Cutters",enabled:O.warmerCutters.bought})),C(()=>({multiplier:O.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(O.heatedCutters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:lt.treesUpgrades.treesUpgrade2.bought}))]),Re=g(()=>Ie.apply(0)),J=Z(()=>[re(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),re(()=>({addend:Fe,description:"Smart Spades",enabled:I.bought}))]),ve=g(()=>J.apply(1)),pe=Z(()=>[C(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),C(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),Ee=g(()=>pe.apply(1)),Oe=Z(()=>[re(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),re(()=>({addend:()=>a.div(Ae.amount.value,2),description:"Generic Planters",enabled:k.bought})),re(()=>({addend:()=>a.div(Nt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone1.earned})),C(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Planters",enabled:O.warmerPlanters.bought})),C(()=>({multiplier:O.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(O.heatedPlanters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:lt.treesUpgrades.treesUpgrade3.bought})),C(()=>({multiplier:2,description:"Ivy Level 1",enabled:Hl.elfTraining.planterElfTraining.milestones[0].earned}))]),Fe=g(()=>Oe.apply(0)),at=Z(()=>[C(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),C(()=>({multiplier:1.25,description:"Research II",enabled:k.bought})),C(()=>({multiplier:()=>a.div(Nt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Nt.milestones.logGainMilestone1.earned})),C(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Nt.milestones.logGainMilestone2.earned})),C(()=>({multiplier:1.25,description:"Ashy Soil",enabled:O.basicFertilizer.bought})),C(()=>({multiplier:O.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(O.moreFertilizer.amount.value,0)})),C(()=>({multiplier:2,description:"4 Elves Trained",enabled:_e.milestones[3].earned})),C(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:lt.treesUpgrades.treesUpgrade4.bought})),C(()=>({multiplier:g(()=>a.add(Re.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Le.upgrades.blueDyeUpg.bought})),C(()=>({multiplier:g(()=>a.add(Re.value,1).log10().plus(1)),description:"Holly Level 1",enabled:Hl.elfTraining.cutterElfTraining.milestones[0].earned})),Fn(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Nt.milestones.logGainMilestone3.earned}))]),$e=Se(0),At=Wt(()=>({direction:Me.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($e.value,he.value)})),me=Tt(()=>({display:{title:"Cut trees",description:S(()=>i(N,null,[u("Cut down up to "),te(a.floor(Ve.value))," ",u("tree"),a.eq(Ve.value,1)?"":"s",u(" at once!"),i("br",null,null),ee(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte($e.value,he.value),onClick(){if(a.lt($e.value,he.value))return;const j=a.floor(a.min(c.value,a.times(Ve.value,a.div($e.value,he.value).floor())));n.value=a.add(n.value,a.times(at.apply(1),j)),o.value=a.add(o.value,j),$e.value=0}})),$=Se(0),De=Wt(()=>({direction:Me.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($.value,Ee.value)})),le=Tt(()=>({display:{title:"Plant trees",description:S(()=>i(N,null,[u("Plant up to "),te(a.floor(ve.value))," ",u("tree"),a.eq(ve.value,1)?"":"s",u(" at once!"),i("br",null,null),ee(De)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte($.value,Ee.value),onClick(){if(a.lt($.value,Ee.value))return;const j=a.floor(a.min(o.value,a.times(ve.value,a.div($.value,Ee.value).floor())));o.value=a.sub(o.value,j),$.value=0}})),[ye,st]=nl(()=>[{title:"Logs per Tree",modifier:at,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ae,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:ke,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:J,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:Ie,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oe,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:k.bought}]),Ke=W(!1),qe=S(()=>i(yt,{modelValue:Ke.value,"onUpdate:modelValue":j=>Ke.value=j},{header:()=>i("h2",null,[e,u(" Modifiers")]),body:ye}));je.on("update",j=>{if(a.lt(X.day.value,on))return;a.gte($e.value,he.value)?$e.value=he.value:($e.value=a.add($e.value,j),me.isHolding.value&&me.onClick()),a.gte($.value,Ee.value)?$.value=Ee.value:($.value=a.add($.value,j),le.isHolding.value&&le.onClick());const Dt=a.min(c.value,a.times(Re.value,j)),Et=a.mul(at.apply(1),Dt),rt=a.div(Et,j);s.value=a.mul(rt,sn).add(a.mul(s.value,a.dOne.sub(sn))),n.value=a.add(n.value,Et),o.value=a.add(o.value,Dt);const se=a.min(o.value,a.times(Fe.value,j));o.value=a.sub(o.value,se)});const ft=g(()=>a.sub(Re.value,Fe.value)),Qe=g(()=>a.sub(Fe.value,Re.value)),It=xl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{me.canClick.value&&me.onClick()}})),U=xl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{le.canClick.value&&le.onClick()}})),{total:He,trackerDisplay:ne}=dl({resource:n,goal:1e4,name:e,day:on,color:l,modal:{show:Ke,display:qe}});return{name:e,color:t,logs:n,totalLogs:He,trees:c,saplings:o,cutTree:me,plantTree:le,cutTreeHK:It,plantTreeHK:U,row1Upgrades:E,row2Upgrades:F,row1Buyables:Ce,manualCutProgress:$e,manualPlantProgress:$,generalTabCollapsed:st,computedAutoCuttingAmount:Re,minWidth:700,display:S(()=>i(N,null,[ee(ne),i(we,null,null),i(Mt,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Re.value,0)?`+${V(s.value)}/s average
equilibrium: +${bn([[Re.value,"cutting speed"],[Fe.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",at.apply(1))}`:void 0},null),i(Mt,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:na(ft.value)},null),i(Mt,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:na(Qe.value)},null),i(we,null,null),We(me,le),i("div",null,[u("Tip: You can hold down on actions to perform them automatically")]),i(we,null,null),Sl(E,F),i(we,null,null),We(...Ce)]))}});var qn="./assets/tree.35808197.png",Gn="./assets/sws.714ad454.png",$n="data:image/png;base64,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",Qn="./assets/elf.9fbfa563.png",Ln="./assets/paperStacks.4c96ec8c.png",Vn="data:image/png;base64,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",Hn="./assets/metal.7407f5d1.png",jn="./assets/cloth.7bcd7f37.png",Wn="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==",Jn="./assets/plastic.b8ac74ff.png",zn="data:image/png;base64,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",Pr="./assets/elfManagement.436c8744.png";const X=Ut("main",function(){const e=Se(1),t=g(()=>(+new Date(new Date().getFullYear(),11,e.value)-ie.time)/1e3),l=W(!1),n=W(-1),o=W(""),s=W();function d(m){const y=Se(!1),h=Se(!1);return kt(()=>{const b=m(),v=ht(b.shouldNotify),E=ht(()=>r(v)||r(h));return{...b,opened:y,shouldNotify:E,recentlyUpdated:h,[Kt]:ss,[al]:function(){const{day:_,layer:x,symbol:z,opened:I,shouldNotify:k,story:F,completedStory:Y,recentlyUpdated:Ae}=this;return{day:_,symbol:z,layer:x,opened:I,recentlyUpdated:Ae,shouldNotify:k,onOpenLore(){var ae,Ve;const H=X.day.value>_;n.value=H?_-1:-1;const Ce=r((Ve=(ae=Ct[x!=null?x:"trees"])==null?void 0:ae.name)!=null?Ve:"");o.value=H?`${Ce} - Completed!`:Ce,s.value=H?`${F}
${Y}`:F,l.value=!0},onOpenLayer(){if(Ae.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ie.tabs.includes(x!=null?x:"trees")){const H=ie.tabs.lastIndexOf(x!=null?x:"trees");ie.tabs.splice(H,1)}else ie.tabs.push(x!=null?x:"trees"),X.minimized.value=!0;else ie.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(I.value=!0,setTimeout(()=>{var H,Ce;n.value=-1,o.value=r((Ce=(H=Ct[x!=null?x:"trees"])==null?void 0:H.name)!=null?Ce:""),s.value=F,ie.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:qn,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!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Gn,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!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:$n,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!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Qn,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!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Ln,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!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Vn,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!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Hn,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!"})),d(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:jn,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!"})),d(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Wn,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!"})),d(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Jn,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),d(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:zn,story:"To make toys, we're going to need some color to make them look nice and enticing! We can't just give kids clear toys after all! To add some color to our toys, we'll need some dyes!",completedStory:"After all that effort, you finally have a rainbow of dyes to choose from! Now the children won't be able to resist the toys you have to offer, once you get them made of course..."})),d(()=>({day:12,shouldNotify:!1,layer:"management",symbol:Pr,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:""})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){n.value=e.value-1,o.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,X.minimized.value=!1,ie.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:n,loreTitle:o,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:S(()=>i(N,null,[ie.devSpeed===0?i("div",null,[u("Game Paused")]):null,ie.devSpeed&&ie.devSpeed!==1?i("div",null,[u("Dev Speed: "),V(ie.devSpeed),u("x")]):null,ie.offlineTime?i("div",null,[u("Offline Time: "),da(ie.offlineTime)]):null,i(we,null,null),i("div",{class:"advent"},[c.reduce((m,y)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(y),m),[[]]).map(m=>We(...m))])]))}}),Tr=e=>[X,de,Nt,O,_e,K,Ze,nt,lt,Ye,Ue,Le,Hl],Ga=g(()=>!1);function Fr(e,t){t.offlineProd=!1}var Ur=Object.freeze(Object.defineProperty({__proto__:null,main:X,getInitialLayers:Tr,hasWon:Ga,fixOldSave:Fr},Symbol.toStringTag,{value:"Module"}));const Rr={class:"scene"},Or=["src"],qr=["src"],Gr=["src"],$r=["src"],Qr=["src"],Lr=["src"],Vr=["src"],Hr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},jr=["src"],Wr=["src"],Jr=["src"],zr=["src"],Kr=ce({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(w(),D("div",Rr,[e.day>=7?(w(),D("img",{key:0,src:r(jn),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Or)):q("",!0),e.day>=0?(w(),D("img",{key:1,src:r(qn),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,qr)):q("",!0),e.day>=1?(w(),D("img",{key:2,src:r(Gn),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Gr)):q("",!0),e.day>=2?(w(),D("img",{key:3,src:r($n),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,$r)):q("",!0),e.day>=6?(w(),D("img",{key:4,src:r(Hn),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Qr)):q("",!0),e.day>=8?(w(),D("img",{key:5,src:r(Wn),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Lr)):q("",!0),e.day>=3?(w(),D("img",{key:6,src:r(Qn),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Vr)):q("",!0),e.day>=4?(w(),D("div",Hr,[e.day>=4?(w(),D("img",{key:0,src:r(Ln),class:"scene-item"},null,8,jr)):q("",!0),e.day>=5?(w(),D("img",{key:1,src:r(Vn),class:"scene-item"},null,8,Wr)):q("",!0),e.day>=9?(w(),D("img",{key:2,src:r(Jn),class:"scene-item"},null,8,Jr)):q("",!0),e.day>=10?(w(),D("img",{key:3,src:r(zn),class:"scene-item"},null,8,zr)):q("",!0)])):q("",!0)]))}});var Xr=Te(Kr,[["__scopeId","data-v-47b4d886"]]);const Yr=ce({components:{Context:Cn},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:L(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:L(Number,String),required:!0},name:{type:L(String),required:!0},color:L(String),minimizable:L(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:n,minWidth:o,tab:s}=pt(e),d=Tl(t),c=g(()=>Ge.allowGoBack&&l.value>0&&!n.value);function p(){ie.tabs.splice(r(e.index),1)}_l(()=>y(n.value,r(o.value))),Jt([n,Qo(o)],([h,b])=>y(h,b));function m(h){e.nodes.value=h}function y(h,b){const v=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,E=s.value();E!=null&&(h?(E.style.flexGrow="0",E.style.flexShrink="0",E.style.width="60px",E.style.minWidth=E.style.flexBasis="",E.style.margin="0"):(E.style.flexGrow="",E.style.flexShrink="",E.style.width="",E.style.minWidth=E.style.flexBasis=v,E.style.margin=""))}return{component:d,showGoBack:c,updateNodes:m,unref:r,goBack:p}}});function Zr(e,t,l,n,o,s){const d=ll("Context");return w(),D("div",{class:"layer-container",style:it({"--layer-color":e.unref(e.color)})},[e.showGoBack?(w(),D("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):q("",!0),e.minimized.value?(w(),D("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,Be(e.unref(e.name)),1)])):(w(),D("div",{key:2,class:et(["layer-tab",{showGoBack:e.showGoBack}])},[i(d,{onUpdateNodes:e.updateNodes},{default:ue(()=>[(w(),oe(ze(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(w(),D("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):q("",!0)],4)}var eu=Te(Yr,[["render",Zr],["__scopeId","data-v-0158bec3"]]);const Kn=e=>(rl("data-v-4b4bda40"),e=e(),ul(),e),tu=Kn(()=>f("h2",null,"Changelog",-1)),lu=Kn(()=>f("details",{open:""},[f("summary",null,[u("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),u(" This is the first release :D "),f("ul",null,[f("li",{class:"feature"},"Did everything"),f("li",{class:"fix"},"Had some fun"),f("li",{class:"breaking"},"Removed everything"),f("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),au=ce({__name:"Changelog",setup(e,{expose:t}){const l=W(!1);return t({open(){l.value=!0}}),(n,o)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value=s)},{header:ue(()=>[tu]),body:ue(()=>[lu]),_:1},8,["modelValue"]))}});var nu=Te(au,[["__scopeId","data-v-4b4bda40"]]),iu=ce({props:{element:Object,display:{type:L(Object,String,Function),required:!0},style:L(Object,String,Array),classes:L(Object),direction:L(String),xoffset:L(String),yoffset:L(String),pinned:Object},setup(e){const{element:t,display:l,pinned:n}=pt(e),o=W(!1),s=g(()=>(ot(n)||o.value)&&d.value),d=yl(l),c=Rt(Pe(S(()=>{const y=ot(t);return y==null?"":jt(y)})));function p(y){const h=n;y.shiftKey&&h&&(h.value=!h.value,y.stopPropagation(),y.preventDefault())}const m=g(()=>ot(n)&&Bl[tt.theme].showPin);return{Direction:Me,isHovered:o,isShown:s,comp:d,elementComp:c,unref:r,togglePinned:p,showPin:m}}});const ou={key:0,class:"material-icons pinned"};function su(e,t,l,n,o,s){return w(),D("div",{class:et(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=d=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=d=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...d)=>e.togglePinned&&e.togglePinned(...d))},[Vt(e.$slots,"default",{},void 0,!0),e.elementComp?(w(),oe(ze(e.elementComp),{key:0})):q("",!0),i(ra,{name:"fade"},{default:ue(()=>{var d;return[e.isShown?(w(),D("div",{key:0,class:et(["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:it([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(w(),D("span",ou,"push_pin")):q("",!0),e.comp?(w(),oe(ze(e.comp),{key:1})):q("",!0)],6)):q("",!0)]}),_:1})],34)}var mt=Te(iu,[["render",su],["__scopeId","data-v-6102fa3a"]]);const ru={class:"info-modal-header"},uu=["src","alt"],du={class:"info-modal-title"},cu={key:0},pu=u(" - "),mu={key:0},vu={key:0},gu=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),fu=f("br",null,null,-1),hu=f("br",null,null,-1),yu=["href"],bu=f("span",{class:"material-icons info-modal-discord"},"discord",-1),wu=f("div",null,[f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")])],-1),Au=f("div",null,[f("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Modding Tree ")])],-1),Cu=f("br",null,null,-1);var ku=ce({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:n,logo:o,author:s,discordName:d,discordLink:c,versionNumber:p,versionTitle:m}=Ge,y=pt(l),h=W(!1),b=g(()=>da(ie.timePlayed)),v=g(()=>Pe(S(()=>i(N,null,[Dn.map(ee)]))));t({open(){h.value=!0}});function E(){var _;(_=r(y.changelog))==null||_.open()}return(_,x)=>(w(),oe(yt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=z=>h.value=z)},{header:ue(()=>[f("div",ru,[r(o)?(w(),D("img",{key:0,class:"info-modal-logo",src:r(o),alt:r(n)},null,8,uu)):q("",!0),f("div",du,[f("h2",null,"- "+Be(r(n))+" -",1),f("h4",null,[u(" - v"+Be(r(p)),1),r(m)?(w(),D("span",cu,": "+Be(r(m)),1)):q("",!0),pu])])])]),body:ue(({shown:z})=>[z?(w(),D("div",mu,[r(s)?(w(),D("div",vu,"By "+Be(r(s)),1)):q("",!0),gu,fu,f("div",{class:"link",onClick:E},"Changelog"),hu,f("div",null,[r(c)?(w(),D("a",{key:0,href:r(c),class:"info-modal-discord-link",target:"_blank"},[bu,u(" "+Be(r(d)),1)],8,yu)):q("",!0)]),wu,Au,Cu,f("div",null,"Time Played: "+Be(r(b)),1),(w(),oe(ze(r(v))))])):q("",!0)]),_:1},8,["modelValue"]))}});const Xn=e=>(rl("data-v-0d685451"),e=e(),ul(),e),Eu=Xn(()=>f("h2",null,"Options",-1)),_u=Xn(()=>f("hr",null,null,-1));var Su=ce({__name:"Options",setup(e,{expose:t}){const l=W(!1);t({open(){l.value=!0}});const n=Object.keys(Bl).map(v=>({label:wn(v),value:v})),o=g(()=>Pe(S(()=>i(N,null,[In.map(ee)])))),{showTPS:s,theme:d}=pt(tt),{autosave:c,usingLog:p}=pt(ie),m=g({get(){return ie.devSpeed===0},set(v){ie.devSpeed=v?0:null}}),y=S(()=>i("span",null,[u("Autosave"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),h=S(()=>i("span",null,[u("Pause game"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),b=S(()=>i("span",null,[u("Use log for progress bar"),i(mt,{display:"Save-specific"},{default:()=>[u("*")]})]));return(v,E)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":E[5]||(E[5]=_=>l.value=_)},{header:ue(()=>[Eu]),body:ue(()=>[i(qa,{title:"Theme",options:r(n),modelValue:r(d),"onUpdate:modelValue":E[0]||(E[0]=_=>vt(d)?d.value=_:null)},null,8,["options","modelValue"]),(w(),oe(ze(r(o)))),i(sl,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":E[1]||(E[1]=_=>vt(s)?s.value=_:null)},null,8,["modelValue"]),_u,i(sl,{title:r(y),modelValue:r(c),"onUpdate:modelValue":E[2]||(E[2]=_=>vt(c)?c.value=_:null)},null,8,["title","modelValue"]),r(Ge).enablePausing?(w(),oe(sl,{key:0,title:r(h),modelValue:r(m),"onUpdate:modelValue":E[3]||(E[3]=_=>vt(m)?m.value=_:null)},null,8,["title","modelValue"])):q("",!0),i(sl,{title:r(b),modelValue:r(p),"onUpdate:modelValue":E[4]||(E[4]=_=>vt(p)?p.value=_:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Bu=Te(Su,[["__scopeId","data-v-0d685451"]]);const Nu=["onSubmit"],Mu={class:"field"},Iu={key:0,class:"field-title"},Du=["placeholder"],xu=ce({__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,n=yl(zt(l,"title"),"span"),o=Rt(null);oa(()=>{var p;(p=o.value)==null||p.focus()});const s=g({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(w(),D("form",{onSubmit:Gl(d,["prevent"])},[f("div",Mu,[r(n)?(w(),D("span",Iu,[(w(),oe(ze(r(n))))])):q("",!0),e.textArea?(w(),oe(r(fi),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=y=>vt(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):sa((w(),D("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=y=>vt(s)?s.value=y:null),placeholder:e.placeholder,class:et({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,Du)),[[di,r(s)]])])],40,Nu))}});var Yn=Te(xu,[["__scopeId","data-v-67b44a54"]]);const Pu={key:0},Tu=["onClick","disabled"],Fu={key:0},Uu=["onClick"],Ru=ce({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=pt(e),o=W(!1);Jt(o,c=>{t("confirmingChanged",c)});function s(){if(r(n.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function d(){o.value=!1}return(c,p)=>(w(),D("span",{class:et(["container",{confirming:o.value}])},[o.value?(w(),D("span",Pu,"Are you sure?")):q("",!0),f("button",{onClick:Gl(s,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(w(),D("span",Fu,"Yes")):Vt(c.$slots,"default",{key:1},void 0,!0)],8,Tu),o.value?(w(),D("button",{key:1,class:"button",onClick:Gl(d,["stop"])},"No",8,Uu)):q("",!0)],2))}});var Ou=Te(Ru,[["__scopeId","data-v-2f8ef34c"]]);const qu=["onClick"],Gu=ce({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=W(!1),n=W(null);function o(){t("click"),n.value&&clearTimeout(n.value),l.value=!1,_l(()=>{l.value=!0,n.value=setTimeout(()=>l.value=!1,500)})}return(s,d)=>(w(),D("button",{onClick:Gl(o,["stop"]),class:et(["feedback",{activated:l.value,left:e.left}])},[Vt(s.$slots,"default",{},void 0,!0)],10,qu))}});var $u=Te(Gu,[["__scopeId","data-v-01a1b95c"]]);const cl=e=>(rl("data-v-5285ac49"),e=e(),ul(),e),Qu=cl(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),Lu={key:0,class:"actions"},Vu=cl(()=>f("span",{class:"material-icons"},"content_paste",-1)),Hu=cl(()=>f("span",{class:"material-icons"},"content_copy",-1)),ju=cl(()=>f("span",{class:"material-icons"},"edit",-1)),Wu=cl(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ju={key:1,class:"actions"},zu=cl(()=>f("span",{class:"material-icons"},"check",-1)),Ku=cl(()=>f("span",{class:"material-icons"},"close",-1)),Xu={key:2,class:"details"},Yu={class:"save-version"},Zu=cl(()=>f("br",null,null,-1)),ed={key:0},td={key:1},ld={key:3,class:"details"},ad={key:4,class:"details error"},nd=cl(()=>f("br",null,null,-1)),id=ce({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:n}=pt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=W(!1),d=W(!1),c=W("");Jt(s,()=>c.value=n.value.name||"");const p=g(()=>n.value&&n.value.id===ie.id),m=g(()=>p.value?ie.time:n.value&&n.value.time||0),y=Tl(g(()=>{var b,v,E,_;return`Day ${(_=(E=(v=(b=n.value)==null?void 0:b.layers)==null?void 0:v.main)==null?void 0:E.day)!=null?_:1}`}));function h(){t("editName",c.value),s.value=!1}return(b,v)=>(w(),D("div",{class:et(["save",{active:r(p)}])},[Qu,s.value?(w(),D("div",Ju,[f("button",{onClick:h,class:"button"},[i(mt,{display:"Save",direction:r(Me).Left,class:"info"},{default:ue(()=>[zu]),_:1},8,["direction"])]),f("button",{onClick:v[5]||(v[5]=E=>s.value=!s.value),class:"button"},[i(mt,{display:"Cancel",direction:r(Me).Left,class:"info"},{default:ue(()=>[Ku]),_:1},8,["direction"])])])):(w(),D("div",Lu,[r(n).error==null&&!d.value?(w(),oe($u,{key:0,onClick:v[0]||(v[0]=E=>t("export")),class:"button",left:""},{default:ue(()=>[i(mt,{display:"Export",direction:r(Me).Left,class:"info"},{default:ue(()=>[Vu]),_:1},8,["direction"])]),_:1})):q("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:1,onClick:v[1]||(v[1]=E=>t("duplicate")),class:"button"},[i(mt,{display:"Duplicate",direction:r(Me).Left,class:"info"},{default:ue(()=>[Hu]),_:1},8,["direction"])])):q("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:2,onClick:v[2]||(v[2]=E=>s.value=!s.value),class:"button"},[i(mt,{display:"Edit Name",direction:r(Me).Left,class:"info"},{default:ue(()=>[ju]),_:1},8,["direction"])])):q("",!0),i(Ou,{disabled:r(p),onClick:v[3]||(v[3]=E=>t("delete")),onConfirmingChanged:v[4]||(v[4]=E=>d.value=E)},{default:ue(()=>[i(mt,{display:"Delete",direction:r(Me).Left,class:"info"},{default:ue(()=>[Wu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(n).error==null&&!s.value?(w(),D("div",Xu,[f("button",{class:"button open",onClick:v[6]||(v[6]=E=>t("open"))},[f("h3",null,Be(r(n).name),1)]),f("span",Yu,"v"+Be(r(n).modVersion),1),Zu,r(m)?(w(),D("div",ed,"Last played "+Be(r(o).format(r(m))),1)):q("",!0),r(y)?(w(),D("div",td,[(w(),oe(ze(r(y))))])):q("",!0)])):r(n).error==null&&s.value?(w(),D("div",ld,[i(Yn,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=E=>c.value=E),class:"editname",onSubmit:h},null,8,["modelValue"])])):(w(),D("div",ad,[u(" Error: Failed to load save with id "+Be(r(n).id),1),nd,u(Be(r(n).error),1)]))],2))}});var od=Te(id,[["__scopeId","data-v-5285ac49"]]);const $a=e=>(rl("data-v-3b9991aa"),e=e(),ul(),e),sd=$a(()=>f("h2",null,"Saves Manager",-1)),rd={class:"modal-footer"},ud={class:"field"},dd=$a(()=>f("span",{class:"field-title"},"Create Save",-1)),cd={class:"field-buttons"},pd={class:"footer"},md=$a(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),vd=ce({__name:"SavesManager",setup(e,{expose:t}){const l=W(!1),n=W(null);t({open(){l.value=!0}});const o=W(!1),s=W(""),d=W(null);Jt(s,I=>{I?_l(()=>{try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=vl.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I),o.value=!0;return}const k=JSON.parse(I);if(typeof k!="object"){o.value=!0;return}const F=ea();k.id=F,Qt(k),s.value="",o.value=!1,tt.saves.push(F)}catch{o.value=!0}}):o.value=!1});let c={},p=W(Object.keys(c).reduce((I,k)=>(I.push({label:k.split("/").slice(-1)[0].slice(0,-4),value:c[k]}),I),[]));const m=ua({});function y(I){if(m[I]==null){let k=localStorage.getItem(I);if(k==null)m[I]={error:"Save doesn't exist in localStorage",id:I};else if(k==="dW5kZWZpbmVk")m[I]={error:"Save is undefined",id:I};else try{if(k[0]!=="{")if(k[0]==="e")k=decodeURIComponent(escape(atob(k)));else if(k[0]==="\u1BE1")k=vl.decompressFromUTF16(k);else return console.warn("Unable to determine preset encoding",k),o.value=!0,m[I]={error:"Unable to determine preset encoding",id:I},m[I];m[I]={...JSON.parse(k),id:I}}catch(F){m[I]={error:F,id:I},console.warn(`SavesManager: Failed to load info about save with id ${I}: ${F} -${k}`)}}return m[M]}Jt(l,M=>{M&&Object.keys(m).forEach(k=>delete m[k])});const h=g(()=>tt.saves.reduce((M,k)=>(M[k]=y(k),M),{}));function b(M){let k;switch(ie.id===M?k=Bn(ie[ut]):k=JSON.stringify(h.value[M]),$e.exportEncoding){default:console.warn(`Unknown save encoding: ${$e.exportEncoding}. Defaulting to lz`);case"lz":k=vl.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const F=document.createElement("textarea");F.value=k,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(M){ie.id===M&&Qt();const k={...h.value[M],id:ea()};Qt(k),tt.saves.push(k.id)}function E(M){tt.saves=tt.saves.filter(k=>k!==M),localStorage.removeItem(M),m[M]=void 0}function _(M){h.value[ie.id].time=ie.time,Qt(),m[ie.id]=void 0,El(h.value[M]),m[M]=void 0}function x(M){if(d.value=M,_l(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=vl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const k=JSON.parse(M);k.id=ea(),Qt(k),tt.saves.push(k.id),_(k.id)}function J(M,k){const F=h.value[M];F&&(F.name=k,ie.id===M?(ie.name=k,Qt()):(Qt(F),m[M]=void 0))}return(M,k)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":k[4]||(k[4]=F=>l.value=F),ref_key:"modal",ref:n},{header:ue(()=>[sd]),body:ue(({shown:F})=>[F?(w(),oe(r(gi),{key:0,list:r(tt).saves,handle:".handle",itemKey:Y=>Y},{item:ue(({element:Y})=>[i(od,{save:r(h)[Y],onOpen:be=>_(Y),onExport:be=>b(Y),onEditName:be=>J(Y,be),onDuplicate:be=>v(Y),onDelete:be=>E(Y)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):O("",!0)]),footer:ue(()=>[f("div",rd,[i(Yn,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:o.value})},null,8,["modelValue","class"]),f("div",ud,[dd,f("div",cd,[f("button",{class:"button",onClick:k[1]||(k[1]=F=>_(r(Dl)().id))},"New Game"),Object.keys(r(p)).length>0?(w(),oe(Ga,{key:0,options:r(p),modelValue:d.value,"onUpdate:modelValue":k[2]||(k[2]=F=>x(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):O("",!0)])]),f("div",pd,[md,f("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Zn=Te(vd,[["__scopeId","data-v-3b9991aa"]]);const Ot=e=>(rl("data-v-8495e562"),e=e(),ul(),e),gd=["src","alt"],fd={key:1,class:"title"},hd=Ot(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yd={class:"discord"},bd={class:"discord-links"},wd={key:0},Ad=["href"],Cd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),kd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Ed={href:"https://forums.moddingtree.com/",target:"_blank"},_d=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Sd=Ot(()=>f("span",{class:"material-icons"},"info",-1)),Bd=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Nd=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Id=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Md=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Dd=Ot(()=>f("span",{class:"material-icons"},"info",-1)),xd={href:"https://forums.moddingtree.com/",target:"_blank"},Pd=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Td={class:"discord"},Fd={class:"discord-links"},Ud={key:0},Rd=["href"],Od=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Gd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),$d=ce({__name:"Nav",setup(e){const t=j(null),l=j(null),n=j(null),o=j(null),{useHeader:s,banner:d,title:c,discordName:p,discordLink:m,versionNumber:y}=$e;function h(){window.open(m,"mywindow")}return(b,v)=>(w(),D(N,null,[r(s)?(w(),D("div",hl({key:0,class:"nav"},b.$attrs),[r(d)?(w(),D("img",{key:0,src:r(d),class:"banner",alt:r(c)},null,8,gd)):(w(),D("div",fd,Be(r(c)),1)),f("div",{onClick:v[0]||(v[0]=E=>{var _;return(_=o.value)==null?void 0:_.open()}),class:"version-container"},[i(mt,{display:"Changelog",direction:r(Ie).Down,class:"version"},{default:ue(()=>[f("span",null,"v"+Be(r(y)),1)]),_:1},8,["direction"])]),hd,f("div",yd,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",bd,[r(m)?(w(),D("li",wd,[f("a",{href:r(m),target:"_blank"},Be(r(p)),9,Ad)])):O("",!0),Cd,kd])]),f("div",null,[f("a",Ed,[i(mt,{display:"Forums",direction:r(Ie).Down,yoffset:"5px"},{default:ue(()=>[_d]),_:1},8,["direction"])])]),f("div",{onClick:v[1]||(v[1]=E=>{var _;return(_=t.value)==null?void 0:_.open()})},[i(mt,{display:"Info",direction:r(Ie).Down,class:"info"},{default:ue(()=>[Sd]),_:1},8,["direction"])]),f("div",{onClick:v[2]||(v[2]=E=>{var _;return(_=l.value)==null?void 0:_.open()})},[i(mt,{display:"Saves",direction:r(Ie).Down,xoffset:"-20px"},{default:ue(()=>[Bd]),_:1},8,["direction"])]),f("div",{onClick:v[3]||(v[3]=E=>{var _;return(_=n.value)==null?void 0:_.open()})},[i(mt,{display:"Options",direction:r(Ie).Down,xoffset:"-66px"},{default:ue(()=>[Nd]),_:1},8,["direction"])])],16)):(w(),D("div",hl({key:1,class:"overlay-nav"},b.$attrs),[f("div",{onClick:v[4]||(v[4]=E=>{var _;return(_=o.value)==null?void 0:_.open()}),class:"version-container"},[i(mt,{display:"Changelog",direction:r(Ie).Right,xoffset:"25%",class:"version"},{default:ue(()=>[f("span",null,"v"+Be(r(y)),1)]),_:1},8,["direction"])]),f("div",{onClick:v[5]||(v[5]=E=>{var _;return(_=l.value)==null?void 0:_.open()})},[i(mt,{display:"Saves",direction:r(Ie).Right},{default:ue(()=>[Id]),_:1},8,["direction"])]),f("div",{onClick:v[6]||(v[6]=E=>{var _;return(_=n.value)==null?void 0:_.open()})},[i(mt,{display:"Options",direction:r(Ie).Right},{default:ue(()=>[Md]),_:1},8,["direction"])]),f("div",{onClick:v[7]||(v[7]=E=>{var _;return(_=t.value)==null?void 0:_.open()})},[i(mt,{display:"Info",direction:r(Ie).Right},{default:ue(()=>[Dd]),_:1},8,["direction"])]),f("div",null,[f("a",xd,[i(mt,{display:"Forums",direction:r(Ie).Right,xoffset:"7px"},{default:ue(()=>[Pd]),_:1},8,["direction"])])]),f("div",Td,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",Fd,[r(m)?(w(),D("li",Ud,[f("a",{href:r(m),target:"_blank"},Be(r(p)),9,Rd)])):O("",!0),Od,Gd])])],16)),i(ku,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),i(Zn,{ref_key:"savesManager",ref:l},null,512),i(Bu,{ref_key:"options",ref:n},null,512),i(nu,{ref_key:"changelog",ref:o},null,512)],64))}});var ei=Te($d,[["__scopeId","data-v-8495e562"]]);const Qa=e=>(rl("data-v-248e2ebb"),e=e(),ul(),e),qd={class:"inner-tab"},Qd={key:1},Vd=Qa(()=>f("br",null,null,-1)),Ld=u(" You can help continue the "),Hd=Qa(()=>f("i",null,"advent",-1)),jd=u("ure at: "),Wd=Qa(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")],-1)),Jd=ce({__name:"Game",setup(e){const t=zt(ie,"tabs"),l=g(()=>Object.keys(Ct)),n=$e.useHeader,o=yl(X.loreBody);function s(d){const{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:v}=d;return{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:v}}return(d,c)=>(w(),D("div",{class:et(["tabs-container",{useHeader:r(n)}])},[(w(!0),D(N,null,Sa(r(t),(p,m)=>{var y,h;return w(),D("div",{key:m,class:et(["tab",r((y=r(Ct)[p])==null?void 0:y.classes)]),ref_for:!0,ref:`tab-${m}`,style:it(r((h=r(Ct)[p])==null?void 0:h.style))},[m===0&&!r(n)?(w(),oe(ei,{key:0})):O("",!0),f("div",qd,[r(l).includes(p)?(w(),oe(eu,hl({key:0},s(r(Ct)[p]),{index:m,tab:()=>{var b;return(b=d.$refs[`tab-${m}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(w(),oe(ze(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),i(yt,{modelValue:r(X).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r(X).showLoreModal.value=p)},{header:ue(()=>[f("h2",null,Be(r(X).loreTitle.value),1)]),body:ue(()=>[r(o)?(w(),oe(ze(r(o)),{key:0})):O("",!0),r(X).loreScene.value!==-1?(w(),D("div",Qd,[i(Xr,{day:r(X).loreScene.value},null,8,["day"]),Vd,Ld,Hd,jd,Wd])):O("",!0)]),_:1},8,["modelValue"])],2))}});var zd=Te(Jd,[["__scopeId","data-v-248e2ebb"]]);const zl=e=>(rl("data-v-4a50ce42"),e=e(),ul(),e),Kd={class:"game-over-modal-header"},Xd=["src","alt"],Yd={class:"game-over-modal-title"},Zd=zl(()=>f("h2",null,"Congratulations!",-1)),ec={key:0},tc=zl(()=>f("br",null,null,-1)),lc=zl(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ac=zl(()=>f("br",null,null,-1)),nc=["href"],ic=zl(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),oc=ce({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:n,discordLink:o,versionNumber:s,versionTitle:d}=$e,c=g(()=>da(ie.timePlayed)),p=g(()=>$a.value&&!ie.keepGoing),m=zt(ie,"autosave");function y(){ie.keepGoing=!0}function h(){El(Dl())}return(b,v)=>(w(),oe(yt,{"model-value":r(p)},{header:ue(()=>[f("div",Kd,[r(l)?(w(),D("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Xd)):O("",!0),f("div",Yd,[Zd,f("h4",null,"You've beaten "+Be(r(t))+" v"+Be(r(s))+": "+Be(r(d)),1)])])]),body:ue(({shown:E})=>[E?(w(),D("div",ec,[f("div",null,"It took you "+Be(r(c))+" to beat the game.",1),tc,lc,ac,f("div",null,[f("a",{href:r(o),class:"game-over-modal-discord-link"},[ic,u(" "+Be(r(n)),1)],8,nc)]),i(sl,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":v[0]||(v[0]=_=>vt(m)?m.value=_:null)},null,8,["modelValue"])])):O("",!0)]),footer:ue(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:y,class:"button"},"Keep Going"),f("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var sc=Te(oc,[["__scopeId","data-v-4a50ce42"]]);const va=e=>(rl("data-v-3de07c06"),e=e(),ul(),e),rc=va(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),uc={key:0},dc=va(()=>f("br",null,null,-1)),cc=["href"],pc=va(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),mc=va(()=>f("br",null,null,-1)),vc={class:"nan-footer"},gc=ce({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=$e,n=zt(ie,"autosave"),o=zt(dt,"hasNaN"),s=j(null),d=g(()=>{var v;return(v=dt.NaNPath)==null?void 0:v.join(".")}),c=g(()=>{var v;return(v=dt.NaNPath)==null?void 0:v.slice(-1)[0]}),p=g(()=>dt.NaNReceiver&&c.value?dt.NaNReceiver[c.value]:null),m=g({get(){return ie.devSpeed===0},set(v){ie.devSpeed=v?null:0}});function y(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(0),dt.hasNaN=!1)}function h(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(1),dt.hasNaN=!1)}function b(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(NaN),dt.hasNaN=!1)}return(v,E)=>(w(),D(N,null,[i(yt,hl({modelValue:r(o),"onUpdate:modelValue":E[4]||(E[4]=_=>vt(o)?o.value=_:null)},v.$attrs),{header:ue(()=>[rc]),body:ue(()=>[f("div",null,[u(' Attempted to assign "'+Be(r(d))+'" to NaN',1),r(p)?(w(),D("span",uc,Be(" ")+"(previously "+Be(r(V)(r(p)))+")",1)):O("",!0),u(". Auto-saving has been "+Be(r(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),dc,f("div",null,[f("a",{href:r(l),class:"nan-modal-discord-link"},[pc,u(" "+Be(r(t)),1)],8,cc)]),mc,i(sl,{title:"Autosave",modelValue:r(n),"onUpdate:modelValue":E[0]||(E[0]=_=>vt(n)?n.value=_:null)},null,8,["modelValue"]),r($e).enablePausing?(w(),oe(sl,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":E[1]||(E[1]=_=>vt(m)?m.value=_:null)},null,8,["modelValue"])):O("",!0)]),footer:ue(()=>[f("div",vc,[f("button",{onClick:E[2]||(E[2]=_=>{var x;return(x=s.value)==null?void 0:x.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:y,class:"button"},"Set to 0"),f("button",{onClick:h,class:"button"},"Set to 1"),r(p)&&r(a).neq(r(p),0)&&r(a).neq(r(p),1)?(w(),D("button",{key:0,onClick:E[3]||(E[3]=_=>o.value=!1),class:"button"}," Set to previous ")):O("",!0),f("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),i(Zn,{ref_key:"savesManager",ref:s},null,512)],64))}});var fc=Te(gc,[["__scopeId","data-v-3de07c06"]]);const hc={key:0,class:"tpsDisplay"},yc={key:0,class:"low"},bc=ce({__name:"TPS",setup(e){const t=g(()=>a.div(dt.lastTenTicks.length,dt.lastTenTicks.reduce((s,d)=>s+d,0))),l=j([]);Ft(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const n=g(()=>l.value.reduce((s,d)=>a.max(s,d),0)),o=g(()=>a.sub(t.value,n.value).gt(1));return(s,d)=>r(t).isNan()?O("",!0):(w(),D("div",hc,[u(" TPS: "+Be(r(te)(r(t)))+" ",1),i(ra,{name:"fade"},{default:ue(()=>[r(o)?(w(),D("span",yc,Be(r(te)(r(n))),1)):O("",!0)]),_:1})]))}});var wc=Te(bc,[["__scopeId","data-v-46a3ed5b"]]);var Ac=ce({__name:"App",setup(e){const t=$e.useHeader,l=g(()=>Bl[tt.theme].variables),n=zt(tt,"showTPS"),o=g(()=>Pe(S(()=>i(N,null,[Ro.map(ee)]))));return(s,d)=>(w(),D(N,null,[f("div",{id:"modal-root",style:it(r(l))},null,4),f("div",{class:et(["app",{useHeader:r(t)}]),style:it(r(l))},[r(t)?(w(),oe(ei,{key:0})):O("",!0),i(zd),r(r(n))?(w(),oe(wc,{key:1})):O("",!0),i(sc),i(fc),(w(),oe(ze(r(o))))],6)],64))}});var Cc=Te(Ac,[["__scopeId","data-v-580927bb"]]);function kc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e;let d,c;const p=async(m=!0)=>{m&&(d==null||d.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),c&&c.waiting&&await yi(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new hi("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",m=>{m.isUpdate||n==null||n()});{const m=()=>{l==null||l()};d.addEventListener("waiting",m),d.addEventListener("externalwaiting",m)}d.register({immediate:t}).then(m=>{c=m,o==null||o(m)}).catch(m=>{s==null||s(m)})}return p}function Ec(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e,d=j(!1),c=j(!1);return{updateServiceWorker:kc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,n==null||n()},onRegistered:o,onRegisterError:s}),offlineReady:c,needRefresh:d}}document.title=$e.title;window.projInfo=$e;if($e.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 xo();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return go}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.d514f92e.js"),["assets/gameLoop.d514f92e.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=ci(Cc);e.emit("setupVue",l),l.mount("#app"),_l(()=>{const n=cn(),{updateServiceWorker:o}=Ec({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,dt as a,$e as b,Ur as c,je as g,Ta as l,ie as p,tt as s}; +${k}`)}}return m[I]}Jt(l,I=>{I&&Object.keys(m).forEach(k=>delete m[k])});const h=g(()=>tt.saves.reduce((I,k)=>(I[k]=y(k),I),{}));function b(I){let k;switch(ie.id===I?k=Bn(ie[ut]):k=JSON.stringify(h.value[I]),Ge.exportEncoding){default:console.warn(`Unknown save encoding: ${Ge.exportEncoding}. Defaulting to lz`);case"lz":k=vl.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const F=document.createElement("textarea");F.value=k,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(I){ie.id===I&&Qt();const k={...h.value[I],id:ea()};Qt(k),tt.saves.push(k.id)}function E(I){tt.saves=tt.saves.filter(k=>k!==I),localStorage.removeItem(I),m[I]=void 0}function _(I){h.value[ie.id].time=ie.time,Qt(),m[ie.id]=void 0,El(h.value[I]),m[I]=void 0}function x(I){if(d.value=I,_l(()=>{d.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=vl.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const k=JSON.parse(I);k.id=ea(),Qt(k),tt.saves.push(k.id),_(k.id)}function z(I,k){const F=h.value[I];F&&(F.name=k,ie.id===I?(ie.name=k,Qt()):(Qt(F),m[I]=void 0))}return(I,k)=>(w(),oe(yt,{modelValue:l.value,"onUpdate:modelValue":k[4]||(k[4]=F=>l.value=F),ref_key:"modal",ref:n},{header:ue(()=>[sd]),body:ue(({shown:F})=>[F?(w(),oe(r(gi),{key:0,list:r(tt).saves,handle:".handle",itemKey:Y=>Y},{item:ue(({element:Y})=>[i(od,{save:r(h)[Y],onOpen:Ae=>_(Y),onExport:Ae=>b(Y),onEditName:Ae=>z(Y,Ae),onDuplicate:Ae=>v(Y),onDelete:Ae=>E(Y)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):q("",!0)]),footer:ue(()=>[f("div",rd,[i(Yn,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:o.value})},null,8,["modelValue","class"]),f("div",ud,[dd,f("div",cd,[f("button",{class:"button",onClick:k[1]||(k[1]=F=>_(r(Dl)().id))},"New Game"),Object.keys(r(p)).length>0?(w(),oe(qa,{key:0,options:r(p),modelValue:d.value,"onUpdate:modelValue":k[2]||(k[2]=F=>x(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):q("",!0)])]),f("div",pd,[md,f("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Zn=Te(vd,[["__scopeId","data-v-3b9991aa"]]);const Ot=e=>(rl("data-v-8495e562"),e=e(),ul(),e),gd=["src","alt"],fd={key:1,class:"title"},hd=Ot(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yd={class:"discord"},bd={class:"discord-links"},wd={key:0},Ad=["href"],Cd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),kd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Ed={href:"https://forums.moddingtree.com/",target:"_blank"},_d=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Sd=Ot(()=>f("span",{class:"material-icons"},"info",-1)),Bd=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Nd=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Md=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Id=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Dd=Ot(()=>f("span",{class:"material-icons"},"info",-1)),xd={href:"https://forums.moddingtree.com/",target:"_blank"},Pd=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Td={class:"discord"},Fd={class:"discord-links"},Ud={key:0},Rd=["href"],Od=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),qd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Gd=ce({__name:"Nav",setup(e){const t=W(null),l=W(null),n=W(null),o=W(null),{useHeader:s,banner:d,title:c,discordName:p,discordLink:m,versionNumber:y}=Ge;function h(){window.open(m,"mywindow")}return(b,v)=>(w(),D(N,null,[r(s)?(w(),D("div",hl({key:0,class:"nav"},b.$attrs),[r(d)?(w(),D("img",{key:0,src:r(d),class:"banner",alt:r(c)},null,8,gd)):(w(),D("div",fd,Be(r(c)),1)),f("div",{onClick:v[0]||(v[0]=E=>{var _;return(_=o.value)==null?void 0:_.open()}),class:"version-container"},[i(mt,{display:"Changelog",direction:r(Me).Down,class:"version"},{default:ue(()=>[f("span",null,"v"+Be(r(y)),1)]),_:1},8,["direction"])]),hd,f("div",yd,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",bd,[r(m)?(w(),D("li",wd,[f("a",{href:r(m),target:"_blank"},Be(r(p)),9,Ad)])):q("",!0),Cd,kd])]),f("div",null,[f("a",Ed,[i(mt,{display:"Forums",direction:r(Me).Down,yoffset:"5px"},{default:ue(()=>[_d]),_:1},8,["direction"])])]),f("div",{onClick:v[1]||(v[1]=E=>{var _;return(_=t.value)==null?void 0:_.open()})},[i(mt,{display:"Info",direction:r(Me).Down,class:"info"},{default:ue(()=>[Sd]),_:1},8,["direction"])]),f("div",{onClick:v[2]||(v[2]=E=>{var _;return(_=l.value)==null?void 0:_.open()})},[i(mt,{display:"Saves",direction:r(Me).Down,xoffset:"-20px"},{default:ue(()=>[Bd]),_:1},8,["direction"])]),f("div",{onClick:v[3]||(v[3]=E=>{var _;return(_=n.value)==null?void 0:_.open()})},[i(mt,{display:"Options",direction:r(Me).Down,xoffset:"-66px"},{default:ue(()=>[Nd]),_:1},8,["direction"])])],16)):(w(),D("div",hl({key:1,class:"overlay-nav"},b.$attrs),[f("div",{onClick:v[4]||(v[4]=E=>{var _;return(_=o.value)==null?void 0:_.open()}),class:"version-container"},[i(mt,{display:"Changelog",direction:r(Me).Right,xoffset:"25%",class:"version"},{default:ue(()=>[f("span",null,"v"+Be(r(y)),1)]),_:1},8,["direction"])]),f("div",{onClick:v[5]||(v[5]=E=>{var _;return(_=l.value)==null?void 0:_.open()})},[i(mt,{display:"Saves",direction:r(Me).Right},{default:ue(()=>[Md]),_:1},8,["direction"])]),f("div",{onClick:v[6]||(v[6]=E=>{var _;return(_=n.value)==null?void 0:_.open()})},[i(mt,{display:"Options",direction:r(Me).Right},{default:ue(()=>[Id]),_:1},8,["direction"])]),f("div",{onClick:v[7]||(v[7]=E=>{var _;return(_=t.value)==null?void 0:_.open()})},[i(mt,{display:"Info",direction:r(Me).Right},{default:ue(()=>[Dd]),_:1},8,["direction"])]),f("div",null,[f("a",xd,[i(mt,{display:"Forums",direction:r(Me).Right,xoffset:"7px"},{default:ue(()=>[Pd]),_:1},8,["direction"])])]),f("div",Td,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",Fd,[r(m)?(w(),D("li",Ud,[f("a",{href:r(m),target:"_blank"},Be(r(p)),9,Rd)])):q("",!0),Od,qd])])],16)),i(ku,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),i(Zn,{ref_key:"savesManager",ref:l},null,512),i(Bu,{ref_key:"options",ref:n},null,512),i(nu,{ref_key:"changelog",ref:o},null,512)],64))}});var ei=Te(Gd,[["__scopeId","data-v-8495e562"]]);const Qa=e=>(rl("data-v-248e2ebb"),e=e(),ul(),e),$d={class:"inner-tab"},Qd={key:1},Ld=Qa(()=>f("br",null,null,-1)),Vd=u(" You can help continue the "),Hd=Qa(()=>f("i",null,"advent",-1)),jd=u("ure at: "),Wd=Qa(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")],-1)),Jd=ce({__name:"Game",setup(e){const t=zt(ie,"tabs"),l=g(()=>Object.keys(Ct)),n=Ge.useHeader,o=yl(X.loreBody);function s(d){const{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:v}=d;return{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:v}}return(d,c)=>(w(),D("div",{class:et(["tabs-container",{useHeader:r(n)}])},[(w(!0),D(N,null,Sa(r(t),(p,m)=>{var y,h;return w(),D("div",{key:m,class:et(["tab",r((y=r(Ct)[p])==null?void 0:y.classes)]),ref_for:!0,ref:`tab-${m}`,style:it(r((h=r(Ct)[p])==null?void 0:h.style))},[m===0&&!r(n)?(w(),oe(ei,{key:0})):q("",!0),f("div",$d,[r(l).includes(p)?(w(),oe(eu,hl({key:0},s(r(Ct)[p]),{index:m,tab:()=>{var b;return(b=d.$refs[`tab-${m}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(w(),oe(ze(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),i(yt,{modelValue:r(X).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r(X).showLoreModal.value=p)},{header:ue(()=>[f("h2",null,Be(r(X).loreTitle.value),1)]),body:ue(()=>[r(o)?(w(),oe(ze(r(o)),{key:0})):q("",!0),r(X).loreScene.value!==-1?(w(),D("div",Qd,[i(Xr,{day:r(X).loreScene.value},null,8,["day"]),Ld,Vd,Hd,jd,Wd])):q("",!0)]),_:1},8,["modelValue"])],2))}});var zd=Te(Jd,[["__scopeId","data-v-248e2ebb"]]);const zl=e=>(rl("data-v-4a50ce42"),e=e(),ul(),e),Kd={class:"game-over-modal-header"},Xd=["src","alt"],Yd={class:"game-over-modal-title"},Zd=zl(()=>f("h2",null,"Congratulations!",-1)),ec={key:0},tc=zl(()=>f("br",null,null,-1)),lc=zl(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ac=zl(()=>f("br",null,null,-1)),nc=["href"],ic=zl(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),oc=ce({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:n,discordLink:o,versionNumber:s,versionTitle:d}=Ge,c=g(()=>da(ie.timePlayed)),p=g(()=>Ga.value&&!ie.keepGoing),m=zt(ie,"autosave");function y(){ie.keepGoing=!0}function h(){El(Dl())}return(b,v)=>(w(),oe(yt,{"model-value":r(p)},{header:ue(()=>[f("div",Kd,[r(l)?(w(),D("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Xd)):q("",!0),f("div",Yd,[Zd,f("h4",null,"You've beaten "+Be(r(t))+" v"+Be(r(s))+": "+Be(r(d)),1)])])]),body:ue(({shown:E})=>[E?(w(),D("div",ec,[f("div",null,"It took you "+Be(r(c))+" to beat the game.",1),tc,lc,ac,f("div",null,[f("a",{href:r(o),class:"game-over-modal-discord-link"},[ic,u(" "+Be(r(n)),1)],8,nc)]),i(sl,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":v[0]||(v[0]=_=>vt(m)?m.value=_:null)},null,8,["modelValue"])])):q("",!0)]),footer:ue(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:y,class:"button"},"Keep Going"),f("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var sc=Te(oc,[["__scopeId","data-v-4a50ce42"]]);const va=e=>(rl("data-v-3de07c06"),e=e(),ul(),e),rc=va(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),uc={key:0},dc=va(()=>f("br",null,null,-1)),cc=["href"],pc=va(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),mc=va(()=>f("br",null,null,-1)),vc={class:"nan-footer"},gc=ce({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Ge,n=zt(ie,"autosave"),o=zt(dt,"hasNaN"),s=W(null),d=g(()=>{var v;return(v=dt.NaNPath)==null?void 0:v.join(".")}),c=g(()=>{var v;return(v=dt.NaNPath)==null?void 0:v.slice(-1)[0]}),p=g(()=>dt.NaNReceiver&&c.value?dt.NaNReceiver[c.value]:null),m=g({get(){return ie.devSpeed===0},set(v){ie.devSpeed=v?null:0}});function y(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(0),dt.hasNaN=!1)}function h(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(1),dt.hasNaN=!1)}function b(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(NaN),dt.hasNaN=!1)}return(v,E)=>(w(),D(N,null,[i(yt,hl({modelValue:r(o),"onUpdate:modelValue":E[4]||(E[4]=_=>vt(o)?o.value=_:null)},v.$attrs),{header:ue(()=>[rc]),body:ue(()=>[f("div",null,[u(' Attempted to assign "'+Be(r(d))+'" to NaN',1),r(p)?(w(),D("span",uc,Be(" ")+"(previously "+Be(r(V)(r(p)))+")",1)):q("",!0),u(". Auto-saving has been "+Be(r(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),dc,f("div",null,[f("a",{href:r(l),class:"nan-modal-discord-link"},[pc,u(" "+Be(r(t)),1)],8,cc)]),mc,i(sl,{title:"Autosave",modelValue:r(n),"onUpdate:modelValue":E[0]||(E[0]=_=>vt(n)?n.value=_:null)},null,8,["modelValue"]),r(Ge).enablePausing?(w(),oe(sl,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":E[1]||(E[1]=_=>vt(m)?m.value=_:null)},null,8,["modelValue"])):q("",!0)]),footer:ue(()=>[f("div",vc,[f("button",{onClick:E[2]||(E[2]=_=>{var x;return(x=s.value)==null?void 0:x.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:y,class:"button"},"Set to 0"),f("button",{onClick:h,class:"button"},"Set to 1"),r(p)&&r(a).neq(r(p),0)&&r(a).neq(r(p),1)?(w(),D("button",{key:0,onClick:E[3]||(E[3]=_=>o.value=!1),class:"button"}," Set to previous ")):q("",!0),f("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),i(Zn,{ref_key:"savesManager",ref:s},null,512)],64))}});var fc=Te(gc,[["__scopeId","data-v-3de07c06"]]);const hc={key:0,class:"tpsDisplay"},yc={key:0,class:"low"},bc=ce({__name:"TPS",setup(e){const t=g(()=>a.div(dt.lastTenTicks.length,dt.lastTenTicks.reduce((s,d)=>s+d,0))),l=W([]);Ft(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const n=g(()=>l.value.reduce((s,d)=>a.max(s,d),0)),o=g(()=>a.sub(t.value,n.value).gt(1));return(s,d)=>r(t).isNan()?q("",!0):(w(),D("div",hc,[u(" TPS: "+Be(r(te)(r(t)))+" ",1),i(ra,{name:"fade"},{default:ue(()=>[r(o)?(w(),D("span",yc,Be(r(te)(r(n))),1)):q("",!0)]),_:1})]))}});var wc=Te(bc,[["__scopeId","data-v-46a3ed5b"]]);var Ac=ce({__name:"App",setup(e){const t=Ge.useHeader,l=g(()=>Bl[tt.theme].variables),n=zt(tt,"showTPS"),o=g(()=>Pe(S(()=>i(N,null,[Ro.map(ee)]))));return(s,d)=>(w(),D(N,null,[f("div",{id:"modal-root",style:it(r(l))},null,4),f("div",{class:et(["app",{useHeader:r(t)}]),style:it(r(l))},[r(t)?(w(),oe(ei,{key:0})):q("",!0),i(zd),r(r(n))?(w(),oe(wc,{key:1})):q("",!0),i(sc),i(fc),(w(),oe(ze(r(o))))],6)],64))}});var Cc=Te(Ac,[["__scopeId","data-v-580927bb"]]);function kc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e;let d,c;const p=async(m=!0)=>{m&&(d==null||d.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),c&&c.waiting&&await yi(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new hi("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",m=>{m.isUpdate||n==null||n()});{const m=()=>{l==null||l()};d.addEventListener("waiting",m),d.addEventListener("externalwaiting",m)}d.register({immediate:t}).then(m=>{c=m,o==null||o(m)}).catch(m=>{s==null||s(m)})}return p}function Ec(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e,d=W(!1),c=W(!1);return{updateServiceWorker:kc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,n==null||n()},onRegistered:o,onRegisterError:s}),offlineReady:c,needRefresh:d}}document.title=Ge.title;window.projInfo=Ge;if(Ge.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 xo();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return go}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.d7c904c7.js"),["assets/gameLoop.d7c904c7.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=ci(Cc);e.emit("setupVue",l),l.mount("#app"),_l(()=>{const n=cn(),{updateServiceWorker:o}=Ec({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,dt as a,Ge as b,Ur as c,je as g,Ta as l,ie as p,tt as s}; diff --git a/index.html b/index.html index a157afe..5105838 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index fdf10f9..3ce71d7 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.d514f92e.js",revision:null},{url:"assets/index.4fa1a689.js",revision:null},{url:"assets/index.734848bb.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"d36ebd74586d483e150a2308125a7164"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.d7c904c7.js",revision:null},{url:"assets/index.3d4863e1.js",revision:null},{url:"assets/index.734848bb.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"1db786e3a8ba40f380d31a01ca6a1300"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));