From 97febfdd1c69341cc45b15d6a40ba416d89cf56a Mon Sep 17 00:00:00 2001 From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com> Date: Thu, 8 Dec 2022 14:08:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?= =?UTF-8?q?pilot/Advent-Incremental@6a9e3cc1ac03fa00d709718a5224466c2f0991?= =?UTF-8?q?76=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eLoop.3fb40232.js => gameLoop.6cb8ae69.js} | 2 +- assets/index.6e411a81.js | 19 ------------------- assets/index.e5372964.js | 19 +++++++++++++++++++ index.html | 2 +- sw.js | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) rename assets/{gameLoop.3fb40232.js => gameLoop.6cb8ae69.js} (91%) delete mode 100644 assets/index.6e411a81.js create mode 100644 assets/index.e5372964.js diff --git a/assets/gameLoop.3fb40232.js b/assets/gameLoop.6cb8ae69.js similarity index 91% rename from assets/gameLoop.3fb40232.js rename to assets/gameLoop.6cb8ae69.js index fec66ae..0604cd3 100644 --- a/assets/gameLoop.3fb40232.js +++ b/assets/gameLoop.6cb8ae69.js @@ -1 +1 @@ -import{_ as d,s as p,p as e,a as f,l as T,D as o,b as m,g as u}from"./index.6e411a81.js";import"./vue.92681fcb.js";import{b1 as c}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,l=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(o.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),o.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||o.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!o.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function x(){l=(await d(()=>import("./index.6e411a81.js").then(function(t){return t.c}),["assets/index.6e411a81.js","assets/index.748c5eae.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,c(l,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{x as startGameLoop}; +import{_ as d,s as p,p as e,a as f,l as T,D as o,b as m,g as u}from"./index.e5372964.js";import"./vue.92681fcb.js";import{b1 as c}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,l=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(o.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),o.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||o.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!o.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function x(){l=(await d(()=>import("./index.e5372964.js").then(function(t){return t.c}),["assets/index.e5372964.js","assets/index.748c5eae.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,c(l,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{x as startGameLoop}; diff --git a/assets/index.6e411a81.js b/assets/index.6e411a81.js deleted file mode 100644 index 5e41f2a..0000000 --- a/assets/index.6e411a81.js +++ /dev/null @@ -1,19 +0,0 @@ -/* empty css */import"./vue.92681fcb.js";import{Z as k,l as Le,aa as W,t as O,ay as xn,ar as Jt,aE as b,a0 as M,aK as Ct,a1 as f,O as P,aG as Cn,A as tt,_ as Q,a8 as o,b6 as H,b8 as Pn,bs as Bl,C as u,aq as Xt,bu as pn,bb as Fn,T as Mi,a7 as p,u as Tn,j as Ai,bv as pl,q as vn,b1 as _t,G as Oe,aC as xl,w as ht,b2 as mt,ao as Ii,I as Ge,J,$ as F,aH as Bt,aF as xt,z as kt,aN as Ie,al as Mn,aL as qt,H as Ei,aJ as Pl,bn as Bi,br as xi,be as Pi}from"./@vue.4ce677c2.js";import{c as Fl}from"./nanoevents.1080beb7.js";import{L as Rt}from"./lz-string.731cedc5.js";import{i as Fi}from"./is-plain-object.906d88e8.js";import{Y as Ti}from"./vue-next-select.a2bfab1d.js";import{s as Di,u as Tl}from"./vue-toastification.6f567382.js";import{D as $i}from"./vuedraggable.7949458c.js";import{p as Ri}from"./vue-textarea-autosize.35804eaf.js";import{v as Ui,n as Oi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const qi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}};qi();const Vi="modulepreload",fl={},Li="./",An=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Li}${l}`,l in fl)return;fl[l]=!0;const a=l.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${s}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":Vi,a||(r.as="script",r.crossOrigin=""),r.href=l,document.head.appendChild(r),a)return new Promise((c,m)=>{r.addEventListener("load",c),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},Gi="./projInfo-schema.json",Hi="Advent Incremental",Qi="An incremental game you play a day at a time, leading up to Christmas!",ji="advent-incremental",zi="thepaperpilot and friends",Ki="",Wi="",Ji="0.3",Xi="Initial Commit",Yi=!0,Zi=!1,ea=2,ta=!0,na=null,la="",ia=["main"],aa=3600,sa=0,oa=!0,ra="base64";var fe={$schema:Gi,title:Hi,description:Qi,id:ji,author:zi,discordName:Ki,discordLink:Wi,versionNumber:Ji,versionTitle:Xi,allowGoBack:Yi,defaultShowSmall:Zi,defaultDecimalsShown:ea,useHeader:ta,banner:na,logo:la,initialTabs:ia,maxTickLength:aa,offlineLimit:sa,enablePausing:oa,exportEncoding:ra};const Ln=17,ua=9e15,ca=Math.log10(9e15),da=1/9e15,ma=308,pa=-324,hl=5,fa=function(){const e=[];for(let n=pa+1;n<=ma;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),jt=[2,Math.E,3,4,5,6,7,8,9,10],ha=[[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]],ga=[[-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]],h=function(t){return i.fromValue_noAlloc(t)},z=function(e,t,n){return i.fromComponents(e,t,n)},X=function(t,n,l){return i.fromComponents_noNormalize(t,n,l)},$t=function(t,n){const l=n+1,a=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,l-a))*Math.pow(10,a-l);return parseFloat(s.toFixed(Math.max(l-a,0)))},Gn=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},va=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 n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const l=e*e;let a=e;return n=n+1/(12*a),a=a*l,n=n+1/(360*a),a=a*l,n=n+1/(1260*a),a=a*l,n=n+1/(1680*a),a=a*l,n=n+1/(1188*a),a=a*l,n=n+691/(360360*a),a=a*l,n=n+7/(1092*a),a=a*l,n=n+3617/(122400*a),Math.exp(n)/t},Dl=.5671432904097838,gl=function(e,t=1e-10){let n,l;if(!Number.isFinite(e)||e===0)return e;if(e===1)return Dl;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let a=0;a<100;++a){if(l=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(l-n).5?1:-1;if(Math.random()*20<1)return X(t,0,1);const n=Math.floor(Math.random()*(e+1));let l=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(l=Math.trunc(l));let a=Math.pow(10,l);return Math.random()>.9&&(a=Math.trunc(a)),z(t,n,a)}static affordGeometricSeries_core(e,t,n,l){const a=t.mul(n.pow(l));return C.floor(e.div(a).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,l){return t.mul(n.pow(l)).mul(C.sub(1,n.pow(e))).div(C.sub(1,n))}static affordArithmeticSeries_core(e,t,n,l){const s=t.add(l.mul(n)).sub(n.div(2)),r=s.pow(2);return s.neg().add(r.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,l){const a=t.add(l.mul(n));return e.div(2).mul(a.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}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=ua)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,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const w=parseFloat(t[0]),v=parseFloat(t[1]),_=t[1].split(";");let N=1;if(_.length===2&&(N=parseFloat(_[1]),isFinite(N)||(N=1)),isFinite(w)&&isFinite(v)){const I=C.pentate(w,v,N);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,this}}const n=e.split("^^");if(n.length===2){const w=parseFloat(n[0]),v=parseFloat(n[1]),_=n[1].split(";");let N=1;if(_.length===2&&(N=parseFloat(_[1]),isFinite(N)||(N=1)),isFinite(w)&&isFinite(v)){const I=C.tetrate(w,v,N);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,this}}const l=e.split("^");if(l.length===2){const w=parseFloat(l[0]),v=parseFloat(l[1]);if(isFinite(w)&&isFinite(v)){const _=C.pow(w,v);return this.sign=_.sign,this.layer=_.layer,this.mag=_.mag,this}}e=e.trim().toLowerCase();let a,s,r=e.split("pt");if(r.length===2){a=10,s=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let w=parseFloat(r[1]);if(isFinite(w)||(w=1),isFinite(a)&&isFinite(s)){const v=C.tetrate(a,s,w);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(r=e.split("p"),r.length===2){a=10,s=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let w=parseFloat(r[1]);if(isFinite(w)||(w=1),isFinite(a)&&isFinite(s)){const v=C.tetrate(a,s,w);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),m=c.length-1;if(m===0){const w=parseFloat(e);if(isFinite(w))return this.fromNumber(w)}else if(m===1){const w=parseFloat(e);if(isFinite(w)&&w!==0)return this.fromNumber(w)}const d=e.split("e^");if(d.length===2){this.sign=1,d[0].charAt(0)=="-"&&(this.sign=-1);let w="";for(let v=0;v=43&&_<=57||_===101)w+=d[1].charAt(v);else return this.layer=parseFloat(w),this.mag=parseFloat(d[1].substr(v+1)),this.normalize(),this}}if(m<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 g=parseFloat(c[c.length-1]);if(m>=2){const w=parseFloat(c[c.length-2]);isFinite(w)&&(g*=Math.sign(w),g+=Gn(w))}if(!isFinite(y))this.sign=c[0]==="-"?-1:1,this.layer=m,this.mag=g;else if(m===1)this.sign=Math.sign(y),this.layer=1,this.mag=g+Math.log10(Math.abs(y));else if(this.sign=Math.sign(y),this.layer=m,m===2){const w=C.mul(z(1,2,g),h(y));return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}else this.mag=g;return this.normalize(),this}fromValue(e){return e instanceof C||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:$t(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:$t(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<=hl?(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):$t(this.m,e)+"e"+$t(this.e,e):this.layer===1?$t(this.m,e)+"e"+$t(this.e,e):this.layer<=hl?(this.sign===-1?"-":"")+"e".repeat(this.layer)+$t(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+$t(this.mag,e)}abs(){return X(this.sign===0?0:1,this.layer,this.mag)}neg(){return X(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?C.dZero:this.layer===0?z(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?C.dZero:this.layer===0?z(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?C.dZero:this.layer===0?z(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?C.dZero:this.layer===0?z(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=h(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 X(0,0,0);let n,l;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(C.cmpabs(this,t)>0?(n=this,l=t):(n=t,l=this),n.layer===0&&l.layer===0)return h(n.sign*n.mag+l.sign*l.mag);const a=n.layer*Math.sign(n.mag),s=l.layer*Math.sign(l.mag);if(a-s>=2)return n;if(a===0&&s===-1){if(Math.abs(l.mag-Math.log10(n.mag))>Ln)return n;{const r=Math.pow(10,Math.log10(n.mag)-l.mag),c=l.sign+n.sign*r;return z(Math.sign(c),1,l.mag+Math.log10(Math.abs(c)))}}if(a===1&&s===0){if(Math.abs(n.mag-Math.log10(l.mag))>Ln)return n;{const r=Math.pow(10,n.mag-Math.log10(l.mag)),c=l.sign+n.sign*r;return z(Math.sign(c),1,Math.log10(l.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(n.mag-l.mag)>Ln)return n;{const r=Math.pow(10,n.mag-l.mag),c=l.sign+n.sign*r;return z(Math.sign(c),1,l.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(h(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return X(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return X(this.sign*t.sign,0,1);let n,l;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,l=t):(n=t,l=this),n.layer===0&&l.layer===0)return h(n.sign*l.sign*n.mag*l.mag);if(n.layer>=3||n.layer-l.layer>=2)return z(n.sign*l.sign,n.layer,n.mag);if(n.layer===1&&l.layer===0)return z(n.sign*l.sign,1,n.mag+Math.log10(l.mag));if(n.layer===1&&l.layer===1)return z(n.sign*l.sign,1,n.mag+l.mag);if(n.layer===2&&l.layer===1){const a=z(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(z(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)));return z(n.sign*l.sign,a.layer+1,a.sign*a.mag)}if(n.layer===2&&l.layer===2){const a=z(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(z(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)));return z(n.sign*l.sign,a.layer+1,a.sign*a.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=h(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?C.dNaN:this.layer===0?z(this.sign,0,1/this.mag):z(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=h(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,l=t.mag>0?t.layer:-t.layer;return n>l?1:nt.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 n=h(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=h(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let l=this.mag,a=n.mag;return this.layer>n.layer&&(a=Gn(a)),this.layer0?z(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):z(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?C.dNaN:this.layer>0?z(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):z(this.sign,0,Math.log10(this.mag))}log(e){return e=h(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?C.dNaN:this.layer===0&&e.layer===0?z(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):C.div(this.log10(),e.log10())}log2(){return this.sign<=0?C.dNaN:this.layer===0?z(this.sign,0,Math.log2(this.mag)):this.layer===1?z(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?z(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):z(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?C.dNaN:this.layer===0?z(this.sign,0,Math.log(this.mag)):this.layer===1?z(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?z(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):z(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=h(e),n=this,l=t;if(n.sign===0)return l.eq(0)?X(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(l.sign===0)return X(1,0,1);if(l.sign===1&&l.layer===0&&l.mag===1)return n;const a=n.absLog10().mul(l).pow10();return this.sign===-1?Math.abs(l.toNumber()%2)%2===1?a.neg():Math.abs(l.toNumber()%2)%2===0?a:C.dNaN:a}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return C.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 z(1,0,t);if(e.sign===0)return C.dOne;e=X(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?z(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?z(-e.sign,e.layer+1,-e.mag):C.dOne}pow_base(e){return h(e).pow(this)}root(e){const t=h(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?C.exp(C.mul(this,C.ln(this).sub(1))):C.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(X(1,0,24)))return h(va(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let l=e,a=12*l,s=1/a,r=t+s;if(r===t||(t=r,l=l*n,a=360*l,s=1/a,r=t-s,r===t))return C.exp(t);t=r,l=l*n,a=1260*l;let c=1/a;return t=t+c,l=l*n,a=1680*l,c=1/a,t=t-c,C.exp(t)}else return this.layer===1?C.exp(C.mul(this,C.ln(this).sub(1))):C.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?C.dOne:this.layer===0&&this.mag<=709.7?h(Math.exp(this.sign*this.mag)):this.layer===0?z(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?z(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):z(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return h(Math.sqrt(this.sign*this.mag));if(this.layer===1)return z(1,2,Math.log10(this.mag)-.3010299956639812);{const e=C.div(X(this.sign,this.layer-1,this.mag),X(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=X(1,0,1)){if(e===1)return C.pow(this,t);if(e===0)return new C(t);if(this.eq(C.dOne))return C.dOne;if(this.eq(-1))return C.pow(this,t);if(e===Number.POSITIVE_INFINITY){const a=this.toNumber();if(a<=1.444667861009766&&a>=.06598803584531254){if(a>1.444667861009099)return new C(Math.E);const s=C.ln(this).neg();return s.lambertw().div(s)}else return a>1.444667861009766?new C(Number.POSITIVE_INFINITY):C.dNaN}if(this.eq(C.dZero)){let a=Math.abs((e+1)%2);return a>1&&(a=2-a),new C(a)}if(e<0)return C.iteratedlog(t,this,-e);t=h(t);const n=e;e=Math.trunc(e);const l=n-e;if(this.gt(C.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let a=0;a3)return X(t.sign,t.layer+(e-a-1),t.mag);if(a>1e4)return t}return t}iteratedexp(e=2,t=X(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return C.tetrate(e,-t,this);e=h(e);let n=h(this);const l=t;t=Math.trunc(t);const a=l-t;if(n.layer-e.layer>3){const s=Math.min(t,n.layer-e.layer-3);t-=s,n.layer-=s}for(let s=0;s1e4)return n}return a>0&&a<1&&(e.eq(10)?n=n.layeradd10(-a):n=n.layeradd(-a,e)),n}slog(e=10){if(e=h(e),e.lte(C.dZero)||e.eq(C.dOne))return C.dNaN;if(e.lt(C.dOne))return this.eq(C.dOne)?C.dZero:this.eq(C.dZero)?C.dNegOne:C.dNaN;if(this.mag<0||this.eq(C.dZero))return C.dNegOne;let t=0,n=h(this);if(n.layer-e.layer>3){const l=n.layer-e.layer-3;t+=l,n.layer-=l}for(let l=0;l<100;++l)if(n.lt(C.dZero))n=C.pow(e,n),t-=1;else{if(n.lte(C.dOne))return h(t+C.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=C.log(n,e)}return h(t)}static slog_critical(e,t){return e>10?t-1:C.critical_section(e,t,ga)}static tetrate_critical(e,t){return C.critical_section(e,t,ha)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let l=0,a=0;for(let c=0;ce){const m=(e-jt[c])/(jt[c+1]-jt[c]);l=n[c][Math.floor(t)]*(1-m)+n[c+1][Math.floor(t)]*m,a=n[c][Math.ceil(t)]*(1-m)+n[c+1][Math.ceil(t)]*m;break}const s=t-Math.floor(t);return l*(1-s)+a*s}layeradd10(e){e=C.fromValue_noAlloc(e).toNumber();const t=h(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 n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let l=0;l<100;++l){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 l=this.slog(t).toNumber()+e;return l>=0?C.tetrate(t,l):Number.isFinite(l)?l>=-1?C.log(C.tetrate(t,l+1),t):C.log(C.log(C.tetrate(t,l+2),t),t):C.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return h(gl(this.toNumber()));if(this.layer===0)return h(gl(this.sign*this.mag));if(this.layer===1)return vl(this);if(this.layer===2)return vl(this);if(this.layer>=3)return X(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return X(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=X(1,0,1)){t=h(t);const n=e;e=Math.trunc(e);const l=n-e;l!==0&&(t.eq(C.dOne)?(++e,t=new C(l)):this.eq(10)?t=t.layeradd10(l):t=t.layeradd(l,this));for(let a=0;a10)return t}return t}sin(){return this.mag<0?this:this.layer===0?h(Math.sin(this.sign*this.mag)):X(0,0,0)}cos(){return this.mag<0?C.dOne:this.layer===0?h(Math.cos(this.sign*this.mag)):X(0,0,0)}tan(){return this.mag<0?this:this.layer===0?h(Math.tan(this.sign*this.mag)):X(0,0,0)}asin(){return this.mag<0?this:this.layer===0?h(Math.asin(this.sign*this.mag)):X(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?h(Math.acos(this.toNumber())):this.layer===0?h(Math.acos(this.sign*this.mag)):X(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?h(Math.atan(this.sign*this.mag)):h(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 C.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return C.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?X(Number.NaN,Number.NaN,Number.NaN):C.ln(this.add(1).div(h(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(C.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 i=C;i.dZero=X(0,0,0);i.dOne=X(1,0,1);i.dNegOne=X(-1,0,1);i.dTwo=X(1,0,2);i.dTen=X(1,0,10);i.dNaN=X(Number.NaN,Number.NaN,Number.NaN);i.dInf=X(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);i.dNegInf=X(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);i.dNumberMax=z(1,0,Number.MAX_VALUE);i.dNumberMin=z(1,0,Number.MIN_VALUE);const ya=new i(1);function un(e,t,n=!0){let l=i.log10(e).floor(),a=i.div(e,i.pow(10,l));a.toStringWithDecimalPlaces(t)==="10"&&(a=ya,l=l.add(1));const s=l.gte(1e9)?He(l,Math.max(Math.max(t,3),fe.defaultDecimalsShown)):l.gte(1e4)?In(l,0):l.toStringWithDecimalPlaces(0);return n?a.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function In(e,t){if(e==null)return"NaN";if(e=new i(e),e.mag<.001)return 0 .toFixed(t);const l=e.toStringWithDecimalPlaces(t).split(".");return l[0]=l[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),l.length==1?l[0]:l[0]+"."+l[1]}function $l(e,t){return e==null?"NaN":(e=new i(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),fe.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const ba=new i("eeee1000"),wa=new i("e100000"),yl=new i("e1000"),Rl=new i(1e9),_a=new i(1e6),ka=new i(1e3),Ca=new i(.98),Na=new i(.001),Ul=new i(0);function He(e,t,n){if(t==null&&(t=fe.defaultDecimalsShown),n=n!=null?n:fe.defaultShowSmall,e=new i(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(ba)){const l=e.slog();return l.gte(_a)?"F"+He(l.floor()):i.pow(10,l.sub(l.floor())).toStringWithDecimalPlaces(3)+"F"+In(l.floor(),0)}else{if(e.gte(wa))return un(e,0,!1);if(e.gte(yl))return un(e,0);if(e.gte(Rl))return un(e,t);if(e.gte(ka))return In(e,0);if(e.gte(Na)||!n)return $l(e,t);if(e.eq(Ul))return 0 .toFixed(t)}return e=Ol(e),e.lt(yl)?un(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):He(e,t)+"\u207B\xB9"}function Se(e){return e=new i(e),e.sign<0?"-"+Se(e.neg()):e.gte(Rl)||e.lte(Ca)&&!e.eq(Ul)?He(e):He(e,0)}function jn(e,t){return t==null&&(t=fe.defaultDecimalsShown),i.lt(e,0)?"-"+jn(i.neg(e),t):i.gt(e,2**51)?He(i.div(e,31536e3))+"y":(e=new i(e).toNumber(),e<60?He(e)+"s":e<3600?Se(Math.floor(e/60))+"m "+He(e%60,t)+"s":e<86400?Se(Math.floor(e/3600))+"h "+Se(Math.floor(e/60)%60)+"m "+Se(e%60)+"s":e<31536e3?Se(Math.floor(e/84600)%365)+"d "+Se(Math.floor(e/3600)%24)+"h "+Se(Math.floor(e/60)%60)+"m":Se(Math.floor(e/31536e3))+"y "+Se(Math.floor(e/84600)%365)+"d "+Se(Math.floor(e/3600)%24)+"h")}function Sa(e,t,n){e=new i(e);let l=e.toStringWithDecimalPlaces(t);return new i(l).gte(n)&&(l=i.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),l}function Ma(e,t){return He(e,t,!0)}function Ol(e){let t=i.log10(e).ceil();const n=i.div(e,i.pow(10,t));return t=t.neg(),e=new i(10).pow(t).times(n),e}function ql(e,t,n=i.dOne){let l=e[0][0],a=e[0][1];for(let s=1;s(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(re||{});const fn=Symbol("DoNotCache");function $(e,t){const n=e[t];Qn(n)&&n.length===0&&!n[fn]?e[t]=k(n.bind(e)):Qn(n)&&(e[t]=n.bind(e),e[t][fn]=!0)}function Ze(e){return Qn(e)&&!e[fn]&&(e=k(e)),e}const Lt=Symbol("Component"),Gt=Symbol("GatherProps");let Ta=0;function ln(e="feature-"){return e+Ta++}var Ke=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Ke||{});function B(e){return e[fn]=!0,e}function U(e,t=2){return e?0:t}function et(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Hl(e,...t){const n=[],l=a=>{Object.keys(a).forEach(s=>{const r=a[s];r&&typeof r=="object"&&(t.includes(r.type)?n.push(r):!(r instanceof i)&&!Le(r)&&l(r))})};return l(e),n}const zt={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 zn=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(zn||{}),yn={classic:zt,paper:{...zt,variables:{...zt.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:{...zt,variables:{...zt.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:{...zt,variables:{...zt.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Te=Fl();document.fonts.onloadingdone=()=>Te.emit("fontsLoaded");var Da=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Te},Symbol.toStringTag,{value:"Module"}));var he=(e,t)=>{const n=e.__vccOpts||e;for(const[l,a]of t)n[l]=a;return n};const $a=W({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var y;const n=O({}),l=new ResizeObserver(c),a=O(null);xn(()=>{const g=a.value;g!=null&&l.observe(g)});let s=!0,r=O((y=a.value)==null?void 0:y.getBoundingClientRect());function c(){s&&(s=!1,Jt(()=>{var g;r.value=(g=a.value)==null?void 0:g.getBoundingClientRect(),Object.values(n.value).filter(w=>w).forEach(w=>w.rect=w.element.getBoundingClientRect()),t("updateNodes",n.value),s=!0}))}Te.on("fontsLoaded",c);const m={attributes:!1,childList:!0,subtree:!1};Cn(Kn,(g,w)=>{const v=new MutationObserver(()=>d(g));v.observe(w,m),n.value[g]={element:w,observer:v,rect:w.getBoundingClientRect()},c()}),Cn(Wn,g=>{var w;(w=n.value[g])==null||w.observer.disconnect(),n.value[g]=void 0,c()}),Cn(Jn,n),Cn(Xn,r);function d(g){const w=n.value[g];w!=null&&(w.rect=w.element.getBoundingClientRect(),t("updateNodes",n.value))}return(g,w)=>(b(),M(P,null,[Ct(g.$slots,"default",{},void 0,!0),f("div",{ref_key:"resizeListener",ref:a,class:"resize-listener"},null,512)],64))}});var Ql=he($a,[["__scopeId","data-v-2b1dc1bc"]]);const Ra=["onPointerdown"],Ua={class:"modal-wrapper"},Oa={class:"modal-container"},qa={class:"modal-header"},Va=p(" default header "),La={class:"modal-body"},Ga=p(" default body "),Ha={class:"modal-footer"},Qa=f("div",{class:"modal-default-flex-grow"},null,-1),rt=W({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const a=tt(e),s=k(()=>a.modelValue||c.value);function r(){n("update:modelValue",!1)}const c=O(!1),m=O(null),d=k(()=>{var y,g;return(g=(y=m.value)==null?void 0:y.nodes)!=null?g:null});return t({isOpen:s,nodes:d}),(y,g)=>(b(),Q(Mi,{to:"#modal-root"},[o(Fn,{name:"modal",onBeforeEnter:g[0]||(g[0]=w=>c.value=!0),onAfterLeave:g[1]||(g[1]=w=>c.value=!1)},{default:H(()=>[Pn(f("div",Xt({class:"modal-mask",onPointerdown:pn(r,["self"])},y.$attrs),[f("div",Ua,[f("div",Oa,[f("div",qa,[Ct(y.$slots,"header",{shown:u(s)},()=>[Va])]),f("div",La,[o(Ql,{ref_key:"contextRef",ref:m},{default:H(()=>[Ct(y.$slots,"body",{shown:u(s)},()=>[Ga])]),_:3},512)]),f("div",Ha,[Ct(y.$slots,"footer",{shown:u(s)},()=>[f("div",{class:"modal-default-footer"},[Qa,f("button",{class:"button modal-default-button",onClick:r}," Close ")])])])])])],16,Ra),[[Bl,e.modelValue]])]),_:3})]))}}),Kn=Symbol("RegisterNode"),Wn=Symbol("UnregisterNode"),Jn=Symbol("Nodes"),Xn=Symbol("Bounds"),it=Tn({});window.layers=it;const en={},yt=[];function St(e,t){return ut(()=>{const n={},l=n.emitter=Fl();if(n.on=l.on.bind(l),n.emit=l.emit.bind(l),n.nodes=O({}),n.id=e,yt.push(e),en[e]=new Set,n.minimized=_e(!1),Object.assign(n,t.call(n)),yt[yt.length-1]==null||yt[yt.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen -Stack: ${yt} -Trying to pop ${n.id}`;return yt.pop(),$(n,"color"),$(n,"display"),$(n,"name"),et(n,"name",n.id),$(n,"minWidth"),et(n,"minWidth",600),$(n,"minimizable"),et(n,"minimizable",!0),n})}function jl(e,t){if(console.info("Adding layer",e.id),it[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,it[e.id]);return}et(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),it[e.id]=e,Te.emit("addLayer",e,t.layers[e.id])}function ja(e){return it[e]}function zl(e){console.info("Removing layer",e.id),Te.emit("removeLayer",e),it[e.id]=void 0}function za(e){zl(e),jl(e,L)}function Ka(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(rt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}Te.on("update",function(t){Object.values(it).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(it).forEach(n=>{n==null||n.emit("update",t)}),Object.values(it).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Wa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Kn,UnregisterNodeInjectionKey:Wn,NodesInjectionKey:Jn,BoundsInjectionKey:Xn,layers:it,persistentRefs:en,addingLayers:yt,createLayer:St,addLayer:jl,getLayer:ja,removeLayer:zl,reloadLayer:za,setupLayerModal:Ka},Symbol.toStringTag,{value:"Module"}));const Yn=Symbol("PersistentState"),Ot=Symbol("DefaultValue"),En=Symbol("StackTrace"),Kl=Symbol("Deleted"),hn=Symbol("NonPersistent"),cn=Symbol("SaveDataPath");function Ja(){var e;return((e=new Error().stack)==null?void 0:e.split(` -`).slice(3,5).map(t=>t.trim()).join(` -`))||""}function _e(e){const t=Le(e)?e:O(e);t[Yn]=t,t[Ot]=Le(e)?e.value:e,t[En]=Ja(),t[Kl]=!1;const n=k({get(){return t.value},set(l){t.value=l}});return n[Ot]=t[Ot],t[hn]=n,t[cn]=void 0,yt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` -Created at: -`+t[En]):en[yt[yt.length-1]].add(t),t}function Xa(e){return e&&typeof e=="object"&&Yn in e}function G(e){return e[hn]}Te.on("addLayer",(e,t)=>{const n=[],l=(a,s=[])=>{let r=!1;return Object.keys(a).forEach(c=>{let m=a[c];if(m&&typeof m=="object")if(xe in m&&(m=m[xe]),Xa(m)){if(r=!0,m[Kl]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,` -Created at: -`+m[En]);return}en[e.id].delete(m);const d=[e.id,...s,c];m[cn]!=null&&JSON.stringify(d)!==JSON.stringify(m[cn])&&console.error(`Persistent ref is being saved to \`${d.join(".")}\` when it's already present at \`${m[cn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[cn]=d;const y=s.reduce((w,v)=>(v in w||(w[v]={}),w[v]),t),g=y[c];y[c]=m[Yn],Ai(y)?g!=null?y[c]=g:y[c]=m[Ot]:g!=null?y[c].value=g:y[c].value=m[Ot]}else!(m instanceof i)&&!Le(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),l(m,[...s,c])&&(pl(m)&&!pl(a)?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.",xe in a?a[xe]:a,c):r=!0))}),r};l(e[xe]),en[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,` -Created at: -`+a[En])}),en[e.id].clear()});const xe=Symbol("ProxyState"),Zt=Symbol("ProxyPath");function ut(e,t={}){const n=t;let l=!1;function a(){return l||(Object.assign(n,e(n)),l=!0),n}return new Proxy(n,{get(s,r){if(r===xe)return a();const c=a()[r];return c&&typeof c=="object"&&hn in c?c[hn]:c},set(s,r,c){return a()[r]=c,!0},has(s,r){return r===xe?!0:Reflect.has(a(),r)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,r){return l||(Object.assign(n,e(n)),l=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Re=window.state=Tn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Wl=vn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Jl(e){return JSON.stringify(e,(t,n)=>u(n))}const Xl={get(e,t){var l;if(t===xe||t===Zt)return e[t];const n=e[xe][t];if(t!=="value"&&(Fi(n)||Array.isArray(n))){if(n!==((l=e[t])==null?void 0:l[xe])){const a=[...e[Zt],t];e[t]=new Proxy({[xe]:n,[Zt]:a},Xl)}return e[t]}return n},set(e,t,n,l){if(!Re.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[xe][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Wl.autosave=!1,Re.hasNaN=!0,Re.NaNPath=[...e[Zt],t],Re.NaNReceiver=l,console.error("Attempted to set NaN value",[...e[Zt],t],e[xe]),"Attempted to set NaN value. See above for details"}return e[xe][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[xe])},has(e,t){return Reflect.has(e[xe],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[xe],t)}};var L=window.player=new Proxy({[xe]:Wl,[Zt]:["player"]},Xl);function Yl(e={}){return Object.assign({id:`${fe.id}-0`,name:"Default Save",tabs:fe.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:fe.id,modVersion:fe.versionNumber,layers:{}},e)}function bt(e){const t=Rt.compressToUTF16(Jl(e!=null?e:L[xe]));return localStorage.setItem((e!=null?e:L[xe]).id,t),t}async function Ya(){es();try{let e=localStorage.getItem(Pe.active);if(e==null){await Kt(tn());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Rt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==fe.id){await Kt(tn());return}t.id=Pe.active,await Kt(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await Kt(tn())}}function tn(){const e=Sn(),t=Yl({id:e});return bt(t),Pe.saves.push(e),t}function Sn(){let e,t=0;do e=`${fe.id}-${t++}`;while(localStorage.getItem(e));return e}const Zn=O(!1);async function Kt(e){console.info("Loading save",e),Zn.value=!0;const{layers:t,removeLayer:n,addLayer:l}=await An(()=>Promise.resolve().then(function(){return Wa}),void 0),{fixOldSave:a,getInitialLayers:s}=await An(()=>Promise.resolve().then(function(){return $o}),void 0);for(const r in t){const c=t[r];c&&n(c)}s(e).forEach(r=>l(r,e)),e=Yl(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,fe.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==fe.versionNumber&&a(e.modVersion,e),Object.assign(L,e),Pe.active=L.id,Te.emit("onLoad")}setInterval(()=>{L.autosave&&bt()},1e3);window.onbeforeunload=()=>{L.autosave&&bt()};window.save=bt;const Za=window.hardReset=async()=>{await Kt(tn())},gn=vn({active:"",saves:[],showTPS:!0,theme:zn.Nordic,unthrottled:!1});_t(gn,e=>{const t=Rt.compressToUTF16(JSON.stringify(e));localStorage.setItem(fe.id,t)},{deep:!0});var Pe=window.settings=gn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:zn.Nordic};Te.emit("loadSettings",e),Object.assign(gn,e),Za()};function es(){try{let e=localStorage.getItem(fe.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Rt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(gn,t)}Te.emit("loadSettings",gn)}catch{}}const Zl=vn([]);function ts(e){Zl.push(e)}const ei=vn([]);function ns(e){ei.push(e)}const ls=vn([]),is={class:"table"},Wt=W({__name:"Column",setup(e){const t=k(()=>yn[Pe.theme].mergeAdjacent);return(n,l)=>(b(),M("div",is,[f("div",{class:Oe(["col",{mergeAdjacent:u(t)}])},[Ct(n.$slots,"default")],2)]))}}),as={class:"table"},el=W({__name:"Row",setup(e){const t=k(()=>yn[Pe.theme].mergeAdjacent);return(n,l)=>(b(),M("div",as,[f("div",{class:Oe(["row",{mergeAdjacent:u(t)}])},[Ct(n.$slots,"default")],2)]))}});function tl(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ii(e)}function ce(e,t="span"){return typeof e=="function"?W({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),W({template:e})):W({render:()=>({})}):e}function de(e){if(Et(e))return typeof e=="function"?e():ce(e);const t=e[Lt];return o(t,e[Gt](),null)}function Fe(...e){let t;return o(el,null,tl(t=e.map(de))?t:{default:()=>[t]})}function dn(...e){let t;return o(Wt,null,tl(t=e.map(de))?t:{default:()=>[t]})}function wt(e){if(Et(e))return typeof e=="function"?e():typeof e=="string"?o(P,null,[e]):o(e,null,null);const t=e[Lt];return o(t,e[Gt](),null)}function ss(...e){let t;return o(Wt,null,tl(t=e.map(wt))?t:{default:()=>[t]})}function Et(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[fn]===!0}function ti(e,t,n){const l=O(null),a=O(void 0);function s(m){l.value||(l.value=setInterval(c,250)),a.value=m,n&&(n.value=!0)}function r(){l.value&&(clearInterval(l.value),l.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return xl(r),{start:s,stop:r,handleHolding:c}}function os(e,t){const n=k(()=>e.filter(l=>u(l.visibility)===Ke.Visible&&t(l)));return{firstFeature:k(()=>n.value[0]),collapsedContent:B(()=>dn(...n.value.slice(1))),hasCollapsedContent:k(()=>n.value.length>1)}}function Bn(e,t="div"){const n=ht();return mt(()=>{n.value=ce(We(e),t)}),n}function Vt(e,t="div"){const n=ht(null);return mt(()=>{const l=We(e);n.value=l==null?null:ce(l,t)}),n}function rs(e){return k(()=>We(e))}function We(e){return u(u(e))}function R(...e){return e.includes(Object)||e.push(Object),e}const ve=W({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),M("div",{style:Ge({width:e.width,height:e.height})},null,4))}});const us={},cs={class:"notif"};function ds(e,t){return b(),M("div",cs,"!")}var bl=he(us,[["render",ds],["__scopeId","data-v-66323fd4"]]);const $n=e=>(Bt("data-v-9de19f28"),e=e(),xt(),e),ms={key:0,class:"day feature dontMerge opened"},ps={class:"date"},fs=p("Dec"),hs=$n(()=>f("br",null,null,-1)),gs={class:"date"},vs=p("Dec"),ys=$n(()=>f("br",null,null,-1)),bs=$n(()=>f("div",{class:"doors"},null,-1)),ws={class:"date"},_s=p("Dec"),ks=$n(()=>f("br",null,null,-1)),Cs={key:0,class:"material-icons lock"},Ns={key:1,class:"timer"},Ss={key:2,class:"timer"},Ms=W({__name:"Day",props:{day:null,symbol:null,layer:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,l=k(()=>n.layer&&i.gte(K.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function a(){l.value&&t("unlockLayer")}return(s,r)=>e.opened.value?(b(),M("div",ms,[o(Fn,{appear:"",name:"door"},{default:H(()=>[f("div",{class:"doors",onClick:r[0]||(r[0]=c=>t("openLayer"))},[f("div",ps,[fs,hs,p(J(e.day),1)]),f("div",gs,[vs,ys,p(J(e.day),1)])])]),_:1}),f("div",{class:"icon",style:Ge({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:r[1]||(r[1]=c=>t("openLore"))},"?"),u(e.shouldNotify)?(b(),Q(bl,{key:0})):F("",!0)])):(b(),M("div",{key:1,class:Oe(["day feature dontMerge",{can:u(l),locked:!u(l),canOpen:u(l)}]),onClick:a},[bs,f("div",ws,[_s,ks,p(J(e.day),1)]),u(l)?F("",!0):(b(),M("div",Cs,"lock")),u(K).day.value===e.day&&!u(l)?(b(),M("div",Ns,J(u(jn)(u(K).timeUntilNewDay.value,0)),1)):u(K).day.value===e.day&&e.layer==null?(b(),M("div",Ss,"NYI")):F("",!0),u(l)?(b(),Q(bl,{key:3})):F("",!0)],2))}});var As=he(Ms,[["__scopeId","data-v-9de19f28"]]);const Is=W({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,n=Bn(kt(t,"display")),l=Bn(kt(t,"content"));return(a,s)=>(b(),Q(Wt,{class:"collapsible-container"},{default:H(()=>[f("button",{onClick:s[0]||(s[0]=r=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(b(),Q(Ie(u(n))))]),e.collapsed.value?F("",!0):(b(),Q(Ie(u(l)),{key:0}))]),_:1}))}});var Es=he(Is,[["__scopeId","data-v-a72c16aa"]]);const Bs={key:0},xs={key:0,class:"mark star"},Ps=["src"],Fs=W({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(b(),M("div",Bs,[e.mark===!0?(b(),M("div",xs)):(b(),M("img",{key:1,class:"mark",src:e.mark},null,8,Ps))])):F("",!0)}});var Rn=he(Fs,[["__scopeId","data-v-2207999f"]]);const Ts=W({__name:"Node",props:{id:null},setup(e){const n=tt(e),l=Mn(Kn,()=>{}),a=Mn(Wn,()=>{}),s=ht(null),r=k(()=>s.value&&s.value.parentElement);return _t([r,n.id],([c,m],[d,y])=>{d&&a(u(y)),c&&l(m,c)}),xl(()=>a(u(n.id))),(c,m)=>(b(),M("div",{class:"node",ref_key:"node",ref:s},null,512))}});var bn=he(Ts,[["__scopeId","data-v-a48cb382"]]);const Ds=W({props:{progress:{type:R(String,Object,Number),required:!0},width:{type:R(Number),required:!0},height:{type:R(Number),required:!0},direction:{type:R(String),required:!0},display:R(Object,String,Function),visibility:{type:R(Number),required:!0},style:R(Object,String,Array),classes:R(Object),borderStyle:R(Object,String,Array),textStyle:R(Object,String,Array),baseStyle:R(Object,String,Array),fillStyle:R(Object,String,Array),mark:R(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Rn,Node:bn},setup(e){const{progress:t,width:n,height:l,direction:a,display:s}=tt(e),r=k(()=>{let d=t.value instanceof i?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(d,0),1))*100}),c=k(()=>{const d={width:We(n)+.5+"px",height:We(l)+.5+"px"};switch(u(a)){case re.Up:d.clipPath=`inset(${r.value}% 0% 0% 0%)`,d.width=We(n)+1+"px";break;case re.Down:d.clipPath=`inset(0% 0% ${r.value}% 0%)`,d.width=We(n)+1+"px";break;case re.Right:d.clipPath=`inset(0% ${r.value}% 0% 0%)`;break;case re.Left:d.clipPath=`inset(0% 0% 0% ${r.value} + '%)`;break;case re.Default:d.clipPath="inset(0% 50% 0% 0%)";break}return d}),m=Vt(s);return{normalizedProgress:r,barStyle:c,component:m,unref:u,Visibility:Ke}}});function $s(e,t,n,l,a,s){var m,d,y,g,w,v,_;const r=qt("MarkNode"),c=qt("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("div",{key:0,style:Ge([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),class:Oe({bar:!0,...e.unref(e.classes)})},[f("div",{class:"overlayTextContainer border",style:Ge([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(d=e.unref(e.borderStyle))!=null?d:{}])},[e.component?(b(),M("span",{key:0,class:"overlayText",style:Ge(e.unref(e.textStyle))},[(b(),Q(Ie(e.component)))],4)):F("",!0)],4),f("div",{class:"border",style:Ge([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(y=e.unref(e.style))!=null?y:{},(g=e.unref(e.baseStyle))!=null?g:{},(w=e.unref(e.borderStyle))!=null?w:{}])},[f("div",{class:"fill",style:Ge([e.barStyle,(v=e.unref(e.style))!=null?v:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):F("",!0)}var Rs=he(Ds,[["render",$s],["__scopeId","data-v-02d0d7b2"]]);const Us=Symbol("Bar");function It(e){return ut(()=>{const t=e();return t.id=ln("bar-"),t.type=Us,t[Lt]=Rs,$(t,"visibility"),et(t,"visibility",Ke.Visible),$(t,"width"),$(t,"height"),$(t,"direction"),$(t,"style"),$(t,"classes"),$(t,"borderStyle"),$(t,"baseStyle"),$(t,"textStyle"),$(t,"fillStyle"),$(t,"progress"),$(t,"display"),$(t,"mark"),t[Gt]=function(){const{progress:n,width:l,height:a,direction:s,display:r,visibility:c,style:m,classes:d,borderStyle:y,textStyle:g,baseStyle:w,fillStyle:v,mark:_,id:N}=this;return{progress:n,width:l,height:a,direction:s,display:r,visibility:c,style:u(m),classes:d,borderStyle:y,textStyle:g,baseStyle:w,fillStyle:v,mark:_,id:N}},t})}var Os=W({props:{display:{type:R(Object,String,Function),required:!0},visibility:{type:R(Number),required:!0},style:R(Object,String,Array),classes:R(Object),onClick:Function,onHold:Function,canClick:{type:R(Boolean),required:!0},small:Boolean,mark:R(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:bn,MarkNode:Rn},setup(e){const{display:t,onClick:n,onHold:l}=tt(e),a=ht("");mt(()=>{const c=We(t);if(c==null){a.value="";return}if(Et(c)){a.value=ce(c);return}const m=ce(c.title||"","h3"),d=ce(c.description,"div");a.value=ce(B(()=>o("span",null,[c.title?o("div",null,[o(m,null,null)]):null,o(d,null,null)])))});const{start:s,stop:r}=ti(n,l,e.isHolding);return{start:s,stop:r,comp:a,Visibility:Ke,unref:u}}});function qs(e,t,n,l,a,s){var m;const r=qt("MarkNode"),c=qt("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("button",{key:0,style:Ge([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:[]]),onClick:t[0]||(t[0]=(...d)=>e.onClick&&e.onClick(...d)),onMousedown:t[1]||(t[1]=(...d)=>e.start&&e.start(...d)),onMouseleave:t[2]||(t[2]=(...d)=>e.stop&&e.stop(...d)),onMouseup:t[3]||(t[3]=(...d)=>e.stop&&e.stop(...d)),onTouchstartPassive:t[4]||(t[4]=(...d)=>e.start&&e.start(...d)),onTouchendPassive:t[5]||(t[5]=(...d)=>e.stop&&e.stop(...d)),onTouchcancelPassive:t[6]||(t[6]=(...d)=>e.stop&&e.stop(...d)),class:Oe({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(b(),Q(Ie(e.unref(e.comp)),{key:0})):F("",!0),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):F("",!0)}var ni=he(Os,[["render",qs],["__scopeId","data-v-8cedd7da"]]);const Vs=Symbol("Clickable");function we(e){return ut(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=ln("clickable-"),t.type=Vs,t[Lt]=ni,t.isHolding=O(!1),$(t,"visibility"),et(t,"visibility",Ke.Visible),$(t,"canClick"),et(t,"canClick",!0),$(t,"classes"),$(t,"style"),$(t,"mark"),$(t,"display"),t.onClick){const l=t.onClick.bind(t);t.onClick=function(a){u(t.canClick)&&l(a)}}if(t.onHold){const l=t.onHold.bind(t);t.onHold=function(){u(t.canClick)&&l()}}return t[Gt]=function(){const{display:l,visibility:a,style:s,classes:r,onClick:c,onHold:m,isHolding:d,canClick:y,small:g,mark:w,id:v}=this;return{display:l,visibility:a,style:u(s),classes:r,onClick:c,onHold:m,isHolding:d,canClick:y,small:g,mark:w,id:v}},t})}function ot(e,t="points",n=0,l=void 0){const a=Le(e)?e:_e(e);if(a.displayName=t,a.precision=n,a.small=l,!Le(e)){const s=a[hn];s.displayName=t,s.precision=n,s.small=l}return a}function wl(e){const t=_e(e.value);return _t(e,n=>{Zn.value||i.gt(n,t.value)&&(t.value=n)}),t}function Ls(e){const t=_e(e.value);return _t(e,(n,l)=>{Zn.value||i.gt(n,l)&&(t.value=i.add(t.value,i.sub(n,l)))}),t}new i("10^^8");new i("1e100");function wn(e,t){const n=t!=null?t:e.value;return i.eq(e.precision,0)?le(e.small?n:i.floor(n)):ue(n,e.precision,e.small)}const Gs=["x1","y1","x2","y2"],Hs=W({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=tt(e),l=k(()=>{const s=n.startNode.value.rect,r=n.boundingRect.value,c=r?{x:s.x+s.width/2-r.x,y:s.y+s.height/2-r.y}:{x:0,y:0};return n.link.value.offsetStart&&(c.x+=n.link.value.offsetStart.x,c.y+=n.link.value.offsetStart.y),c}),a=k(()=>{const s=n.endNode.value.rect,r=n.boundingRect.value,c=r?{x:s.x+s.width/2-r.x,y:s.y+s.height/2-r.y}:{x:0,y:0};return n.link.value.offsetEnd&&(c.x+=n.link.value.offsetEnd.x,c.y+=n.link.value.offsetEnd.y),c});return(s,r)=>(b(),M("line",Xt({"stroke-width":"15px",stroke:"white"},e.link,{x1:u(l).x,y1:u(l).y,x2:u(a).x,y2:u(a).y}),null,16,Gs))}});const Qs=W({__name:"Links",props:{links:null},setup(e){var m;const n=kt(e,"links"),l=O(null),a=Mn(Jn,O({})),s=Mn(Xn,O(void 0)),r=O((m=l.value)==null?void 0:m.getBoundingClientRect());_t(s,()=>{var d;return r.value=(d=l.value)==null?void 0:d.getBoundingClientRect()}),xn(()=>{var d;return r.value=(d=l.value)==null?void 0:d.getBoundingClientRect()});const c=k(()=>{var y,g;const d=a.value;return(g=(y=n.value)==null?void 0:y.filter(w=>{var v,_;return((v=d[w.startNode.id])==null?void 0:v.rect)&&((_=d[w.startNode.id])==null?void 0:_.rect)}))!=null?g:[]});return(d,y)=>(b(),M(P,null,[u(c)?(b(),M("svg",Ei(Xt({key:0},d.$attrs)),[(b(!0),M(P,null,Pl(u(c),(g,w)=>(b(),Q(Hs,{key:w,link:g,boundingRect:r.value,startNode:u(a)[g.startNode.id],endNode:u(a)[g.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):F("",!0),f("div",{ref_key:"resizeListener",ref:l,class:"resize-listener"},null,512)],64))}});var js=he(Qs,[["__scopeId","data-v-063f6d6b"]]);W({props:{nodes:{type:R(Array),required:!0},leftSideNodes:R(Array),rightSideNodes:R(Array),branches:R(Array)},components:{Links:js},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:l}=tt(e),a=ht();mt(()=>{const c=We(t);a.value=ce(B(()=>o(P,null,[c.map(m=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[m.map(wt)]))])))});const s=ht();mt(()=>{const c=We(n);s.value=c?ce(B(()=>o("span",{class:"left-side-nodes small"},[c.map(wt)]))):""});const r=ht();return mt(()=>{const c=We(l);r.value=c?ce(B(()=>o("span",{class:"side-nodes small"},[c.map(wt)]))):""}),{unref:u,nodesComp:a,leftNodesComp:s,rightNodesComp:r}}});W({props:{display:R(Object,String,Function),visibility:{type:R(Number),required:!0},style:R(String,Object,Array),classes:R(Object),onClick:Function,onHold:Function,color:R(String),glowColor:R(String),canClick:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Rn,Node:bn},setup(e){const{onClick:t,onHold:n,display:l}=tt(e),a=Vt(l),{start:s,stop:r}=ti(t,n);return{start:s,stop:r,comp:a,unref:u,Visibility:Ke,isCoercableComponent:Et}}});function an(e){const t=[],n={};let l=!1;function a(){return l||(t.push(...e()),n.base=t.map(c=>Ze(c.base)),n.baseText=t.map(c=>Ze(c.baseText)),n.visible=t.map(c=>Ze(c.visible)),l=!0),t}const s=_e({});return[B(()=>{const c=a();let m=!0;const d=c.map((y,g)=>{var N,I,ne;if(u(n.visible[g])===!1)return null;const w=o("h3",{onClick:()=>s.value[g]=!s.value[g],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(u(s.value[g])?" collapsed":"")},[p("\u25BC")]),y.title,y.subtitle?o("span",{class:"subtitle"},[p(" ("),y.subtitle,p(")")]):null]),v=u(s.value[g])?null:o(P,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[wt((N=u(n.baseText[g]))!=null?N:"Base")]),o("span",{class:"modifier-amount"},[ue((I=u(n.base[g]))!=null?I:1),y.unit])]),wt(u(y.modifier.description))]),_=!m;return m=!1,o(P,null,[_?o("br",null,null):null,o("div",null,[w,o("br",null,null),v,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[p("Total")]),o("span",{class:"modifier-amount"},[ue(y.modifier.apply((ne=u(n.base[g]))!=null?ne:1)),y.unit])])])])});return o(P,null,[d])}),s]}function li(e){const t=Object.values(e).reverse(),n=_e(!0),l=k(()=>t.filter(m=>m.earned.value===!1)),{firstFeature:a,collapsedContent:s,hasCollapsedContent:r}=os(t,m=>m.earned.value),c=B(()=>{const m=[...l.value];return a.value&&m.push(a.value),ss(...m,B(()=>Pn(o(Es,{collapsed:n,content:s,display:n.value?"Show other completed milestones":"Hide other completed milestones"},null),[[Bl,u(r)]])))});return{collapseMilestones:n,display:c}}function sn(e){const t=Ls(e.resource),n=()=>{var c,m;if(K.day.value!==e.day)return 1;let s=i.add(t.value,1),r=e.goal;return((m=(c=e.usingLog)==null?void 0:c.value)!=null?m:L.usingLog)&&(s=s.log10(),r=i.log10(r)),i.div(s,r)},l=It(()=>({direction:re.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:n,display:B(()=>K.day.value===e.day?o(P,null,[Se(t.value),p("/"),Se(e.goal)]):"")})),a=B(()=>o(P,null,[o("div",null,[K.day.value===e.day?o(P,null,[p("Reach "),Se(e.goal),p(" total "),e.resource.displayName,p(" to complete the day")]):o(P,null,[e.name,p(" Complete!")]),e.modal?o(P,null,[" ",p("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[p("Check Modifiers")])]):void 0]),de(l),e.modal?de(e.modal.display):void 0]));return mt(()=>{K.day.value===e.day&&i.gte(t.value,e.goal)&&K.completeDay()}),{total:t,trackerDisplay:a}}const zs=Symbol("Buyable");function Ue(e){const t=_e(0);return ut(()=>{var s,r,c;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=ln("buyable-"),n.type=zs,n[Lt]=ni,n.amount=t,n.amount[Ot]=(s=n.initialValue)!=null?s:0,n.canAfford=k(()=>{const m=n,d=u(m.cost);return m.resource!=null&&d!=null&&i.gte(m.resource.value,d)}),n.canPurchase==null&&(n.canPurchase=k(()=>u(n.visibility)===Ke.Visible&&u(n.canAfford)&&i.lt(n.amount.value,u(n.purchaseLimit)))),n.maxed=k(()=>i.gte(n.amount.value,u(n.purchaseLimit))),$(n,"classes");const l=n.classes;n.classes=k(()=>{const m=u(l)||{};return n.maxed.value&&(m.bought=!0),m}),$(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(c=(r=n.onClick)!=null?r:n.purchase)!=null?c:function(){var y;const m=n;if(!u(m.canPurchase))return;const d=u(m.cost);m.cost!=null&&m.resource!=null&&(m.resource.value=i.sub(m.resource.value,d),m.amount.value=i.add(m.amount.value,1)),(y=m.onPurchase)==null||y.call(m,d)},$(n,"display");const a=n.display;return n.display=B(()=>{const m=u(a);if(Et(m)){const d=ce(m);return o(d,null,null)}if(m!=null&&n.cost!=null&&n.resource!=null){const d=n,y=ce(m.title||"","h3"),g=ce(m.description||""),w=ce(m.effectDisplay||"");return o("span",null,[m.title?o("div",null,[o(y,null,null)]):null,m.description?o(g,null,null):null,m.showAmount===!1?null:o("div",null,[o("br",null,null),u(d.purchaseLimit)===i.dInf?o(P,null,[p("Amount: "),le(d.amount.value)]):o(P,null,[p("Amount: "),le(d.amount.value),p(" /")," ",le(u(d.purchaseLimit))])]),m.effectDisplay?o("div",null,[o("br",null,null),p("Currently: "),o(w,null,null)]):null,d.cost&&!d.maxed.value?o("div",null,[p("Cost: "),ue(u(d.cost)||0)," ",n.resource.displayName]):null])}return""}),$(n,"visibility"),et(n,"visibility",Ke.Visible),$(n,"cost"),$(n,"resource"),$(n,"purchaseLimit"),et(n,"purchaseLimit",i.dInf),$(n,"style"),$(n,"mark"),$(n,"small"),n[Gt]=function(){const{display:m,visibility:d,style:y,classes:g,onClick:w,canClick:v,small:_,mark:N,id:I}=this;return{display:m,visibility:d,style:u(y),classes:g,onClick:w,canClick:v,small:_,mark:N,id:I}},n})}const Un=Tn({}),nl=Symbol("Hotkey");function nn(e){return ut(()=>{const t=e();return t.type=nl,$(t,"enabled"),et(t,"enabled",!0),$(t,"description"),t})}Te.on("addLayer",e=>{Hl(e,nl).forEach(t=>{Un[t.key]=t})});Te.on("removeLayer",e=>{Hl(e,nl).forEach(t=>{Un[t.key]=void 0})});document.onkeydown=function(e){var l;if(((l=e.target)==null?void 0:l.tagName)==="INPUT"||al.value&&!L.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=Un[t];n&&u(n.enabled)&&(e.preventDefault(),n.onPress())};ns(B(()=>{const e=Object.values(Un).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":o("div",null,[o("br",null,null),o("h4",null,[p("Hotkeys")]),e.map(t=>o("div",null,[t==null?void 0:t.key,p(": "),t==null?void 0:t.description]))])}));const Ks=W({__name:"Sticky",setup(e){const t=O("0"),n=new ResizeObserver(a),l=ht(null);function a(){let s=l.value;if(s==null)return;let r=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(r+=c.offsetHeight),s=c}t.value=r+"px"}return Jt(a),document.fonts.ready.then(a),xn(()=>{var r;const s=(r=l.value)==null?void 0:r.parentElement;s&&n.observe(s)}),(s,r)=>(b(),M("div",{class:"sticky",style:Ge({top:t.value}),ref_key:"element",ref:l,"data-v-sticky":""},[Ct(s.$slots,"default",{},void 0,!0)],4))}});var Ws=he(Ks,[["__scopeId","data-v-cccac690"]]);const _l=W({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=k(()=>wn(t.resource));return(l,a)=>(b(),M("h2",{style:Ge({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},J(u(n)),5))}});const Js={class:"main-display"},Xs={key:0},Ys={key:1},Zs=p(", "),eo={key:2},to=f("br",null,null,-1),no={class:"main-display"},lo={key:0},io={key:1},ao=p(", "),so={key:2},oo=f("br",null,null,-1),gt=W({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const n=tt(e),l=O(null),a=Vt(n.effectDisplay),s=Vt(n.productionDisplay),r=k(()=>i.lt(n.resource.value,"1e1000"));return(c,m)=>{var d,y;return e.sticky?(b(),Q(Ws,{key:0},{default:H(()=>{var g,w,v,_;return[f("div",{class:Oe(["main-display-container",(g=e.classes)!=null?g:{}]),style:Ge([{height:`${((v=(w=l.value)==null?void 0:w.$el.clientHeight)!=null?v:0)+50}px`},(_=e.style)!=null?_:{}])},[f("div",Js,[u(r)?(b(),M("span",Xs,"You have ")):F("",!0),o(_l,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),p(" "+J(e.resource.displayName),1),u(a)?(b(),M("span",Ys,[Zs,(b(),Q(Ie(u(a)),{ref_key:"effectRef",ref:l},null,512))])):F("",!0),u(s)?(b(),M("span",eo,[to,(b(),Q(Ie(u(s)),{ref_key:"effectRef",ref:l},null,512))])):F("",!0)])],6)]}),_:1})):(b(),M("div",{key:1,class:Oe(["main-display-container",(d=e.classes)!=null?d:{}]),style:Ge([{height:"50px"},(y=e.style)!=null?y:{}])},[f("div",no,[u(r)?(b(),M("span",lo,"You have ")):F("",!0),o(_l,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),p(" "+J(e.resource.displayName),1),u(a)?(b(),M("span",io,[ao,(b(),Q(Ie(u(a)),{ref_key:"effectRef",ref:l},null,512))])):F("",!0),u(s)?(b(),M("span",so,[oo,(b(),Q(Ie(u(s)),{ref_key:"effectRef",ref:l},null,512))])):F("",!0)])],6))}}});var ro=W({props:{display:{type:R(String,Object,Function),required:!0},visibility:{type:R(Number),required:!0},style:R(String,Object,Array),classes:R(Object),resource:Object,cost:R(String,Object,Number),canPurchase:{type:R(Boolean),required:!0},bought:{type:R(Boolean),required:!0},mark:R(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:bn,MarkNode:Rn},setup(e){const{display:t,cost:n}=tt(e),l=ht("");return mt(()=>{const a=We(t);if(a==null){l.value="";return}if(Et(a)){l.value=ce(a);return}const s=We(n),r=ce(a.title||"","h3"),c=ce(a.description,"div"),m=ce(a.effectDisplay||"");l.value=ce(B(()=>{var d;return o("span",null,[a.title?o("div",null,[o(r,null,null)]):null,o(c,null,null),a.effectDisplay?o("div",null,[p("Currently: "),o(m,null,null)]):null,e.resource!=null&&a.showCost!==!1?o(P,null,[o("br",null,null),p("Cost: "),e.resource&&wn(e.resource,s)," ",(d=e.resource)==null?void 0:d.displayName]):null])}))}),{component:l,unref:u,Visibility:Ke}}});const uo=["disabled"];function co(e,t,n,l,a,s){var m;const r=qt("MarkNode"),c=qt("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("button",{key:0,style:Ge([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),onClick:t[0]||(t[0]=(...d)=>e.purchase&&e.purchase(...d)),class:Oe({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(b(),Q(Ie(e.unref(e.component)),{key:0})):F("",!0),o(r,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,uo)):F("",!0)}var mo=he(ro,[["render",co],["__scopeId","data-v-7f411ac8"]]);const po=Symbol("Upgrade");function Y(e){const t=_e(!1);return ut(()=>{const n=e();return n.id=ln("upgrade-"),n.type=po,n[Lt]=mo,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=k(()=>{const l=n;return l.resource!=null&&l.cost!=null&&i.gte(l.resource.value,u(l.cost))}):$(n,"canAfford"),n.canPurchase=k(()=>u(n.visibility)===Ke.Visible&&u(n.canAfford)&&!u(n.bought)),n.purchase=function(){var a;const l=n;!u(l.canPurchase)||(l.resource!=null&&l.cost!=null&&(l.resource.value=i.sub(l.resource.value,u(l.cost))),t.value=!0,(a=l.onPurchase)==null||a.call(l))},$(n,"visibility"),et(n,"visibility",Ke.Visible),$(n,"classes"),$(n,"style"),$(n,"display"),$(n,"mark"),$(n,"cost"),$(n,"resource"),n[Gt]=function(){const{display:l,visibility:a,style:s,classes:r,resource:c,cost:m,canPurchase:d,bought:y,mark:g,id:w,purchase:v}=this;return{display:l,visibility:a,style:u(s),classes:r,resource:c,cost:m,canPurchase:d,bought:y,mark:g,id:w,purchase:v}},n})}function ae(e){return ut(()=>{const{addend:t,description:n,enabled:l}=e(),a=Ze(t),s=Ze(n),r=l==null?void 0:Ze(l);return{apply:c=>i.add(c,u(a)),revert:c=>i.sub(c,u(a)),enabled:r,description:n==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(s)?o("span",{class:"modifier-description"},[wt(u(s))]):null,o("span",{class:"modifier-amount"},[i.gte(u(a),0)?"+":"",ue(u(a))])]))}})}function x(e){return ut(()=>{const{multiplier:t,description:n,enabled:l}=e(),a=Ze(t),s=Ze(n),r=l==null?void 0:Ze(l);return{apply:c=>i.times(c,u(a)),revert:c=>i.div(c,u(a)),enabled:r,description:n==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(s)?o("span",{class:"modifier-description"},[wt(u(s))]):null,o("span",{class:"modifier-amount"},[p("\xD7"),ue(u(a))])]))}})}function ii(e){return ut(()=>{const{exponent:t,description:n,enabled:l,supportLowNumbers:a}=e(),s=Ze(t),r=Ze(n),c=l==null?void 0:Ze(l);return{apply:m=>{let d=m;return a&&(d=i.add(d,1)),d=i.pow(d,u(s)),a&&(d=i.sub(d,1)),d},revert:m=>{let d=m;return a&&(d=i.add(d,1)),d=i.root(d,u(s)),a&&(d=i.sub(d,1)),d},enabled:c,description:n==null?void 0:B(()=>o("div",{class:"modifier-container"},[u(r)?o("span",{class:"modifier-description"},[wt(u(r)),a?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[p("^"),ue(u(s))])]))}})}function Z(e){return ut(()=>{const t=e();return{apply:n=>t.filter(l=>u(l.enabled)!==!1).reduce((l,a)=>a.apply(l),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(l=>u(l.enabled)!==!1).reduceRight((l,a)=>a.revert(l),n):void 0,enabled:k(()=>t.filter(n=>u(n.enabled)!==!1).length>0),description:B(()=>o(P,null,[t.filter(n=>u(n.enabled)!==!1).map(n=>u(n.description)).filter(n=>n).map(wt)]))}})}function ai(e){return ut(()=>{const t=e();return t.currentGain==null&&(t.currentGain=k(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=i.floor(n).max(0),u(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=k(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=i.ceil(n)),n})),t.nextAt==null&&(t.nextAt=k(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=i.ceil(n)),n})),t.convert==null&&(t.convert=function(){var a;const n=u(t.currentGain),l=u(t.currentAt);t.gainResource.value=i.add(t.gainResource.value,n),t.spend(n,l),(a=t.onConvert)==null||a.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),$(t,"currentGain"),$(t,"actualGain"),$(t,"currentAt"),$(t,"nextAt"),$(t,"buyMax"),et(t,"buyMax",!0),$(t,"roundUpCost"),et(t,"roundUpCost",!0),t})}function ll(e,t){const n=Ze(e),l=Ze(t);return{currentGain(a){let s=u(a.baseResource.value);if(a.costModifier&&(s=a.costModifier.apply(s)),i.lt(s,u(n)))return 0;const r=i.div(s,u(n)).pow(u(l));return r.isNan()?new i(0):r},currentAt(a){let s=u(a.currentGain);return a.gainModifier&&(s=a.gainModifier.revert(s)),s=i.max(0,s).root(u(l)).times(u(n)),a.costModifier&&(s=a.costModifier.revert(s)),s},nextAt(a){let s=i.add(u(a.currentGain),1).floor();return a.gainModifier&&(s=a.gainModifier.revert(s)),s=i.max(0,s).root(u(l)).times(u(n)).max(u(n)),a.costModifier&&(s=a.costModifier.revert(s)),s}}}function si(e){return ai(e)}function fo(e){return ai(()=>{const t=e();return et(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=k(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=i.floor(n).max(t.gainResource.value),u(t.buyMax)||(n=n.min(i.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=k(()=>{let n=i.sub(i.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return u(t.buyMax)||(n=n.min(1)),n})),et(t,"convert",function(){var a;const n=u(t.actualGain),l=u(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(u(t.currentGain)):u(t.currentGain),t.spend(n,l),(a=t.onConvert)==null||a.call(t,n)}),t})}const ho="boxes",kl=6,dt=St(ho,function(){const e="Boxes",t="#964B00",n=ot(0,"boxes"),l=si(()=>({scaling:ll(1e10,1),baseResource:se.logs,gainResource:G(n),roundUpCost:!0})),a=we(()=>({display:B(()=>o(P,null,[o("span",{style:"font-size: large"},[p("Create "),le(l.currentGain.value),p(" "),n.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[p("Cost:")," ",wn(se.logs,i.gte(l.actualGain.value,1)?l.currentAt.value:l.nextAt.value)," ",se.logs.displayName])])),canClick:()=>i.gte(l.actualGain.value,1),onClick(){!u(this.canClick)||l.convert()},style:"width: 600px; min-height: unset"})),s=Y(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){K.days[3].recentlyUpdated.value=!0},resource:G(n),cost:100})),r=Y(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){K.days[3].recentlyUpdated.value=!0},resource:G(n),cost:1e3})),c=Y(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){K.days[3].recentlyUpdated.value=!0},resource:G(n),cost:4e3})),m={logsUpgrade:s,ashUpgrade:r,coalUpgrade:c},d=Ue(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:B(()=>o(P,null,[ue(i.div(d.amount.value,2).add(1)),p("x")]))},resource:G(n),cost(){return i.pow(3,d.amount.value).times(100)},visibility:()=>U(s.bought.value)})),y=Ue(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:B(()=>o(P,null,[ue(i.div(y.amount.value,2).add(1)),p("x")]))},resource:G(n),cost(){return i.pow(5,y.amount.value).times(1e3)},visibility:()=>U(r.bought.value)})),g=Ue(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:B(()=>o(P,null,[ue(i.div(g.amount.value,2).add(1)),p("x")]))},resource:G(n),cost(){return i.pow(7,g.amount.value).times(1e3)},visibility:()=>U(c.bought.value)})),w={logBoxesBuyable:d,ashBoxesBuyable:y,coalBoxesBuyable:g},{total:v,trackerDisplay:_}=sn({resource:n,goal:5e4,name:e,day:kl,color:t});return{name:e,day:kl,color:t,boxes:n,totalBoxes:v,boxesConversion:l,upgrades:m,buyables:w,minWidth:700,display:B(()=>o(P,null,[de(_),o(ve,null,null),o(gt,{resource:n,color:t,style:"margin-bottom: 0"},null),o(ve,null,null),de(a),o(ve,null,null),Fe(...Object.values(m)),Fe(...Object.values(w))]))}});const go={class:"field"},vo=W({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,l=k(()=>ce(u(n.title)||"","span")),a=k({get(){return!!n.modelValue},set(s){t("update:modelValue",s)}});return(s,r)=>(b(),M("label",go,[Pn(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":r[0]||(r[0]=c=>Le(a)?a.value=c:null)},null,512),[[Bi,u(a)]]),(b(),Q(Ie(u(l))))]))}});var At=he(vo,[["__scopeId","data-v-33d57459"]]);const yo={class:"field"},bo={key:0,class:"field-title"},il=W({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var r;const n=e,l=Vt(kt(n,"title"),"span"),a=O((r=n.options.find(c=>c.value===n.modelValue))!=null?r:null);_t(kt(n,"modelValue"),c=>{var m;We(a)!==c&&(a.value=(m=n.options.find(d=>d.value===c))!=null?m:null)});function s(c){t("update:modelValue",c.value)}return(c,m)=>(b(),M("div",yo,[u(l)?(b(),M("span",bo,[(b(),Q(Ie(u(l))))])):F("",!0),o(u(Ti),{options:e.options,modelValue:a.value,"onUpdate:modelValue":[m[0]||(m[0]=d=>a.value=d),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var wo=W({props:{visibility:{type:R(Number),required:!0},display:{type:R(String,Object,Function),required:!0},style:R(String,Object,Array),classes:R(Object),earned:{type:R(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:bn},setup(e){const{display:t}=tt(e),n=ht("");return mt(()=>{const l=We(t);if(l==null){n.value="";return}if(Et(l)){n.value=ce(l);return}const a=ce(l.requirement,"h3"),s=ce(l.effectDisplay||"","b"),r=ce(l.optionsDisplay||"","span");n.value=ce(B(()=>o("span",null,[o(a,null,null),l.effectDisplay?o("div",null,[o(s,null,null)]):null,l.optionsDisplay?o("div",{class:"equal-spaced"},[o(r,null,null)]):null])))}),{comp:n,unref:u,Visibility:Ke}}});function _o(e,t,n,l,a,s){var c;const r=qt("Node");return e.unref(e.visibility)!==e.Visibility.None?(b(),M("div",{key:0,style:Ge([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:Oe({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(b(),Q(Ie(e.unref(e.comp)))),o(r,{id:e.id},null,8,["id"])],6)):F("",!0)}var ko=he(wo,[["render",_o],["__scopeId","data-v-f4e8794e"]]);Te.on("setupVue",e=>e.use(Di));const Cl=Tl(),Co=Symbol("Milestone");let Ut;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Ut||(Ut={}));function Ye(e){const t=_e(!1);return ut(()=>{var a;const n=(a=e==null?void 0:e())!=null?a:{};n.id=ln("milestone-"),n.type=Co,n[Lt]=ko,n.earned=t,n.complete=function(){var r;const s=n;if(t.value=!0,(r=s.onComplete)==null||r.call(s),s.display&&u(s.showPopups)===!0){const c=u(s.display),m=ce(Et(c)?c:c.requirement);Cl(o(P,null,[o("h3",null,[p("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}},$(n,"visibility"),et(n,"visibility",Ke.Visible);const l=n.visibility;if(n.visibility=k(()=>{const s=u(n.display);switch(Pe.msDisplay){default:case Ut.All:return u(l);case Ut.Configurable:return u(n.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?Ke.None:u(l);case Ut.Incomplete:return u(n.earned)?Ke.None:u(l);case Ut.None:return Ke.None}}),$(n,"style"),$(n,"classes"),$(n,"display"),$(n,"showPopups"),n[Gt]=function(){const{visibility:s,display:r,style:c,classes:m,earned:d,id:y}=this;return{visibility:s,display:r,style:u(c),classes:m,earned:d,id:y}},n.shouldEarn){const s=n;mt(()=>{var r,c;if(Pe.active===L.id&&!s.earned.value&&u(s.visibility)===Ke.Visible&&((r=s.shouldEarn)==null?void 0:r.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&u(s.showPopups)===!0)){const m=u(s.display),d=ce(Et(m)?m:m.requirement);Cl(o(P,null,[o("h3",null,[p("Milestone earned!")]),o("div",null,[o(d,null,null)])]))}})}return n})}Te.on("loadSettings",e=>{et(e,"msDisplay",Ut.All)});const No=Object.values(Ut).map(e=>({label:Gl(e),value:e}));ts(B(()=>o(il,{title:"Show Milestones",options:No,"onUpdate:modelValue":e=>Pe.msDisplay=e,modelValue:Pe.msDisplay},null)));const So=Symbol("Reset");function Mo(e){return ut(()=>{const t=e();return t.id=ln("reset-"),t.type=So,t.reset=function(){var l;const n=a=>{if(a&&typeof a=="object")if(Ot in a){const s=a;s.value=s[Ot]}else!(a instanceof i)&&!Le(a)&&Object.values(a).forEach(s=>n(s))};u(t.thingsToReset).forEach(n),Te.emit("reset",t),(l=t.onReset)==null||l.call(t)},$(t,"thingsToReset"),t})}const Nn={};Te.on("removeLayer",e=>{var t;(t=Nn[e.id])==null||t.call(Nn),Nn[e.id]=void 0});const Ao="paper",Nl=5,pe=St(Ao,function(){const e="Paper",t="#E8DCB8",n=ot(0,"paper"),l=ot(k(()=>i.min(i.div(se.logs.value,1e9),i.div(q.ash.value,1e6))),"pulp"),a=si(()=>({scaling:ll(1,1.2),baseResource:l,gainResource:G(n),roundUpCost:!0,spend(oe,V){se.logs.value=i.sub(se.logs.value,i.times(V,1e9)),q.ash.value=i.sub(q.ash.value,i.times(V,1e6))},gainModifier:ne})),s=we(()=>({display:B(()=>{const oe=i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return o(P,null,[o("span",{style:"font-size: large"},[p("Create "),le(a.currentGain.value),p(" "),n.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[p("Cost: "),wn(se.logs,oe),p(" "),l.displayName,p(" ("),le(i.times(oe,1e9)),p(" "),se.logs.displayName,p(";")," ",le(i.times(oe,1e6)),p(" "),q.ash.displayName,p(")")])])}),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!u(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function r(oe){const V=Ue(()=>({...oe,display:{title:oe.name,description:`Print a copy of "${oe.name}", which ${oe.elfName} will use to improve their skills! Each copy printed will reduce the "${oe.buyableName}" price scaling by 0.95x and make ${oe.elfName} purchase +10% faster!`,effectDisplay:B(()=>o(P,null,[ue(i.pow(.95,V.amount.value)),p("x price scaling,")," ",ue(i.div(V.amount.value,10).add(1)),p("x auto-purchase speed")])),showAmount:!1},resource:G(n),cost:()=>i.pow(5,V.amount.value).times(10),style:"width: 600px"}));return V}const c=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),m=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),d=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),g=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),w=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>U(Ve.elves.smallFireElf.bought.value)}),_=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>U(Ve.elves.bonfireElf.bought.value)}),N=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>U(Ve.elves.kilnElf.bought.value)}),I={cuttersBook:c,plantersBook:m,expandersBook:d,heatedCuttersBook:y,heatedPlantersBook:g,fertilizerBook:w,smallFireBook:v,bonfireBook:_,kilnBook:N},ne=Z(()=>[x(()=>({multiplier:2,description:"Scholar's shoes",enabled:Nt.paperUpgrades.paperUpgrade1.bought})),x(()=>({multiplier:2,description:"Scholar's slacks",enabled:Nt.paperUpgrades.paperUpgrade2.bought})),x(()=>({multiplier:2,description:"Scholar's jacket",enabled:Nt.paperUpgrades.paperUpgrade3.bought}))]),[A,S]=an(()=>[{title:"Paper Gain",modifier:ne,base:1}]),T=O(!1),ye=B(()=>o(rt,{modelValue:T.value,"onUpdate:modelValue":oe=>T.value=oe},{header:()=>o("h2",null,[e,p(" Modifiers")]),body:A})),{total:Me,trackerDisplay:Ae}=sn({resource:n,goal:5e3,name:e,day:Nl,color:t,textColor:"var(--feature-foreground)",modal:{show:T,display:ye}});return{name:e,day:Nl,color:t,paper:n,totalPaper:Me,paperConversion:a,books:I,generalTabCollapsed:S,minWidth:700,display:B(()=>o(P,null,[de(Ae),o(ve,null,null),o(gt,{resource:n,color:t,style:"margin-bottom: 0"},null),o(ve,null,null),de(s),o(ve,null,null),dn(...Object.values(I))]))}}),Io="workshop",on=2,st=St(Io,function(){const e="Workshop",t="#D66B02",n="#D66B02",l=ot(0,"foundation progress"),a=fo(()=>({scaling:ll(250,1.5),baseResource:se.logs,gainResource:G(l),roundUpCost:!0,buyMax:!1,spend(T,ye){se.logs.value=i.sub(se.logs.value,ye)}})),s=we(()=>({display:B(()=>o(P,null,[o("b",{style:"font-size: x-large"},[p("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[p("Cost:")," ",wn(se.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",se.logs.displayName])])),visibility:()=>U(i.lt(l.value,100)),canClick:()=>i.gte(a.actualGain.value,1)&&i.lt(l.value,100),onClick(){!u(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=nn(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=k(()=>!Ve.milestones[6].earned.value),m=Ye(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>i.gte(l.value,1),showPopups:c})),d=Ye(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>i.gte(l.value,10),visibility:()=>U(m.earned.value),showPopups:c})),y=Ye(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>i.gte(l.value,20),visibility:()=>U(d.earned.value),showPopups:c})),g=Ye(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>i.gte(l.value,30),visibility:()=>U(y.earned.value),showPopups:c})),w=Ye(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>i.gte(l.value,40),visibility:()=>U(g.earned.value),showPopups:c})),v=Ye(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(l.value,50),visibility:()=>U(w.earned.value),showPopups:c})),_=Ye(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>i.gte(l.value,75),visibility:()=>U(v.earned.value),showPopups:c})),N=Ye(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>i.gte(l.value,100),visibility:()=>U(_.earned.value),showPopups:c})),I={logGainMilestone1:m,autoCutMilestone1:d,autoPlantMilestone1:y,autoCutMilestone2:g,autoPlantMilestone2:w,logGainMilestone2:v,morePlantsMilestone1:_,logGainMilestone3:N},{collapseMilestones:ne,display:A}=li(I),S=It(()=>({direction:re.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>K.day.value===on?i.div(l.value,100):1,display:B(()=>K.day.value===on?o(P,null,[le(l.value),p("%")]):"")}));return mt(()=>{K.day.value===on&&i.gte(l.value,100)&&K.completeDay()}),{name:e,day:on,color:t,foundationProgress:l,foundationConversion:a,milestones:I,collapseMilestones:ne,minWidth:700,buildFoundationHK:r,display:B(()=>o(P,null,[o("div",null,[K.day.value===on?"Complete the foundation to complete the day":`${e} Complete!`]),de(S),o(ve,null,null),o("div",null,[o("span",null,[p("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[le(l.value)]),p("% completed")]),i.lt(l.value,100)?o(ve,null,null):null,de(s),o(ve,null,null),A()]))}}),Eo="elves",rn=4,Ve=St(Eo,function(){const e="Elves",t="red",n="#911D21",a=It(()=>({direction:re.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>K.day.value===rn?i.div(me.value,6).times(.8333333333333334).add(i.div(i.add(q.coal.value,1).log10(),i.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>K.day.value===rn?i.lt(me.value,6)?o(P,null,[le(me.value),p("/6 elves")]):o(P,null,[le(q.coal.value),p("/"),le(1e9),p(" coal")]):"")})),s=Mo(()=>({thingsToReset:[se,st,q],onReset(){setTimeout(()=>{Xe.earned.value?(se.row1Upgrades.forEach(j=>j.bought.value=!0),se.row2Upgrades.forEach(j=>j.bought.value=!0)):je.earned.value&&(se.row1Upgrades[4].bought.value=!0,se.row2Upgrades[4].bought.value=!0),ze.earned.value&&(st.foundationProgress.value=100)})}})),r=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>i.gt(pe.books.cuttersBook.amount.value,0)}))]),c=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>i.gt(pe.books.plantersBook.amount.value,0)}))]),m=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>i.gt(pe.books.expandersBook.amount.value,0)}))]),d=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>i.gt(pe.books.heatedCuttersBook.amount.value,0)}))]),y=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>i.gt(pe.books.heatedPlantersBook.amount.value,0)}))]),g=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>i.gt(pe.books.fertilizerBook.amount.value,0)}))]),w=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>i.gt(pe.books.smallFireBook.amount.value,0)}))]),v=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>i.gt(pe.books.bonfireBook.amount.value,0)}))]),_=Z(()=>[x(()=>({multiplier:2,description:"6 Elves Trained",enabled:ke.earned})),x(()=>({multiplier:()=>i.times(pe.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>i.gt(pe.books.kilnBook.amount.value,0)}))]),[N,I]=an(()=>[{title:"Holly Auto-Buy Frequency",modifier:r,base:10,unit:"/s",visible:ge.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:ge.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:ge.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:ge.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:ge.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:ge.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:ge.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:ge.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:ge.kilnElf.bought}]),ne=O(!1),A=B(()=>o(rt,{modelValue:ne.value,"onUpdate:modelValue":j=>ne.value=j},{header:()=>o("h2",null,[e,p(" Modifiers")]),body:N}));function S(j){var Qt;const vt=k(()=>i.pow(4,me.value).times(1e6)),lt=_e(0),te=j.hasToggle?_e(!1):O(!0),Mt=k(()=>j.cooldownModifier.apply(10)),Ft=Ze((Qt=j.canBuy)!=null?Qt:!0);function Tt(ft){var Yt;if(D.bought.value&&u(Ft)){lt.value=i.add(lt.value,ft);const Dt=i.recip(Mt.value);for(;i.gte(lt.value,Dt);)if(j.customCost==null?u(j.buyable.canPurchase):i.gte(j.buyable.resource.value,j.customCost(j.buyable.amount.value)))j.buyable.amount.value=i.add(j.buyable.amount.value,1),lt.value=i.sub(lt.value,Dt),(Yt=j.onAutoPurchase)==null||Yt.call(j);else{lt.value=Dt;break}}}const D=Y(()=>({...j,buyable:void 0,toggle:te,buyProgress:lt,update:Tt,resource:q.coal,cost:vt,computedAutoBuyCooldown:Mt,display:()=>({title:j.name,description:B(()=>o(P,null,[j.description,D.bought.value?null:o(P,null,[" ",p("Training this elf will require resetting all your progress from days 1-3.")]),D.bought.value&&j.hasToggle===!0?o(P,null,[o(At,{title:j.toggleDesc,"onUpdate:modelValue":ft=>te.value=ft,modelValue:te.value},null)]):null])),showCost:!D.bought.value}),style:"width: 190px",onPurchase(){var ft;(ft=j.onPurchase)==null||ft.call(j),s.reset()}}));return D}const T=S({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:se.row1Buyables[0],cooldownModifier:r}),ye=S({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:se.row1Buyables[1],cooldownModifier:c}),Me=S({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:se.row1Buyables[2],cooldownModifier:m}),Ae=[T,ye,Me],oe=S({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:q.heatedCutters,cooldownModifier:d}),V=S({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:q.heatedPlanters,cooldownModifier:y}),Qe=S({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:q.moreFertilizer,cooldownModifier:g}),at=[oe,V,Qe],De=S({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:q.buildFire,cooldownModifier:w,visibility:()=>U(dt.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){De.toggle.value&&(q.activeFires.value=i.add(q.activeFires.value,1))},onPurchase(){K.days[4].recentlyUpdated.value=!0}}),be=S({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:q.buildBonfire,cooldownModifier:v,visibility:()=>U(dt.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const j=u(this.buyable.cost);q.activeFires.value=i.sub(q.activeFires.value,j).max(0),q.buildFire.amount.value=i.sub(q.buildFire.amount.value,j).max(0),be.toggle.value&&(q.activeBonfires.value=i.add(q.activeBonfires.value,1))},onPurchase(){K.days[4].recentlyUpdated.value=!0},canBuy:q.unlockBonfire.bought}),Ce=S({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:q.buildKiln,cooldownModifier:_,visibility:()=>U(dt.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Ce.toggle.value&&(q.activeKilns.value=i.add(q.activeKilns.value,1))},onPurchase(){K.days[4].recentlyUpdated.value=!0},canBuy:q.unlockKiln.bought}),Ee=[De,be,Ce],ge={cuttersElf:T,plantersElf:ye,expandersElf:Me,heatedCuttersElf:oe,heatedPlantersElf:V,fertilizerElf:Qe,smallFireElf:De,bonfireElf:be,kilnElf:Ce},me=k(()=>Object.values(ge).filter(j=>j.bought.value).length),ie=Ye(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>i.gte(me.value,1)})),je=Ye(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>i.gte(me.value,2),visibility:()=>U(ie.earned.value)})),Ne=Ye(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>i.gte(me.value,3),visibility:()=>U(je.earned.value)})),Je=Ye(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(me.value,4),visibility:()=>U(Ne.earned.value)})),Be=Ye(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>i.gte(me.value,5),visibility:()=>U(Je.earned.value)})),ke=Ye(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>i.gte(me.value,6),visibility:()=>U(Be.earned.value)})),ze=Ye(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>i.gte(me.value,7),visibility:()=>U(ke.earned.value&&K.day.value>5)})),ee=Ye(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>i.gte(me.value,8),visibility:()=>U(ze.earned.value)})),Xe=Ye(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>i.gte(me.value,9),visibility:()=>U(ee.earned.value)})),$e=[ie,je,Ne,Je,Be,ke,ze,ee,Xe],nt={manualMilestone:ie,researchMilestone:je,coalGainMilestone:Ne,logGainMilestone:Je,forestMilestone:Be,elvesMilestone:ke,foundationMilestone:ze,forestMilestone2:ee,treeUpgradesMilestone:Xe},{collapseMilestones:Ht,display:ct}=li(nt);return Te.on("update",j=>{i.lt(K.day.value,rn)||Object.values(ge).forEach(vt=>vt.update(j))}),mt(()=>{K.day.value===rn&&i.gte(me.value,6)&&i.gte(q.coal.value,1e9)&&K.completeDay()}),{name:e,color:t,elves:ge,totalElves:me,milestones:$e,collapseMilestones:Ht,generalTabCollapsed:I,minWidth:700,display:B(()=>o(P,null,[o("div",null,[K.day.value===rn?`Reach ${le(6)} trained elves and ${le(1e9)} ${q.coal.displayName} to complete the day`:`${e} Complete!`," ",p("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>ne.value=!0},[p("Check Modifiers")])]),de(a),de(A),o(ve,null,null),o("div",{style:"width: 600px"},[Fe(...Ae),Fe(...at),Fe(...Ee)]),ct()]))}}),Bo="coal",Sl=3,q=St(Bo,function(){const e="Coal",t="#151716",n="#B2BeB5",l="var(--foreground)",a=ot(0,"coal"),s=ot(0,"ash"),r=_e(0),c=k(()=>i.times(r.value,1e3)),m=k(()=>i.times(r.value,.1)),d=k(()=>i.times(r.value,50)),y=Ue(()=>({resource:se.logs,cost(){let E=i.times(T.amount.value,u(T.cost)).plus(this.amount.value);return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),E=i.pow(.95,pe.books.smallFireBook.amount.value).times(E),E.pow(1.5).times(1e4)},display:B(()=>o(P,null,[o("h3",null,[p("Small Fire")]),o("br",null,null),p("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),p("Currently:"),o("br",null,null),p("-"),ue(c.value),p(" logs/sec"),o("br",null,null),p("+"),ue(m.value),p(" coal/sec"),o("br",null,null),p("+"),ue(d.value),p(" ash/sec"),o("br",null,null),o("br",null,null),p("Cost: "),le(u(y.cost)),p(" "),y.resource.displayName])),onPurchase(){r.value=i.add(r.value,1)},style:{color:l,width:"160px"}})),g=we(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(r.value,0)},onClick(){r.value=0}})),w=we(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(r.value,0)},onClick(){r.value=i.sub(r.value,1)}})),v=we(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(r.value,y.amount.value)},onClick(){r.value=i.add(r.value,1)}})),_=we(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(r.value,y.amount.value)},onClick(){r.value=y.amount.value}})),N=ot(y.amount,"small fires"),I=_e(0),ne=k(()=>i.times(I.value,1e4)),A=k(()=>i.times(I.value,10)),S=k(()=>i.times(I.value,1e3)),T=Ue(()=>({resource:N,cost(){return i.pow(.95,pe.books.bonfireBook.amount.value).times(10)},display:B(()=>o(P,null,[o("h3",null,[p("Bonfire")]),o("br",null,null),p("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),p("Currently:"),o("br",null,null),p("-"),ue(ne.value),p(" logs/sec"),o("br",null,null),p("+"),ue(A.value),p(" coal/sec"),o("br",null,null),p("+"),ue(S.value),p(" ash/sec"),o("br",null,null),o("br",null,null),p("Cost: "),le(u(T.cost)),p(" "),T.resource.displayName])),onPurchase(E){r.value=i.sub(r.value,E).max(0),I.value=i.add(I.value,1)},style:{color:l,width:"160px"},visibility:()=>U(nt.bought.value)})),ye=we(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(I.value,0)},onClick(){I.value=0}})),Me=we(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(I.value,0)},onClick(){I.value=i.sub(I.value,1)}})),Ae=we(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(I.value,T.amount.value)},onClick(){I.value=i.add(I.value,1)}})),oe=we(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(I.value,T.amount.value)},onClick(){I.value=T.amount.value}})),V=_e(0),Qe=k(()=>i.times(V.value,1e6)),at=k(()=>i.times(V.value,1e4)),De=k(()=>i.times(V.value,1e4)),be=Ue(()=>({resource:se.logs,cost(){let E=this.amount.value;return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),E=i.pow(.95,pe.books.kilnBook.amount.value).times(E),i.pow(1.1,E).times(1e7)},display:B(()=>o(P,null,[o("h3",null,[p("Charcoal Kiln")]),o("br",null,null),p("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),p("Currently:"),o("br",null,null),p("-"),ue(Qe.value),p(" logs/sec"),o("br",null,null),p("+"),ue(at.value),p(" coal/sec"),o("br",null,null),p("+"),ue(De.value),p(" ash/sec"),o("br",null,null),o("br",null,null),p("Cost: "),le(u(be.cost)),p(" "),be.resource.displayName])),onPurchase(){V.value=i.add(V.value,1)},style:{color:l,width:"160px"},visibility:()=>U(lt.bought.value)})),Ce=we(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(V.value,0)},onClick(){V.value=0}})),Ee=we(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(V.value,0)},onClick(){V.value=i.sub(V.value,1)}})),ge=we(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(V.value,be.amount.value)},onClick(){V.value=i.add(V.value,1)}})),me=we(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(V.value,be.amount.value)},onClick(){V.value=be.amount.value}})),ie=_e(0),je=k(()=>i.times(ie.value,5e7)),Ne=Ue(()=>({resource:mn.metal,cost(){let E=this.amount.value;return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),i.pow(1.15,E).times(10)},display:B(()=>o(P,null,[o("h3",null,[p("Mining Drill")]),o("br",null,null),p("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),p("Currently:"),o("br",null,null),p("+"),ue(je.value),p(" coal/sec"),o("br",null,null),o("br",null,null),p("Cost: "),le(u(Ne.cost)),p(" "),Ne.resource.displayName])),onPurchase(){ie.value=i.add(ie.value,1)},style:{color:l,width:"160px"},visibility:()=>U(mn.coalDrill.bought.value)})),Je=we(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(ie.value,0)},onClick(){ie.value=0}})),Be=we(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.gt(ie.value,0)},onClick(){ie.value=i.sub(ie.value,1)}})),ke=we(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(ie.value,Ne.amount.value)},onClick(){ie.value=i.add(ie.value,1)}})),ze=we(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:l},canClick(){return i.lt(ie.value,Ne.amount.value)},onClick(){ie.value=Ne.amount.value}})),ee=Y(()=>({resource:G(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:l}})),Xe=Y(()=>({resource:G(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:l}})),$e=Y(()=>({resource:G(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:l}})),nt=Y(()=>({resource:N,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){N.value=i.add(N.value,this.cost)},style:{color:l}})),Ht=[ee,Xe,$e,nt],ct=Y(()=>({resource:G(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:l},visibility:()=>U(nt.bought.value)})),j=Y(()=>({resource:G(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:l},visibility:()=>U(nt.bought.value)})),vt=Y(()=>({canAfford(){return i.gte(se.logs.value,1e5)&&i.gte(s.value,1e5)},onPurchase(){se.logs.value=i.sub(se.logs.value,1e5),s.value=i.sub(s.value,1e5)},display:B(()=>o(P,null,[o("h3",null,[p("Mulched Soil")]),o("br",null,null),p("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),p("Cost: "),le(1e5),p(" "),se.logs.displayName,o("br",null,null),le(1e5),p(" "),s.displayName])),style:{color:l},visibility:()=>U(nt.bought.value)})),lt=Y(()=>({resource:se.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:l},visibility:()=>U(nt.bought.value)})),te=[ct,j,vt,lt],Mt=Ue(()=>({resource:G(a),cost(){let E=this.amount.value;return i.gte(E,50)&&(E=i.pow(E,2).div(50)),i.gte(E,200)&&(E=i.pow(E,2).div(200)),i.gte(E,2e6)&&(E=i.pow(E,2).div(2e6)),E=i.pow(.95,pe.books.heatedCuttersBook.amount.value).times(E),i.add(E,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(P,null,[p("Cutters cut down trees "),ue(ft.value),p("x faster")]))},style:{color:l},visibility:()=>U(ee.bought.value)})),Ft=Ue(()=>({resource:G(a),cost(){let E=this.amount.value;return i.gte(E,50)&&(E=i.pow(E,2).div(50)),i.gte(E,200)&&(E=i.pow(E,2).div(200)),i.gte(E,2e6)&&(E=i.pow(E,2).div(2e6)),E=i.pow(.95,pe.books.heatedPlantersBook.amount.value).times(E),i.add(E,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(P,null,[p("Planters plant trees "),ue(Dt.value),p("x faster")]))},style:{color:l},visibility:()=>U(Xe.bought.value)})),Tt=Ue(()=>({resource:G(s),cost(){let E=this.amount.value;return i.gte(E,50)&&(E=i.pow(E,2).div(50)),i.gte(E,200)&&(E=i.pow(E,2).div(200)),i.gte(E,2e6)&&(E=i.pow(E,2).div(2e6)),E=i.pow(.95,pe.books.fertilizerBook.amount.value).times(E),i.add(E,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(P,null,[p("Trees give "),ue(rl.value),p("x more logs")]))},style:{color:l},visibility:()=>U($e.bought.value)})),D=[Mt,Ft,Tt],Qt=Z(()=>[ae(()=>({addend(){return i.times(Mt.amount.value,.25)},description:"Heated Cutters",enabled(){return i.gt(Mt.amount.value,0)}})),x(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:ct.bought}))]),ft=k(()=>Qt.apply(1)),Yt=Z(()=>[ae(()=>({addend(){return i.times(Ft.amount.value,.25)},description:"Heated Planters",enabled(){return i.gt(Ft.amount.value,0)}})),x(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:j.bought}))]),Dt=k(()=>Yt.apply(1)),wi=Z(()=>[ae(()=>({addend(){return i.times(Tt.amount.value,.25)},description:"Fertilized Soil",enabled(){return i.gt(Tt.amount.value,0)}})),x(()=>({multiplier:2,description:"Mulched Soil",enabled:vt.bought}))]),rl=k(()=>wi.apply(1)),ul=Z(()=>[ae(()=>({addend(){return m.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ae(()=>({addend(){return A.value},description:"Bonfires",enabled(){return i.gt(I.value,0)}})),ae(()=>({addend(){return at.value},description:"Charcoal Kilns",enabled(){return i.gt(V.value,0)}})),ae(()=>({addend(){return je.value},description:"Mining Drills",enabled(){return i.gt(ie.value,0)}})),x(()=>({multiplier:2,description:"Carry coal in boxes",enabled:dt.upgrades.coalUpgrade.bought})),x(()=>({multiplier:()=>i.div(dt.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:dt.upgrades.coalUpgrade.bought})),x(()=>({multiplier:()=>i.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Ve.elves.smallFireElf.bought})),x(()=>({multiplier:()=>i.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ve.elves.bonfireElf.bought})),x(()=>({multiplier:()=>i.div(be.amount.value,100).add(1),description:"Kiln Synergy",enabled:Ve.elves.kilnElf.bought})),x(()=>({multiplier:2,description:"Mining overalls",enabled:Nt.metalUpgrades.metalUpgrade2.bought})),x(()=>({multiplier:3,description:"Mining helmet",enabled:Nt.metalUpgrades.metalUpgrade3.bought})),ii(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Ve.milestones[2].earned,supportLowNumbers:!0}))]),kn=k(()=>ul.apply(0)),cl=Z(()=>[ae(()=>({addend(){return d.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ae(()=>({addend(){return S.value},description:"Bonfires",enabled(){return i.gt(I.value,0)}})),ae(()=>({addend(){return De.value},description:"Charcoal Kilns",enabled(){return i.gt(V.value,0)}})),x(()=>({multiplier:2,description:"Carry ash in boxes",enabled:dt.upgrades.ashUpgrade.bought})),x(()=>({multiplier:()=>i.div(dt.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:dt.upgrades.ashUpgrade.bought})),x(()=>({multiplier:()=>i.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Ve.elves.smallFireElf.bought})),x(()=>({multiplier:()=>i.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ve.elves.bonfireElf.bought})),x(()=>({multiplier:()=>i.div(be.amount.value,100).add(1),description:"Kiln Synergy",enabled:Ve.elves.kilnElf.bought})),x(()=>({multiplier:4,description:"Mining boots",enabled:Nt.metalUpgrades.metalUpgrade1.bought}))]),qn=k(()=>cl.apply(0)),dl=Z(()=>[ae(()=>({addend(){return i.negate(c.value)},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ae(()=>({addend(){return i.negate(ne.value)},description:"Bonfires",enabled(){return i.gt(I.value,0)}})),ae(()=>({addend(){return i.negate(Qe.value)},description:"Charcoal Kilns",enabled(){return i.gt(V.value,0)}}))]),ml=k(()=>dl.apply(0)),[_i,ki]=an(()=>[{title:"Log Consumption",modifier:dl,base:0,visible(){return i.gt(r.value,0)||i.gt(I.value,0)||i.gt(V.value,0)}},{title:"Coal Gain",modifier:ul,base:0,visible(){return i.gt(r.value,0)||i.gt(I.value,0)||i.gt(V.value,0)}},{title:"Ash Gain",modifier:cl,base:0,visible(){return i.gt(r.value,0)||i.gt(I.value,0)||i.gt(V.value,0)}}]),Vn=O(!1),Ci=B(()=>o(rt,{modelValue:Vn.value,"onUpdate:modelValue":E=>Vn.value=E},{header:()=>o("h2",null,[e,p(" Modifiers")]),body:_i}));Te.on("update",E=>{i.lt(K.day.value,Sl)||i.times(E,ml.value).negate().gt(se.logs.value)||(se.logs.value=i.times(E,ml.value).plus(se.logs.value),a.value=i.times(E,kn.value).plus(a.value),s.value=i.times(E,qn.value).plus(s.value),r.value=i.max(r.value,0))});const{total:Ni,trackerDisplay:Si}=sn({resource:a,goal:1e7,name:e,day:Sl,color:t,modal:{show:Vn,display:Ci}});return{name:e,color:t,coal:a,totalCoal:Ni,computedCoalGain:kn,ash:s,activeFires:r,buildFire:y,activeBonfires:I,buildBonfire:T,activeKilns:V,buildKiln:be,activeDrills:ie,buildDrill:Ne,warmerCutters:ee,warmerPlanters:Xe,basicFertilizer:$e,unlockBonfire:nt,dedicatedCutters:ct,dedicatedPlanters:j,betterFertilizer:vt,unlockKiln:lt,heatedCutters:Mt,heatedPlanters:Ft,moreFertilizer:Tt,computedHeatedCutterEffect:ft,computedHeatedPlanterEffect:Dt,computedFertilizerEffect:rl,generalTabCollapsed:ki,minWidth:700,display:B(()=>o(P,null,[de(Si),o(ve,null,null),o(gt,{resource:a,color:t,style:"margin-bottom: 0",effectDisplay:i.gt(kn.value,0)?`+${ue(kn.value)}/s`:void 0},null),o(ve,null,null),o(gt,{resource:s,color:n,style:"margin-bottom: 0",effectDisplay:i.gt(qn.value,0)?`+${ue(qn.value)}/s`:void 0},null),o(ve,null,null),o(el,null,{default:()=>[o(Wt,null,{default:()=>[de(y),o("div",null,[le(i.floor(r.value)),p("/"),le(i.floor(y.amount.value))]),Fe(g,w,v,_)]}),nt.bought.value?o(P,null,[o(ve,null,null),o(Wt,null,{default:()=>[de(T),o("div",null,[le(I.value),p("/"),le(T.amount.value)]),Fe(ye,Me,Ae,oe)]})]):void 0,lt.bought.value?o(P,null,[o(ve,null,null),o(Wt,null,{default:()=>[de(be),o("div",null,[le(V.value),p("/"),le(be.amount.value)]),Fe(Ce,Ee,ge,me)]})]):void 0,mn.coalDrill.bought.value?o(P,null,[o(ve,null,null),o(Wt,null,{default:()=>[de(Ne),o("div",null,[le(ie.value),p("/"),le(Ne.amount.value)]),Fe(Je,Be,ke,ze)]})]):void 0]}),o(ve,null,null),Fe(...Ht),Fe(...te),Fe(...D)]))}}),xo="metal",Ml=7,mn=St(xo,function(){const e="Metal",t="#888B8D",n=ot(0,"metal ingots",void 0,!0),l=wl(n),a=ot(0,"ore"),s=wl(a),r=Z(()=>[x(()=>({multiplier:5,description:"Crucible",enabled:at.bought})),x(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>i.gte(Ee.amount.value,1)})),x(()=>({multiplier:2,description:"Industrial Furnace",enabled:be.bought})),x(()=>({multiplier:()=>i.add(ie.value,1),description:"Hotter Forges",enabled:()=>i.gte(me.amount.value,1)}))]),c=k(()=>r.apply(.1)),m=Z(()=>[ae(()=>({addend:()=>i.times(Ee.amount.value,10),description:"Industrial Crucibles",enabled:()=>i.gte(Ee.amount.value,1)}))]),d=k(()=>m.apply(0)),y=1e10,g=k(()=>i.min(a.value,i.div(q.coal.value,y)).floor().max(0)),w=we(()=>({display:B(()=>{const ee=i.gte(g.value,1)?g.value:i.add(g.value,1);return o(P,null,[o("span",{style:"font-size: large"},[p("Smelt "),He(i.times(g.value,c.value))," ",n.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[p("Cost: "),Se(ee),p(" "),a.displayName,p(";")," ",Se(i.times(ee,y)),p(" "),q.coal.displayName])])}),canClick:()=>i.gte(g.value,1),onClick(){!u(this.canClick)||v(g.value)},style:{width:"600px",minHeight:"unset"}}));function v(ee){const[Xe,$e,nt]=[i.times(ee,c.value),ee,i.times(ee,y)];n.value=i.add(n.value,Xe),a.value=i.sub(a.value,$e),q.coal.value=i.sub(q.coal.value,nt)}const _=Z(()=>[ae(()=>({addend:()=>Ce.amount.value,description:"Mining Drills",enabled:()=>i.gte(Ce.amount.value,1)}))]),N=k(()=>_.apply(1)),I=Z(()=>[x(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:V.bought})),x(()=>({multiplier:2,description:"Double Pickaxe",enabled:Qe.bought})),x(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>i.gte(Ce.amount.value,1)}))]),ne=k(()=>I.apply(1)),A=_e(0),S=10,T=It(()=>({width:400,height:25,direction:re.Right,fillStyle:{backgroundColor:t},progress:()=>i.div(A.value,S)})),ye=Z(()=>[ae(()=>({addend:N})),x(()=>({multiplier:ne})),x(()=>({multiplier:i.reciprocate(S)}))]),Me=k(()=>ye.apply(0)),Ae=Z(()=>[ae(()=>({addend:Me})),ae(()=>({addend:()=>i.negate(d.value),enabled:ge}))]),oe=k(()=>Ae.apply(0)),V=Y(()=>({resource:G(n),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

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

Halve the time to mine more ore"}})),Oe=G(()=>({resource:H(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:()=>F(Oe.bought.value)})),Ie=G(()=>({resource:H(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>F(Ie.bought.value||n.div(s.value,c.value).plus(a.value).gte(1))})),je=G(()=>({resource:H(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>F(n.gte(pe.amount.value,1)&&(je.bought.value||n.lt(O.computedCoalGain.value,n.times(oe.value,M.value).times(w)))),onPurchase(){J.days[2].recentlyUpdated.value=!0}})),ut=G(()=>({canAfford(){return n.gte(l.value,50)&&n.gte(O.coal.value,1e11)},onPurchase(){l.value=n.sub(l.value,50),O.coal.value=n.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}
${ie(1e11)} ${O.coal.displayName}`}})),z=G(()=>({resource:H(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibilty:()=>F(We.depthMilestones[4].earned.value)})),pe=De(()=>({resource:H(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:I(()=>o(B,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",te(pe.amount.value),d(" ore per operation")]))},visibility:()=>F(n.gte(pe.amount.value,1)||n.div(s.value,c.value).plus(a.value).gte(10)),style:{width:"200px"}})),W=De(()=>({resource:H(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:I(()=>o(B,null,[d("Automatically smelts")," ",te(n.times(W.amount.value,10)),d(" ore per second")]))},visibility:()=>F(n.gte(W.amount.value,1)||n.gte(pe.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),ve=be(!0),Me=De(()=>({resource:O.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:I(()=>o(B,null,[d("Gain "),te(n.times(et.value,100)),d("% more metal per ore")]))},visibility:()=>F(n.gte(Me.amount.value,1)||ut.bought.value),style:{width:"200px"}})),et=k(()=>n.times(Me.amount.value,.25));He.on("update",re=>{D.value=n.times(re,M.value).plus(D.value);const vt=D.value.trunc();D.value=D.value.minus(vt),i.value=n.add(i.value,n.times(vt,oe.value)),ve.value&&S(n.min(h.value,n.times(m.value,re)),g.value)});const[Re,Be]=cl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(W.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return n.gt(g.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:N,base:1},{title:"Mining Speed",modifier:A,base:.1,unit:"/s"}]),ae=R(!1),Pe=I(()=>o(gt,{modelValue:ae.value,"onUpdate:modelValue":re=>ae.value=re},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Re})),{total:nt,trackerDisplay:Ue}=dl({resource:l,goal:25e3,name:e,day:jn,color:t,modal:{show:ae,display:Pe}});return{name:e,day:jn,color:t,ore:i,bestOre:s,oreProgress:D,metal:l,bestMetal:a,totalMetal:nt,simplePickaxe:$e,doublePickaxe:Oe,crucible:Ie,coalDrill:je,industrialFurnace:ut,efficientDrill:z,oreDrill:pe,industrialCrucible:W,autoSmeltEnabled:ve,hotterForge:Me,generalTabCollapsed:Be,minWidth:700,display:I(()=>o(B,null,[ue(Ue),o(we,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:I(()=>o(B,null,[ve.value&&n.gte(W.amount.value,1)?`+${oa([[m.value,"smelting speed"],[de.value,"ore gain"],[n.div(O.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,g.value))}`:void 0]))},null),o(we,null,null),ue(C),n.gte(W.amount.value,1)?o("div",{style:{width:"150px"}},[o(Gt,{title:"Auto Smelt",modelValue:ve.value,"onUpdate:modelValue":re=>ve.value=re},null)]):void 0,o(we,null,null),o(St,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:I(()=>o(B,null,[sa(Ze.value)]))},null),o(we,null,null),o("div",null,[d("Currently mining "),ie(oe.value),d(" ore every")," ",ie(n.recip(M.value)),d(" seconds")]),ue(Te),o(we,null,null),_e($e,Oe,Ie,je,ut,z),_e(pe,W,Me)]))}}),lr="cloth",zn=8,qt=Ft(lr,function(){const e="Cloth",t="white",l=st(0,"cloth"),a=st(0,"wool"),i=st(10,"sheep"),s=be(0),r=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,ve.value)})),c=V(()=>({display:{title:"Breed sheep",description:I(()=>o(B,null,[d("Breed "),te(n.floor(pe.value)),d(" sheep"),o("br",null,null),ue(r)]))},style:{minHeight:"80px"},canClick:()=>n.gte(s.value,ve.value),onClick(){if(n.lt(s.value,ve.value))return;const se=n.floor(pe.value);i.value=n.add(i.value,se),s.value=0}})),p=be(0),m=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(p.value,Be.value)})),y=V(()=>({display:{title:"Shear sheep",description:I(()=>o(B,null,[d("Shear up to "),te(n.floor(et.value)),d(" sheep"),o("br",null,null),ue(m)]))},style:{minHeight:"80px"},canClick:()=>n.gte(p.value,Be.value),onClick(){if(n.lt(p.value,Be.value))return;const se=n.min(i.value,et.value).floor();a.value=n.add(a.value,se),p.value=0}})),g=be(0),w=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(g.value,Ue.value)})),h=V(()=>({display:{title:"Spinning wool",description:I(()=>o(B,null,[d("Spin "),te(n.floor(Pe.value)),d(" wool"),o("br",null,null),ue(w)]))},style:{minHeight:"80px"},canClick:()=>n.gte(g.value,Ue.value),onClick(){if(n.lt(g.value,Ue.value))return;const se=n.min(a.value,Pe.value).floor();l.value=n.add(l.value,se),a.value=n.sub(a.value,se),g.value=0}})),C=vl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),S=vl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),N=vl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{h.canClick.value&&h.onClick()}})),oe=De(()=>({resource:ge.logs,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.5,se).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),A=De(()=>({resource:ht.metal,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.4,se).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),M=De(()=>({resource:xe.paper,cost(){let se=this.amount.value;return n.gte(se,100)&&(se=n.pow(se,2).div(100)),n.pow(1.3,se).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),D=G(()=>({resource:H(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Ne=G(()=>({resource:H(a),cost:150,visibility:()=>F(D.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),Z={treesUpgrade3:G(()=>({resource:H(i),cost:200,visibility:()=>F(Ne.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),treesUpgrade2:Ne,treesUpgrade1:D},de=G(()=>({resource:H(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),L=G(()=>({resource:H(a),cost:225,visibility:()=>F(de.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),$e={metalUpgrade3:G(()=>({resource:H(i),cost:300,visibility:()=>F(L.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),metalUpgrade2:L,metalUpgrade1:de},Oe=G(()=>({resource:H(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),Ie=G(()=>({resource:H(a),cost:200,visibility:()=>F(Oe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),ut={paperUpgrade3:G(()=>({resource:H(i),cost:400,visibility:()=>F(Ie.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),paperUpgrade2:Ie,paperUpgrade1:Oe},z=X(()=>[ne(()=>({addend:oe.amount,description:"Build more pens"}))]),pe=k(()=>z.apply(1)),W=X(()=>[]),ve=k(()=>W.apply(1)),Me=X(()=>[ne(()=>({addend:A.amount,description:"Make stronger shears"}))]),et=k(()=>Me.apply(1)),Re=X(()=>[]),Be=k(()=>Re.apply(1)),ae=X(()=>[ne(()=>({addend:M.amount,description:"Learn how to spin"}))]),Pe=k(()=>ae.apply(1)),nt=X(()=>[]),Ue=k(()=>nt.apply(1)),[re,vt]=cl(()=>[{title:"Sheep Gain",modifier:z,base:1},{title:"Sheep Breeding Cooldown",modifier:W,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Me,base:1},{title:"Shearing Cooldown",modifier:Re,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:ae,base:1},{title:"Spinning Cooldown",modifier:nt,base:1,visible:!1,unit:"s"}]),at=R(!1),j=I(()=>o(gt,{modelValue:at.value,"onUpdate:modelValue":se=>at.value=se},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:re}));He.on("update",se=>{n.lt(J.day.value,zn)||(n.gte(s.value,ve.value)?s.value=ve.value:(s.value=n.add(s.value,se),c.isHolding.value&&c.onClick()),n.gte(p.value,Be.value)?p.value=Be.value:(p.value=n.add(p.value,se),y.isHolding.value&&y.onClick()),n.gte(g.value,Ue.value)?g.value=Ue.value:(g.value=n.add(g.value,se),h.isHolding.value&&h.onClick()))});const{total:dt,trackerDisplay:fe}=dl({resource:l,goal:1e3,name:e,day:zn,color:t,textColor:"var(--feature-foreground)",modal:{show:at,display:j}});return{name:e,color:t,cloth:l,totalCloth:dt,wool:a,sheep:i,buildPens:oe,betterShears:A,fasterSpinning:M,treesUpgrades:Z,metalUpgrades:$e,paperUpgrades:ut,generalTabCollapsed:vt,breedingProgress:s,shearingProgress:p,spinningProgress:g,breedSheepHK:C,shearSheepHK:S,spinWoolHK:N,minWidth:700,display:I(()=>o(B,null,[ue(fe),o(we,null,null),o(St,{resource:l,style:"margin-bottom: 0"},null),o(St,{resource:a,style:"margin-bottom: 0"},null),o(St,{resource:i,style:"margin-bottom: 0"},null),_e(c,y,h),_e(oe,A,M),o(we,null,null),o(Il,null,{default:()=>[Nl(...Object.values(Z)),Nl(...Object.values($e)),Nl(...Object.values(ut))]})]))}}),nr="trees",Wn=1,Kn=.1,ge=Ft(nr,function(){const e="Trees",t="#4BDC13",l="green",a=st(0,"logs"),i=st(0,"saplings"),s=R(0),r=X(()=>[ne(()=>({addend:()=>n.times(Z.amount.value,10),description:"Expand Forest",enabled:M.bought})),ne(()=>({addend:()=>n.div(ft.foundationProgress.value,2),description:"75% Foundation Completed",enabled:ft.milestones.morePlantsMilestone1.earned})),E(()=>({multiplier:2,description:"5 Elves Trained",enabled:Je.milestones[4].earned})),E(()=>({multiplier:2,description:"8 Elves Trained",enabled:Je.milestones[7].earned})),E(()=>({multiplier:4,description:"Lumberjack Boots",enabled:qt.treesUpgrades.treesUpgrade1.bought}))]),c=st(k(()=>n.sub(r.apply(10),i.value)),"trees"),p=k(()=>r.apply(10)),m=G(()=>({resource:H(a),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=G(()=>({resource:H(a),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),g=G(()=>({resource:H(a),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),w=G(()=>({resource:H(a),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),h=G(()=>({resource:H(a),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),C=[m,y,g,w,h],S=G(()=>({resource:H(a),cost:50,visibility:()=>F(h.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),N=G(()=>({resource:H(a),cost:50,visibility:()=>F(h.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),oe=G(()=>({resource:H(a),cost:150,visibility:()=>F(h.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),A=G(()=>({resource:H(a),cost:150,visibility:()=>F(h.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),M=G(()=>({resource:H(a),cost:300,visibility:()=>F(h.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),D=[S,N,oe,A,M],Ne=De(()=>({resource:H(a),cost(){let $=this.amount.value;return n.gte($,50)&&($=n.pow($,2).div(50)),n.gte($,200)&&($=n.pow($,2).div(200)),n.gte($,2e6)&&($=n.pow($,2).div(2e6)),$=n.pow(.95,xe.books.cuttersBook.amount.value).times($),n.times(100,$).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>F(M.bought.value)})),Te=De(()=>({resource:H(a),cost(){let $=this.amount.value;return n.gte($,50)&&($=n.pow($,2).div(50)),n.gte($,200)&&($=n.pow($,2).div(200)),n.gte($,2e6)&&($=n.pow($,2).div(2e6)),$=n.pow(.95,xe.books.plantersBook.amount.value).times($),n.times(100,$).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>F(M.bought.value)})),Z=De(()=>({resource:H(a),cost(){let $=this.amount.value;return n.gte($,100)&&($=n.pow($,2).div(100)),n.gte($,1e5)&&($=n.pow($,2).div(1e5)),$=n.pow(.95,xe.books.expandersBook.amount.value).times($),n.pow(n.add($,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>F(M.bought.value)})),de=[Ne,Te,Z],L=X(()=>[ne(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),ne(()=>({addend:je,description:"Smart Knives",enabled:oe.bought}))]),Ze=k(()=>L.apply(1)),$e=X(()=>[E(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),E(()=>({multiplier:()=>n.pow(.5,Je.totalElves.value),description:"1 Elf Trained",enabled:Je.milestones[0].earned}))]),Oe=k(()=>$e.apply(1)),Ie=X(()=>[ne(()=>({addend:1,description:"Automated Knives",enabled:g.bought})),ne(()=>({addend:Ne.amount,description:"Generic Cutters",enabled:M.bought})),ne(()=>({addend:()=>n.div(ft.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:ft.milestones.autoCutMilestone1.earned})),E(()=>({multiplier:2,description:"30% Foundation Completed",enabled:ft.milestones.autoCutMilestone2.earned})),E(()=>({multiplier:2,description:"Warmer Cutters",enabled:O.warmerCutters.bought})),E(()=>({multiplier:O.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>n.gt(O.heatedCutters.amount.value,0)})),E(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:qt.treesUpgrades.treesUpgrade2.bought}))]),je=k(()=>Ie.apply(0)),ut=X(()=>[ne(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),ne(()=>({addend:Me,description:"Smart Spades",enabled:A.bought}))]),z=k(()=>ut.apply(1)),pe=X(()=>[E(()=>({multiplier:.5,description:"Greener Fingers",enabled:N.bought})),E(()=>({multiplier:()=>n.pow(.5,Je.totalElves.value),description:"1 Elf Trained",enabled:Je.milestones[0].earned}))]),W=k(()=>pe.apply(1)),ve=X(()=>[ne(()=>({addend:1,description:"Automated Spade",enabled:w.bought})),ne(()=>({addend:()=>n.div(Te.amount.value,2),description:"Generic Planters",enabled:M.bought})),ne(()=>({addend:()=>n.div(ft.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:ft.milestones.autoPlantMilestone1.earned})),E(()=>({multiplier:2,description:"40% Foundation Completed",enabled:ft.milestones.autoPlantMilestone2.earned})),E(()=>({multiplier:2,description:"Warmer Planters",enabled:O.warmerPlanters.bought})),E(()=>({multiplier:O.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>n.gt(O.heatedPlanters.amount.value,0)})),E(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:qt.treesUpgrades.treesUpgrade3.bought}))]),Me=k(()=>ve.apply(0)),et=X(()=>[E(()=>({multiplier:1.25,description:"Research I",enabled:h.bought})),E(()=>({multiplier:1.25,description:"Research II",enabled:M.bought})),E(()=>({multiplier:()=>n.div(ft.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:ft.milestones.logGainMilestone1.earned})),E(()=>({multiplier:2,description:"50% Foundation Completed",enabled:ft.milestones.logGainMilestone2.earned})),E(()=>({multiplier:1.25,description:"Ashy Soil",enabled:O.basicFertilizer.bought})),E(()=>({multiplier:O.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>n.gt(O.moreFertilizer.amount.value,0)})),E(()=>({multiplier:2,description:"4 Elves Trained",enabled:Je.milestones[3].earned})),E(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ct.upgrades.logsUpgrade.bought})),E(()=>({multiplier:()=>n.div(Ct.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ct.upgrades.logsUpgrade.bought})),_a(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:ft.milestones.logGainMilestone3.earned}))]),Re=be(0),Be=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(Re.value,Oe.value)})),ae=V(()=>({display:{title:"Cut trees",description:I(()=>o(B,null,[d("Cut down up to "),he(n.floor(Ze.value))," ",d("tree"),n.eq(Ze.value,1)?"":"s",d(" at once!"),o("br",null,null),ue(Be)]))},style:{minHeight:"80px"},canClick:()=>n.gte(c.value,1)&&n.gte(Re.value,Oe.value),onClick(){if(n.lt(Re.value,Oe.value))return;const $=n.floor(n.min(c.value,n.times(Ze.value,n.div(Re.value,Oe.value).floor())));a.value=n.add(a.value,n.times(et.apply(1),$)),i.value=n.add(i.value,$),Re.value=0}})),Pe=be(0),nt=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(Pe.value,W.value)})),Ue=V(()=>({display:{title:"Plant trees",description:I(()=>o(B,null,[d("Plant up to "),he(n.floor(z.value))," ",d("tree"),n.eq(z.value,1)?"":"s",d(" at once!"),o("br",null,null),ue(nt)]))},style:{minHeight:"80px"},canClick:()=>n.gte(i.value,1)&&n.gte(Pe.value,W.value),onClick(){if(n.lt(Pe.value,W.value))return;const $=n.floor(n.min(i.value,n.times(z.value,n.div(Pe.value,W.value).floor())));i.value=n.sub(i.value,$),Pe.value=0}})),[re,vt]=cl(()=>[{title:"Logs per Tree",modifier:et,base:1,visible:h.bought},{title:"Manual Cutting Amount",modifier:L,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:$e,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:ut,base:1,visible:y.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:pe,base:1,visible:y.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ie,base:0,visible:g.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:ve,base:0,visible:w.bought,unit:"/s"},{title:"Forest Size",modifier:r,base:10,visible:M.bought}]),at=R(!1),j=I(()=>o(gt,{modelValue:at.value,"onUpdate:modelValue":$=>at.value=$},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:re}));He.on("update",$=>{if(n.lt(J.day.value,Wn))return;n.gte(Re.value,Oe.value)?Re.value=Oe.value:(Re.value=n.add(Re.value,$),ae.isHolding.value&&ae.onClick()),n.gte(Pe.value,W.value)?Pe.value=W.value:(Pe.value=n.add(Pe.value,$),Ue.isHolding.value&&Ue.onClick());const Mt=n.min(c.value,n.times(je.value,$)),wt=n.mul(et.apply(1),Mt),ze=n.div(wt,$);s.value=n.mul(ze,Kn).add(n.mul(s.value,n.dOne.sub(Kn))),a.value=n.add(a.value,wt),i.value=n.add(i.value,Mt);const $t=n.min(i.value,n.times(Me.value,$));i.value=n.sub(i.value,$t)});const dt=k(()=>n.sub(je.value,Me.value)),fe=k(()=>n.sub(Me.value,je.value)),se=vl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{ae.canClick.value&&ae.onClick()}})),Ht=vl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{Ue.canClick.value&&Ue.onClick()}})),{total:yt,trackerDisplay:Tt}=dl({resource:a,goal:1e4,name:e,day:Wn,color:l,modal:{show:at,display:j}});return{name:e,color:t,logs:a,totalLogs:yt,trees:c,saplings:i,cutTree:ae,plantTree:Ue,cutTreeHK:se,plantTreeHK:Ht,row1Upgrades:C,row2Upgrades:D,row1Buyables:de,manualCutProgress:Re,manualPlantProgress:Pe,generalTabCollapsed:vt,minWidth:700,display:I(()=>o(B,null,[ue(Tt),o(we,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",productionDisplay:n.gt(je.value,0)?`+${ke(s.value)}/s average
equilibrium: +${ra([[je.value,"cutting speed"],[Me.value,"planting speed"],[n.mul(p.value,20),"forest cap"]],"/s",et.apply(1))}`:void 0},null),o(St,{resource:i,color:l,style:"margin-bottom: 0",productionDisplay:Wl(dt.value)},null),o(St,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:Wl(fe.value)},null),o(we,null,null),_e(ae,Ue),o("div",null,[d("Tip: You can hold down on actions to perform them automatically")]),o(we,null,null),_e(...C),_e(...D),_e(...de)]))}});var Ma="./assets/tree.35808197.png",xa="./assets/sws.714ad454.png",Aa="data:image/png;base64,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",Ea="./assets/elf.9fbfa563.png",Ia="./assets/paperStacks.4c96ec8c.png",Ba="data:image/png;base64,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",Pa="./assets/metal.7407f5d1.png",Da="./assets/cloth.7bcd7f37.png";const J=Ft("main",function(){const e=be(1),t=k(()=>(+new Date(new Date().getFullYear(),11,e.value)-Q.time)/1e3),l=R(!1),a=R(-1),i=R(""),s=R();function r(m){const y=be(!1),g=be(!1);return bt(()=>{const w=m(),h=it(w.shouldNotify),C=it(()=>u(h)||u(g));return{...w,opened:y,shouldNotify:C,recentlyUpdated:g,[ll]:Qo,[nl]:function(){const{day:S,layer:N,symbol:oe,opened:A,shouldNotify:M,story:D,completedStory:Ne,recentlyUpdated:Te}=this;return{day:S,symbol:oe,layer:N,opened:A,recentlyUpdated:Te,shouldNotify:M,onOpenLore(){var L,Ze;const Z=J.day.value>S;a.value=Z?S-1:-1;const de=u((Ze=(L=ct[N!=null?N:"trees"])==null?void 0:L.name)!=null?Ze:"");i.value=Z?`${de} - Completed!`:de,s.value=Z?`${D}
${Ne}`:D,l.value=!0},onOpenLayer(){if(Te.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(Q.tabs.includes(N!=null?N:"trees")){const Z=Q.tabs.lastIndexOf(N!=null?N:"trees");Q.tabs.splice(Z,1)}else Q.tabs.push(N!=null?N:"trees"),J.minimized.value=!0;else Q.tabs.splice(1,1/0,N!=null?N:"trees")},onUnlockLayer(){N&&(A.value=!0,setTimeout(()=>{var Z,de;a.value=-1,i.value=u((de=(Z=ct[N!=null?N:"trees"])==null?void 0:Z.name)!=null?de:""),s.value=D,Q.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[r(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Ma,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:xa,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),r(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Aa,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ea,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),r(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Ia,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),r(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Ba,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),r(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Pa,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drills and metal clanging join the already loud din as yet another piece of the puzzle fits into place. You're making solid progress, Good Job!"})),r(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:Da,story:"Another resource you're going to need for gifts is cloth! Fortunately you think this should be pretty easy to prepare using a sheep farm - and as you've already proven with the tree farm, that's something you can handle!",completedStory:"You fall into a pile of wool, sighing contentedly as you look at all the progress you've made today. Good Job!"})),r(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:"",story:"Looks like you just need one more thing before the toy factory can get 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, unfortunately you'll need to mine much deeper that you're currently doing before, 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 these digging work - tomorrow will be a busy day! Good Job!"})),r(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){a.value=e.value-1,i.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,J.minimized.value=!1,Q.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:a,loreTitle:i,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:I(()=>o(B,null,[Q.devSpeed===0?o("div",null,[d("Game Paused")]):null,Q.devSpeed&&Q.devSpeed!==1?o("div",null,[d("Dev Speed: "),ke(Q.devSpeed),d("x")]):null,Q.offlineTime?o("div",null,[d("Offline Time: "),ln(Q.offlineTime)]):null,o(we,null,null),o("div",{class:"advent"},[c.reduce((m,y)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(y),m),[[]]).map(m=>_e(...m))])]))}}),ar=e=>[J,ge,ft,O,Je,xe,Ct,ht,qt,We],An=k(()=>!1);function ir(e,t){t.offlineProd=!1}var or=Object.freeze(Object.defineProperty({__proto__:null,main:J,getInitialLayers:ar,hasWon:An,fixOldSave:ir},Symbol.toStringTag,{value:"Module"}));const sr={class:"scene"},rr=["src"],ur=["src"],cr=["src"],dr=["src"],pr=["src"],mr=["src"],fr={key:6,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},hr=["src"],gr=["src"],vr=le({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(b(),x("div",sr,[e.day>=7?(b(),x("img",{key:0,src:u(Da),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,rr)):T("",!0),e.day>=0?(b(),x("img",{key:1,src:u(Ma),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,ur)):T("",!0),e.day>=1?(b(),x("img",{key:2,src:u(xa),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,cr)):T("",!0),e.day>=2?(b(),x("img",{key:3,src:u(Aa),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,dr)):T("",!0),e.day>=6?(b(),x("img",{key:4,src:u(Pa),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,pr)):T("",!0),e.day>=3?(b(),x("img",{key:5,src:u(Ea),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,mr)):T("",!0),e.day>=4?(b(),x("div",fr,[e.day>=4?(b(),x("img",{key:0,src:u(Ia),class:"scene-item"},null,8,hr)):T("",!0),e.day>=5?(b(),x("img",{key:1,src:u(Ba),class:"scene-item"},null,8,gr)):T("",!0)])):T("",!0)]))}});var yr=Se(vr,[["__scopeId","data-v-217dad6a"]]);const br=le({components:{Context:da},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:q(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:q(Number,String),required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:a,minWidth:i,tab:s}=rt(e),r=Jl(t),c=k(()=>Ae.allowGoBack&&l.value>0&&!a.value);function p(){Q.tabs.splice(u(e.index),1)}rl(()=>y(a.value,u(i.value))),Pt([a,Mo(i)],([g,w])=>y(g,w));function m(g){e.nodes.value=g}function y(g,w){const h=typeof w=="number"||Number.isNaN(parseInt(w))?w+"px":w,C=s.value();C!=null&&(g?(C.style.flexGrow="0",C.style.flexShrink="0",C.style.width="60px",C.style.minWidth=C.style.flexBasis="",C.style.margin="0"):(C.style.flexGrow="",C.style.flexShrink="",C.style.width="",C.style.minWidth=C.style.flexBasis=h,C.style.margin=""))}return{component:r,showGoBack:c,updateNodes:m,unref:u,goBack:p}}});function wr(e,t,l,a,i,s){const r=el("Context");return b(),x("div",{class:"layer-container",style:Ye({"--layer-color":e.unref(e.color)})},[e.showGoBack?(b(),x("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):T("",!0),e.minimized.value?(b(),x("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,ce(e.unref(e.name)),1)])):(b(),x("div",{key:2,class:Qe(["layer-tab",{showGoBack:e.showGoBack}])},[o(r,{onUpdateNodes:e.updateNodes},{default:K(()=>[(b(),Y(qe(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(b(),x("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var kr=Se(br,[["render",wr],["__scopeId","data-v-0158bec3"]]);const Fa=e=>(zt("data-v-4b4bda40"),e=e(),Wt(),e),Cr=Fa(()=>f("h2",null,"Changelog",-1)),_r=Fa(()=>f("details",{open:""},[f("summary",null,[d("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),d(" 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)),Sr=le({__name:"Changelog",setup(e,{expose:t}){const l=R(!1);return t({open(){l.value=!0}}),(a,i)=>(b(),Y(gt,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s)},{header:K(()=>[Cr]),body:K(()=>[_r]),_:1},8,["modelValue"]))}});var Nr=Se(Sr,[["__scopeId","data-v-4b4bda40"]]),Mr=le({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:l,pinned:a}=rt(e),i=R(!1),s=k(()=>(lt(a)||i.value)&&r.value),r=tl(l),c=xt(Ce(I(()=>{const y=lt(t);return y==null?"":Bt(y)})));function p(y){const g=a;y.shiftKey&&g&&(g.value=!g.value,y.stopPropagation(),y.preventDefault())}const m=k(()=>lt(a)&&Pl[Le.theme].showPin);return{Direction:ye,isHovered:i,isShown:s,comp:r,elementComp:c,unref:u,togglePinned:p,showPin:m}}});const xr={key:0,class:"material-icons pinned"};function Ar(e,t,l,a,i,s){return b(),x("div",{class:Qe(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=r=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=r=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...r)=>e.togglePinned&&e.togglePinned(...r))},[It(e.$slots,"default",{},void 0,!0),e.elementComp?(b(),Y(qe(e.elementComp),{key:0})):T("",!0),o(en,{name:"fade"},{default:K(()=>{var r;return[e.isShown?(b(),x("div",{key:0,class:Qe(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Ye([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(r=e.unref(e.style))!=null?r:{}])},[e.showPin?(b(),x("span",xr,"push_pin")):T("",!0),e.comp?(b(),Y(qe(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var Ke=Se(Mr,[["render",Ar],["__scopeId","data-v-6102fa3a"]]);const Er={class:"info-modal-header"},Ir=["src","alt"],Br={class:"info-modal-title"},Pr={key:0},Dr=d(" - "),Fr={key:0},Tr={key:0},$r=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),Or=f("br",null,null,-1),Rr=f("br",null,null,-1),Ur=["href"],qr=f("span",{class:"material-icons info-modal-discord"},"discord",-1),Hr=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"),d(" The Paper Pilot Community ")])],-1),Vr=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"),d(" The Modding Tree ")])],-1),Lr=f("br",null,null,-1);var Gr=le({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:a,logo:i,author:s,discordName:r,discordLink:c,versionNumber:p,versionTitle:m}=Ae,y=rt(l),g=R(!1),w=k(()=>ln(Q.timePlayed)),h=k(()=>Ce(I(()=>o(B,null,[wa.map(ue)]))));t({open(){g.value=!0}});function C(){var S;(S=u(y.changelog))==null||S.open()}return(S,N)=>(b(),Y(gt,{class:"info-modal",modelValue:g.value,"onUpdate:modelValue":N[0]||(N[0]=oe=>g.value=oe)},{header:K(()=>[f("div",Er,[u(i)?(b(),x("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(a)},null,8,Ir)):T("",!0),f("div",Br,[f("h2",null,"- "+ce(u(a))+" -",1),f("h4",null,[d(" - v"+ce(u(p)),1),u(m)?(b(),x("span",Pr,": "+ce(u(m)),1)):T("",!0),Dr])])])]),body:K(({shown:oe})=>[oe?(b(),x("div",Fr,[u(s)?(b(),x("div",Tr,"By "+ce(u(s)),1)):T("",!0),$r,Or,f("div",{class:"link",onClick:C},"Changelog"),Rr,f("div",null,[u(c)?(b(),x("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[qr,d(" "+ce(u(r)),1)],8,Ur)):T("",!0)]),Hr,Vr,Lr,f("div",null,"Time Played: "+ce(u(w)),1),(b(),Y(qe(u(h))))])):T("",!0)]),_:1},8,["modelValue"]))}});const Ta=e=>(zt("data-v-0d685451"),e=e(),Wt(),e),Qr=Ta(()=>f("h2",null,"Options",-1)),jr=Ta(()=>f("hr",null,null,-1));var zr=le({__name:"Options",setup(e,{expose:t}){const l=R(!1);t({open(){l.value=!0}});const a=Object.keys(Pl).map(h=>({label:ua(h),value:h})),i=k(()=>Ce(I(()=>o(B,null,[ba.map(ue)])))),{showTPS:s,theme:r}=rt(Le),{autosave:c,usingLog:p}=rt(Q),m=k({get(){return Q.devSpeed===0},set(h){Q.devSpeed=h?0:null}}),y=I(()=>o("span",null,[d("Autosave"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})])),g=I(()=>o("span",null,[d("Pause game"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})])),w=I(()=>o("span",null,[d("Use log for progress bar"),o(Ke,{display:"Save-specific"},{default:()=>[d("*")]})]));return(h,C)=>(b(),Y(gt,{modelValue:l.value,"onUpdate:modelValue":C[5]||(C[5]=S=>l.value=S)},{header:K(()=>[Qr]),body:K(()=>[o(xn,{title:"Theme",options:u(a),modelValue:u(r),"onUpdate:modelValue":C[0]||(C[0]=S=>Xe(r)?r.value=S:null)},null,8,["options","modelValue"]),(b(),Y(qe(u(i)))),o(Gt,{title:"Show TPS",modelValue:u(s),"onUpdate:modelValue":C[1]||(C[1]=S=>Xe(s)?s.value=S:null)},null,8,["modelValue"]),jr,o(Gt,{title:u(y),modelValue:u(c),"onUpdate:modelValue":C[2]||(C[2]=S=>Xe(c)?c.value=S:null)},null,8,["title","modelValue"]),u(Ae).enablePausing?(b(),Y(Gt,{key:0,title:u(g),modelValue:u(m),"onUpdate:modelValue":C[3]||(C[3]=S=>Xe(m)?m.value=S:null)},null,8,["title","modelValue"])):T("",!0),o(Gt,{title:u(w),modelValue:u(p),"onUpdate:modelValue":C[4]||(C[4]=S=>Xe(p)?p.value=S:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Wr=Se(zr,[["__scopeId","data-v-0d685451"]]);const Kr=["onSubmit"],Jr={class:"field"},Xr={key:0,class:"field-title"},Yr=["placeholder"],Zr=le({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const l=e,a=tl(Dt(l,"title"),"span"),i=xt(null);Yl(()=>{var p;(p=i.value)==null||p.focus()});const s=k({get(){return u(l.modelValue)||""},set(p){t("update:modelValue",p)}});function r(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(b(),x("form",{onSubmit:Ml(r,["prevent"])},[f("div",Jr,[u(a)?(b(),x("span",Xr,[(b(),Y(qe(u(a))))])):T("",!0),e.textArea?(b(),Y(u(ei),{key:1,modelValue:u(s),"onUpdate:modelValue":m[0]||(m[0]=y=>Xe(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Zl((b(),x("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=y=>Xe(s)?s.value=y:null),placeholder:e.placeholder,class:Qe({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Yr)),[[Wa,u(s)]])])],40,Kr))}});var $a=Se(Zr,[["__scopeId","data-v-67b44a54"]]);const eu={key:0},tu=["onClick","disabled"],lu={key:0},nu=["onClick"],au=le({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const a=rt(e),i=R(!1);Pt(i,c=>{t("confirmingChanged",c)});function s(){if(u(a.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function r(){i.value=!1}return(c,p)=>(b(),x("span",{class:Qe(["container",{confirming:i.value}])},[i.value?(b(),x("span",eu,"Are you sure?")):T("",!0),f("button",{onClick:Ml(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(b(),x("span",lu,"Yes")):It(c.$slots,"default",{key:1},void 0,!0)],8,tu),i.value?(b(),x("button",{key:1,class:"button",onClick:Ml(r,["stop"])},"No",8,nu)):T("",!0)],2))}});var iu=Se(au,[["__scopeId","data-v-2f8ef34c"]]);const ou=["onClick"],su=le({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=R(!1),a=R(null);function i(){t("click"),a.value&&clearTimeout(a.value),l.value=!1,rl(()=>{l.value=!0,a.value=setTimeout(()=>l.value=!1,500)})}return(s,r)=>(b(),x("button",{onClick:Ml(i,["stop"]),class:Qe(["feedback",{activated:l.value,left:e.left}])},[It(s.$slots,"default",{},void 0,!0)],10,ou))}});var ru=Se(su,[["__scopeId","data-v-01a1b95c"]]);const Kt=e=>(zt("data-v-5285ac49"),e=e(),Wt(),e),uu=Kt(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),cu={key:0,class:"actions"},du=Kt(()=>f("span",{class:"material-icons"},"content_paste",-1)),pu=Kt(()=>f("span",{class:"material-icons"},"content_copy",-1)),mu=Kt(()=>f("span",{class:"material-icons"},"edit",-1)),fu=Kt(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),hu={key:1,class:"actions"},gu=Kt(()=>f("span",{class:"material-icons"},"check",-1)),vu=Kt(()=>f("span",{class:"material-icons"},"close",-1)),yu={key:2,class:"details"},bu={class:"save-version"},wu=Kt(()=>f("br",null,null,-1)),ku={key:0},Cu={key:1},_u={key:3,class:"details"},Su={key:4,class:"details error"},Nu=Kt(()=>f("br",null,null,-1)),Mu=le({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:a}=rt(l),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=R(!1),r=R(!1),c=R("");Pt(s,()=>c.value=a.value.name||"");const p=k(()=>a.value&&a.value.id===Q.id),m=k(()=>p.value?Q.time:a.value&&a.value.time||0),y=Jl(k(()=>{var w,h,C,S;return`Day ${(S=(C=(h=(w=a.value)==null?void 0:w.layers)==null?void 0:h.main)==null?void 0:C.day)!=null?S:1}`}));function g(){t("editName",c.value),s.value=!1}return(w,h)=>(b(),x("div",{class:Qe(["save",{active:u(p)}])},[uu,s.value?(b(),x("div",hu,[f("button",{onClick:g,class:"button"},[o(Ke,{display:"Save",direction:u(ye).Left,class:"info"},{default:K(()=>[gu]),_:1},8,["direction"])]),f("button",{onClick:h[5]||(h[5]=C=>s.value=!s.value),class:"button"},[o(Ke,{display:"Cancel",direction:u(ye).Left,class:"info"},{default:K(()=>[vu]),_:1},8,["direction"])])])):(b(),x("div",cu,[u(a).error==null&&!r.value?(b(),Y(ru,{key:0,onClick:h[0]||(h[0]=C=>t("export")),class:"button",left:""},{default:K(()=>[o(Ke,{display:"Export",direction:u(ye).Left,class:"info"},{default:K(()=>[du]),_:1},8,["direction"])]),_:1})):T("",!0),u(a).error==null&&!r.value?(b(),x("button",{key:1,onClick:h[1]||(h[1]=C=>t("duplicate")),class:"button"},[o(Ke,{display:"Duplicate",direction:u(ye).Left,class:"info"},{default:K(()=>[pu]),_:1},8,["direction"])])):T("",!0),u(a).error==null&&!r.value?(b(),x("button",{key:2,onClick:h[2]||(h[2]=C=>s.value=!s.value),class:"button"},[o(Ke,{display:"Edit Name",direction:u(ye).Left,class:"info"},{default:K(()=>[mu]),_:1},8,["direction"])])):T("",!0),o(iu,{disabled:u(p),onClick:h[3]||(h[3]=C=>t("delete")),onConfirmingChanged:h[4]||(h[4]=C=>r.value=C)},{default:K(()=>[o(Ke,{display:"Delete",direction:u(ye).Left,class:"info"},{default:K(()=>[fu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(a).error==null&&!s.value?(b(),x("div",yu,[f("button",{class:"button open",onClick:h[6]||(h[6]=C=>t("open"))},[f("h3",null,ce(u(a).name),1)]),f("span",bu,"v"+ce(u(a).modVersion),1),wu,u(m)?(b(),x("div",ku,"Last played "+ce(u(i).format(u(m))),1)):T("",!0),u(y)?(b(),x("div",Cu,[(b(),Y(qe(u(y))))])):T("",!0)])):u(a).error==null&&s.value?(b(),x("div",_u,[o($a,{modelValue:c.value,"onUpdate:modelValue":h[7]||(h[7]=C=>c.value=C),class:"editname",onSubmit:g},null,8,["modelValue"])])):(b(),x("div",Su,[d(" Error: Failed to load save with id "+ce(u(a).id),1),Nu,d(ce(u(a).error),1)]))],2))}});var xu=Se(Mu,[["__scopeId","data-v-5285ac49"]]);const En=e=>(zt("data-v-3b9991aa"),e=e(),Wt(),e),Au=En(()=>f("h2",null,"Saves Manager",-1)),Eu={class:"modal-footer"},Iu={class:"field"},Bu=En(()=>f("span",{class:"field-title"},"Create Save",-1)),Pu={class:"field-buttons"},Du={class:"footer"},Fu=En(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),Tu=le({__name:"SavesManager",setup(e,{expose:t}){const l=R(!1),a=R(null);t({open(){l.value=!0}});const i=R(!1),s=R(""),r=R(null);Pt(s,A=>{A?rl(()=>{try{if(A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Xt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A),i.value=!0;return}const M=JSON.parse(A);if(typeof M!="object"){i.value=!0;return}const D=Gl();M.id=D,Et(M),s.value="",i.value=!1,Le.saves.push(D)}catch{i.value=!0}}):i.value=!1});let c={},p=R(Object.keys(c).reduce((A,M)=>(A.push({label:M.split("/").slice(-1)[0].slice(0,-4),value:c[M]}),A),[]));const m=tn({});function y(A){if(m[A]==null){let M=localStorage.getItem(A);if(M==null)m[A]={error:"Save doesn't exist in localStorage",id:A};else if(M==="dW5kZWZpbmVk")m[A]={error:"Save is undefined",id:A};else try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Xt.decompressFromUTF16(M);else return console.warn("Unable to determine preset encoding",M),i.value=!0,m[A]={error:"Unable to determine preset encoding",id:A},m[A];m[A]={...JSON.parse(M),id:A}}catch(D){m[A]={error:D,id:A},console.warn(`SavesManager: Failed to load info about save with id ${A}: +${D} +${M}`)}}return m[A]}Pt(l,A=>{A&&Object.keys(m).forEach(M=>delete m[M])});const g=k(()=>Le.saves.reduce((A,M)=>(A[M]=y(M),A),{}));function w(A){let M;switch(Q.id===A?M=ga(Q[Ve]):M=JSON.stringify(g.value[A]),Ae.exportEncoding){default:console.warn(`Unknown save encoding: ${Ae.exportEncoding}. Defaulting to lz`);case"lz":M=Xt.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const D=document.createElement("textarea");D.value=M,document.body.appendChild(D),D.select(),D.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(D)}function h(A){Q.id===A&&Et();const M={...g.value[A],id:Gl()};Et(M),Le.saves.push(M.id)}function C(A){Le.saves=Le.saves.filter(M=>M!==A),localStorage.removeItem(A),m[A]=void 0}function S(A){g.value[Q.id].time=Q.time,Et(),m[Q.id]=void 0,sl(g.value[A]),m[A]=void 0}function N(A){if(r.value=A,rl(()=>{r.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Xt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const M=JSON.parse(A);M.id=Gl(),Et(M),Le.saves.push(M.id),S(M.id)}function oe(A,M){const D=g.value[A];D&&(D.name=M,Q.id===A?(Q.name=M,Et()):(Et(D),m[A]=void 0))}return(A,M)=>(b(),Y(gt,{modelValue:l.value,"onUpdate:modelValue":M[4]||(M[4]=D=>l.value=D),ref_key:"modal",ref:a},{header:K(()=>[Au]),body:K(({shown:D})=>[D?(b(),Y(u(Za),{key:0,list:u(Le).saves,handle:".handle",itemKey:Ne=>Ne},{item:K(({element:Ne})=>[o(xu,{save:u(g)[Ne],onOpen:Te=>S(Ne),onExport:Te=>w(Ne),onEditName:Te=>oe(Ne,Te),onDuplicate:Te=>h(Ne),onDelete:Te=>C(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):T("",!0)]),footer:K(()=>[f("div",Eu,[o($a,{modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=D=>s.value=D),title:"Import Save",placeholder:"Paste your save here!",class:Qe({importingFailed:i.value})},null,8,["modelValue","class"]),f("div",Iu,[Bu,f("div",Pu,[f("button",{class:"button",onClick:M[1]||(M[1]=D=>S(u(gl)().id))},"New Game"),Object.keys(u(p)).length>0?(b(),Y(xn,{key:0,options:u(p),modelValue:r.value,"onUpdate:modelValue":M[2]||(M[2]=D=>N(D)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):T("",!0)])]),f("div",Du,[Fu,f("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=D=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Oa=Se(Tu,[["__scopeId","data-v-3b9991aa"]]);const Nt=e=>(zt("data-v-8495e562"),e=e(),Wt(),e),$u=["src","alt"],Ou={key:1,class:"title"},Ru=Nt(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Uu={class:"discord"},qu={class:"discord-links"},Hu={key:0},Vu=["href"],Lu=Nt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Gu=Nt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Qu={href:"https://forums.moddingtree.com/",target:"_blank"},ju=Nt(()=>f("span",{class:"material-icons"},"forum",-1)),zu=Nt(()=>f("span",{class:"material-icons"},"info",-1)),Wu=Nt(()=>f("span",{class:"material-icons"},"library_books",-1)),Ku=Nt(()=>f("span",{class:"material-icons"},"settings",-1)),Ju=Nt(()=>f("span",{class:"material-icons"},"library_books",-1)),Xu=Nt(()=>f("span",{class:"material-icons"},"settings",-1)),Yu=Nt(()=>f("span",{class:"material-icons"},"info",-1)),Zu={href:"https://forums.moddingtree.com/",target:"_blank"},ec=Nt(()=>f("span",{class:"material-icons"},"forum",-1)),tc={class:"discord"},lc={class:"discord-links"},nc={key:0},ac=["href"],ic=Nt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),oc=Nt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),sc=le({__name:"Nav",setup(e){const t=R(null),l=R(null),a=R(null),i=R(null),{useHeader:s,banner:r,title:c,discordName:p,discordLink:m,versionNumber:y}=Ae;function g(){window.open(m,"mywindow")}return(w,h)=>(b(),x(B,null,[u(s)?(b(),x("div",ul({key:0,class:"nav"},w.$attrs),[u(r)?(b(),x("img",{key:0,src:u(r),class:"banner",alt:u(c)},null,8,$u)):(b(),x("div",Ou,ce(u(c)),1)),f("div",{onClick:h[0]||(h[0]=C=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[o(Ke,{display:"Changelog",direction:u(ye).Down,class:"version"},{default:K(()=>[f("span",null,"v"+ce(u(y)),1)]),_:1},8,["direction"])]),Ru,f("div",Uu,[f("span",{onClick:g,class:"material-icons"},"discord"),f("ul",qu,[u(m)?(b(),x("li",Hu,[f("a",{href:u(m),target:"_blank"},ce(u(p)),9,Vu)])):T("",!0),Lu,Gu])]),f("div",null,[f("a",Qu,[o(Ke,{display:"Forums",direction:u(ye).Down,yoffset:"5px"},{default:K(()=>[ju]),_:1},8,["direction"])])]),f("div",{onClick:h[1]||(h[1]=C=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(Ke,{display:"Info",direction:u(ye).Down,class:"info"},{default:K(()=>[zu]),_:1},8,["direction"])]),f("div",{onClick:h[2]||(h[2]=C=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(Ke,{display:"Saves",direction:u(ye).Down,xoffset:"-20px"},{default:K(()=>[Wu]),_:1},8,["direction"])]),f("div",{onClick:h[3]||(h[3]=C=>{var S;return(S=a.value)==null?void 0:S.open()})},[o(Ke,{display:"Options",direction:u(ye).Down,xoffset:"-66px"},{default:K(()=>[Ku]),_:1},8,["direction"])])],16)):(b(),x("div",ul({key:1,class:"overlay-nav"},w.$attrs),[f("div",{onClick:h[4]||(h[4]=C=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[o(Ke,{display:"Changelog",direction:u(ye).Right,xoffset:"25%",class:"version"},{default:K(()=>[f("span",null,"v"+ce(u(y)),1)]),_:1},8,["direction"])]),f("div",{onClick:h[5]||(h[5]=C=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(Ke,{display:"Saves",direction:u(ye).Right},{default:K(()=>[Ju]),_:1},8,["direction"])]),f("div",{onClick:h[6]||(h[6]=C=>{var S;return(S=a.value)==null?void 0:S.open()})},[o(Ke,{display:"Options",direction:u(ye).Right},{default:K(()=>[Xu]),_:1},8,["direction"])]),f("div",{onClick:h[7]||(h[7]=C=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(Ke,{display:"Info",direction:u(ye).Right},{default:K(()=>[Yu]),_:1},8,["direction"])]),f("div",null,[f("a",Zu,[o(Ke,{display:"Forums",direction:u(ye).Right,xoffset:"7px"},{default:K(()=>[ec]),_:1},8,["direction"])])]),f("div",tc,[f("span",{onClick:g,class:"material-icons"},"discord"),f("ul",lc,[u(m)?(b(),x("li",nc,[f("a",{href:u(m),target:"_blank"},ce(u(p)),9,ac)])):T("",!0),ic,oc])])],16)),o(Gr,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),o(Oa,{ref_key:"savesManager",ref:l},null,512),o(Wr,{ref_key:"options",ref:a},null,512),o(Nr,{ref_key:"changelog",ref:i},null,512)],64))}});var Ra=Se(sc,[["__scopeId","data-v-8495e562"]]);const In=e=>(zt("data-v-248e2ebb"),e=e(),Wt(),e),rc={class:"inner-tab"},uc={key:1},cc=In(()=>f("br",null,null,-1)),dc=d(" You can help continue the "),pc=In(()=>f("i",null,"advent",-1)),mc=d("ure at: "),fc=In(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Paper Pilot Community ")],-1)),hc=le({__name:"Game",setup(e){const t=Dt(Q,"tabs"),l=k(()=>Object.keys(ct)),a=Ae.useHeader,i=tl(J.loreBody);function s(r){const{display:c,minimized:p,minWidth:m,name:y,color:g,minimizable:w,nodes:h}=r;return{display:c,minimized:p,minWidth:m,name:y,color:g,minimizable:w,nodes:h}}return(r,c)=>(b(),x("div",{class:Qe(["tabs-container",{useHeader:u(a)}])},[(b(!0),x(B,null,Yn(u(t),(p,m)=>{var y,g;return b(),x("div",{key:m,class:Qe(["tab",u((y=u(ct)[p])==null?void 0:y.classes)]),ref_for:!0,ref:`tab-${m}`,style:Ye(u((g=u(ct)[p])==null?void 0:g.style))},[m===0&&!u(a)?(b(),Y(Ra,{key:0})):T("",!0),f("div",rc,[u(l).includes(p)?(b(),Y(kr,ul({key:0},s(u(ct)[p]),{index:m,tab:()=>{var w;return(w=r.$refs[`tab-${m}`])==null?void 0:w[0]}}),null,16,["index","tab"])):(b(),Y(qe(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),o(gt,{modelValue:u(J).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>u(J).showLoreModal.value=p)},{header:K(()=>[f("h2",null,ce(u(J).loreTitle.value),1)]),body:K(()=>[u(i)?(b(),Y(qe(u(i)),{key:0})):T("",!0),u(J).loreScene.value!==-1?(b(),x("div",uc,[o(yr,{day:u(J).loreScene.value},null,8,["day"]),cc,dc,pc,mc,fc])):T("",!0)]),_:1},8,["modelValue"])],2))}});var gc=Se(hc,[["__scopeId","data-v-248e2ebb"]]);const Tl=e=>(zt("data-v-4a50ce42"),e=e(),Wt(),e),vc={class:"game-over-modal-header"},yc=["src","alt"],bc={class:"game-over-modal-title"},wc=Tl(()=>f("h2",null,"Congratulations!",-1)),kc={key:0},Cc=Tl(()=>f("br",null,null,-1)),_c=Tl(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Sc=Tl(()=>f("br",null,null,-1)),Nc=["href"],Mc=Tl(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),xc=le({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:a,discordLink:i,versionNumber:s,versionTitle:r}=Ae,c=k(()=>ln(Q.timePlayed)),p=k(()=>An.value&&!Q.keepGoing),m=Dt(Q,"autosave");function y(){Q.keepGoing=!0}function g(){sl(gl())}return(w,h)=>(b(),Y(gt,{"model-value":u(p)},{header:K(()=>[f("div",vc,[u(l)?(b(),x("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,yc)):T("",!0),f("div",bc,[wc,f("h4",null,"You've beaten "+ce(u(t))+" v"+ce(u(s))+": "+ce(u(r)),1)])])]),body:K(({shown:C})=>[C?(b(),x("div",kc,[f("div",null,"It took you "+ce(u(c))+" to beat the game.",1),Cc,_c,Sc,f("div",null,[f("a",{href:u(i),class:"game-over-modal-discord-link"},[Mc,d(" "+ce(u(a)),1)],8,Nc)]),o(Gt,{title:"Autosave",modelValue:u(m),"onUpdate:modelValue":h[0]||(h[0]=S=>Xe(m)?m.value=S:null)},null,8,["modelValue"])])):T("",!0)]),footer:K(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:y,class:"button"},"Keep Going"),f("button",{onClick:g,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Ac=Se(xc,[["__scopeId","data-v-4a50ce42"]]);const sn=e=>(zt("data-v-3de07c06"),e=e(),Wt(),e),Ec=sn(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),Ic={key:0},Bc=sn(()=>f("br",null,null,-1)),Pc=["href"],Dc=sn(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Fc=sn(()=>f("br",null,null,-1)),Tc={class:"nan-footer"},$c=le({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Ae,a=Dt(Q,"autosave"),i=Dt(Ge,"hasNaN"),s=R(null),r=k(()=>{var h;return(h=Ge.NaNPath)==null?void 0:h.join(".")}),c=k(()=>{var h;return(h=Ge.NaNPath)==null?void 0:h.slice(-1)[0]}),p=k(()=>Ge.NaNReceiver&&c.value?Ge.NaNReceiver[c.value]:null),m=k({get(){return Q.devSpeed===0},set(h){Q.devSpeed=h?null:0}});function y(){Ge.NaNReceiver&&c.value&&(Ge.NaNReceiver[c.value]=new n(0),Ge.hasNaN=!1)}function g(){Ge.NaNReceiver&&c.value&&(Ge.NaNReceiver[c.value]=new n(1),Ge.hasNaN=!1)}function w(){Ge.NaNReceiver&&c.value&&(Ge.NaNReceiver[c.value]=new n(NaN),Ge.hasNaN=!1)}return(h,C)=>(b(),x(B,null,[o(gt,ul({modelValue:u(i),"onUpdate:modelValue":C[4]||(C[4]=S=>Xe(i)?i.value=S:null)},h.$attrs),{header:K(()=>[Ec]),body:K(()=>[f("div",null,[d(' Attempted to assign "'+ce(u(r))+'" to NaN',1),u(p)?(b(),x("span",Ic,ce(" ")+"(previously "+ce(u(ke)(u(p)))+")",1)):T("",!0),d(". Auto-saving has been "+ce(u(a)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Bc,f("div",null,[f("a",{href:u(l),class:"nan-modal-discord-link"},[Dc,d(" "+ce(u(t)),1)],8,Pc)]),Fc,o(Gt,{title:"Autosave",modelValue:u(a),"onUpdate:modelValue":C[0]||(C[0]=S=>Xe(a)?a.value=S:null)},null,8,["modelValue"]),u(Ae).enablePausing?(b(),Y(Gt,{key:0,title:"Pause game",modelValue:u(m),"onUpdate:modelValue":C[1]||(C[1]=S=>Xe(m)?m.value=S:null)},null,8,["modelValue"])):T("",!0)]),footer:K(()=>[f("div",Tc,[f("button",{onClick:C[2]||(C[2]=S=>{var N;return(N=s.value)==null?void 0:N.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:y,class:"button"},"Set to 0"),f("button",{onClick:g,class:"button"},"Set to 1"),u(p)&&u(n).neq(u(p),0)&&u(n).neq(u(p),1)?(b(),x("button",{key:0,onClick:C[3]||(C[3]=S=>i.value=!1),class:"button"}," Set to previous ")):T("",!0),f("button",{onClick:w,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Oa,{ref_key:"savesManager",ref:s},null,512)],64))}});var Oc=Se($c,[["__scopeId","data-v-3de07c06"]]);const Rc={key:0,class:"tpsDisplay"},Uc={key:0,class:"low"},qc=le({__name:"TPS",setup(e){const t=k(()=>n.div(Ge.lastTenTicks.length,Ge.lastTenTicks.reduce((s,r)=>s+r,0))),l=R([]);_t(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const a=k(()=>l.value.reduce((s,r)=>n.max(s,r),0)),i=k(()=>n.sub(t.value,a.value).gt(1));return(s,r)=>u(t).isNan()?T("",!0):(b(),x("div",Rc,[d(" TPS: "+ce(u(he)(u(t)))+" ",1),o(en,{name:"fade"},{default:K(()=>[u(i)?(b(),x("span",Uc,ce(u(he)(u(a))),1)):T("",!0)]),_:1})]))}});var Hc=Se(qc,[["__scopeId","data-v-46a3ed5b"]]);var Vc=le({__name:"App",setup(e){const t=Ae.useHeader,l=k(()=>Pl[Le.theme].variables),a=Dt(Le,"showTPS"),i=k(()=>Ce(I(()=>o(B,null,[ko.map(ue)]))));return(s,r)=>(b(),x(B,null,[f("div",{id:"modal-root",style:Ye(u(l))},null,4),f("div",{class:Qe(["app",{useHeader:u(t)}]),style:Ye(u(l))},[u(t)?(b(),Y(Ra,{key:0})):T("",!0),o(gc),u(u(a))?(b(),Y(Hc,{key:1})):T("",!0),o(Ac),o(Oc),(b(),Y(qe(u(i))))],6)],64))}});var Lc=Se(Vc,[["__scopeId","data-v-580927bb"]]);function Gc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:a,onRegistered:i,onRegisterError:s}=e;let r,c;const p=async(m=!0)=>{m&&(r==null||r.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),c&&c.waiting&&await li(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new ti("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",m=>{m.isUpdate||a==null||a()});{const m=()=>{l==null||l()};r.addEventListener("waiting",m),r.addEventListener("externalwaiting",m)}r.register({immediate:t}).then(m=>{c=m,i==null||i(m)}).catch(m=>{s==null||s(m)})}return p}function Qc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:a,onRegistered:i,onRegisterError:s}=e,r=R(!1),c=R(!1);return{updateServiceWorker:Gc({immediate:t,onNeedRefresh(){r.value=!0,l==null||l()},onOfflineReady(){c.value=!0,a==null||a()},onRegistered:i,onRegisterError:s}),offlineReady:c,needRefresh:r}}document.title=Ae.title;window.projInfo=Ae;if(Ae.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 go();const{globalBus:e}=await jl(()=>Promise.resolve().then(function(){return Yi}),void 0),{startGameLoop:t}=await jl(()=>import("./gameLoop.6cb8ae69.js"),["assets/gameLoop.6cb8ae69.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=Ka(Lc);e.emit("setupVue",l),l.mount("#app"),rl(()=>{const a=ea(),{updateServiceWorker:i}=Qc({onNeedRefresh(){a.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){a.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(s.update,60*1e3)}})}),t()});export{n as D,jl as _,Ge as a,Ae as b,or as c,He as g,_n as l,Q as p,Le as s}; diff --git a/index.html b/index.html index 8abaed8..99e1ca0 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index 2dd9826..a4cf4ec 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.3fb40232.js",revision:null},{url:"assets/index.6e411a81.js",revision:null},{url:"assets/index.748c5eae.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:"68ad34bb932ec2b53d8a26dbe740a3db"},{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.6cb8ae69.js",revision:null},{url:"assets/index.748c5eae.css",revision:null},{url:"assets/index.e5372964.js",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:"864b8319573edabadf00208b1a05f75e"},{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")))}));