diff --git a/assets/gameLoop.40c68b34.js b/assets/gameLoop.dc191476.js
similarity index 91%
rename from assets/gameLoop.40c68b34.js
rename to assets/gameLoop.dc191476.js
index fefe2a9..1abaf89 100644
--- a/assets/gameLoop.40c68b34.js
+++ b/assets/gameLoop.dc191476.js
@@ -1 +1 @@
-import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.1a6ba797.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.1a6ba797.js").then(function(t){return t.c}),["assets/index.1a6ba797.js","assets/index.ad5251ed.css","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop};
+import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.c1e10ebc.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.c1e10ebc.js").then(function(t){return t.c}),["assets/index.c1e10ebc.js","assets/index.ad5251ed.css","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop};
diff --git a/assets/index.1a6ba797.js b/assets/index.c1e10ebc.js
similarity index 82%
rename from assets/index.1a6ba797.js
rename to assets/index.c1e10ebc.js
index bd1ca6c..cd8a1b2 100644
--- a/assets/index.1a6ba797.js
+++ b/assets/index.c1e10ebc.js
@@ -9,11 +9,11 @@ Created at:
`+p[Zl]);return}Sl[e.id].delete(p);const m=[e.id,...s,c];p[Dl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Dl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Dl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Dl]=m;const b=s.reduce((w,f)=>(f in w||(w[f]={}),w[f]),t),h=b[c];b[c]=p[Mn],Ki(b)?h!=null?b[c]=h:b[c]=p[ol]:h!=null?b[c].value=h:b[c].value=p[ol]}else!(p instanceof n)&&!lt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...s,c])&&(wn(p)&&!wn(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.",Je in a?a[Je]:a,c):u=!0))}),u};i(e[Je]),Sl[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[Zl])}),Sl[e.id].clear()});const Je=Symbol("ProxyState"),Al=Symbol("ProxyPath");function Nt(e,t={}){const l=t;let i=!1;function a(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(s,u){if(u===Je)return a();const c=a()[u];return c&&typeof c=="object"&&Ul in c?c[Ul]:c},set(s,u,c){return a()[u]=c,!0},has(s,u){return u===Je?!0:Reflect.has(a(),u)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,u){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(s,u)}})}var Ze=window.state=on({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const yi=Ol({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function bi(e){return JSON.stringify(e,(t,l)=>r(l))}const wi={get(e,t){var i;if(t===Je||t===Al)return e[t];const l=e[Je][t];if(t!=="value"&&(ta(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[Je])){const a=[...e[Al],t];e[t]=new Proxy({[Je]:l,[Al]:a},wi)}return e[t]}return l},set(e,t,l,i){if(!Ze.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const a=e[Je][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof n&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw yi.autosave=!1,Ze.hasNaN=!0,Ze.NaNPath=[...e[Al],t],Ze.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Al],t],e[Je]),"Attempted to set NaN value. See above for details"}return e[Je][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Je])},has(e,t){return Reflect.has(e[Je],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Je],t)}};var j=window.player=new Proxy({[Je]:yi,[Al]:["player"]},wi);function Ci(e={}){return Object.assign({id:`${Me.id}-0`,name:"Default Save",tabs:Me.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Me.id,modVersion:Me.versionNumber,layers:{}},e)}function qt(e){const t=il.compressToUTF16(bi(e!=null?e:j[Je]));return localStorage.setItem((e!=null?e:j[Je]).id,t),t}async function Co(){_o();try{let e=localStorage.getItem(Ye.active);if(e==null){await yl(Nl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Me.id){await yl(Nl());return}t.id=Ye.active,await yl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
-`,e),await yl(Nl())}}function Nl(){const e=Wl(),t=Ci({id:e});return qt(t),Ye.saves.push(e),t}function Wl(){let e,t=0;do e=`${Me.id}-${t++}`;while(localStorage.getItem(e));return e}const In=$(!1);async function yl(e){console.info("Loading save",e),In.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await Jl(()=>Promise.resolve().then(function(){return yo}),void 0),{fixOldSave:a,getInitialLayers:s}=await Jl(()=>Promise.resolve().then(function(){return pr}),void 0);for(const u in t){const c=t[u];c&&l(c)}s(e).forEach(u=>i(u,e)),e=Ci(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,Me.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Me.versionNumber&&a(e.modVersion,e),Object.assign(j,e),Ye.active=j.id,Te.emit("onLoad")}setInterval(()=>{j.autosave&&qt()},1e3);window.onbeforeunload=()=>{j.autosave&&qt()};window.save=qt;const ko=window.hardReset=async()=>{await yl(Nl())},Rl=Ol({active:"",saves:[],showTPS:!0,theme:_n.Nordic,unthrottled:!1});Qt(Rl,e=>{const t=il.compressToUTF16(JSON.stringify(e));localStorage.setItem(Me.id,t)},{deep:!0});var Ye=window.settings=Rl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:_n.Nordic};Te.emit("loadSettings",e),Object.assign(Rl,e),ko()};function _o(){try{let e=localStorage.getItem(Me.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Rl,t)}Te.emit("loadSettings",Rl)}catch{}}const ki=Ol([]);function Ao(e){ki.push(e)}const _i=Ol([]);function So(e){_i.push(e)}const No=Ol([]),Eo={class:"table"},At=ae({__name:"Column",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Eo,[g("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),Mo={class:"table"},Ml=ae({__name:"Row",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Mo,[g("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function Bn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ji(e)}function Ae(e,t="span"){return typeof e=="function"?ae({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}${t}>`),ae({template:e})):ae({render:()=>({})}):e}function re(e){if(Jt(e))return typeof e=="function"?e():Ae(e);const t=e[dl];return o(t,e[cl](),null)}function ve(...e){let t;return o(Ml,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function sl(...e){let t;return o(At,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function Lt(e){if(Jt(e))return typeof e=="function"?e():typeof e=="string"?o(I,null,[e]):o(e,null,null);const t=e[dl];return o(t,e[cl](),null)}function Io(...e){let t;return o(At,null,Bn(t=e.map(Lt))?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[Tl]===!0}function Ai(e,t,l){const i=$(null),a=$(void 0);function s(p){i.value||(i.value=setInterval(c,250)),a.value=p,l&&(l.value=!0)}function u(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return ei(u),{start:s,stop:u,handleHolding:c}}function Bo(e,t){const l=C(()=>e.filter(i=>r(i.visibility)===at.Visible&&t(i)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function en(e,t="div"){const l=Tt();return Bt(()=>{l.value=Ae(ot(e),t)}),l}function ul(e,t="div"){const l=Tt(null);return Bt(()=>{const i=ot(e);l.value=i==null?null:Ae(i,t)}),l}function xo(e){return C(()=>ot(e))}function ot(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ge=ae({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(y(),E("div",{style:nt({width:e.width,height:e.height})},null,4))}});const Po={},Do={class:"notif"};function Fo(e,t){return y(),E("div",Do,"!")}var Ln=Ne(Po,[["render",Fo],["__scopeId","data-v-66323fd4"]]);const rn=e=>(Yt("data-v-9de19f28"),e=e(),Xt(),e),To={key:0,class:"day feature dontMerge opened"},Uo={class:"date"},Ro=d("Dec"),Oo=rn(()=>g("br",null,null,-1)),$o={class:"date"},qo=d("Dec"),Go=rn(()=>g("br",null,null,-1)),Vo=rn(()=>g("div",{class:"doors"},null,-1)),Lo={class:"date"},Qo=d("Dec"),Ho=rn(()=>g("br",null,null,-1)),jo={key:0,class:"material-icons lock"},zo={key:1,class:"timer"},Wo={key:2,class:"timer"},Ko=ae({__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,i=C(()=>l.layer&&n.gte(W.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function a(){i.value&&t("unlockLayer")}return(s,u)=>e.opened.value?(y(),E("div",To,[o(an,{appear:"",name:"door"},{default:J(()=>[g("div",{class:"doors",onClick:u[0]||(u[0]=c=>t("openLayer"))},[g("div",Uo,[Ro,Oo,d(ce(e.day),1)]),g("div",$o,[qo,Go,d(ce(e.day),1)])])]),_:1}),g("div",{class:"icon",style:nt({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:u[1]||(u[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(y(),ee(Ln,{key:0})):U("",!0)])):(y(),E("div",{key:1,class:et(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:a},[Vo,g("div",Lo,[Qo,Ho,d(ce(e.day),1)]),r(i)?U("",!0):(y(),E("div",jo,"lock")),r(W).day.value===e.day&&!r(i)?(y(),E("div",zo,ce(r(kn)(r(W).timeUntilNewDay.value,0)),1)):r(W).day.value===e.day&&e.layer==null?(y(),E("div",Wo,"NYI")):U("",!0),r(i)?(y(),ee(Ln,{key:3})):U("",!0)],2))}});var Jo=Ne(Ko,[["__scopeId","data-v-9de19f28"]]);const Yo=ae({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=en(Ht(t,"display")),i=en(Ht(t,"content"));return(a,s)=>(y(),ee(At,{class:"collapsible-container"},{default:J(()=>[g("button",{onClick:s[0]||(s[0]=u=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),ee(je(r(l))))]),e.collapsed.value?U("",!0):(y(),ee(je(r(i)),{key:0}))]),_:1}))}});var Xo=Ne(Yo,[["__scopeId","data-v-a72c16aa"]]);const Zo={key:0},es={key:0,class:"mark star"},ts=["src"],ls=ae({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(y(),E("div",Zo,[e.mark===!0?(y(),E("div",es)):(y(),E("img",{key:1,class:"mark",src:e.mark},null,8,ts))])):U("",!0)}});var un=Ne(ls,[["__scopeId","data-v-2207999f"]]);const ns=ae({__name:"Node",props:{id:null},setup(e){const l=gt(e),i=Kl(An,()=>{}),a=Kl(Sn,()=>{}),s=Tt(null),u=C(()=>s.value&&s.value.parentElement);return Qt([u,l.id],([c,p],[m,b])=>{m&&a(r(b)),c&&i(p,c)}),ei(()=>a(r(l.id))),(c,p)=>(y(),E("div",{class:"node",ref_key:"node",ref:s},null,512))}});var ql=Ne(ns,[["__scopeId","data-v-a48cb382"]]);const is=ae({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{progress:t,width:l,height:i,direction:a,display:s}=gt(e),u=C(()=>{let m=t.value instanceof n?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=C(()=>{const m={width:ot(l)+.5+"px",height:ot(i)+.5+"px"};switch(r(a)){case ke.Up:m.clipPath=`inset(${u.value}% 0% 0% 0%)`,m.width=ot(l)+1+"px";break;case ke.Down:m.clipPath=`inset(0% 0% ${u.value}% 0%)`,m.width=ot(l)+1+"px";break;case ke.Right:m.clipPath=`inset(0% ${u.value}% 0% 0%)`;break;case ke.Left:m.clipPath=`inset(0% 0% 0% ${u.value} + '%)`;break;case ke.Default:m.clipPath="inset(0% 50% 0% 0%)";break}return m}),p=ul(s);return{normalizedProgress:u,barStyle:c,component:p,unref:r,Visibility:at}}});function as(e,t,l,i,a,s){var p,m,b,h,w,f,_;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),class:et({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(y(),E("span",{key:0,class:"overlayText",style:nt(e.unref(e.textStyle))},[(y(),ee(je(e.component)))],4)):U("",!0)],4),g("div",{class:"border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(b=e.unref(e.style))!=null?b:{},(h=e.unref(e.baseStyle))!=null?h:{},(w=e.unref(e.borderStyle))!=null?w:{}])},[g("div",{class:"fill",style:nt([e.barStyle,(f=e.unref(e.style))!=null?f:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):U("",!0)}var os=Ne(is,[["render",as],["__scopeId","data-v-02d0d7b2"]]);const ss=Symbol("Bar");function Kt(e){return Nt(()=>{const t=e();return t.id=Il("bar-"),t.type=ss,t[dl]=os,G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"width"),G(t,"height"),G(t,"direction"),G(t,"style"),G(t,"classes"),G(t,"borderStyle"),G(t,"baseStyle"),G(t,"textStyle"),G(t,"fillStyle"),G(t,"progress"),G(t,"display"),G(t,"mark"),t[cl]=function(){const{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:p,classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}=this;return{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:r(p),classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}},t})}var rs=ae({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:ql,MarkNode:un},setup(e){const{display:t,onClick:l,onHold:i}=gt(e),a=Tt("");Bt(()=>{const c=ot(t);if(c==null){a.value="";return}if(Jt(c)){a.value=Ae(c);return}const p=Ae(c.title||"","h3"),m=Ae(c.description,"div");a.value=Ae(B(()=>o("span",null,[c.title?o("div",null,[o(p,null,null)]):null,o(m,null,null)])))});const{start:s,stop:u}=Ai(l,i,e.isHolding);return{start:s,stop:u,comp:a,Visibility:at,unref:r}}});function us(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:et({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(y(),ee(je(e.unref(e.comp)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):U("",!0)}var Si=Ne(rs,[["render",us],["__scopeId","data-v-8cedd7da"]]);const ds=Symbol("Clickable");function It(e){return Nt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Il("clickable-"),t.type=ds,t[dl]=Si,t.isHolding=$(!1),G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"canClick"),mt(t,"canClick",!0),G(t,"classes"),G(t,"style"),G(t,"mark"),G(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(a){r(t.canClick)&&i(a)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&i()}}return t[cl]=function(){const{display:i,visibility:a,style:s,classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}=this;return{display:i,visibility:a,style:r(s),classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}},t})}function st(e,t="points",l=0,i=void 0){const a=lt(e)?e:we(e);if(a.displayName=t,a.precision=l,a.small=i,!lt(e)){const s=a[Ul];s.displayName=t,s.precision=l,s.small=i}return a}function Qn(e){const t=we(e.value);return Qt(e,l=>{In.value||n.gt(l,t.value)&&(t.value=l)}),t}function cs(e){const t=we(e.value);return Qt(e,(l,i)=>{In.value||n.gt(l,i)&&(t.value=n.add(t.value,n.sub(l,i)))}),t}new n("10^^8");new n("1e100");function Gl(e,t){const l=t!=null?t:e.value;return n.eq(e.precision,0)?se(e.small?l:n.floor(l)):ye(l,e.precision,e.small)}const ps=["x1","y1","x2","y2"],ms=ae({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=gt(e),i=C(()=>{const s=l.startNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.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}),a=C(()=>{const s=l.endNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.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,u)=>(y(),E("line",wl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(i).x,y1:r(i).y,x2:r(a).x,y2:r(a).y}),null,16,ps))}});const gs=ae({__name:"Links",props:{links:null},setup(e){var p;const l=Ht(e,"links"),i=$(null),a=Kl(Nn,$({})),s=Kl(En,$(void 0)),u=$((p=i.value)==null?void 0:p.getBoundingClientRect());Qt(s,()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()}),ln(()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()});const c=C(()=>{var b,h;const m=a.value;return(h=(b=l.value)==null?void 0:b.filter(w=>{var f,_;return((f=m[w.startNode.id])==null?void 0:f.rect)&&((_=m[w.startNode.id])==null?void 0:_.rect)}))!=null?h:[]});return(m,b)=>(y(),E(I,null,[r(c)?(y(),E("svg",Yi(wl({key:0},m.$attrs)),[(y(!0),E(I,null,ti(r(c),(h,w)=>(y(),ee(ms,{key:w,link:h,boundingRect:u.value,startNode:r(a)[h.startNode.id],endNode:r(a)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):U("",!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var fs=Ne(gs,[["__scopeId","data-v-063f6d6b"]]);ae({props:{nodes:{type:V(Array),required:!0},leftSideNodes:V(Array),rightSideNodes:V(Array),branches:V(Array)},components:{Links:fs},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=gt(e),a=Tt();Bt(()=>{const c=ot(t);a.value=Ae(B(()=>o(I,null,[c.map(p=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Lt)]))])))});const s=Tt();Bt(()=>{const c=ot(l);s.value=c?Ae(B(()=>o("span",{class:"left-side-nodes small"},[c.map(Lt)]))):""});const u=Tt();return Bt(()=>{const c=ot(i);u.value=c?Ae(B(()=>o("span",{class:"side-nodes small"},[c.map(Lt)]))):""}),{unref:r,nodesComp:a,leftNodesComp:s,rightNodesComp:u}}});ae({props:{display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),onClick:Function,onHold:Function,color:V(String),glowColor:V(String),canClick:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{onClick:t,onHold:l,display:i}=gt(e),a=ul(i),{start:s,stop:u}=Ai(t,l);return{start:s,stop:u,comp:a,unref:r,Visibility:at,isCoercableComponent:Jt}}});function pl(e){const t=[],l={};let i=!1;function a(){return i||(t.push(...e()),l.base=t.map(c=>pt(c.base)),l.baseText=t.map(c=>pt(c.baseText)),l.visible=t.map(c=>pt(c.visible)),i=!0),t}const s=we({});return[B(()=>{const c=a();let p=!0;const m=c.map((b,h)=>{var A,P,Y;if(r(l.visible[h])===!1)return null;const w=o("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[d("\u25BC")]),b.title,b.subtitle?o("span",{class:"subtitle"},[d(" ("),b.subtitle,d(")")]):null]),f=r(s.value[h])?null:o(I,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[Lt((A=r(l.baseText[h]))!=null?A:"Base")]),o("span",{class:"modifier-amount"},[ye((P=r(l.base[h]))!=null?P:1),b.unit])]),Lt(r(b.modifier.description))]),_=!p;return p=!1,o(I,null,[_?o("br",null,null):null,o("div",null,[w,o("br",null,null),f,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[d("Total")]),o("span",{class:"modifier-amount"},[ye(b.modifier.apply((Y=r(l.base[h]))!=null?Y:1)),b.unit])])])])});return o(I,null,[m])}),s]}function tn(e){const t=Object.values(e).reverse(),l=we(!0),i=C(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:a,collapsedContent:s,hasCollapsedContent:u}=Bo(t,p=>p.earned.value),c=B(()=>{const p=[...i.value];return a.value&&p.push(a.value),Io(...p,B(()=>nn(o(Xo,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[Zn,r(u)]])))});return{collapseMilestones:l,display:c}}function ml(e){const t=cs(e.resource),l=()=>{var c,p;if(W.day.value!==e.day)return 1;let s=n.add(t.value,1),u=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:j.usingLog)&&(s=s.log10(),u=n.log10(u)),n.div(s,u)},i=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:B(()=>W.day.value===e.day?o(I,null,[ie(t.value),d("/"),ie(e.goal)]):"")})),a=B(()=>o(I,null,[o("div",null,[W.day.value===e.day?o(I,null,[d("Reach "),ie(e.goal),d(" total "),e.resource.displayName,d(" to complete the day")]):o(I,null,[e.name,d(" Complete!")]),e.modal?o(I,null,[" ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[d("Check Modifiers")])]):void 0]),re(i),e.modal?re(e.modal.display):void 0]));return Bt(()=>{W.day.value===e.day&&n.gte(t.value,e.goal)&&W.completeDay()}),{total:t,trackerDisplay:a}}function Gt(e){var u;const t=(u=e.style)!=null?u:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=It(()=>({display:"0",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=It(()=>({display:"-",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=n.sub(e.active.value,1)}})),a=It(()=>({display:"+",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=n.add(e.active.value,1)}})),s=It(()=>({display:"Max",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:i,add:a,max:s}}const hs=Symbol("Buyable");function Se(e){const t=we(0);return Nt(()=>{var s,u,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=Il("buyable-"),l.type=hs,l[dl]=Si,l.amount=t,l.amount[ol]=(s=l.initialValue)!=null?s:0,l.canAfford=C(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&n.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&n.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=C(()=>n.gte(l.amount.value,r(l.purchaseLimit))),G(l,"classes");const i=l.classes;l.classes=C(()=>{const p=r(i)||{};return l.maxed.value&&(p.bought=!0),p}),G(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(u=l.onClick)!=null?u:l.purchase)!=null?c:function(){var b;const p=l;if(!r(p.canPurchase))return;const m=r(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)),(b=p.onPurchase)==null||b.call(p,m)},G(l,"display");const a=l.display;return l.display=B(()=>{const p=r(a);if(Jt(p)){const m=Ae(p);return o(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,b=Ae(p.title||"","h3"),h=Ae(p.description||""),w=Ae(p.effectDisplay||"");return o("span",null,[p.title?o("div",null,[o(b,null,null)]):null,p.description?o(h,null,null):null,p.showAmount===!1?null:o("div",null,[o("br",null,null),r(m.purchaseLimit)===n.dInf?o(I,null,[d("Amount: "),se(m.amount.value)]):o(I,null,[d("Amount: "),se(m.amount.value),d(" /")," ",se(r(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: "),ye(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"cost"),G(l,"resource"),G(l,"purchaseLimit"),mt(l,"purchaseLimit",n.dInf),G(l,"style"),G(l,"mark"),G(l,"small"),l[cl]=function(){const{display:p,visibility:m,style:b,classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}=this;return{display:p,visibility:m,style:r(b),classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}},l})}const dn=on({}),xn=Symbol("Hotkey");function El(e){return Nt(()=>{const t=e();return t.type=xn,G(t,"enabled"),mt(t,"enabled",!0),G(t,"description"),t})}Te.on("addLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=t})});Te.on("removeLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||Fn.value&&!j.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=dn[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};So(B(()=>{const e=Object.values(dn).filter(t=>r(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 vs=ae({__name:"Sticky",setup(e){const t=$("0"),l=new ResizeObserver(a),i=Tt(null);function a(){let s=i.value;if(s==null)return;let u=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(u+=c.offsetHeight),s=c}t.value=u+"px"}return bl(a),document.fonts.ready.then(a),ln(()=>{var u;const s=(u=i.value)==null?void 0:u.parentElement;s&&l.observe(s)}),(s,u)=>(y(),E("div",{class:"sticky",style:nt({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Vt(s.$slots,"default",{},void 0,!0)],4))}});var ys=Ne(vs,[["__scopeId","data-v-cccac690"]]);const Hn=ae({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=C(()=>Gl(t.resource));return(i,a)=>(y(),E("h2",{style:nt({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},ce(r(l)),5))}});const bs={class:"main-display"},ws={key:0},Cs={key:1},ks=d(", "),_s={key:2},As=g("br",null,null,-1),Ss={class:"main-display"},Ns={key:0},Es={key:1},Ms=d(", "),Is={key:2},Bs=g("br",null,null,-1),St=ae({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=gt(e),i=$(null),a=ul(l.effectDisplay),s=$(null),u=ul(l.productionDisplay),c=C(()=>n.lt(l.resource.value,"1e1000"));return(p,m)=>{var b,h;return e.sticky?(y(),ee(ys,{key:0},{default:J(()=>{var w,f,_,A;return[g("div",{class:et(["main-display-container",(w=e.classes)!=null?w:{}]),style:nt([{height:`${((_=(f=i.value)==null?void 0:f.$el.clientHeight)!=null?_:0)+50}px`},(A=e.style)!=null?A:{}])},[g("div",bs,[r(c)?(y(),E("span",ws,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Cs,[ks,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",_s,[As,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6)]}),_:1})):(y(),E("div",{key:1,class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:nt([{height:"50px"},(h=e.style)!=null?h:{}])},[g("div",Ss,[r(c)?(y(),E("span",Ns,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Es,[Ms,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",Is,[Bs,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6))}}});var xs=ae({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:ql,MarkNode:un},setup(e){const{display:t,cost:l}=gt(e),i=Tt("");return Bt(()=>{const a=ot(t);if(a==null){i.value="";return}if(Jt(a)){i.value=Ae(a);return}const s=ot(l),u=Ae(a.title||"","h3"),c=Ae(a.description,"div"),p=Ae(a.effectDisplay||"");i.value=Ae(B(()=>{var m;return o("span",null,[a.title?o("div",null,[o(u,null,null)]):null,o(c,null,null),a.effectDisplay?o("div",null,[d("Currently: "),o(p,null,null)]):null,e.resource!=null&&a.showCost!==!1?o(I,null,[o("br",null,null),d("Cost: "),e.resource&&Gl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:i,unref:r,Visibility:at}}});const Ps=["disabled"];function Ds(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:et({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(y(),ee(je(e.unref(e.component)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,Ps)):U("",!0)}var Fs=Ne(xs,[["render",Ds],["__scopeId","data-v-7f411ac8"]]);const Ts=Symbol("Upgrade");function O(e){const t=we(!1);return Nt(()=>{const l=e();return l.id=Il("upgrade-"),l.type=Ts,l[dl]=Fs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=C(()=>{const i=l;return i.resource!=null&&i.cost!=null&&n.gte(i.resource.value,r(i.cost))}):G(l,"canAfford"),l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var a;const i=l;!r(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=n.sub(i.resource.value,r(i.cost))),t.value=!0,(a=i.onPurchase)==null||a.call(i))},G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"classes"),G(l,"style"),G(l,"display"),G(l,"mark"),G(l,"cost"),G(l,"resource"),l[cl]=function(){const{display:i,visibility:a,style:s,classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}=this;return{display:i,visibility:a,style:r(s),classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}},l})}function Z(e){return Nt(()=>{const{addend:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.add(c,r(a)),revert:c=>n.sub(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[n.gte(r(a),0)?"+":"",ye(r(a))])]))}})}function k(e){return Nt(()=>{const{multiplier:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.times(c,r(a)),revert:c=>n.div(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[d("\xD7"),ye(r(a))])]))}})}function Ni(e){return Nt(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:a}=e(),s=pt(t),u=pt(l),c=i==null?void 0:pt(i);return{apply:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.pow(m,r(s)),a&&(m=n.sub(m,1)),m},revert:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.root(m,r(s)),a&&(m=n.sub(m,1)),m},enabled:c,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(u)?o("span",{class:"modifier-description"},[Lt(r(u)),a?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[d("^"),ye(r(s))])]))}})}function z(e){return Nt(()=>{const t=e();return{apply:l=>t.filter(i=>r(i.enabled)!==!1).reduce((i,a)=>a.apply(i),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(i=>r(i.enabled)!==!1).reduceRight((i,a)=>a.revert(i),l):void 0,enabled:C(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:B(()=>o(I,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(Lt)]))}})}function Ei(e){return Nt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=C(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.nextAt==null&&(t.nextAt=C(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.convert==null&&(t.convert=function(){var a;const l=r(t.currentGain),i=r(t.currentAt);t.gainResource.value=n.add(t.gainResource.value,l),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),G(t,"currentGain"),G(t,"actualGain"),G(t,"currentAt"),G(t,"nextAt"),G(t,"buyMax"),mt(t,"buyMax",!0),G(t,"roundUpCost"),mt(t,"roundUpCost",!0),t})}function Pn(e,t){const l=pt(e),i=pt(t);return{currentGain(a){let s=r(a.baseResource.value);if(a.costModifier&&(s=a.costModifier.apply(s)),n.lt(s,r(l)))return 0;const u=n.div(s,r(l)).pow(r(i));return u.isNan()?new n(0):u},currentAt(a){let s=r(a.currentGain);return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s},nextAt(a){let s=n.add(r(a.currentGain),1).floor();return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)).max(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s}}}function Mi(e){return Ei(e)}function Us(e){return Ei(()=>{const t=e();return mt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(n.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=C(()=>{let l=n.sub(n.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),mt(t,"convert",function(){var a;const l=r(t.actualGain),i=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t})}const Rs={class:"field"},Os=ae({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=C(()=>Ae(r(l.title)||"","span")),a=C({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,u)=>(y(),E("label",Rs,[nn(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=c=>lt(a)?a.value=c:null)},null,512),[[Xi,r(a)]]),(y(),ee(je(r(i))))]))}});var Wt=Ne(Os,[["__scopeId","data-v-33d57459"]]);const $s={class:"field"},qs={key:0,class:"field-title"},Dn=ae({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const l=e,i=ul(Ht(l,"title"),"span"),a=$((u=l.options.find(c=>c.value===l.modelValue))!=null?u:null);Qt(Ht(l,"modelValue"),c=>{var p;ot(a)!==c&&(a.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(y(),E("div",$s,[r(i)?(y(),E("span",qs,[(y(),ee(je(r(i))))])):U("",!0),o(r(la),{options:e.options,modelValue:a.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>a.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 Gs=ae({props:{visibility:{type:V(Number),required:!0},display:{type:V(String,Object,Function),required:!0},style:V(String,Object,Array),classes:V(Object),earned:{type:V(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:ql},setup(e){const{display:t}=gt(e),l=Tt("");return Bt(()=>{const i=ot(t);if(i==null){l.value="";return}if(Jt(i)){l.value=Ae(i);return}const a=Ae(i.requirement,"h3"),s=Ae(i.effectDisplay||"","b"),u=Ae(i.optionsDisplay||"","span");l.value=Ae(B(()=>o("span",null,[o(a,null,null),i.effectDisplay?o("div",null,[o(s,null,null)]):null,i.optionsDisplay?o("div",{class:"equal-spaced"},[o(u,null,null)]):null])))}),{comp:l,unref:r,Visibility:at}}});function Vs(e,t,l,i,a,s){var c;const u=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:et({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(y(),ee(je(e.unref(e.comp)))),o(u,{id:e.id},null,8,["id"])],6)):U("",!0)}var Ls=Ne(Gs,[["render",Vs],["__scopeId","data-v-f4e8794e"]]);Te.on("setupVue",e=>e.use(na));const jn=ni(),Qs=Symbol("Milestone");let al;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(al||(al={}));function _e(e){const t=we(!1);return Nt(()=>{var a;const l=(a=e==null?void 0:e())!=null?a:{};l.id=Il("milestone-"),l.type=Qs,l[dl]=Ls,l.earned=t,l.complete=function(){var u;const s=l;if(t.value=!0,(u=s.onComplete)==null||u.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=Ae(Jt(c)?c:c.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(p,null,null)])]))}},G(l,"visibility"),mt(l,"visibility",at.Visible);const i=l.visibility;if(l.visibility=C(()=>{const s=r(l.display);switch(Ye.msDisplay){default:case al.All:return r(i);case al.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?at.None:r(i);case al.Incomplete:return r(l.earned)?at.None:r(i);case al.None:return at.None}}),G(l,"style"),G(l,"classes"),G(l,"display"),G(l,"showPopups"),l[cl]=function(){const{visibility:s,display:u,style:c,classes:p,earned:m,id:b}=this;return{visibility:s,display:u,style:r(c),classes:p,earned:m,id:b}},l.shouldEarn){const s=l;Bt(()=>{var u,c;if(Ye.active===j.id&&!s.earned.value&&r(s.visibility)===at.Visible&&((u=s.shouldEarn)==null?void 0:u.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Ae(Jt(p)?p:p.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}})}return l})}Te.on("loadSettings",e=>{mt(e,"msDisplay",al.All)});const Hs=Object.values(al).map(e=>({label:pi(e),value:e}));Ao(B(()=>o(Dn,{title:"Show Milestones",options:Hs,"onUpdate:modelValue":e=>Ye.msDisplay=e,modelValue:Ye.msDisplay},null)));const js=Symbol("Reset");function zs(e){return Nt(()=>{const t=e();return t.id=Il("reset-"),t.type=js,t.reset=function(){var i;const l=a=>{if(a&&typeof a=="object")if(ol in a){const s=a;s.value=s[ol]}else!(a instanceof n)&&!lt(a)&&Object.values(a).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),Te.emit("reset",t),(i=t.onReset)==null||i.call(t)},G(t,"thingsToReset"),t})}const zl={};Te.on("removeLayer",e=>{var t;(t=zl[e.id])==null||t.call(zl),zl[e.id]=void 0});const Ws={},Ks={style:{"white-space":"nowrap"}},Js=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ys={style:{"text-decoration":"overline"}};function Xs(e,t){return y(),E("span",Ks,[Js,g("span",Ys,[Vt(e.$slots,"default")])])}var Zs=Ne(Ws,[["render",Xs]]);const er="oil",vn=9,Ke=Ut(er,function(){const e="Oil",t="#000000",l="var(--foreground)",i=st(0,"oil"),a=st(0,"depth"),s=we(0),u=C(()=>n.lt(a.value,990)?n.add(10,a.value):n.pow(1.001,n.sub(a.value,990)).mul(1e3));function c(){if(n.lt(a.value,990)){const Ge=n.min(n.affordArithmeticSeries(s.value,10,1,a.value),n.sub(990,a.value)),wt=n.sumArithmeticSeries(Ge,10,1,a.value);s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}if(n.gte(a.value,990)){const Ge=n.affordGeometricSeries(s.value,1e3,1.001,n.sub(a.value,990)),wt=n.sumGeometricSeries(Ge,1e3,1.001,n.sub(a.value,990));s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}}const p=we(0),m=C(()=>n.times(n.pow(p.value,Y.value).pow(2),1e14)),b=C(()=>n.times(n.pow(p.value,Y.value),1)),h=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(1.3,Ge).times(25e3)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill")]),o("br",null,null),d("A large drill specialized at deep mining."),o("br",null,null),d("Consumes 1e14*(Heavy Drills amount)"),o("sup",null,[d("2")]),d(" coal/sec for (Heavy Drills amount) drill power."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(m.value),d(" coal/sec"),o("br",null,null),d("+"),oe(b.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(h.cost)),d(" "),h.resource.displayName])),onPurchase(){p.value=n.add(p.value,1)},style:{color:l,width:"160px"}})),{min:w,max:f,add:_,remove:A}=Gt({buyable:h,active:p}),P=we(0),Y=C(()=>n.add(P.value,Math.E).ln()),M=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(1e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill Drill")]),o("br",null,null),d("Attach extra drills to Heavy Drills to make them faster"),o("br",null,null),d("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),o("br",null,null),d("(also affects coal consumption)."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("^"),oe(Y.value),d(" Heavy Drill amount"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(M.cost)),d(" "),M.resource.displayName])),onPurchase(){P.value=n.add(P.value,1)},style:{color:l,width:"160px"}})),{min:S,max:T,add:fe,remove:Pe}=Gt({buyable:M,active:P}),Q=we(0),Ee=C(()=>n.pow(1/3,Q.value)),de=C(()=>n.pow(2,Q.value)),Ue=C(()=>n.pow(1.2,Q.value)),Be=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(8,Ge).times(2e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Extractor")]),o("br",null,null),d("Attach extractors to the drill to mine coal and ore, but with a price."),o("br",null,null),d("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(Ee.value),d(" drill power"),o("br",null,null),d("\xD7"),oe(de.value),d(" coal/sec"),o("br",null,null),d("\xD7"),oe(Ue.value),d(" ore/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(Be.cost))," ",Be.resource.displayName])),onPurchase(){Q.value=n.add(Q.value,1)},style:{color:l,width:"160px"}})),{min:Re,max:Ie,add:Oe,remove:L}=Gt({buyable:Be,active:Q}),Ce=we(0),he=C(()=>n.pow(_t[3].bought.value?4:5,Ce.value)),me=C(()=>n.pow(Ce.value,2).mul(p.value).mul(n.add(P.value,1)).mul(Q.value).mul(a.value).div(1e5)),$e=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(16,Ge).times(2e6);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,null,[o("h3",null,[d("Oil Pump")]),o("br",null,null),d("Pump that oil from the ground."),o("br",null,null),d("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),_t[3].bought.value?4:5,d("\xD7."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(he.value),d(" coal usage"),o("br",null,null),d("+"),oe(me.value),d(" oil/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r($e.cost)),d(" "),$e.resource.displayName])),onPurchase(){Ce.value=n.add(Ce.value,1)},style:{color:l,width:"160px"}})),{max:De,min:rt,add:Fe,remove:Pt}=Gt({buyable:$e,active:Ce}),te=we(0),le=C(()=>n.pow(te.value,2)),Xe=C(()=>n.pow(te.value,3).mul(1e19)),He=C(()=>n.add(te.value,1)),ue=Se(()=>({resource:F(i),cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(50)},display:B(()=>o(I,null,[o("h3",null,[d("Oil Burner")]),o("br",null,null),d("Burn oil as fuel."),o("br",null,null),d("(Oil Burner Amount)"),o("sup",null,[d("2")]),d(" unit of oil can give 1e19*(Oil Burner Amount)"),o("sup",null,[d("3")]),d(" units of coal."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(le.value),d(" oil/sec"),o("br",null,null),d("-"),oe(Xe.value),d(" coal consumption"),_t[2].bought.value?o(I,null,[o("br",null,null),d("\xD7"),oe(He.value),d(" to auto smelting multi")]):"",o("br",null,null),o("br",null,null),d("Cost: "),ie(r(ue.cost)),d(" "),ue.resource.displayName])),onPurchase(){te.value=n.add(te.value,1)},style:{color:l,width:"160px"}})),{max:ut,min:ze,add:xe,remove:ft}=Gt({buyable:ue,active:te}),Ve=we(0),Dt=C(()=>n.pow(Ve.value,2).mul(100)),qe=C(()=>n.add(Ve.value,1)),dt=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(10,Ge).times(1e7);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,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("-"),oe(Dt.value),d(" oil/sec"),o("br",null,null),d("\xD7"),oe(qe.value),d(" smelting speed"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(dt.cost)),d(" "),dt.resource.displayName])),onPurchase(){Ve.value=n.add(Ve.value,1)},style:{color:l,width:"160px"}})),{max:K,min:q,add:Rt,remove:el}=Gt({buyable:dt,active:Ve}),it=[_e(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>n.gte(a.value,5)})),_e(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>n.gte(a.value,10),visibility:()=>x(it[0].earned.value)})),_e(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>n.gte(a.value,25),visibility:()=>x(it[1].earned.value)})),_e(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>n.gte(a.value,60),visibility:()=>x(it[2].earned.value)})),_e(()=>({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(a.value,150),visibility:()=>x(it[3].earned.value)})),_e(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>n.gte(a.value,350),visibility:()=>x(it[4].earned.value)})),_e(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>n.gte(a.value,1e3),visibility:()=>x(n.gte(a.value,1e3))})),_e(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>n.gte(a.value,3e3),visibility:()=>x(n.gte(a.value,2e3))}))],{collapseMilestones:X,display:Et}=tn(it),kt=[_e(()=>({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(fl.value,100)})),_e(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>n.gte(fl.value,500),visibility:()=>x(kt[0].earned.value)})),_e(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>n.gte(fl.value,1e4),visibility:()=>x(kt[1].earned.value)}))],{collapseMilestones:Cl,display:kl}=tn(kt),Ft=[O(()=>({resource:R.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[0].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[1].value)]))},style:{color:l}})),O(()=>({resource:R.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[2].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[3].value)]))},style:{color:l}})),O(()=>({resource:F(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:B(()=>o(I,null,[d("+"),oe(n.mul(We[4].value,100)),d("%")]))},style:{color:l}}))],We=[C(()=>n.mul(R.buildDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(ht.oreDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(n.max(R.coal.value,1).log10().floor(),n.add(.06,zt.value)).add(1)),C(()=>n.mul(n.max(ht.metal.value,1).log10().floor(),n.add(.1,zt.value)).add(1)),C(()=>n.mul(h.amount.value,.001))],_t=[O(()=>({resource:F(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),O(()=>({resource:F(i),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}})),O(()=>({resource:F(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),O(()=>({resource:F(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),O(()=>({resource:F(i),cost:5e4,display:{title:"Be One with the Oil",description:B(()=>o(I,null,[d("Divide metal ingot prices of oil buildings by "),o("sup",null,[d("6")]),o(Zs,null,{default:()=>[d("total oil + 1")]})]))},style:{color:l}}))],Mt=z(()=>[Z(()=>({addend:()=>n.negate(m.value),description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:he,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),Z(()=>({addend:pn,description:"Oil to Coal Substitution",enabled:()=>n.gt(pn.value,0)}))]),tl=C(()=>Mt.apply(0)),Ot=z(()=>[Z(()=>({addend:b,description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:Ee,description:"Heavy Extractor",enabled:()=>n.gt(Q.value,0)})),k(()=>({multiplier:We[0],description:"Coal Drill Synergy",enabled:Ft[0].bought})),k(()=>({multiplier:We[1],description:"Metal Drill Synergy",enabled:Ft[1].bought})),k(()=>({multiplier:We[2],description:"Coal Drill Upgrade",enabled:Ft[2].bought})),k(()=>({multiplier:We[3],description:"Metal Drill Upgrade",enabled:Ft[3].bought})),k(()=>({multiplier:2,description:"Guide to drilling",enabled:H.upgrades.drillingUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),gl=C(()=>Ot.apply(0)),Ll=z(()=>[Z(()=>({addend:We[4],description:"Drill Oil",enabled:Ft[4].bought}))]),zt=C(()=>Ll.apply(0)),Ql=z(()=>[Z(()=>({addend:me,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),k(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:_t[0].bought})),k(()=>({multiplier:2,description:"3000m Well Depth",enabled:it[7].earned})),k(()=>({multiplier:2,description:"Oil and where to find it",enabled:H.upgrades.oilUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),_l=C(()=>Ql.apply(0)),Hl=z(()=>[Z(()=>({addend:()=>n.negate(le.value),description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),Z(()=>({addend:()=>n.negate(Dt.value),description:"Oil Smelter",enabled:()=>n.gt(Ve.value,0)})),Z(()=>({addend:()=>n.negate(Le.oilCost.value),description:"Oil Refinery",enabled:()=>n.gt(Le.activeRefinery.value,0)}))]),D=C(()=>Hl.apply(0)),Rn=z(()=>[Z(()=>({addend:Xe,description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),k(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>n.lt(ll.value,1)}))]),pn=C(()=>Rn.apply(0)),[Qi,Hi]=pl(()=>[{title:"Coal Consumption",modifier:Mt,unit:"/s",base:0},{title:"Drill Power",modifier:Ot,base:0},{title:"Upgrade Bonus",modifier:Ll,base:0,visible(){return n.gt(zt.value,0)}},{title:"Oil Speed",modifier:Ql,unit:"/s",base:0,visible(){return n.gt(_l.value,0)}},{title:"Oil Consumption",modifier:Hl,unit:"/s",base:0,visible(){return n.lt(D.value,0)}},{title:"Oil to Coal Substitution",modifier:Rn,unit:"/s",base:0,visible(){return n.gt(pn.value,0)}}]),mn=$(!1),ji=B(()=>o(bt,{modelValue:mn.value,"onUpdate:modelValue":Ge=>mn.value=Ge},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Qi})),jt=$(n.dOne),ll=$(n.dOne);Te.on("update",Ge=>{if(n.lt(W.day.value,vn))return;const wt=n.negate(tl.value);n.gt(wt,0)?(jt.value=n.min(n.div(R.coal.value,wt),1),R.coal.value=n.sub(R.coal.value,n.mul(wt,jt.value).mul(Ge))):jt.value=n.dOne,s.value=n.add(s.value,n.mul(gl.value,Ge)),i.value=n.add(i.value,n.mul(_l.value,Ge)),c();const gn=n.negate(D.value);n.gt(gn,0)?(ll.value=n.min(n.div(i.value,gn),1),i.value=n.sub(i.value,n.mul(gn,ll.value).mul(Ge)).max(0)):ll.value=n.dOne});const{total:fl,trackerDisplay:zi}=ml({resource:i,goal:25e4,name:e,day:vn,color:t,modal:{show:mn,display:ji}});return{name:e,day:vn,color:t,oil:i,totalOil:fl,depth:a,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:P,buildHeavy2:M,activeExtractor:Q,buildExtractor:Be,activePump:Ce,buildPump:$e,activeBurner:te,buildBurner:ue,activeSmelter:Ve,buildSmelter:dt,extractorCoal:de,extractorOre:Ue,coalEffectiveness:jt,oilEffectiveness:ll,depthMilestones:it,collapsedDepthMilestones:X,row1Upgrades:Ft,row2Upgrades:_t,minWidth:700,oilMilestones:kt,collapsedOilMilestones:Cl,generalTabCollapsed:Hi,display:B(()=>o(I,null,[re(zi),o(ge,null,null),n.lt(jt.value,1)?o("div",null,[d("Coal efficiency: "),oe(n.mul(jt.value,100)),d("%")]):null,n.lt(ll.value,1)?o("div",null,[d("Oil efficiency: "),oe(n.mul(ll.value,100)),d("%")]):null,o(St,{resource:i,color:t,sticky:!0,productionDisplay:B(()=>o(I,null,[n.lt(a.value,1e3)?"Reach 1000m to start gaining oil":o(I,null,[Xl(n.add(_l.value,D.value))])]))},null),n.eq(_l.value,0)?o(I,null,[d("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),o("br",null,null)]):"",o(Ml,null,{default:()=>[it[6].earned.value?o(At,null,{default:()=>[re($e),o("div",null,[ie(n.floor(Ce.value)),d("/"),ie(n.floor($e.amount.value))]),ve(rt,Pt,Fe,De)]}):null,kt[0].earned.value?o(At,null,{default:()=>[re(ue),o("div",null,[ie(n.floor(te.value)),d("/"),ie(n.floor(ue.amount.value))]),ve(ze,ft,xe,ut)]}):null,kt[2].earned.value?o(At,null,{default:()=>[re(dt),o("div",null,[ie(n.floor(Ve.value)),d("/"),ie(n.floor(dt.amount.value))]),ve(q,el,Rt,K)]}):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"},[ie(a.value)]),d("m deep"),o("br",null,null),d("Next at "),oe(n.sub(u.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"},[oe(gl.value)])]),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(h),o("div",null,[ie(n.floor(p.value)),d("/"),ie(n.floor(h.amount.value))]),ve(w,A,_,f)]}),it[3].earned.value?o(At,null,{default:()=>[re(M),o("div",null,[ie(n.floor(P.value)),d("/"),ie(n.floor(M.amount.value))]),ve(S,Pe,fe,T)]}):null,it[5].earned.value?o(At,null,{default:()=>[re(Be),o("div",null,[ie(n.floor(Q.value)),d("/"),ie(n.floor(Be.amount.value))]),ve(Re,L,Oe,Ie)]}):null]}),o(ge,null,null),it[1].earned.value?ve(...Ft):null,kt[1].earned.value?ve(..._t):null,o(ge,null,null),Et(),n.gte(fl.value,50)?kl():""]))}}),tr="plastic",zn=10,Le=Ut(tr,function(){const e="Plastic",t="#DCD9CD",l=st(0,"plastic"),[i,a]=pl(()=>[{title:"Plastic Gain",modifier:Be,base:0}]),s=$(!1),u=B(()=>o(bt,{modelValue:s.value,"onUpdate:modelValue":L=>s.value=L},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:i})),c=we(0),p=C(()=>n.times(c.value,100)),m=Se(()=>({resource:ht.metal,cost(){const L=new n(this.amount.value);return n.pow(1.2,L).times(1e7)},display:B(()=>o(I,null,[o("h3",null,[d("Refinery")]),o("br",null,null),d("Refines oil into plastic pellets"),o("br",null,null),d("Consumes 1000 oil/s to create 1 plastic/s"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ye(p.value),d(" oil/sec"),o("br",null,null),d("+"),ye(c.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=n.add(c.value,1)},style:{width:"300px"}})),{min:b,max:h,add:w,remove:f}=Gt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=C(()=>n.pow(5,n.add([...Object.values(M),...Object.values(Pe)].filter(L=>L.bought.value).length,2))),A=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!A.bought.value})})),P=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!P.bought.value})})),Y=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!Y.bought.value})})),M={paperTools:A,boxTools:P,clothTools:Y},S=O(()=>({resource:F(l),cost:_,visibility:()=>x(A.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!S.bought.value})})),T=O(()=>({resource:F(l),cost:_,visibility:()=>x(P.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!T.bought.value})})),fe=O(()=>({resource:F(l),cost:_,visibility:()=>x(Y.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!fe.bought.value})})),Pe={paperElf:S,boxElf:T,clothElf:fe},Q=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(S.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:B(()=>o(I,null,[se(Q.amount.value),d("%")])),showAmount:!1}})),Ee=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(T.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:B(()=>o(I,null,[se(Ee.amount.value),d("%")])),showAmount:!1}})),de=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(fe.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions complete +10% amounts per cycle",effectDisplay:B(()=>o(I,null,[se(n.times(de.amount.value,10)),d("%")])),showAmount:!1}})),Ue={passivePaper:Q,passiveBoxes:Ee,clothGains:de},Be=z(()=>[Z(()=>({addend:c,description:"Oil Refinery",enabled:()=>n.gt(c.value,0)})),k(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:S.bought})),k(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:T.bought})),k(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:fe.bought})),k(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ct.row2Upgrades.plasticUpgrade.bought})),k(()=>({multiplier:()=>Ke.oilEffectiveness.value,description:"Effectiveness",enabled:()=>n.lt(Ke.oilEffectiveness.value,1)}))]),Re=C(()=>Be.apply(0));Te.on("update",L=>{n.lt(W.day.value,zn)||(l.value=n.times(L,Re.value).add(l.value))});const{total:Ie,trackerDisplay:Oe}=ml({resource:l,goal:25e4,name:e,day:zn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:u}});return{name:e,color:t,plastic:l,totalPlastic:Ie,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:Pe,buyables:Ue,generalTabCollapsed:a,minWidth:700,display:B(()=>o(I,null,[re(Oe),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),o(At,null,{default:()=>[re(m),o("div",null,[se(n.floor(c.value)),d("/"),se(n.floor(m.amount.value))]),ve(b,f,w,h)]}),o(Ml,null,{default:()=>[sl(A,S,Q),sl(P,T,Ee),sl(Y,fe,de)]})]))}}),lr="workshop",Bl=2,Ct=Ut(lr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=st(0,"foundation progress"),a=Us(()=>({scaling:Pn(250,1.5),baseResource:be.logs,gainResource:F(i),roundUpCost:!0,buyMax:!1,spend(T,fe){be.logs.value=n.sub(be.logs.value,fe)}})),s=It(()=>({display:B(()=>o(I,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:")," ",Gl(be.logs,n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",be.logs.displayName])])),visibility:()=>x(n.lt(i.value,100)),canClick:()=>n.gte(a.actualGain.value,1)&&n.lt(i.value,100),onClick(){!r(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),u=El(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=C(()=>!Qe.milestones[6].earned.value),p=_e(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>n.gte(i.value,1),showPopups:c})),m=_e(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>n.gte(i.value,10),visibility:()=>x(p.earned.value),showPopups:c})),b=_e(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>n.gte(i.value,20),visibility:()=>x(m.earned.value),showPopups:c})),h=_e(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>n.gte(i.value,30),visibility:()=>x(b.earned.value),showPopups:c})),w=_e(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>n.gte(i.value,40),visibility:()=>x(h.earned.value),showPopups:c})),f=_e(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(i.value,50),visibility:()=>x(w.earned.value),showPopups:c})),_=_e(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>n.gte(i.value,75),visibility:()=>x(f.earned.value),showPopups:c})),A=_e(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>n.gte(i.value,100),visibility:()=>x(_.earned.value),showPopups:c})),P={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:b,autoCutMilestone2:h,autoPlantMilestone2:w,logGainMilestone2:f,morePlantsMilestone1:_,logGainMilestone3:A},{collapseMilestones:Y,display:M}=tn(P),S=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>W.day.value===Bl?n.div(i.value,100):1,display:B(()=>W.day.value===Bl?o(I,null,[se(i.value),d("%")]):"")}));return Bt(()=>{W.day.value===Bl&&n.gte(i.value,100)&&W.completeDay()}),{name:e,day:Bl,color:t,foundationProgress:i,foundationConversion:a,milestones:P,collapseMilestones:Y,minWidth:700,buildFoundationHK:u,display:B(()=>o(I,null,[o("div",null,[W.day.value===Bl?"Complete the foundation to complete the day":`${e} Complete!`]),re(S),o(ge,null,null),o("div",null,[o("span",null,[d("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[se(i.value)]),d("% completed")]),n.lt(i.value,100)?o(ge,null,null):null,re(s),o(ge,null,null),M()]))}}),nr="elves",xl=4,Qe=Ut(nr,function(){const e="Elves",t="red",l="#911D21",a=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>W.day.value===xl?n.div(le.value,6).times(.8333333333333334).add(n.div(n.add(R.coal.value,1).log10(),n.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>W.day.value===xl?n.lt(le.value,6)?o(I,null,[se(le.value),d("/6 elves")]):o(I,null,[se(R.coal.value),d("/"),se(1e9),d(" coal")]):"")})),s=zs(()=>({thingsToReset:[be,Ct,R],onReset(){setTimeout(()=>{Dt.earned.value?(be.row1Upgrades.forEach(X=>X.bought.value=!0),be.row2Upgrades.forEach(X=>X.bought.value=!0)):He.earned.value&&(be.row1Upgrades[4].bought.value=!0,be.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Ct.foundationProgress.value=100),dt.earned.value&&(R.warmerCutters.bought.value=!0,R.warmerPlanters.bought.value=!0,R.basicFertilizer.bought.value=!0,R.unlockBonfire.bought.value=!0,R.dedicatedCutters.bought.value=!0,R.dedicatedPlanters.bought.value=!0,R.betterFertilizer.bought.value=!0,R.unlockKiln.bought.value=!0,R.efficientSmelther.bought.value=!0)})}})),u=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>n.gt(H.books.cuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),c=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>n.gt(H.books.plantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),p=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>n.gt(H.books.expandersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),m=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>n.gt(H.books.heatedCuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),b=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>n.gt(H.books.heatedPlantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),h=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>n.gt(H.books.fertilizerBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),w=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>n.gt(H.books.smallFireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),f=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>n.gt(H.books.bonfireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),_=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>n.gt(H.books.kilnBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),A=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>n.gt(H.books.paperBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),P=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>n.gt(H.books.boxBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),Y=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>n.gt(H.books.clothBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),[M,S]=pl(()=>[{title:"Holly Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:te.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:te.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:te.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:te.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:te.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:te.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:te.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:f,base:10,unit:"/s",visible:te.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:te.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:A,base:10,unit:"/s",visible:te.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:P,base:10,unit:"/s",visible:te.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:Y,base:10,unit:"/s",visible:te.clothElf.bought}]),T=$(!1),fe=B(()=>o(bt,{modelValue:T.value,"onUpdate:modelValue":X=>T.value=X},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:M})),Pe=C(()=>{let X=n.pow(4,le.value).times(1e6);return n.gte(le.value,9)&&(X=n.times(X,1e15)),X});function Q(X){var _t;const Et=we(0),kt=X.hasToggle?we(!1):$(!0),Cl=C(()=>X.cooldownModifier.apply(10)),kl=pt((_t=X.canBuy)!=null?_t:!0);function Ft(Mt){if(We.bought.value&&r(kl)){Et.value=n.add(Et.value,Mt);const tl=n.recip(Cl.value);(wn(X.buyable)?X.buyable:[X.buyable]).forEach(Ot=>{var gl;for(;n.gte(Et.value,tl);)if(X.customCost==null?r(Ot.canPurchase):n.gte(Ot.resource.value,X.customCost(Ot.amount.value)))Ot.amount.value=n.add(Ot.amount.value,1),Et.value=n.sub(Et.value,tl),(gl=X.onAutoPurchase)==null||gl.call(X);else{Et.value=tl;break}})}}const We=O(()=>({...X,buyable:void 0,toggle:kt,buyProgress:Et,update:Ft,resource:R.coal,cost:Pe,computedAutoBuyCooldown:Cl,display:()=>({title:X.name,description:B(()=>o(I,null,[X.description,We.bought.value?null:o(I,null,[" ",d("Training this elf will require resetting all your progress from days 1-3.")]),We.bought.value&&X.hasToggle===!0?o(I,null,[o(Wt,{title:X.toggleDesc,"onUpdate:modelValue":Mt=>kt.value=Mt,modelValue:kt.value},null)]):null])),showCost:!We.bought.value}),style:"width: 190px",onPurchase(){var Mt;(Mt=X.onPurchase)==null||Mt.call(X),s.reset()}}));return We}const Ee=Q({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:be.row1Buyables[0],cooldownModifier:u}),de=Q({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:be.row1Buyables[1],cooldownModifier:c}),Ue=Q({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:be.row1Buyables[2],cooldownModifier:p}),Be=[Ee,de,Ue],Re=Q({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Ie=Q({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:b}),Oe=Q({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),L=[Re,Ie,Oe],Ce=Q({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:R.buildFire,cooldownModifier:w,visibility:()=>x(ct.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ce.toggle.value&&(R.activeFires.value=n.add(R.activeFires.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0}}),he=Q({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:R.buildBonfire,cooldownModifier:f,visibility:()=>x(ct.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const X=r(this.buyable.cost);R.activeFires.value=n.sub(R.activeFires.value,X).max(0),R.buildFire.amount.value=n.sub(R.buildFire.amount.value,X).max(0),he.toggle.value&&(R.activeBonfires.value=n.add(R.activeBonfires.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),me=Q({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:R.buildKiln,cooldownModifier:_,visibility:()=>x(ct.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){me.toggle.value&&(R.activeKilns.value=n.add(R.activeKilns.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),$e=[Ce,he,me],De=Q({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(H.books),cooldownModifier:A,visibility:()=>x(Le.elfUpgrades.paperElf.bought.value)}),rt=Q({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(ct.buyables),cooldownModifier:P,visibility:()=>x(Le.elfUpgrades.boxElf.bought.value)}),Fe=Q({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[yt.buildPens,yt.betterShears,yt.fasterSpinning],cooldownModifier:Y,visibility:()=>x(Le.elfUpgrades.clothElf.bought.value)}),Pt=[De,rt,Fe],te={cuttersElf:Ee,plantersElf:de,expandersElf:Ue,heatedCuttersElf:Re,heatedPlantersElf:Ie,fertilizerElf:Oe,smallFireElf:Ce,bonfireElf:he,kilnElf:me,paperElf:De,boxElf:rt,clothElf:Fe},le=C(()=>Object.values(te).filter(X=>X.bought.value).length),Xe=_e(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>n.gte(le.value,1)})),He=_e(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>n.gte(le.value,2),visibility:()=>x(Xe.earned.value)})),ue=_e(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>n.gte(le.value,3),visibility:()=>x(He.earned.value)})),ut=_e(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(le.value,4),visibility:()=>x(ue.earned.value)})),ze=_e(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>n.gte(le.value,5),visibility:()=>x(ut.earned.value)})),xe=_e(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>n.gte(le.value,6),visibility:()=>x(ze.earned.value)})),ft=_e(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>n.gte(le.value,7),visibility:()=>x(xe.earned.value&&W.day.value>5)})),Ve=_e(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>n.gte(le.value,8),visibility:()=>x(ft.earned.value)})),Dt=_e(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,9),visibility:()=>x(Ve.earned.value)})),qe=_e(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>n.gte(le.value,10),visibility:()=>x(W.day.value>=10)})),dt=_e(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,11),visibility:()=>x(qe.earned.value)})),K=_e(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>n.gte(le.value,12),visibility:()=>x(dt.earned.value)})),q=[Xe,He,ue,ut,ze,xe,ft,Ve,Dt,qe,dt,K],Rt={manualMilestone:Xe,researchMilestone:He,coalGainMilestone:ue,logGainMilestone:ut,forestMilestone:ze,elvesMilestone:xe,foundationMilestone:ft,forestMilestone2:Ve,treeUpgradesMilestone:Dt,elvesMilestone2:qe,coalUpgradesMilestone:dt,coalGainMilestone2:K},{collapseMilestones:el,display:it}=tn(Rt);return Te.on("update",X=>{n.lt(W.day.value,xl)||Object.values(te).forEach(Et=>Et.update(X))}),Bt(()=>{W.day.value===xl&&n.gte(le.value,6)&&n.gte(R.coal.value,1e9)&&W.completeDay()}),{name:e,color:t,elves:te,totalElves:le,milestones:q,collapseMilestones:el,generalTabCollapsed:S,minWidth:700,display:B(()=>o(I,null,[o("div",null,[W.day.value===xl?`Reach ${se(6)} trained elves and ${se(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>T.value=!0},[d("Check Modifiers")])]),re(a),re(fe),o(ge,null,null),o("div",{style:"width: 600px"},[ve(...Be),ve(...L),ve(...$e),ve(...Pt)]),it()]))}}),ir="coal",Wn=3,R=Ut(ir,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",a=st(0,"coal"),s=st(0,"ash"),u=we(0),c=C(()=>n.times(u.value,1e3)),p=C(()=>n.times(u.value,.1)),m=C(()=>n.times(u.value,50)),b=Se(()=>({resource:be.logs,cost(){let D=n.times(T.amount.value,r(T.cost)).plus(this.amount.value);return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,H.books.smallFireBook.amount.value).times(D),D.pow(1.5).times(1e4)},display:B(()=>o(I,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("-"),ye(c.value),d(" logs/sec"),o("br",null,null),d("+"),ye(p.value),d(" coal/sec"),o("br",null,null),d("+"),ye(m.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(b.cost)),d(" "),b.resource.displayName])),onPurchase(){u.value=n.add(u.value,1)},style:{color:i,width:"160px"}})),{min:h,max:w,add:f,remove:_}=Gt({active:u,buyable:b}),A=st(b.amount,"small fires"),P=we(0),Y=C(()=>n.times(P.value,1e4)),M=C(()=>n.times(P.value,10)),S=C(()=>n.times(P.value,1e3)),T=Se(()=>({resource:A,cost(){return n.pow(.95,H.books.bonfireBook.amount.value).times(10)},display:B(()=>o(I,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("-"),ye(Y.value),d(" logs/sec"),o("br",null,null),d("+"),ye(M.value),d(" coal/sec"),o("br",null,null),d("+"),ye(S.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(T.cost)),d(" "),T.resource.displayName])),onPurchase(D){u.value=n.sub(u.value,D).max(0),P.value=n.add(P.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ue.bought.value)})),{min:fe,max:Pe,add:Q,remove:Ee}=Gt({buyable:T,active:P}),de=we(0),Ue=C(()=>n.times(de.value,1e6)),Be=C(()=>n.times(de.value,1e4)),Re=C(()=>n.times(de.value,1e4)),Ie=Se(()=>({resource:be.logs,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,H.books.kilnBook.amount.value).times(D),n.pow(1.1,D).times(1e7)},display:B(()=>o(I,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("-"),ye(Ue.value),d(" logs/sec"),o("br",null,null),d("+"),ye(Be.value),d(" coal/sec"),o("br",null,null),d("+"),ye(Re.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(Ie.cost)),d(" "),Ie.resource.displayName])),onPurchase(){de.value=n.add(de.value,1)},style:{color:i,width:"160px"},visibility:()=>x(Ve.bought.value)})),{min:Oe,max:L,add:Ce,remove:he}=Gt({buyable:Ie,active:de}),me=we(0),$e=C(()=>n.times(n.pow(me.value,Ke.row2Upgrades[1].bought.value?2:1),5e7).times(ht.efficientDrill.bought.value?2:1)),De=Se(()=>({resource:ht.metal,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),n.pow(1.15,D).times(10)},display:B(()=>o(I,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("+"),ye($e.value),d(" coal/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(De.cost)),d(" "),De.resource.displayName])),onPurchase(){me.value=n.add(me.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ht.coalDrill.bought.value)})),{max:rt,min:Fe,add:Pt,remove:te}=Gt({buyable:De,active:me}),le=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),Xe=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),He=O(()=>({resource:F(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),ue=O(()=>({resource:A,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){A.value=n.add(A.value,this.cost)},style:{color:i}})),ut=[le,Xe,He,ue],ze=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>x(ue.bought.value)})),xe=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>x(ue.bought.value)})),ft=O(()=>({canAfford(){return n.gte(be.logs.value,1e5)&&n.gte(s.value,1e5)},onPurchase(){be.logs.value=n.sub(be.logs.value,1e5),s.value=n.sub(s.value,1e5)},display:B(()=>o(I,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: "),se(1e5),d(" "),be.logs.displayName,o("br",null,null),se(1e5),d(" "),s.displayName])),style:{color:i},visibility:()=>x(ue.bought.value)})),Ve=O(()=>({resource:be.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>x(ue.bought.value)})),Dt=[ze,xe,ft,Ve],qe=O(()=>({resource:F(a),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),dt=[qe],K=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.heatedCuttersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(I,null,[d("Cutters cut down trees "),ye(X.value),d("x faster")]))},style:{color:i},visibility:()=>x(le.bought.value)})),q=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.heatedPlantersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(I,null,[d("Planters plant trees "),ye(kt.value),d("x faster")]))},style:{color:i},visibility:()=>x(Xe.bought.value)})),Rt=Se(()=>({resource:F(s),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.fertilizerBook.amount.value).times(D),n.add(D,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(I,null,[d("Trees give "),ye(kl.value),d("x more logs")]))},style:{color:i},visibility:()=>x(He.bought.value)})),el=[K,q,Rt],it=z(()=>[Z(()=>({addend(){return n.times(K.amount.value,.25)},description:"Heated Cutters",enabled(){return n.gt(K.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:ze.bought}))]),X=C(()=>it.apply(1)),Et=z(()=>[Z(()=>({addend(){return n.times(q.amount.value,.25)},description:"Heated Planters",enabled(){return n.gt(q.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:xe.bought}))]),kt=C(()=>Et.apply(1)),Cl=z(()=>[Z(()=>({addend(){return n.times(Rt.amount.value,.25)},description:"Fertilized Soil",enabled(){return n.gt(Rt.amount.value,0)}})),k(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),kl=C(()=>Cl.apply(1)),Ft=z(()=>[Z(()=>({addend(){return p.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return M.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return Be.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),Z(()=>({addend(){return $e.value},description:"Mining Drills",enabled(){return n.gt(me.value,0)}})),k(()=>({multiplier:2,description:"Carry coal in boxes",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:2,description:"Mining overalls",enabled:yt.metalUpgrades.metalUpgrade2.bought})),k(()=>({multiplier:3,description:"Mining helmet",enabled:yt.metalUpgrades.metalUpgrade3.bought})),k(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:yt.metalUpgrades.metalUpgrade4.bought})),k(()=>({multiplier:2,description:"12 Elves Trained",enabled:Qe.milestones[11].earned})),Ni(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Qe.milestones[2].earned,supportLowNumbers:!0})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ke.depthMilestones[0].earned})),k(()=>({multiplier:Ke.extractorCoal,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)}))]),We=C(()=>Ft.apply(0)),_t=z(()=>[Z(()=>({addend(){return m.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return S.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return Re.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),k(()=>({multiplier:2,description:"Carry ash in boxes",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:4,description:"Mining boots",enabled:yt.metalUpgrades.metalUpgrade1.bought}))]),Mt=C(()=>_t.apply(0)),tl=z(()=>[Z(()=>({addend(){return n.negate(c.value)},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return n.negate(Y.value)},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return n.negate(Ue.value)},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}}))]),Ot=C(()=>tl.apply(0)),[gl,Ll]=pl(()=>[{title:"Log Consumption",modifier:tl,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Coal Gain",modifier:Ft,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Ash Gain",modifier:_t,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}}]),zt=$(!1),Ql=B(()=>o(bt,{modelValue:zt.value,"onUpdate:modelValue":D=>zt.value=D},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:gl}));Te.on("update",D=>{n.lt(W.day.value,Wn)||n.times(D,Ot.value).negate().gt(be.logs.value)||(be.logs.value=n.times(D,Ot.value).plus(be.logs.value),a.value=n.times(D,We.value).plus(a.value),s.value=n.times(D,Mt.value).plus(s.value),u.value=n.max(u.value,0))});const{total:_l,trackerDisplay:Hl}=ml({resource:a,goal:1e7,name:e,day:Wn,color:t,modal:{show:zt,display:Ql}});return{name:e,color:t,coal:a,totalCoal:_l,computedCoalGain:We,ash:s,activeFires:u,buildFire:b,activeBonfires:P,buildBonfire:T,activeKilns:de,buildKiln:Ie,activeDrills:me,buildDrill:De,warmerCutters:le,warmerPlanters:Xe,basicFertilizer:He,unlockBonfire:ue,dedicatedCutters:ze,dedicatedPlanters:xe,betterFertilizer:ft,unlockKiln:Ve,efficientSmelther:qe,heatedCutters:K,heatedPlanters:q,moreFertilizer:Rt,computedHeatedCutterEffect:X,computedHeatedPlanterEffect:kt,computedFertilizerEffect:kl,generalTabCollapsed:Ll,minWidth:700,display:B(()=>o(I,null,[re(Hl),o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",effectDisplay:n.gt(We.value,0)?`+${ye(We.value)}/s`:void 0},null),o(ge,null,null),o(St,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:n.gt(Mt.value,0)?`+${ye(Mt.value)}/s`:void 0},null),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(b),o("div",null,[se(n.floor(u.value)),d("/"),se(n.floor(b.amount.value))]),ve(h,_,f,w)]}),ue.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(T),o("div",null,[se(P.value),d("/"),se(T.amount.value)]),ve(fe,Ee,Q,Pe)]})]):void 0,Ve.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(Ie),o("div",null,[se(de.value),d("/"),se(Ie.amount.value)]),ve(Oe,he,Ce,L)]})]):void 0,ht.coalDrill.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(De),o("div",null,[se(me.value),d("/"),se(De.amount.value)]),ve(Fe,te,Pt,rt)]})]):void 0]}),o(ge,null,null),ve(...ut),ve(...Dt),ve(...dt),ve(...el)]))}}),ar="metal",Kn=7,ht=Ut(ar,function(){const e="Metal",t="#888B8D",l=st(0,"metal ingots",void 0,!0),i=Qn(l),a=st(0,"ore"),s=Qn(a),u=z(()=>[k(()=>({multiplier:5,description:"Crucible",enabled:Ie.bought})),k(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Industrial Furnace",enabled:L.bought})),k(()=>({multiplier:()=>n.add(rt.value,1),description:"Hotter Forges",enabled:()=>n.gte(De.amount.value,1)})),k(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ct.row2Upgrades.metalUpgrade.bought}))]),c=C(()=>u.apply(.1)),p=z(()=>[Z(()=>({addend:()=>n.times(me.amount.value,10),description:"Industrial Crucibles",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.mul(Ke.activeSmelter.value,Ke.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>n.gt(Ke.activeSmelter.value,0)}))]),m=C(()=>p.apply(0)),b=z(()=>[k(()=>({multiplier:3,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.add(Ke.activeBurner.value,1).mul(Ke.oilEffectiveness.value),description:"Blaster Burner",enabled:Ke.row2Upgrades[2].bought}))]),h=C(()=>b.apply(1)),w=1e10,f=C(()=>n.min(a.value,n.div(R.coal.value,w)).floor().max(0)),_=It(()=>({display:B(()=>{const ue=n.gte(f.value,1)?f.value:n.add(f.value,1);return o(I,null,[o("span",{style:"font-size: large"},[d("Smelt "),oe(n.times(f.value,c.value))," ",l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),ie(ue),d(" "),a.displayName,d(";")," ",ie(n.times(ue,w)),d(" "),R.coal.displayName])])}),canClick:()=>n.gte(f.value,1),onClick(){!r(this.canClick)||A(f.value)},style:{width:"600px",minHeight:"unset"}}));function A(ue,ut=1){const[ze,xe,ft]=[n.times(ue,c.value).times(ut),ue,n.times(ue,w)];l.value=n.add(l.value,ze),a.value=n.sub(a.value,xe),R.coal.value=n.sub(R.coal.value,ft)}const P=z(()=>[Z(()=>({addend:()=>he.amount.value,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ke.depthMilestones[2].earned})),k(()=>({multiplier:Ke.extractorOre,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)})),k(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ct.row2Upgrades.oreUpgrade.bought}))]),Y=C(()=>P.apply(1)),M=z(()=>[k(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Be.bought})),k(()=>({multiplier:2,description:"Double Pickaxe",enabled:Re.bought})),k(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Drills",enabled:Ce.bought})),k(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ke.row2Upgrades[1].bought}))]),S=C(()=>M.apply(n.recip(fe))),T=we(0),fe=10,Pe=Kt(()=>({width:400,height:25,direction:ke.Right,fillStyle:{backgroundColor:t},progress:()=>T.value})),Q=z(()=>[Z(()=>({addend:Y})),k(()=>({multiplier:S}))]),Ee=C(()=>Q.apply(0)),de=z(()=>[Z(()=>({addend:Ee})),Z(()=>({addend:()=>n.negate(m.value),enabled:$e}))]),Ue=C(()=>de.apply(0)),Be=O(()=>({resource:F(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.
Halve the time to mine more ore"}})),Re=O(()=>({resource:F(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:()=>x(Re.bought.value)})),Ie=O(()=>({resource:F(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:()=>x(Ie.bought.value||n.div(s.value,c.value).plus(i.value).gte(1))})),Oe=O(()=>({resource:F(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:()=>x(n.gte(he.amount.value,1)&&(Oe.bought.value||n.lt(R.computedCoalGain.value,n.times(Y.value,S.value).times(w)))),onPurchase(){W.days[2].recentlyUpdated.value=!0}})),L=O(()=>({canAfford(){return n.gte(l.value,50)&&n.gte(R.coal.value,1e11)},onPurchase(){l.value=n.sub(l.value,50),R.coal.value=n.sub(R.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore
+`,e),await yl(Nl())}}function Nl(){const e=Wl(),t=Ci({id:e});return qt(t),Ye.saves.push(e),t}function Wl(){let e,t=0;do e=`${Me.id}-${t++}`;while(localStorage.getItem(e));return e}const In=$(!1);async function yl(e){console.info("Loading save",e),In.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await Jl(()=>Promise.resolve().then(function(){return yo}),void 0),{fixOldSave:a,getInitialLayers:s}=await Jl(()=>Promise.resolve().then(function(){return pr}),void 0);for(const u in t){const c=t[u];c&&l(c)}s(e).forEach(u=>i(u,e)),e=Ci(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,Me.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Me.versionNumber&&a(e.modVersion,e),Object.assign(j,e),Ye.active=j.id,Te.emit("onLoad")}setInterval(()=>{j.autosave&&qt()},1e3);window.onbeforeunload=()=>{j.autosave&&qt()};window.save=qt;const ko=window.hardReset=async()=>{await yl(Nl())},Rl=Ol({active:"",saves:[],showTPS:!0,theme:_n.Nordic,unthrottled:!1});Qt(Rl,e=>{const t=il.compressToUTF16(JSON.stringify(e));localStorage.setItem(Me.id,t)},{deep:!0});var Ye=window.settings=Rl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:_n.Nordic};Te.emit("loadSettings",e),Object.assign(Rl,e),ko()};function _o(){try{let e=localStorage.getItem(Me.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Rl,t)}Te.emit("loadSettings",Rl)}catch{}}const ki=Ol([]);function Ao(e){ki.push(e)}const _i=Ol([]);function So(e){_i.push(e)}const No=Ol([]),Eo={class:"table"},At=ae({__name:"Column",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Eo,[g("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),Mo={class:"table"},Ml=ae({__name:"Row",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Mo,[g("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function Bn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ji(e)}function Ae(e,t="span"){return typeof e=="function"?ae({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}${t}>`),ae({template:e})):ae({render:()=>({})}):e}function re(e){if(Jt(e))return typeof e=="function"?e():Ae(e);const t=e[dl];return o(t,e[cl](),null)}function ve(...e){let t;return o(Ml,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function sl(...e){let t;return o(At,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function Lt(e){if(Jt(e))return typeof e=="function"?e():typeof e=="string"?o(I,null,[e]):o(e,null,null);const t=e[dl];return o(t,e[cl](),null)}function Io(...e){let t;return o(At,null,Bn(t=e.map(Lt))?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[Tl]===!0}function Ai(e,t,l){const i=$(null),a=$(void 0);function s(p){i.value||(i.value=setInterval(c,250)),a.value=p,l&&(l.value=!0)}function u(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return ei(u),{start:s,stop:u,handleHolding:c}}function Bo(e,t){const l=C(()=>e.filter(i=>r(i.visibility)===at.Visible&&t(i)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function en(e,t="div"){const l=Tt();return Bt(()=>{l.value=Ae(ot(e),t)}),l}function ul(e,t="div"){const l=Tt(null);return Bt(()=>{const i=ot(e);l.value=i==null?null:Ae(i,t)}),l}function xo(e){return C(()=>ot(e))}function ot(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ge=ae({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(y(),E("div",{style:nt({width:e.width,height:e.height})},null,4))}});const Po={},Do={class:"notif"};function Fo(e,t){return y(),E("div",Do,"!")}var Ln=Ne(Po,[["render",Fo],["__scopeId","data-v-66323fd4"]]);const rn=e=>(Yt("data-v-9de19f28"),e=e(),Xt(),e),To={key:0,class:"day feature dontMerge opened"},Uo={class:"date"},Ro=d("Dec"),Oo=rn(()=>g("br",null,null,-1)),$o={class:"date"},qo=d("Dec"),Go=rn(()=>g("br",null,null,-1)),Vo=rn(()=>g("div",{class:"doors"},null,-1)),Lo={class:"date"},Qo=d("Dec"),Ho=rn(()=>g("br",null,null,-1)),jo={key:0,class:"material-icons lock"},zo={key:1,class:"timer"},Wo={key:2,class:"timer"},Ko=ae({__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,i=C(()=>l.layer&&n.gte(W.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function a(){i.value&&t("unlockLayer")}return(s,u)=>e.opened.value?(y(),E("div",To,[o(an,{appear:"",name:"door"},{default:J(()=>[g("div",{class:"doors",onClick:u[0]||(u[0]=c=>t("openLayer"))},[g("div",Uo,[Ro,Oo,d(ce(e.day),1)]),g("div",$o,[qo,Go,d(ce(e.day),1)])])]),_:1}),g("div",{class:"icon",style:nt({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:u[1]||(u[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(y(),ee(Ln,{key:0})):U("",!0)])):(y(),E("div",{key:1,class:et(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:a},[Vo,g("div",Lo,[Qo,Ho,d(ce(e.day),1)]),r(i)?U("",!0):(y(),E("div",jo,"lock")),r(W).day.value===e.day&&!r(i)?(y(),E("div",zo,ce(r(kn)(r(W).timeUntilNewDay.value,0)),1)):r(W).day.value===e.day&&e.layer==null?(y(),E("div",Wo,"NYI")):U("",!0),r(i)?(y(),ee(Ln,{key:3})):U("",!0)],2))}});var Jo=Ne(Ko,[["__scopeId","data-v-9de19f28"]]);const Yo=ae({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=en(Ht(t,"display")),i=en(Ht(t,"content"));return(a,s)=>(y(),ee(At,{class:"collapsible-container"},{default:J(()=>[g("button",{onClick:s[0]||(s[0]=u=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),ee(je(r(l))))]),e.collapsed.value?U("",!0):(y(),ee(je(r(i)),{key:0}))]),_:1}))}});var Xo=Ne(Yo,[["__scopeId","data-v-a72c16aa"]]);const Zo={key:0},es={key:0,class:"mark star"},ts=["src"],ls=ae({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(y(),E("div",Zo,[e.mark===!0?(y(),E("div",es)):(y(),E("img",{key:1,class:"mark",src:e.mark},null,8,ts))])):U("",!0)}});var un=Ne(ls,[["__scopeId","data-v-2207999f"]]);const ns=ae({__name:"Node",props:{id:null},setup(e){const l=gt(e),i=Kl(An,()=>{}),a=Kl(Sn,()=>{}),s=Tt(null),u=C(()=>s.value&&s.value.parentElement);return Qt([u,l.id],([c,p],[m,b])=>{m&&a(r(b)),c&&i(p,c)}),ei(()=>a(r(l.id))),(c,p)=>(y(),E("div",{class:"node",ref_key:"node",ref:s},null,512))}});var ql=Ne(ns,[["__scopeId","data-v-a48cb382"]]);const is=ae({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{progress:t,width:l,height:i,direction:a,display:s}=gt(e),u=C(()=>{let m=t.value instanceof n?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=C(()=>{const m={width:ot(l)+.5+"px",height:ot(i)+.5+"px"};switch(r(a)){case ke.Up:m.clipPath=`inset(${u.value}% 0% 0% 0%)`,m.width=ot(l)+1+"px";break;case ke.Down:m.clipPath=`inset(0% 0% ${u.value}% 0%)`,m.width=ot(l)+1+"px";break;case ke.Right:m.clipPath=`inset(0% ${u.value}% 0% 0%)`;break;case ke.Left:m.clipPath=`inset(0% 0% 0% ${u.value} + '%)`;break;case ke.Default:m.clipPath="inset(0% 50% 0% 0%)";break}return m}),p=ul(s);return{normalizedProgress:u,barStyle:c,component:p,unref:r,Visibility:at}}});function as(e,t,l,i,a,s){var p,m,b,h,w,f,_;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),class:et({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(y(),E("span",{key:0,class:"overlayText",style:nt(e.unref(e.textStyle))},[(y(),ee(je(e.component)))],4)):U("",!0)],4),g("div",{class:"border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(b=e.unref(e.style))!=null?b:{},(h=e.unref(e.baseStyle))!=null?h:{},(w=e.unref(e.borderStyle))!=null?w:{}])},[g("div",{class:"fill",style:nt([e.barStyle,(f=e.unref(e.style))!=null?f:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):U("",!0)}var os=Ne(is,[["render",as],["__scopeId","data-v-02d0d7b2"]]);const ss=Symbol("Bar");function Kt(e){return Nt(()=>{const t=e();return t.id=Il("bar-"),t.type=ss,t[dl]=os,G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"width"),G(t,"height"),G(t,"direction"),G(t,"style"),G(t,"classes"),G(t,"borderStyle"),G(t,"baseStyle"),G(t,"textStyle"),G(t,"fillStyle"),G(t,"progress"),G(t,"display"),G(t,"mark"),t[cl]=function(){const{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:p,classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}=this;return{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:r(p),classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}},t})}var rs=ae({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:ql,MarkNode:un},setup(e){const{display:t,onClick:l,onHold:i}=gt(e),a=Tt("");Bt(()=>{const c=ot(t);if(c==null){a.value="";return}if(Jt(c)){a.value=Ae(c);return}const p=Ae(c.title||"","h3"),m=Ae(c.description,"div");a.value=Ae(B(()=>o("span",null,[c.title?o("div",null,[o(p,null,null)]):null,o(m,null,null)])))});const{start:s,stop:u}=Ai(l,i,e.isHolding);return{start:s,stop:u,comp:a,Visibility:at,unref:r}}});function us(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:et({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(y(),ee(je(e.unref(e.comp)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):U("",!0)}var Si=Ne(rs,[["render",us],["__scopeId","data-v-8cedd7da"]]);const ds=Symbol("Clickable");function It(e){return Nt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Il("clickable-"),t.type=ds,t[dl]=Si,t.isHolding=$(!1),G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"canClick"),mt(t,"canClick",!0),G(t,"classes"),G(t,"style"),G(t,"mark"),G(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(a){r(t.canClick)&&i(a)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&i()}}return t[cl]=function(){const{display:i,visibility:a,style:s,classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}=this;return{display:i,visibility:a,style:r(s),classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}},t})}function st(e,t="points",l=0,i=void 0){const a=lt(e)?e:we(e);if(a.displayName=t,a.precision=l,a.small=i,!lt(e)){const s=a[Ul];s.displayName=t,s.precision=l,s.small=i}return a}function Qn(e){const t=we(e.value);return Qt(e,l=>{In.value||n.gt(l,t.value)&&(t.value=l)}),t}function cs(e){const t=we(e.value);return Qt(e,(l,i)=>{In.value||n.gt(l,i)&&(t.value=n.add(t.value,n.sub(l,i)))}),t}new n("10^^8");new n("1e100");function Gl(e,t){const l=t!=null?t:e.value;return n.eq(e.precision,0)?se(e.small?l:n.floor(l)):ye(l,e.precision,e.small)}const ps=["x1","y1","x2","y2"],ms=ae({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=gt(e),i=C(()=>{const s=l.startNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.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}),a=C(()=>{const s=l.endNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.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,u)=>(y(),E("line",wl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(i).x,y1:r(i).y,x2:r(a).x,y2:r(a).y}),null,16,ps))}});const gs=ae({__name:"Links",props:{links:null},setup(e){var p;const l=Ht(e,"links"),i=$(null),a=Kl(Nn,$({})),s=Kl(En,$(void 0)),u=$((p=i.value)==null?void 0:p.getBoundingClientRect());Qt(s,()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()}),ln(()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()});const c=C(()=>{var b,h;const m=a.value;return(h=(b=l.value)==null?void 0:b.filter(w=>{var f,_;return((f=m[w.startNode.id])==null?void 0:f.rect)&&((_=m[w.startNode.id])==null?void 0:_.rect)}))!=null?h:[]});return(m,b)=>(y(),E(I,null,[r(c)?(y(),E("svg",Yi(wl({key:0},m.$attrs)),[(y(!0),E(I,null,ti(r(c),(h,w)=>(y(),ee(ms,{key:w,link:h,boundingRect:u.value,startNode:r(a)[h.startNode.id],endNode:r(a)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):U("",!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var fs=Ne(gs,[["__scopeId","data-v-063f6d6b"]]);ae({props:{nodes:{type:V(Array),required:!0},leftSideNodes:V(Array),rightSideNodes:V(Array),branches:V(Array)},components:{Links:fs},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=gt(e),a=Tt();Bt(()=>{const c=ot(t);a.value=Ae(B(()=>o(I,null,[c.map(p=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Lt)]))])))});const s=Tt();Bt(()=>{const c=ot(l);s.value=c?Ae(B(()=>o("span",{class:"left-side-nodes small"},[c.map(Lt)]))):""});const u=Tt();return Bt(()=>{const c=ot(i);u.value=c?Ae(B(()=>o("span",{class:"side-nodes small"},[c.map(Lt)]))):""}),{unref:r,nodesComp:a,leftNodesComp:s,rightNodesComp:u}}});ae({props:{display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),onClick:Function,onHold:Function,color:V(String),glowColor:V(String),canClick:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{onClick:t,onHold:l,display:i}=gt(e),a=ul(i),{start:s,stop:u}=Ai(t,l);return{start:s,stop:u,comp:a,unref:r,Visibility:at,isCoercableComponent:Jt}}});function pl(e){const t=[],l={};let i=!1;function a(){return i||(t.push(...e()),l.base=t.map(c=>pt(c.base)),l.baseText=t.map(c=>pt(c.baseText)),l.visible=t.map(c=>pt(c.visible)),i=!0),t}const s=we({});return[B(()=>{const c=a();let p=!0;const m=c.map((b,h)=>{var A,P,Y;if(r(l.visible[h])===!1)return null;const w=o("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[d("\u25BC")]),b.title,b.subtitle?o("span",{class:"subtitle"},[d(" ("),b.subtitle,d(")")]):null]),f=r(s.value[h])?null:o(I,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[Lt((A=r(l.baseText[h]))!=null?A:"Base")]),o("span",{class:"modifier-amount"},[ye((P=r(l.base[h]))!=null?P:1),b.unit])]),Lt(r(b.modifier.description))]),_=!p;return p=!1,o(I,null,[_?o("br",null,null):null,o("div",null,[w,o("br",null,null),f,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[d("Total")]),o("span",{class:"modifier-amount"},[ye(b.modifier.apply((Y=r(l.base[h]))!=null?Y:1)),b.unit])])])])});return o(I,null,[m])}),s]}function tn(e){const t=Object.values(e).reverse(),l=we(!0),i=C(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:a,collapsedContent:s,hasCollapsedContent:u}=Bo(t,p=>p.earned.value),c=B(()=>{const p=[...i.value];return a.value&&p.push(a.value),Io(...p,B(()=>nn(o(Xo,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[Zn,r(u)]])))});return{collapseMilestones:l,display:c}}function ml(e){const t=cs(e.resource),l=()=>{var c,p;if(W.day.value!==e.day)return 1;let s=n.add(t.value,1),u=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:j.usingLog)&&(s=s.log10(),u=n.log10(u)),n.div(s,u)},i=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:B(()=>W.day.value===e.day?o(I,null,[ie(t.value),d("/"),ie(e.goal)]):"")})),a=B(()=>o(I,null,[o("div",null,[W.day.value===e.day?o(I,null,[d("Reach "),ie(e.goal),d(" total "),e.resource.displayName,d(" to complete the day")]):o(I,null,[e.name,d(" Complete!")]),e.modal?o(I,null,[" ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[d("Check Modifiers")])]):void 0]),re(i),e.modal?re(e.modal.display):void 0]));return Bt(()=>{W.day.value===e.day&&n.gte(t.value,e.goal)&&W.completeDay()}),{total:t,trackerDisplay:a}}function Gt(e){var u;const t=(u=e.style)!=null?u:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=It(()=>({display:"0",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=It(()=>({display:"-",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=n.sub(e.active.value,1)}})),a=It(()=>({display:"+",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=n.add(e.active.value,1)}})),s=It(()=>({display:"Max",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:i,add:a,max:s}}const hs=Symbol("Buyable");function Se(e){const t=we(0);return Nt(()=>{var s,u,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=Il("buyable-"),l.type=hs,l[dl]=Si,l.amount=t,l.amount[ol]=(s=l.initialValue)!=null?s:0,l.canAfford=C(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&n.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&n.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=C(()=>n.gte(l.amount.value,r(l.purchaseLimit))),G(l,"classes");const i=l.classes;l.classes=C(()=>{const p=r(i)||{};return l.maxed.value&&(p.bought=!0),p}),G(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(u=l.onClick)!=null?u:l.purchase)!=null?c:function(){var b;const p=l;if(!r(p.canPurchase))return;const m=r(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)),(b=p.onPurchase)==null||b.call(p,m)},G(l,"display");const a=l.display;return l.display=B(()=>{const p=r(a);if(Jt(p)){const m=Ae(p);return o(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,b=Ae(p.title||"","h3"),h=Ae(p.description||""),w=Ae(p.effectDisplay||"");return o("span",null,[p.title?o("div",null,[o(b,null,null)]):null,p.description?o(h,null,null):null,p.showAmount===!1?null:o("div",null,[o("br",null,null),r(m.purchaseLimit)===n.dInf?o(I,null,[d("Amount: "),se(m.amount.value)]):o(I,null,[d("Amount: "),se(m.amount.value),d(" /")," ",se(r(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: "),ye(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"cost"),G(l,"resource"),G(l,"purchaseLimit"),mt(l,"purchaseLimit",n.dInf),G(l,"style"),G(l,"mark"),G(l,"small"),l[cl]=function(){const{display:p,visibility:m,style:b,classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}=this;return{display:p,visibility:m,style:r(b),classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}},l})}const dn=on({}),xn=Symbol("Hotkey");function El(e){return Nt(()=>{const t=e();return t.type=xn,G(t,"enabled"),mt(t,"enabled",!0),G(t,"description"),t})}Te.on("addLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=t})});Te.on("removeLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||Fn.value&&!j.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=dn[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};So(B(()=>{const e=Object.values(dn).filter(t=>r(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 vs=ae({__name:"Sticky",setup(e){const t=$("0"),l=new ResizeObserver(a),i=Tt(null);function a(){let s=i.value;if(s==null)return;let u=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(u+=c.offsetHeight),s=c}t.value=u+"px"}return bl(a),document.fonts.ready.then(a),ln(()=>{var u;const s=(u=i.value)==null?void 0:u.parentElement;s&&l.observe(s)}),(s,u)=>(y(),E("div",{class:"sticky",style:nt({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Vt(s.$slots,"default",{},void 0,!0)],4))}});var ys=Ne(vs,[["__scopeId","data-v-cccac690"]]);const Hn=ae({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=C(()=>Gl(t.resource));return(i,a)=>(y(),E("h2",{style:nt({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},ce(r(l)),5))}});const bs={class:"main-display"},ws={key:0},Cs={key:1},ks=d(", "),_s={key:2},As=g("br",null,null,-1),Ss={class:"main-display"},Ns={key:0},Es={key:1},Ms=d(", "),Is={key:2},Bs=g("br",null,null,-1),St=ae({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=gt(e),i=$(null),a=ul(l.effectDisplay),s=$(null),u=ul(l.productionDisplay),c=C(()=>n.lt(l.resource.value,"1e1000"));return(p,m)=>{var b,h;return e.sticky?(y(),ee(ys,{key:0},{default:J(()=>{var w,f,_,A;return[g("div",{class:et(["main-display-container",(w=e.classes)!=null?w:{}]),style:nt([{height:`${((_=(f=i.value)==null?void 0:f.$el.clientHeight)!=null?_:0)+50}px`},(A=e.style)!=null?A:{}])},[g("div",bs,[r(c)?(y(),E("span",ws,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Cs,[ks,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",_s,[As,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6)]}),_:1})):(y(),E("div",{key:1,class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:nt([{height:"50px"},(h=e.style)!=null?h:{}])},[g("div",Ss,[r(c)?(y(),E("span",Ns,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Es,[Ms,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",Is,[Bs,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6))}}});var xs=ae({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:ql,MarkNode:un},setup(e){const{display:t,cost:l}=gt(e),i=Tt("");return Bt(()=>{const a=ot(t);if(a==null){i.value="";return}if(Jt(a)){i.value=Ae(a);return}const s=ot(l),u=Ae(a.title||"","h3"),c=Ae(a.description,"div"),p=Ae(a.effectDisplay||"");i.value=Ae(B(()=>{var m;return o("span",null,[a.title?o("div",null,[o(u,null,null)]):null,o(c,null,null),a.effectDisplay?o("div",null,[d("Currently: "),o(p,null,null)]):null,e.resource!=null&&a.showCost!==!1?o(I,null,[o("br",null,null),d("Cost: "),e.resource&&Gl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:i,unref:r,Visibility:at}}});const Ps=["disabled"];function Ds(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:et({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(y(),ee(je(e.unref(e.component)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,Ps)):U("",!0)}var Fs=Ne(xs,[["render",Ds],["__scopeId","data-v-7f411ac8"]]);const Ts=Symbol("Upgrade");function O(e){const t=we(!1);return Nt(()=>{const l=e();return l.id=Il("upgrade-"),l.type=Ts,l[dl]=Fs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=C(()=>{const i=l;return i.resource!=null&&i.cost!=null&&n.gte(i.resource.value,r(i.cost))}):G(l,"canAfford"),l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var a;const i=l;!r(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=n.sub(i.resource.value,r(i.cost))),t.value=!0,(a=i.onPurchase)==null||a.call(i))},G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"classes"),G(l,"style"),G(l,"display"),G(l,"mark"),G(l,"cost"),G(l,"resource"),l[cl]=function(){const{display:i,visibility:a,style:s,classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}=this;return{display:i,visibility:a,style:r(s),classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}},l})}function Z(e){return Nt(()=>{const{addend:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.add(c,r(a)),revert:c=>n.sub(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[n.gte(r(a),0)?"+":"",ye(r(a))])]))}})}function k(e){return Nt(()=>{const{multiplier:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.times(c,r(a)),revert:c=>n.div(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[d("\xD7"),ye(r(a))])]))}})}function Ni(e){return Nt(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:a}=e(),s=pt(t),u=pt(l),c=i==null?void 0:pt(i);return{apply:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.pow(m,r(s)),a&&(m=n.sub(m,1)),m},revert:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.root(m,r(s)),a&&(m=n.sub(m,1)),m},enabled:c,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(u)?o("span",{class:"modifier-description"},[Lt(r(u)),a?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[d("^"),ye(r(s))])]))}})}function z(e){return Nt(()=>{const t=e();return{apply:l=>t.filter(i=>r(i.enabled)!==!1).reduce((i,a)=>a.apply(i),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(i=>r(i.enabled)!==!1).reduceRight((i,a)=>a.revert(i),l):void 0,enabled:C(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:B(()=>o(I,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(Lt)]))}})}function Ei(e){return Nt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=C(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.nextAt==null&&(t.nextAt=C(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.convert==null&&(t.convert=function(){var a;const l=r(t.currentGain),i=r(t.currentAt);t.gainResource.value=n.add(t.gainResource.value,l),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),G(t,"currentGain"),G(t,"actualGain"),G(t,"currentAt"),G(t,"nextAt"),G(t,"buyMax"),mt(t,"buyMax",!0),G(t,"roundUpCost"),mt(t,"roundUpCost",!0),t})}function Pn(e,t){const l=pt(e),i=pt(t);return{currentGain(a){let s=r(a.baseResource.value);if(a.costModifier&&(s=a.costModifier.apply(s)),n.lt(s,r(l)))return 0;const u=n.div(s,r(l)).pow(r(i));return u.isNan()?new n(0):u},currentAt(a){let s=r(a.currentGain);return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s},nextAt(a){let s=n.add(r(a.currentGain),1).floor();return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)).max(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s}}}function Mi(e){return Ei(e)}function Us(e){return Ei(()=>{const t=e();return mt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(n.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=C(()=>{let l=n.sub(n.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),mt(t,"convert",function(){var a;const l=r(t.actualGain),i=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t})}const Rs={class:"field"},Os=ae({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=C(()=>Ae(r(l.title)||"","span")),a=C({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,u)=>(y(),E("label",Rs,[nn(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=c=>lt(a)?a.value=c:null)},null,512),[[Xi,r(a)]]),(y(),ee(je(r(i))))]))}});var Wt=Ne(Os,[["__scopeId","data-v-33d57459"]]);const $s={class:"field"},qs={key:0,class:"field-title"},Dn=ae({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const l=e,i=ul(Ht(l,"title"),"span"),a=$((u=l.options.find(c=>c.value===l.modelValue))!=null?u:null);Qt(Ht(l,"modelValue"),c=>{var p;ot(a)!==c&&(a.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(y(),E("div",$s,[r(i)?(y(),E("span",qs,[(y(),ee(je(r(i))))])):U("",!0),o(r(la),{options:e.options,modelValue:a.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>a.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 Gs=ae({props:{visibility:{type:V(Number),required:!0},display:{type:V(String,Object,Function),required:!0},style:V(String,Object,Array),classes:V(Object),earned:{type:V(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:ql},setup(e){const{display:t}=gt(e),l=Tt("");return Bt(()=>{const i=ot(t);if(i==null){l.value="";return}if(Jt(i)){l.value=Ae(i);return}const a=Ae(i.requirement,"h3"),s=Ae(i.effectDisplay||"","b"),u=Ae(i.optionsDisplay||"","span");l.value=Ae(B(()=>o("span",null,[o(a,null,null),i.effectDisplay?o("div",null,[o(s,null,null)]):null,i.optionsDisplay?o("div",{class:"equal-spaced"},[o(u,null,null)]):null])))}),{comp:l,unref:r,Visibility:at}}});function Vs(e,t,l,i,a,s){var c;const u=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:et({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(y(),ee(je(e.unref(e.comp)))),o(u,{id:e.id},null,8,["id"])],6)):U("",!0)}var Ls=Ne(Gs,[["render",Vs],["__scopeId","data-v-f4e8794e"]]);Te.on("setupVue",e=>e.use(na));const jn=ni(),Qs=Symbol("Milestone");let al;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(al||(al={}));function _e(e){const t=we(!1);return Nt(()=>{var a;const l=(a=e==null?void 0:e())!=null?a:{};l.id=Il("milestone-"),l.type=Qs,l[dl]=Ls,l.earned=t,l.complete=function(){var u;const s=l;if(t.value=!0,(u=s.onComplete)==null||u.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=Ae(Jt(c)?c:c.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(p,null,null)])]))}},G(l,"visibility"),mt(l,"visibility",at.Visible);const i=l.visibility;if(l.visibility=C(()=>{const s=r(l.display);switch(Ye.msDisplay){default:case al.All:return r(i);case al.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?at.None:r(i);case al.Incomplete:return r(l.earned)?at.None:r(i);case al.None:return at.None}}),G(l,"style"),G(l,"classes"),G(l,"display"),G(l,"showPopups"),l[cl]=function(){const{visibility:s,display:u,style:c,classes:p,earned:m,id:b}=this;return{visibility:s,display:u,style:r(c),classes:p,earned:m,id:b}},l.shouldEarn){const s=l;Bt(()=>{var u,c;if(Ye.active===j.id&&!s.earned.value&&r(s.visibility)===at.Visible&&((u=s.shouldEarn)==null?void 0:u.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Ae(Jt(p)?p:p.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}})}return l})}Te.on("loadSettings",e=>{mt(e,"msDisplay",al.All)});const Hs=Object.values(al).map(e=>({label:pi(e),value:e}));Ao(B(()=>o(Dn,{title:"Show Milestones",options:Hs,"onUpdate:modelValue":e=>Ye.msDisplay=e,modelValue:Ye.msDisplay},null)));const js=Symbol("Reset");function zs(e){return Nt(()=>{const t=e();return t.id=Il("reset-"),t.type=js,t.reset=function(){var i;const l=a=>{if(a&&typeof a=="object")if(ol in a){const s=a;s.value=s[ol]}else!(a instanceof n)&&!lt(a)&&Object.values(a).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),Te.emit("reset",t),(i=t.onReset)==null||i.call(t)},G(t,"thingsToReset"),t})}const zl={};Te.on("removeLayer",e=>{var t;(t=zl[e.id])==null||t.call(zl),zl[e.id]=void 0});const Ws={},Ks={style:{"white-space":"nowrap"}},Js=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ys={style:{"text-decoration":"overline"}};function Xs(e,t){return y(),E("span",Ks,[Js,g("span",Ys,[Vt(e.$slots,"default")])])}var Zs=Ne(Ws,[["render",Xs]]);const er="oil",vn=9,Ke=Ut(er,function(){const e="Oil",t="#000000",l="var(--foreground)",i=st(0,"oil"),a=st(0,"depth"),s=we(0),u=C(()=>n.lt(a.value,990)?n.add(10,a.value):n.pow(1.001,n.sub(a.value,990)).mul(1e3));function c(){if(n.lt(a.value,990)){const Ge=n.min(n.affordArithmeticSeries(s.value,10,1,a.value),n.sub(990,a.value)),wt=n.sumArithmeticSeries(Ge,10,1,a.value);s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}if(n.gte(a.value,990)){const Ge=n.affordGeometricSeries(s.value,1e3,1.001,n.sub(a.value,990)),wt=n.sumGeometricSeries(Ge,1e3,1.001,n.sub(a.value,990));s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}}const p=we(0),m=C(()=>n.times(n.pow(p.value,Y.value).pow(2),1e14)),b=C(()=>n.times(n.pow(p.value,Y.value),1)),h=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(1.3,Ge).times(25e3)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill")]),o("br",null,null),d("A large drill specialized at deep mining."),o("br",null,null),d("Consumes 1e14*(Heavy Drills amount)"),o("sup",null,[d("2")]),d(" coal/sec for (Heavy Drills amount) drill power."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(m.value),d(" coal/sec"),o("br",null,null),d("+"),oe(b.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(h.cost)),d(" "),h.resource.displayName])),onPurchase(){p.value=n.add(p.value,1)},style:{color:l,width:"160px"}})),{min:w,max:f,add:_,remove:A}=Gt({buyable:h,active:p}),P=we(0),Y=C(()=>n.add(P.value,Math.E).ln()),M=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(1e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill Drill")]),o("br",null,null),d("Attach extra drills to Heavy Drills to make them faster"),o("br",null,null),d("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),o("br",null,null),d("(also affects coal consumption)."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("^"),oe(Y.value),d(" Heavy Drill amount"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(M.cost)),d(" "),M.resource.displayName])),onPurchase(){P.value=n.add(P.value,1)},style:{color:l,width:"160px"}})),{min:S,max:T,add:fe,remove:Pe}=Gt({buyable:M,active:P}),Q=we(0),Ee=C(()=>n.pow(1/3,Q.value)),de=C(()=>n.pow(2,Q.value)),Ue=C(()=>n.pow(1.2,Q.value)),Be=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(8,Ge).times(2e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Extractor")]),o("br",null,null),d("Attach extractors to the drill to mine coal and ore, but with a price."),o("br",null,null),d("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(Ee.value),d(" drill power"),o("br",null,null),d("\xD7"),oe(de.value),d(" coal/sec"),o("br",null,null),d("\xD7"),oe(Ue.value),d(" ore/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(Be.cost))," ",Be.resource.displayName])),onPurchase(){Q.value=n.add(Q.value,1)},style:{color:l,width:"160px"}})),{min:Re,max:Ie,add:Oe,remove:L}=Gt({buyable:Be,active:Q}),Ce=we(0),he=C(()=>n.pow(_t[3].bought.value?4:5,Ce.value)),me=C(()=>n.pow(Ce.value,2).mul(p.value).mul(n.add(P.value,1)).mul(Q.value).mul(a.value).div(1e5)),$e=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(16,Ge).times(2e6);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,null,[o("h3",null,[d("Oil Pump")]),o("br",null,null),d("Pump that oil from the ground."),o("br",null,null),d("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),_t[3].bought.value?4:5,d("\xD7."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(he.value),d(" coal usage"),o("br",null,null),d("+"),oe(me.value),d(" oil/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r($e.cost)),d(" "),$e.resource.displayName])),onPurchase(){Ce.value=n.add(Ce.value,1)},style:{color:l,width:"160px"}})),{max:De,min:rt,add:Fe,remove:Pt}=Gt({buyable:$e,active:Ce}),te=we(0),le=C(()=>n.pow(te.value,2)),Xe=C(()=>n.pow(te.value,3).mul(1e19)),He=C(()=>n.add(te.value,1)),ue=Se(()=>({resource:F(i),cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(50)},display:B(()=>o(I,null,[o("h3",null,[d("Oil Burner")]),o("br",null,null),d("Burn oil as fuel."),o("br",null,null),d("(Oil Burner Amount)"),o("sup",null,[d("2")]),d(" unit of oil can give 1e19*(Oil Burner Amount)"),o("sup",null,[d("3")]),d(" units of coal."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(le.value),d(" oil/sec"),o("br",null,null),d("-"),oe(Xe.value),d(" coal consumption"),_t[2].bought.value?o(I,null,[o("br",null,null),d("\xD7"),oe(He.value),d(" to auto smelting multi")]):"",o("br",null,null),o("br",null,null),d("Cost: "),ie(r(ue.cost)),d(" "),ue.resource.displayName])),onPurchase(){te.value=n.add(te.value,1)},style:{color:l,width:"160px"}})),{max:ut,min:ze,add:xe,remove:ft}=Gt({buyable:ue,active:te}),Ve=we(0),Dt=C(()=>n.pow(Ve.value,2).mul(100)),qe=C(()=>n.add(Ve.value,1)),dt=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(10,Ge).times(1e7);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,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("-"),oe(Dt.value),d(" oil/sec"),o("br",null,null),d("\xD7"),oe(qe.value),d(" smelting speed"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(dt.cost)),d(" "),dt.resource.displayName])),onPurchase(){Ve.value=n.add(Ve.value,1)},style:{color:l,width:"160px"}})),{max:K,min:q,add:Rt,remove:el}=Gt({buyable:dt,active:Ve}),it=[_e(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>n.gte(a.value,5)})),_e(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>n.gte(a.value,10),visibility:()=>x(it[0].earned.value)})),_e(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>n.gte(a.value,25),visibility:()=>x(it[1].earned.value)})),_e(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>n.gte(a.value,60),visibility:()=>x(it[2].earned.value)})),_e(()=>({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(a.value,150),visibility:()=>x(it[3].earned.value)})),_e(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>n.gte(a.value,350),visibility:()=>x(it[4].earned.value)})),_e(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>n.gte(a.value,1e3),visibility:()=>x(n.gte(a.value,1e3))})),_e(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>n.gte(a.value,3e3),visibility:()=>x(n.gte(a.value,2e3))}))],{collapseMilestones:X,display:Et}=tn(it),kt=[_e(()=>({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(fl.value,100)})),_e(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>n.gte(fl.value,500),visibility:()=>x(kt[0].earned.value)})),_e(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>n.gte(fl.value,1e4),visibility:()=>x(kt[1].earned.value)}))],{collapseMilestones:Cl,display:kl}=tn(kt),Ft=[O(()=>({resource:R.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[0].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[1].value)]))},style:{color:l}})),O(()=>({resource:R.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[2].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[3].value)]))},style:{color:l}})),O(()=>({resource:F(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:B(()=>o(I,null,[d("+"),oe(n.mul(We[4].value,100)),d("%")]))},style:{color:l}}))],We=[C(()=>n.mul(R.buildDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(ht.oreDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(n.max(R.coal.value,1).log10().floor(),n.add(.06,zt.value)).add(1)),C(()=>n.mul(n.max(ht.metal.value,1).log10().floor(),n.add(.1,zt.value)).add(1)),C(()=>n.mul(h.amount.value,.001))],_t=[O(()=>({resource:F(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),O(()=>({resource:F(i),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}})),O(()=>({resource:F(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),O(()=>({resource:F(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),O(()=>({resource:F(i),cost:5e4,display:{title:"Be One with the Oil",description:B(()=>o(I,null,[d("Divide metal ingot prices of oil buildings by "),o("sup",null,[d("6")]),o(Zs,null,{default:()=>[d("total oil + 1")]})]))},style:{color:l}}))],Mt=z(()=>[Z(()=>({addend:()=>n.negate(m.value),description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:he,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),Z(()=>({addend:pn,description:"Oil to Coal Substitution",enabled:()=>n.gt(pn.value,0)}))]),tl=C(()=>Mt.apply(0)),Ot=z(()=>[Z(()=>({addend:b,description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:Ee,description:"Heavy Extractor",enabled:()=>n.gt(Q.value,0)})),k(()=>({multiplier:We[0],description:"Coal Drill Synergy",enabled:Ft[0].bought})),k(()=>({multiplier:We[1],description:"Metal Drill Synergy",enabled:Ft[1].bought})),k(()=>({multiplier:We[2],description:"Coal Drill Upgrade",enabled:Ft[2].bought})),k(()=>({multiplier:We[3],description:"Metal Drill Upgrade",enabled:Ft[3].bought})),k(()=>({multiplier:2,description:"Guide to drilling",enabled:H.upgrades.drillingUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),gl=C(()=>Ot.apply(0)),Ll=z(()=>[Z(()=>({addend:We[4],description:"Drill Oil",enabled:Ft[4].bought}))]),zt=C(()=>Ll.apply(0)),Ql=z(()=>[Z(()=>({addend:me,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),k(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:_t[0].bought})),k(()=>({multiplier:2,description:"3000m Well Depth",enabled:it[7].earned})),k(()=>({multiplier:2,description:"Oil and where to find it",enabled:H.upgrades.oilUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),_l=C(()=>Ql.apply(0)),Hl=z(()=>[Z(()=>({addend:()=>n.negate(le.value),description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),Z(()=>({addend:()=>n.negate(Dt.value),description:"Oil Smelter",enabled:()=>n.gt(Ve.value,0)})),Z(()=>({addend:()=>n.negate(Le.oilCost.value),description:"Oil Refinery",enabled:()=>n.gt(Le.activeRefinery.value,0)}))]),D=C(()=>Hl.apply(0)),Rn=z(()=>[Z(()=>({addend:Xe,description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),k(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>n.lt(ll.value,1)}))]),pn=C(()=>Rn.apply(0)),[Qi,Hi]=pl(()=>[{title:"Coal Consumption",modifier:Mt,unit:"/s",base:0},{title:"Drill Power",modifier:Ot,base:0},{title:"Upgrade Bonus",modifier:Ll,base:0,visible(){return n.gt(zt.value,0)}},{title:"Oil Speed",modifier:Ql,unit:"/s",base:0,visible(){return n.gt(_l.value,0)}},{title:"Oil Consumption",modifier:Hl,unit:"/s",base:0,visible(){return n.lt(D.value,0)}},{title:"Oil to Coal Substitution",modifier:Rn,unit:"/s",base:0,visible(){return n.gt(pn.value,0)}}]),mn=$(!1),ji=B(()=>o(bt,{modelValue:mn.value,"onUpdate:modelValue":Ge=>mn.value=Ge},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Qi})),jt=$(n.dOne),ll=$(n.dOne);Te.on("update",Ge=>{if(n.lt(W.day.value,vn))return;const wt=n.negate(tl.value);n.gt(wt,0)?(jt.value=n.min(n.div(R.coal.value,wt),1),R.coal.value=n.sub(R.coal.value,n.mul(wt,jt.value).mul(Ge))):jt.value=n.dOne,s.value=n.add(s.value,n.mul(gl.value,Ge)),i.value=n.add(i.value,n.mul(_l.value,Ge)),c();const gn=n.negate(D.value);n.gt(gn,0)?(ll.value=n.min(n.div(i.value,gn),1),i.value=n.sub(i.value,n.mul(gn,ll.value).mul(Ge)).max(0)):ll.value=n.dOne});const{total:fl,trackerDisplay:zi}=ml({resource:i,goal:25e4,name:e,day:vn,color:t,modal:{show:mn,display:ji}});return{name:e,day:vn,color:t,oil:i,totalOil:fl,depth:a,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:P,buildHeavy2:M,activeExtractor:Q,buildExtractor:Be,activePump:Ce,buildPump:$e,activeBurner:te,buildBurner:ue,activeSmelter:Ve,buildSmelter:dt,extractorCoal:de,extractorOre:Ue,coalEffectiveness:jt,oilEffectiveness:ll,depthMilestones:it,collapsedDepthMilestones:X,row1Upgrades:Ft,row2Upgrades:_t,minWidth:700,oilMilestones:kt,collapsedOilMilestones:Cl,generalTabCollapsed:Hi,display:B(()=>o(I,null,[re(zi),o(ge,null,null),n.lt(jt.value,1)?o("div",null,[d("Coal efficiency: "),oe(n.mul(jt.value,100)),d("%")]):null,n.lt(ll.value,1)?o("div",null,[d("Oil efficiency: "),oe(n.mul(ll.value,100)),d("%")]):null,o(St,{resource:i,color:t,sticky:!0,productionDisplay:B(()=>o(I,null,[n.lt(a.value,1e3)?"Reach 1000m to start gaining oil":o(I,null,[Xl(n.add(_l.value,D.value))])]))},null),n.eq(_l.value,0)?o(I,null,[d("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),o("br",null,null)]):"",o(Ml,null,{default:()=>[it[6].earned.value?o(At,null,{default:()=>[re($e),o("div",null,[ie(n.floor(Ce.value)),d("/"),ie(n.floor($e.amount.value))]),ve(rt,Pt,Fe,De)]}):null,kt[0].earned.value?o(At,null,{default:()=>[re(ue),o("div",null,[ie(n.floor(te.value)),d("/"),ie(n.floor(ue.amount.value))]),ve(ze,ft,xe,ut)]}):null,kt[2].earned.value?o(At,null,{default:()=>[re(dt),o("div",null,[ie(n.floor(Ve.value)),d("/"),ie(n.floor(dt.amount.value))]),ve(q,el,Rt,K)]}):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"},[ie(a.value)]),d("m deep"),o("br",null,null),d("Next at "),oe(n.sub(u.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"},[oe(gl.value)])]),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(h),o("div",null,[ie(n.floor(p.value)),d("/"),ie(n.floor(h.amount.value))]),ve(w,A,_,f)]}),it[3].earned.value?o(At,null,{default:()=>[re(M),o("div",null,[ie(n.floor(P.value)),d("/"),ie(n.floor(M.amount.value))]),ve(S,Pe,fe,T)]}):null,it[5].earned.value?o(At,null,{default:()=>[re(Be),o("div",null,[ie(n.floor(Q.value)),d("/"),ie(n.floor(Be.amount.value))]),ve(Re,L,Oe,Ie)]}):null]}),o(ge,null,null),it[1].earned.value?ve(...Ft):null,kt[1].earned.value?ve(..._t):null,o(ge,null,null),Et(),n.gte(fl.value,50)?kl():""]))}}),tr="plastic",zn=10,Le=Ut(tr,function(){const e="Plastic",t="#DCD9CD",l=st(0,"plastic"),[i,a]=pl(()=>[{title:"Plastic Gain",modifier:Be,base:0}]),s=$(!1),u=B(()=>o(bt,{modelValue:s.value,"onUpdate:modelValue":L=>s.value=L},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:i})),c=we(0),p=C(()=>n.times(c.value,100)),m=Se(()=>({resource:ht.metal,cost(){const L=new n(this.amount.value);return n.pow(1.2,L).times(1e7)},display:B(()=>o(I,null,[o("h3",null,[d("Refinery")]),o("br",null,null),d("Refines oil into plastic pellets"),o("br",null,null),d("Consumes 100 oil/s to create 1 plastic/s"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ye(p.value),d(" oil/sec"),o("br",null,null),d("+"),ye(c.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=n.add(c.value,1)},style:{width:"300px"}})),{min:b,max:h,add:w,remove:f}=Gt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=C(()=>n.pow(5,n.add([...Object.values(M),...Object.values(Pe)].filter(L=>L.bought.value).length,2))),A=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!A.bought.value})})),P=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!P.bought.value})})),Y=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!Y.bought.value})})),M={paperTools:A,boxTools:P,clothTools:Y},S=O(()=>({resource:F(l),cost:_,visibility:()=>x(A.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!S.bought.value})})),T=O(()=>({resource:F(l),cost:_,visibility:()=>x(P.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!T.bought.value})})),fe=O(()=>({resource:F(l),cost:_,visibility:()=>x(Y.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!fe.bought.value})})),Pe={paperElf:S,boxElf:T,clothElf:fe},Q=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(S.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:B(()=>o(I,null,[se(Q.amount.value),d("%")])),showAmount:!1}})),Ee=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(T.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:B(()=>o(I,null,[se(Ee.amount.value),d("%")])),showAmount:!1}})),de=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(fe.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions complete +10% amounts per cycle",effectDisplay:B(()=>o(I,null,[se(n.times(de.amount.value,10)),d("%")])),showAmount:!1}})),Ue={passivePaper:Q,passiveBoxes:Ee,clothGains:de},Be=z(()=>[Z(()=>({addend:c,description:"Oil Refinery",enabled:()=>n.gt(c.value,0)})),k(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:S.bought})),k(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:T.bought})),k(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:fe.bought})),k(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ct.row2Upgrades.plasticUpgrade.bought})),k(()=>({multiplier:()=>Ke.oilEffectiveness.value,description:"Effectiveness",enabled:()=>n.lt(Ke.oilEffectiveness.value,1)}))]),Re=C(()=>Be.apply(0));Te.on("update",L=>{n.lt(W.day.value,zn)||(l.value=n.times(L,Re.value).add(l.value))});const{total:Ie,trackerDisplay:Oe}=ml({resource:l,goal:25e4,name:e,day:zn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:u}});return{name:e,color:t,plastic:l,totalPlastic:Ie,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:Pe,buyables:Ue,generalTabCollapsed:a,minWidth:700,display:B(()=>o(I,null,[re(Oe),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),o(At,null,{default:()=>[re(m),o("div",null,[se(n.floor(c.value)),d("/"),se(n.floor(m.amount.value))]),ve(b,f,w,h)]}),o(Ml,null,{default:()=>[sl(A,S,Q),sl(P,T,Ee),sl(Y,fe,de)]})]))}}),lr="workshop",Bl=2,Ct=Ut(lr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=st(0,"foundation progress"),a=Us(()=>({scaling:Pn(250,1.5),baseResource:be.logs,gainResource:F(i),roundUpCost:!0,buyMax:!1,spend(T,fe){be.logs.value=n.sub(be.logs.value,fe)}})),s=It(()=>({display:B(()=>o(I,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:")," ",Gl(be.logs,n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",be.logs.displayName])])),visibility:()=>x(n.lt(i.value,100)),canClick:()=>n.gte(a.actualGain.value,1)&&n.lt(i.value,100),onClick(){!r(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),u=El(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=C(()=>!Qe.milestones[6].earned.value),p=_e(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>n.gte(i.value,1),showPopups:c})),m=_e(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>n.gte(i.value,10),visibility:()=>x(p.earned.value),showPopups:c})),b=_e(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>n.gte(i.value,20),visibility:()=>x(m.earned.value),showPopups:c})),h=_e(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>n.gte(i.value,30),visibility:()=>x(b.earned.value),showPopups:c})),w=_e(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>n.gte(i.value,40),visibility:()=>x(h.earned.value),showPopups:c})),f=_e(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(i.value,50),visibility:()=>x(w.earned.value),showPopups:c})),_=_e(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>n.gte(i.value,75),visibility:()=>x(f.earned.value),showPopups:c})),A=_e(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>n.gte(i.value,100),visibility:()=>x(_.earned.value),showPopups:c})),P={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:b,autoCutMilestone2:h,autoPlantMilestone2:w,logGainMilestone2:f,morePlantsMilestone1:_,logGainMilestone3:A},{collapseMilestones:Y,display:M}=tn(P),S=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>W.day.value===Bl?n.div(i.value,100):1,display:B(()=>W.day.value===Bl?o(I,null,[se(i.value),d("%")]):"")}));return Bt(()=>{W.day.value===Bl&&n.gte(i.value,100)&&W.completeDay()}),{name:e,day:Bl,color:t,foundationProgress:i,foundationConversion:a,milestones:P,collapseMilestones:Y,minWidth:700,buildFoundationHK:u,display:B(()=>o(I,null,[o("div",null,[W.day.value===Bl?"Complete the foundation to complete the day":`${e} Complete!`]),re(S),o(ge,null,null),o("div",null,[o("span",null,[d("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[se(i.value)]),d("% completed")]),n.lt(i.value,100)?o(ge,null,null):null,re(s),o(ge,null,null),M()]))}}),nr="elves",xl=4,Qe=Ut(nr,function(){const e="Elves",t="red",l="#911D21",a=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>W.day.value===xl?n.div(le.value,6).times(.8333333333333334).add(n.div(n.add(R.coal.value,1).log10(),n.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>W.day.value===xl?n.lt(le.value,6)?o(I,null,[se(le.value),d("/6 elves")]):o(I,null,[se(R.coal.value),d("/"),se(1e9),d(" coal")]):"")})),s=zs(()=>({thingsToReset:[be,Ct,R],onReset(){setTimeout(()=>{Dt.earned.value?(be.row1Upgrades.forEach(X=>X.bought.value=!0),be.row2Upgrades.forEach(X=>X.bought.value=!0)):He.earned.value&&(be.row1Upgrades[4].bought.value=!0,be.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Ct.foundationProgress.value=100),dt.earned.value&&(R.warmerCutters.bought.value=!0,R.warmerPlanters.bought.value=!0,R.basicFertilizer.bought.value=!0,R.unlockBonfire.bought.value=!0,R.dedicatedCutters.bought.value=!0,R.dedicatedPlanters.bought.value=!0,R.betterFertilizer.bought.value=!0,R.unlockKiln.bought.value=!0,R.efficientSmelther.bought.value=!0)})}})),u=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>n.gt(H.books.cuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),c=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>n.gt(H.books.plantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),p=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>n.gt(H.books.expandersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),m=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>n.gt(H.books.heatedCuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),b=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>n.gt(H.books.heatedPlantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),h=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>n.gt(H.books.fertilizerBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),w=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>n.gt(H.books.smallFireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),f=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>n.gt(H.books.bonfireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),_=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>n.gt(H.books.kilnBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),A=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>n.gt(H.books.paperBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),P=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>n.gt(H.books.boxBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),Y=z(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(H.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>n.gt(H.books.clothBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),[M,S]=pl(()=>[{title:"Holly Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:te.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:te.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:te.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:te.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:te.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:te.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:te.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:f,base:10,unit:"/s",visible:te.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:te.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:A,base:10,unit:"/s",visible:te.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:P,base:10,unit:"/s",visible:te.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:Y,base:10,unit:"/s",visible:te.clothElf.bought}]),T=$(!1),fe=B(()=>o(bt,{modelValue:T.value,"onUpdate:modelValue":X=>T.value=X},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:M})),Pe=C(()=>{let X=n.pow(4,le.value).times(1e6);return n.gte(le.value,9)&&(X=n.times(X,1e15)),X});function Q(X){var _t;const Et=we(0),kt=X.hasToggle?we(!1):$(!0),Cl=C(()=>X.cooldownModifier.apply(10)),kl=pt((_t=X.canBuy)!=null?_t:!0);function Ft(Mt){if(We.bought.value&&r(kl)){Et.value=n.add(Et.value,Mt);const tl=n.recip(Cl.value);(wn(X.buyable)?X.buyable:[X.buyable]).forEach(Ot=>{var gl;for(;n.gte(Et.value,tl);)if(X.customCost==null?r(Ot.canPurchase):n.gte(Ot.resource.value,X.customCost(Ot.amount.value)))Ot.amount.value=n.add(Ot.amount.value,1),Et.value=n.sub(Et.value,tl),(gl=X.onAutoPurchase)==null||gl.call(X);else{Et.value=tl;break}})}}const We=O(()=>({...X,buyable:void 0,toggle:kt,buyProgress:Et,update:Ft,resource:R.coal,cost:Pe,computedAutoBuyCooldown:Cl,display:()=>({title:X.name,description:B(()=>o(I,null,[X.description,We.bought.value?null:o(I,null,[" ",d("Training this elf will require resetting all your progress from days 1-3.")]),We.bought.value&&X.hasToggle===!0?o(I,null,[o(Wt,{title:X.toggleDesc,"onUpdate:modelValue":Mt=>kt.value=Mt,modelValue:kt.value},null)]):null])),showCost:!We.bought.value}),style:"width: 190px",onPurchase(){var Mt;(Mt=X.onPurchase)==null||Mt.call(X),s.reset()}}));return We}const Ee=Q({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:be.row1Buyables[0],cooldownModifier:u}),de=Q({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:be.row1Buyables[1],cooldownModifier:c}),Ue=Q({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:be.row1Buyables[2],cooldownModifier:p}),Be=[Ee,de,Ue],Re=Q({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Ie=Q({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:b}),Oe=Q({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),L=[Re,Ie,Oe],Ce=Q({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:R.buildFire,cooldownModifier:w,visibility:()=>x(ct.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ce.toggle.value&&(R.activeFires.value=n.add(R.activeFires.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0}}),he=Q({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:R.buildBonfire,cooldownModifier:f,visibility:()=>x(ct.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const X=r(this.buyable.cost);R.activeFires.value=n.sub(R.activeFires.value,X).max(0),R.buildFire.amount.value=n.sub(R.buildFire.amount.value,X).max(0),he.toggle.value&&(R.activeBonfires.value=n.add(R.activeBonfires.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),me=Q({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:R.buildKiln,cooldownModifier:_,visibility:()=>x(ct.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){me.toggle.value&&(R.activeKilns.value=n.add(R.activeKilns.value,1))},onPurchase(){W.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),$e=[Ce,he,me],De=Q({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(H.books),cooldownModifier:A,visibility:()=>x(Le.elfUpgrades.paperElf.bought.value)}),rt=Q({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(ct.buyables),cooldownModifier:P,visibility:()=>x(Le.elfUpgrades.boxElf.bought.value)}),Fe=Q({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[yt.buildPens,yt.betterShears,yt.fasterSpinning],cooldownModifier:Y,visibility:()=>x(Le.elfUpgrades.clothElf.bought.value)}),Pt=[De,rt,Fe],te={cuttersElf:Ee,plantersElf:de,expandersElf:Ue,heatedCuttersElf:Re,heatedPlantersElf:Ie,fertilizerElf:Oe,smallFireElf:Ce,bonfireElf:he,kilnElf:me,paperElf:De,boxElf:rt,clothElf:Fe},le=C(()=>Object.values(te).filter(X=>X.bought.value).length),Xe=_e(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>n.gte(le.value,1)})),He=_e(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>n.gte(le.value,2),visibility:()=>x(Xe.earned.value)})),ue=_e(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>n.gte(le.value,3),visibility:()=>x(He.earned.value)})),ut=_e(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(le.value,4),visibility:()=>x(ue.earned.value)})),ze=_e(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>n.gte(le.value,5),visibility:()=>x(ut.earned.value)})),xe=_e(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>n.gte(le.value,6),visibility:()=>x(ze.earned.value)})),ft=_e(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>n.gte(le.value,7),visibility:()=>x(xe.earned.value&&W.day.value>5)})),Ve=_e(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>n.gte(le.value,8),visibility:()=>x(ft.earned.value)})),Dt=_e(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,9),visibility:()=>x(Ve.earned.value)})),qe=_e(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>n.gte(le.value,10),visibility:()=>x(W.day.value>=10)})),dt=_e(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,11),visibility:()=>x(qe.earned.value)})),K=_e(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>n.gte(le.value,12),visibility:()=>x(dt.earned.value)})),q=[Xe,He,ue,ut,ze,xe,ft,Ve,Dt,qe,dt,K],Rt={manualMilestone:Xe,researchMilestone:He,coalGainMilestone:ue,logGainMilestone:ut,forestMilestone:ze,elvesMilestone:xe,foundationMilestone:ft,forestMilestone2:Ve,treeUpgradesMilestone:Dt,elvesMilestone2:qe,coalUpgradesMilestone:dt,coalGainMilestone2:K},{collapseMilestones:el,display:it}=tn(Rt);return Te.on("update",X=>{n.lt(W.day.value,xl)||Object.values(te).forEach(Et=>Et.update(X))}),Bt(()=>{W.day.value===xl&&n.gte(le.value,6)&&n.gte(R.coal.value,1e9)&&W.completeDay()}),{name:e,color:t,elves:te,totalElves:le,milestones:q,collapseMilestones:el,generalTabCollapsed:S,minWidth:700,display:B(()=>o(I,null,[o("div",null,[W.day.value===xl?`Reach ${se(6)} trained elves and ${se(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>T.value=!0},[d("Check Modifiers")])]),re(a),re(fe),o(ge,null,null),o("div",{style:"width: 600px"},[ve(...Be),ve(...L),ve(...$e),ve(...Pt)]),it()]))}}),ir="coal",Wn=3,R=Ut(ir,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",a=st(0,"coal"),s=st(0,"ash"),u=we(0),c=C(()=>n.times(u.value,1e3)),p=C(()=>n.times(u.value,.1)),m=C(()=>n.times(u.value,50)),b=Se(()=>({resource:be.logs,cost(){let D=n.times(T.amount.value,r(T.cost)).plus(this.amount.value);return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,H.books.smallFireBook.amount.value).times(D),D.pow(1.5).times(1e4)},display:B(()=>o(I,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("-"),ye(c.value),d(" logs/sec"),o("br",null,null),d("+"),ye(p.value),d(" coal/sec"),o("br",null,null),d("+"),ye(m.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(b.cost)),d(" "),b.resource.displayName])),onPurchase(){u.value=n.add(u.value,1)},style:{color:i,width:"160px"}})),{min:h,max:w,add:f,remove:_}=Gt({active:u,buyable:b}),A=st(b.amount,"small fires"),P=we(0),Y=C(()=>n.times(P.value,1e4)),M=C(()=>n.times(P.value,10)),S=C(()=>n.times(P.value,1e3)),T=Se(()=>({resource:A,cost(){return n.pow(.95,H.books.bonfireBook.amount.value).times(10)},display:B(()=>o(I,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("-"),ye(Y.value),d(" logs/sec"),o("br",null,null),d("+"),ye(M.value),d(" coal/sec"),o("br",null,null),d("+"),ye(S.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(T.cost)),d(" "),T.resource.displayName])),onPurchase(D){u.value=n.sub(u.value,D).max(0),P.value=n.add(P.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ue.bought.value)})),{min:fe,max:Pe,add:Q,remove:Ee}=Gt({buyable:T,active:P}),de=we(0),Ue=C(()=>n.times(de.value,1e6)),Be=C(()=>n.times(de.value,1e4)),Re=C(()=>n.times(de.value,1e4)),Ie=Se(()=>({resource:be.logs,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,H.books.kilnBook.amount.value).times(D),n.pow(1.1,D).times(1e7)},display:B(()=>o(I,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("-"),ye(Ue.value),d(" logs/sec"),o("br",null,null),d("+"),ye(Be.value),d(" coal/sec"),o("br",null,null),d("+"),ye(Re.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(Ie.cost)),d(" "),Ie.resource.displayName])),onPurchase(){de.value=n.add(de.value,1)},style:{color:i,width:"160px"},visibility:()=>x(Ve.bought.value)})),{min:Oe,max:L,add:Ce,remove:he}=Gt({buyable:Ie,active:de}),me=we(0),$e=C(()=>n.times(n.pow(me.value,Ke.row2Upgrades[1].bought.value?2:1),5e7).times(ht.efficientDrill.bought.value?2:1)),De=Se(()=>({resource:ht.metal,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),n.pow(1.15,D).times(10)},display:B(()=>o(I,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("+"),ye($e.value),d(" coal/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(De.cost)),d(" "),De.resource.displayName])),onPurchase(){me.value=n.add(me.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ht.coalDrill.bought.value)})),{max:rt,min:Fe,add:Pt,remove:te}=Gt({buyable:De,active:me}),le=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),Xe=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),He=O(()=>({resource:F(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),ue=O(()=>({resource:A,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){A.value=n.add(A.value,this.cost)},style:{color:i}})),ut=[le,Xe,He,ue],ze=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>x(ue.bought.value)})),xe=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>x(ue.bought.value)})),ft=O(()=>({canAfford(){return n.gte(be.logs.value,1e5)&&n.gte(s.value,1e5)},onPurchase(){be.logs.value=n.sub(be.logs.value,1e5),s.value=n.sub(s.value,1e5)},display:B(()=>o(I,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: "),se(1e5),d(" "),be.logs.displayName,o("br",null,null),se(1e5),d(" "),s.displayName])),style:{color:i},visibility:()=>x(ue.bought.value)})),Ve=O(()=>({resource:be.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>x(ue.bought.value)})),Dt=[ze,xe,ft,Ve],qe=O(()=>({resource:F(a),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),dt=[qe],K=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.heatedCuttersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(I,null,[d("Cutters cut down trees "),ye(X.value),d("x faster")]))},style:{color:i},visibility:()=>x(le.bought.value)})),q=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.heatedPlantersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(I,null,[d("Planters plant trees "),ye(kt.value),d("x faster")]))},style:{color:i},visibility:()=>x(Xe.bought.value)})),Rt=Se(()=>({resource:F(s),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,H.books.fertilizerBook.amount.value).times(D),n.add(D,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(I,null,[d("Trees give "),ye(kl.value),d("x more logs")]))},style:{color:i},visibility:()=>x(He.bought.value)})),el=[K,q,Rt],it=z(()=>[Z(()=>({addend(){return n.times(K.amount.value,.25)},description:"Heated Cutters",enabled(){return n.gt(K.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:ze.bought}))]),X=C(()=>it.apply(1)),Et=z(()=>[Z(()=>({addend(){return n.times(q.amount.value,.25)},description:"Heated Planters",enabled(){return n.gt(q.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:xe.bought}))]),kt=C(()=>Et.apply(1)),Cl=z(()=>[Z(()=>({addend(){return n.times(Rt.amount.value,.25)},description:"Fertilized Soil",enabled(){return n.gt(Rt.amount.value,0)}})),k(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),kl=C(()=>Cl.apply(1)),Ft=z(()=>[Z(()=>({addend(){return p.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return M.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return Be.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),Z(()=>({addend(){return $e.value},description:"Mining Drills",enabled(){return n.gt(me.value,0)}})),k(()=>({multiplier:2,description:"Carry coal in boxes",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:2,description:"Mining overalls",enabled:yt.metalUpgrades.metalUpgrade2.bought})),k(()=>({multiplier:3,description:"Mining helmet",enabled:yt.metalUpgrades.metalUpgrade3.bought})),k(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:yt.metalUpgrades.metalUpgrade4.bought})),k(()=>({multiplier:2,description:"12 Elves Trained",enabled:Qe.milestones[11].earned})),Ni(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Qe.milestones[2].earned,supportLowNumbers:!0})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ke.depthMilestones[0].earned})),k(()=>({multiplier:Ke.extractorCoal,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)}))]),We=C(()=>Ft.apply(0)),_t=z(()=>[Z(()=>({addend(){return m.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return S.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return Re.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),k(()=>({multiplier:2,description:"Carry ash in boxes",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:4,description:"Mining boots",enabled:yt.metalUpgrades.metalUpgrade1.bought}))]),Mt=C(()=>_t.apply(0)),tl=z(()=>[Z(()=>({addend(){return n.negate(c.value)},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return n.negate(Y.value)},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return n.negate(Ue.value)},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}}))]),Ot=C(()=>tl.apply(0)),[gl,Ll]=pl(()=>[{title:"Log Consumption",modifier:tl,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Coal Gain",modifier:Ft,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Ash Gain",modifier:_t,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}}]),zt=$(!1),Ql=B(()=>o(bt,{modelValue:zt.value,"onUpdate:modelValue":D=>zt.value=D},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:gl}));Te.on("update",D=>{n.lt(W.day.value,Wn)||n.times(D,Ot.value).negate().gt(be.logs.value)||(be.logs.value=n.times(D,Ot.value).plus(be.logs.value),a.value=n.times(D,We.value).plus(a.value),s.value=n.times(D,Mt.value).plus(s.value),u.value=n.max(u.value,0))});const{total:_l,trackerDisplay:Hl}=ml({resource:a,goal:1e7,name:e,day:Wn,color:t,modal:{show:zt,display:Ql}});return{name:e,color:t,coal:a,totalCoal:_l,computedCoalGain:We,ash:s,activeFires:u,buildFire:b,activeBonfires:P,buildBonfire:T,activeKilns:de,buildKiln:Ie,activeDrills:me,buildDrill:De,warmerCutters:le,warmerPlanters:Xe,basicFertilizer:He,unlockBonfire:ue,dedicatedCutters:ze,dedicatedPlanters:xe,betterFertilizer:ft,unlockKiln:Ve,efficientSmelther:qe,heatedCutters:K,heatedPlanters:q,moreFertilizer:Rt,computedHeatedCutterEffect:X,computedHeatedPlanterEffect:kt,computedFertilizerEffect:kl,generalTabCollapsed:Ll,minWidth:700,display:B(()=>o(I,null,[re(Hl),o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",effectDisplay:n.gt(We.value,0)?`+${ye(We.value)}/s`:void 0},null),o(ge,null,null),o(St,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:n.gt(Mt.value,0)?`+${ye(Mt.value)}/s`:void 0},null),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(b),o("div",null,[se(n.floor(u.value)),d("/"),se(n.floor(b.amount.value))]),ve(h,_,f,w)]}),ue.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(T),o("div",null,[se(P.value),d("/"),se(T.amount.value)]),ve(fe,Ee,Q,Pe)]})]):void 0,Ve.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(Ie),o("div",null,[se(de.value),d("/"),se(Ie.amount.value)]),ve(Oe,he,Ce,L)]})]):void 0,ht.coalDrill.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(De),o("div",null,[se(me.value),d("/"),se(De.amount.value)]),ve(Fe,te,Pt,rt)]})]):void 0]}),o(ge,null,null),ve(...ut),ve(...Dt),ve(...dt),ve(...el)]))}}),ar="metal",Kn=7,ht=Ut(ar,function(){const e="Metal",t="#888B8D",l=st(0,"metal ingots",void 0,!0),i=Qn(l),a=st(0,"ore"),s=Qn(a),u=z(()=>[k(()=>({multiplier:5,description:"Crucible",enabled:Ie.bought})),k(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Industrial Furnace",enabled:L.bought})),k(()=>({multiplier:()=>n.add(rt.value,1),description:"Hotter Forges",enabled:()=>n.gte(De.amount.value,1)})),k(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ct.row2Upgrades.metalUpgrade.bought}))]),c=C(()=>u.apply(.1)),p=z(()=>[Z(()=>({addend:()=>n.times(me.amount.value,10),description:"Industrial Crucibles",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.mul(Ke.activeSmelter.value,Ke.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>n.gt(Ke.activeSmelter.value,0)}))]),m=C(()=>p.apply(0)),b=z(()=>[k(()=>({multiplier:3,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.add(Ke.activeBurner.value,1).mul(Ke.oilEffectiveness.value),description:"Blaster Burner",enabled:Ke.row2Upgrades[2].bought}))]),h=C(()=>b.apply(1)),w=1e10,f=C(()=>n.min(a.value,n.div(R.coal.value,w)).floor().max(0)),_=It(()=>({display:B(()=>{const ue=n.gte(f.value,1)?f.value:n.add(f.value,1);return o(I,null,[o("span",{style:"font-size: large"},[d("Smelt "),oe(n.times(f.value,c.value))," ",l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),ie(ue),d(" "),a.displayName,d(";")," ",ie(n.times(ue,w)),d(" "),R.coal.displayName])])}),canClick:()=>n.gte(f.value,1),onClick(){!r(this.canClick)||A(f.value)},style:{width:"600px",minHeight:"unset"}}));function A(ue,ut=1){const[ze,xe,ft]=[n.times(ue,c.value).times(ut),ue,n.times(ue,w)];l.value=n.add(l.value,ze),a.value=n.sub(a.value,xe),R.coal.value=n.sub(R.coal.value,ft)}const P=z(()=>[Z(()=>({addend:()=>he.amount.value,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ke.depthMilestones[2].earned})),k(()=>({multiplier:Ke.extractorOre,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)})),k(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ct.row2Upgrades.oreUpgrade.bought}))]),Y=C(()=>P.apply(1)),M=z(()=>[k(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Be.bought})),k(()=>({multiplier:2,description:"Double Pickaxe",enabled:Re.bought})),k(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Drills",enabled:Ce.bought})),k(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ke.row2Upgrades[1].bought}))]),S=C(()=>M.apply(n.recip(fe))),T=we(0),fe=10,Pe=Kt(()=>({width:400,height:25,direction:ke.Right,fillStyle:{backgroundColor:t},progress:()=>T.value})),Q=z(()=>[Z(()=>({addend:Y})),k(()=>({multiplier:S}))]),Ee=C(()=>Q.apply(0)),de=z(()=>[Z(()=>({addend:Ee})),Z(()=>({addend:()=>n.negate(m.value),enabled:$e}))]),Ue=C(()=>de.apply(0)),Be=O(()=>({resource:F(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.
Halve the time to mine more ore"}})),Re=O(()=>({resource:F(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:()=>x(Re.bought.value)})),Ie=O(()=>({resource:F(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:()=>x(Ie.bought.value||n.div(s.value,c.value).plus(i.value).gte(1))})),Oe=O(()=>({resource:F(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:()=>x(n.gte(he.amount.value,1)&&(Oe.bought.value||n.lt(R.computedCoalGain.value,n.times(Y.value,S.value).times(w)))),onPurchase(){W.days[2].recentlyUpdated.value=!0}})),L=O(()=>({canAfford(){return n.gte(l.value,50)&&n.gte(R.coal.value,1e11)},onPurchase(){l.value=n.sub(l.value,50),R.coal.value=n.sub(R.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore
Cost: 50 ${l.displayName}
${oe(1e11)} ${R.coal.displayName}`}})),Ce=O(()=>({resource:F(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),he=Se(()=>({resource:F(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(I,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",ie(he.amount.value),d(" ore per operation")]))},visibility:()=>x(n.gte(he.amount.value,1)||n.div(s.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),me=Se(()=>({resource:F(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(I,null,[d("Automatically smelts")," ",ie(n.times(me.amount.value,10)),d(" ore per second")]))},visibility:()=>x(n.gte(me.amount.value,1)||n.gte(he.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),$e=we(!0),De=Se(()=>({resource:R.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(I,null,[d("Gain "),ie(n.times(rt.value,100)),d("% more metal per ore")]))},visibility:()=>x(n.gte(De.amount.value,1)||L.bought.value),style:{width:"200px"}})),rt=C(()=>n.times(De.amount.value,.25));Te.on("update",ue=>{T.value=n.times(ue,S.value).plus(T.value);const ut=T.value.trunc();T.value=T.value.minus(ut),a.value=n.add(a.value,n.times(ut,Y.value)),$e.value&&A(n.min(f.value,n.times(m.value,ue)),h.value)});const[Fe,Pt]=pl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(me.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return n.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:P,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),te=$(!1),le=B(()=>o(bt,{modelValue:te.value,"onUpdate:modelValue":ue=>te.value=ue},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Fe})),{total:Xe,trackerDisplay:He}=ml({resource:l,goal:25e3,name:e,day:Kn,color:t,modal:{show:te,display:le}});return{name:e,day:Kn,color:t,ore:a,bestOre:s,oreProgress:T,metal:l,bestMetal:i,totalMetal:Xe,simplePickaxe:Be,doublePickaxe:Re,crucible:Ie,coalDrill:Oe,industrialFurnace:L,efficientDrill:Ce,oreDrill:he,industrialCrucible:me,autoSmeltEnabled:$e,hotterForge:De,generalTabCollapsed:Pt,minWidth:700,display:B(()=>o(I,null,[re(He),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[$e.value&&n.gte(me.amount.value,1)?`+${ui([[m.value,"smelting speed"],[Ee.value,"ore gain"],[n.div(R.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,h.value))}`:void 0]))},null),o(ge,null,null),re(_),n.gte(me.amount.value,1)?o("div",{style:{width:"150px"}},[o(Wt,{title:"Auto Smelt",modelValue:$e.value,"onUpdate:modelValue":ue=>$e.value=ue},null)]):void 0,o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[di(Ue.value)]))},null),o(ge,null,null),o("div",null,[d("Currently mining "),oe(Y.value),d(" ore every")," ",oe(n.recip(S.value)),d(" seconds")]),re(Pe),o(ge,null,null),ve(Be,Re,Ie,Oe,L,Ce),ve(he,me,De)]))}}),or="cloth",Jn=8,yt=Ut(or,function(){const e="Cloth",t="white",l=st(0,"cloth"),i=st(0,"wool"),a=st(10,"sheep"),s=we(0),u=Kt(()=>({direction:ke.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,Fe.value)})),c=It(()=>({display:{title:"Breed sheep",description:B(()=>o(I,null,[d("Breed "),ie(n.floor(De.value)),d(" sheep"),o("br",null,null),re(u)]))},style:{minHeight:"80px"},canClick:()=>n.gte(s.value,Fe.value),onClick(){if(n.lt(s.value,Fe.value))return;const K=n.floor(De.value);a.value=n.add(a.value,K),s.value=0}})),p=we(0),m=Kt(()=>({direction:ke.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,Xe.value)})),b=It(()=>({display:{title:"Shear sheep",description:B(()=>o(I,null,[d("Shear up to "),ie(n.floor(te.value)),d(" sheep"),o("br",null,null),re(m)]))},style:{minHeight:"80px"},canClick:()=>n.gte(p.value,Xe.value),onClick(){if(n.lt(p.value,Xe.value))return;const K=n.min(a.value,te.value).floor();i.value=n.add(i.value,K),p.value=0}})),h=we(0),w=Kt(()=>({direction:ke.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(h.value,ze.value)})),f=It(()=>({display:{title:"Spinning wool",description:B(()=>o(I,null,[d("Spin "),ie(n.floor(ue.value)),d(" wool"),o("br",null,null),re(w)]))},style:{minHeight:"80px"},canClick:()=>n.gte(h.value,ze.value),onClick(){if(n.lt(h.value,ze.value))return;const K=n.min(i.value,ue.value).floor();l.value=n.add(l.value,K),i.value=n.sub(i.value,K),h.value=0}})),_=El(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),A=El(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{b.canClick.value&&b.onClick()}})),P=El(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{f.canClick.value&&f.onClick()}})),Y=Se(()=>({resource:be.logs,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,H.books.clothBook.amount.value).times(K),n.pow(1.5,K).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=Se(()=>({resource:ht.metal,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,H.books.clothBook.amount.value).times(K),n.pow(1.4,K).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),S=Se(()=>({resource:H.paper,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,H.books.clothBook.amount.value).times(K),n.pow(1.3,K).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),T=O(()=>({resource:F(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),fe=O(()=>({resource:F(i),cost:150,visibility:()=>x(T.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),Pe=O(()=>({resource:F(a),cost:200,visibility:()=>x(fe.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ee={treesUpgrade4:O(()=>({resource:F(l),cost:1e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x trees planted"}})),treesUpgrade3:Pe,treesUpgrade2:fe,treesUpgrade1:T},de=O(()=>({resource:F(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Ue=O(()=>({resource:F(i),cost:225,visibility:()=>x(de.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Be=O(()=>({resource:F(a),cost:300,visibility:()=>x(Ue.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ie={metalUpgrade4:O(()=>({resource:F(l),cost:2e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Be,metalUpgrade2:Ue,metalUpgrade1:de},Oe=O(()=>({resource:F(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),L=O(()=>({resource:F(i),cost:200,visibility:()=>x(Oe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ce=O(()=>({resource:F(a),cost:400,visibility:()=>x(L.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),me={paperUpgrade4:O(()=>({resource:F(l),cost:4e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ce,paperUpgrade2:L,paperUpgrade1:Oe},$e=z(()=>[Z(()=>({addend:Y.amount,description:"Build more pens"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:H.upgrades.clothUpgrade.bought}))]),De=C(()=>$e.apply(1)),rt=z(()=>[]),Fe=C(()=>rt.apply(1)),Pt=z(()=>[Z(()=>({addend:M.amount,description:"Make stronger shears"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:H.upgrades.clothUpgrade.bought}))]),te=C(()=>Pt.apply(1)),le=z(()=>[]),Xe=C(()=>le.apply(1)),He=z(()=>[Z(()=>({addend:S.amount,description:"Learn how to spin"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:H.upgrades.clothUpgrade.bought}))]),ue=C(()=>He.apply(1)),ut=z(()=>[]),ze=C(()=>ut.apply(1)),[xe,ft]=pl(()=>[{title:"Sheep Gain",modifier:$e,base:1},{title:"Sheep Breeding Cooldown",modifier:rt,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Pt,base:1},{title:"Shearing Cooldown",modifier:le,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:He,base:1},{title:"Spinning Cooldown",modifier:ut,base:1,visible:!1,unit:"s"}]),Ve=$(!1),Dt=B(()=>o(bt,{modelValue:Ve.value,"onUpdate:modelValue":K=>Ve.value=K},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:xe}));Te.on("update",K=>{n.lt(W.day.value,Jn)||(n.gte(s.value,Fe.value)?s.value=Fe.value:(s.value=n.add(s.value,K),c.isHolding.value&&c.onClick()),n.gte(p.value,Xe.value)?p.value=Xe.value:(p.value=n.add(p.value,K),b.isHolding.value&&b.onClick()),n.gte(h.value,ze.value)?h.value=ze.value:(h.value=n.add(h.value,K),f.isHolding.value&&f.onClick()))});const{total:qe,trackerDisplay:dt}=ml({resource:l,goal:1e3,name:e,day:Jn,color:t,textColor:"var(--feature-foreground)",modal:{show:Ve,display:Dt}});return{name:e,color:t,cloth:l,totalCloth:qe,wool:i,sheep:a,buildPens:Y,betterShears:M,fasterSpinning:S,treesUpgrades:Ee,metalUpgrades:Ie,paperUpgrades:me,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:A,spinWoolHK:P,minWidth:700,display:B(()=>o(I,null,[re(dt),o(ge,null,null),o(St,{resource:l,style:"margin-bottom: 0"},null),o(St,{resource:i,style:"margin-bottom: 0"},null),o(St,{resource:a,style:"margin-bottom: 0"},null),ve(c,b,f),ve(Y,M,S),o(ge,null,null),o(Ml,null,{default:()=>[sl(...Object.values(Ee)),sl(...Object.values(Ie)),sl(...Object.values(me))]})]))}}),sr="paper",yn=5,H=Ut(sr,function(){const e="Paper",t="#E8DCB8",l=st(0,"paper"),i=st(C(()=>n.min(n.div(be.logs.value,1e9),n.div(R.ash.value,1e6))),"pulp"),a=Mi(()=>({scaling:Pn(1,1.2),baseResource:i,gainResource:F(l),roundUpCost:!0,spend(L,Ce){be.logs.value=n.sub(be.logs.value,n.times(Ce,1e9)),R.ash.value=n.sub(R.ash.value,n.times(Ce,1e6))},gainModifier:Ee})),s=It(()=>({display:B(()=>{const L=n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return o(I,null,[o("span",{style:"font-size: large"},[d("Create "),se(a.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),Gl(be.logs,L),d(" "),i.displayName,d(" ("),se(n.times(L,1e9)),d(" "),be.logs.displayName,d(";")," ",se(n.times(L,1e6)),d(" "),R.ash.displayName,d(")")])])}),canClick:()=>n.gte(a.actualGain.value,1),onClick(){!r(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function u(L){const Ce=Se(()=>({...L,display:{title:L.name,description:`Print a copy of "${L.name}", which ${L.elfName} will use to improve their skills! Each copy printed will reduce the "${L.buyableName}" price scaling by 0.95x and make ${L.elfName} purchase +10% faster!`,effectDisplay:B(()=>o(I,null,[ye(n.pow(.95,Ce.amount.value)),d("x price scaling,")," ",ye(n.div(Ce.amount.value,10).add(1)),d("x auto-purchase speed")])),showAmount:!1},resource:F(l),cost(){let he=this.amount.value;return(L.elfName==="Star"||L.elfName==="Bell")&&(he=n.pow(he,2)),n.gte(he,100)&&(he=n.pow(he,2).div(100)),n.gte(he,1e4)&&(he=n.pow(he,2).div(1e4)),he=n.pow(.95,P.amount.value).times(he),n.pow(5,he).times(10)},style:"width: 600px"}));return Ce}const c=u({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=u({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=u({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),b=u({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=u({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),w=u({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),f=u({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>x(Qe.elves.smallFireElf.bought.value)}),_=u({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>x(Qe.elves.bonfireElf.bought.value)}),A=u({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>x(Qe.elves.kilnElf.bought.value)}),P=u({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>x(Qe.elves.paperElf.bought.value)}),Y=u({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>x(Qe.elves.boxElf.bought.value)}),M=u({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>x(Qe.elves.clothElf.bought.value)}),S={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:b,heatedPlantersBook:h,fertilizerBook:w,smallFireBook:f,bonfireBook:_,kilnBook:A,paperBook:P,boxBook:Y,clothBook:M},T=O(()=>({resource:F(l),cost:1e8,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),fe=O(()=>({resource:F(l),cost:1e9,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),Pe=O(()=>({resource:F(l),cost:1e10,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),Q={clothUpgrade:T,drillingUpgrade:fe,oilUpgrade:Pe},Ee=z(()=>[k(()=>({multiplier:2,description:"Scholar's shoes",enabled:yt.paperUpgrades.paperUpgrade1.bought})),k(()=>({multiplier:2,description:"Scholar's slacks",enabled:yt.paperUpgrades.paperUpgrade2.bought})),k(()=>({multiplier:2,description:"Scholar's jacket",enabled:yt.paperUpgrades.paperUpgrade3.bought})),k(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:yt.paperUpgrades.paperUpgrade4.bought}))]),[de,Ue]=pl(()=>[{title:"Paper Gain",modifier:Ee,base:1}]),Be=$(!1),Re=B(()=>o(bt,{modelValue:Be.value,"onUpdate:modelValue":L=>Be.value=L},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:de}));Te.on("update",L=>{n.lt(W.day.value,yn)||(l.value=n.times(L,Le.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(l.value))});const{total:Ie,trackerDisplay:Oe}=ml({resource:l,goal:5e3,name:e,day:yn,color:t,textColor:"var(--feature-foreground)",modal:{show:Be,display:Re}});return{name:e,day:yn,color:t,paper:l,totalPaper:Ie,paperConversion:a,books:S,upgrades:Q,generalTabCollapsed:Ue,minWidth:700,display:B(()=>o(I,null,[re(Oe),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),re(s),o(ge,null,null),ve(...Object.values(Q)),o(ge,null,null),sl(...Object.values(S))]))}}),rr="boxes",bn=6,ct=Ut(rr,function(){const e="Boxes",t="#964B00",l=st(0,"boxes"),i=Mi(()=>({scaling:Pn(1e10,1),baseResource:be.logs,gainResource:F(l),roundUpCost:!0})),a=It(()=>({display:B(()=>o(I,null,[o("span",{style:"font-size: large"},[d("Create "),se(i.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost:")," ",Gl(be.logs,n.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",be.logs.displayName])])),canClick:()=>n.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),s=O(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){W.days[3].recentlyUpdated.value=!0},resource:F(l),cost:100})),u=O(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){W.days[3].recentlyUpdated.value=!0},resource:F(l),cost:1e3})),c=O(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){W.days[3].recentlyUpdated.value=!0},resource:F(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:u,coalUpgrade:c},m=O(()=>({resource:F(l),cost:1e8,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),b=O(()=>({resource:F(l),cost:1e9,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=O(()=>({resource:F(l),cost:1e10,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),w={oreUpgrade:m,metalUpgrade:b,plasticUpgrade:h},f=Se(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:B(()=>o(I,null,[ye(n.div(f.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,H.books.boxBook.amount.value).times(S),n.pow(3,S).times(100)},visibility:()=>x(s.bought.value)})),_=Se(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:B(()=>o(I,null,[ye(n.div(_.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,H.books.boxBook.amount.value).times(S),n.pow(5,S).times(1e3)},visibility:()=>x(u.bought.value)})),A=Se(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:B(()=>o(I,null,[ye(n.div(A.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,H.books.boxBook.amount.value).times(S),n.pow(7,S).times(1e3)},visibility:()=>x(c.bought.value)})),P={logBoxesBuyable:f,ashBoxesBuyable:_,coalBoxesBuyable:A};Te.on("update",S=>{n.lt(W.day.value,bn)||(l.value=n.times(S,Le.buyables.passiveBoxes.amount.value).times(i.currentGain.value).div(100).add(l.value))});const{total:Y,trackerDisplay:M}=ml({resource:l,goal:5e4,name:e,day:bn,color:t});return{name:e,day:bn,color:t,boxes:l,totalBoxes:Y,boxesConversion:i,upgrades:p,row2Upgrades:w,buyables:P,minWidth:700,display:B(()=>o(I,null,[re(M),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),re(a),o(ge,null,null),ve(...Object.values(p)),ve(...Object.values(w)),ve(...Object.values(P))]))}}),ur="trees",Yn=1,Xn=.1,be=Ut(ur,function(){const e="Trees",t="#4BDC13",l="green",i=st(0,"logs"),a=st(0,"saplings"),s=$(0),u=z(()=>[Z(()=>({addend:()=>n.times(Q.amount.value,10),description:"Expand Forest",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ct.milestones.morePlantsMilestone1.earned})),k(()=>({multiplier:2,description:"5 Elves Trained",enabled:Qe.milestones[4].earned})),k(()=>({multiplier:2,description:"8 Elves Trained",enabled:Qe.milestones[7].earned})),k(()=>({multiplier:4,description:"Lumberjack Boots",enabled:yt.treesUpgrades.treesUpgrade1.bought}))]),c=st(C(()=>n.sub(u.apply(10),a.value)),"trees"),p=C(()=>u.apply(10)),m=O(()=>({resource:F(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),b=O(()=>({resource:F(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=O(()=>({resource:F(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),w=O(()=>({resource:F(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),f=O(()=>({resource:F(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,b,h,w,f],A=O(()=>({resource:F(i),cost:50,visibility:()=>x(f.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),P=O(()=>({resource:F(i),cost:50,visibility:()=>x(f.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),Y=O(()=>({resource:F(i),cost:150,visibility:()=>x(f.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),M=O(()=>({resource:F(i),cost:150,visibility:()=>x(f.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),S=O(()=>({resource:F(i),cost:300,visibility:()=>x(f.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),T=[A,P,Y,M,S],fe=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,50)&&(q=n.pow(q,2).div(50)),n.gte(q,200)&&(q=n.pow(q,2).div(200)),n.gte(q,2e6)&&(q=n.pow(q,2).div(2e6)),q=n.pow(.95,H.books.cuttersBook.amount.value).times(q),n.times(100,q).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>x(S.bought.value)})),Pe=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,50)&&(q=n.pow(q,2).div(50)),n.gte(q,200)&&(q=n.pow(q,2).div(200)),n.gte(q,2e6)&&(q=n.pow(q,2).div(2e6)),q=n.pow(.95,H.books.plantersBook.amount.value).times(q),n.times(100,q).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>x(S.bought.value)})),Q=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,100)&&(q=n.pow(q,2).div(100)),n.gte(q,1e5)&&(q=n.pow(q,2).div(1e5)),q=n.pow(.95,H.books.expandersBook.amount.value).times(q),n.pow(n.add(q,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>x(S.bought.value)})),Ee=[fe,Pe,Q],de=z(()=>[Z(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),Z(()=>({addend:Oe,description:"Smart Knives",enabled:Y.bought}))]),Ue=C(()=>de.apply(1)),Be=z(()=>[k(()=>({multiplier:.5,description:"Sharper Fingers",enabled:A.bought})),k(()=>({multiplier:()=>n.pow(.5,Qe.totalElves.value),description:"1 Elf Trained",enabled:Qe.milestones[0].earned}))]),Re=C(()=>Be.apply(1)),Ie=z(()=>[Z(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),Z(()=>({addend:fe.amount,description:"Generic Cutters",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ct.milestones.autoCutMilestone1.earned})),k(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ct.milestones.autoCutMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Cutters",enabled:R.warmerCutters.bought})),k(()=>({multiplier:R.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>n.gt(R.heatedCutters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:yt.treesUpgrades.treesUpgrade2.bought}))]),Oe=C(()=>Ie.apply(0)),L=z(()=>[Z(()=>({addend:1,description:"Leafy Fingers",enabled:b.bought})),Z(()=>({addend:De,description:"Smart Spades",enabled:M.bought}))]),Ce=C(()=>L.apply(1)),he=z(()=>[k(()=>({multiplier:.5,description:"Greener Fingers",enabled:P.bought})),k(()=>({multiplier:()=>n.pow(.5,Qe.totalElves.value),description:"1 Elf Trained",enabled:Qe.milestones[0].earned}))]),me=C(()=>he.apply(1)),$e=z(()=>[Z(()=>({addend:1,description:"Automated Spade",enabled:w.bought})),Z(()=>({addend:()=>n.div(Pe.amount.value,2),description:"Generic Planters",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone1.earned})),k(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Planters",enabled:R.warmerPlanters.bought})),k(()=>({multiplier:R.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>n.gt(R.heatedPlanters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:yt.treesUpgrades.treesUpgrade3.bought}))]),De=C(()=>$e.apply(0)),rt=z(()=>[k(()=>({multiplier:1.25,description:"Research I",enabled:f.bought})),k(()=>({multiplier:1.25,description:"Research II",enabled:S.bought})),k(()=>({multiplier:()=>n.div(Ct.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ct.milestones.logGainMilestone1.earned})),k(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ct.milestones.logGainMilestone2.earned})),k(()=>({multiplier:1.25,description:"Ashy Soil",enabled:R.basicFertilizer.bought})),k(()=>({multiplier:R.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>n.gt(R.moreFertilizer.amount.value,0)})),k(()=>({multiplier:2,description:"4 Elves Trained",enabled:Qe.milestones[3].earned})),k(()=>({multiplier:2,description:"Carry logs in boxes",enabled:ct.upgrades.logsUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:ct.upgrades.logsUpgrade.bought})),k(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:yt.treesUpgrades.treesUpgrade4.bought})),Ni(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ct.milestones.logGainMilestone3.earned}))]),Fe=we(0),Pt=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(Fe.value,Re.value)})),te=It(()=>({display:{title:"Cut trees",description:B(()=>o(I,null,[d("Cut down up to "),se(n.floor(Ue.value))," ",d("tree"),n.eq(Ue.value,1)?"":"s",d(" at once!"),o("br",null,null),re(Pt)]))},style:{minHeight:"80px"},canClick:()=>n.gte(c.value,1)&&n.gte(Fe.value,Re.value),onClick(){if(n.lt(Fe.value,Re.value))return;const q=n.floor(n.min(c.value,n.times(Ue.value,n.div(Fe.value,Re.value).floor())));i.value=n.add(i.value,n.times(rt.apply(1),q)),a.value=n.add(a.value,q),Fe.value=0}})),le=we(0),Xe=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(le.value,me.value)})),He=It(()=>({display:{title:"Plant trees",description:B(()=>o(I,null,[d("Plant up to "),se(n.floor(Ce.value))," ",d("tree"),n.eq(Ce.value,1)?"":"s",d(" at once!"),o("br",null,null),re(Xe)]))},style:{minHeight:"80px"},canClick:()=>n.gte(a.value,1)&&n.gte(le.value,me.value),onClick(){if(n.lt(le.value,me.value))return;const q=n.floor(n.min(a.value,n.times(Ce.value,n.div(le.value,me.value).floor())));a.value=n.sub(a.value,q),le.value=0}})),[ue,ut]=pl(()=>[{title:"Logs per Tree",modifier:rt,base:1,visible:f.bought},{title:"Manual Cutting Amount",modifier:de,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Be,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:L,base:1,visible:b.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:he,base:1,visible:b.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ie,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:$e,base:0,visible:w.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:S.bought}]),ze=$(!1),xe=B(()=>o(bt,{modelValue:ze.value,"onUpdate:modelValue":q=>ze.value=q},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:ue}));Te.on("update",q=>{if(n.lt(W.day.value,Yn))return;n.gte(Fe.value,Re.value)?Fe.value=Re.value:(Fe.value=n.add(Fe.value,q),te.isHolding.value&&te.onClick()),n.gte(le.value,me.value)?le.value=me.value:(le.value=n.add(le.value,q),He.isHolding.value&&He.onClick());const Rt=n.min(c.value,n.times(Oe.value,q)),el=n.mul(rt.apply(1),Rt),it=n.div(el,q);s.value=n.mul(it,Xn).add(n.mul(s.value,n.dOne.sub(Xn))),i.value=n.add(i.value,el),a.value=n.add(a.value,Rt);const X=n.min(a.value,n.times(De.value,q));a.value=n.sub(a.value,X)});const ft=C(()=>n.sub(Oe.value,De.value)),Ve=C(()=>n.sub(De.value,Oe.value)),Dt=El(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{te.canClick.value&&te.onClick()}})),qe=El(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{He.canClick.value&&He.onClick()}})),{total:dt,trackerDisplay:K}=ml({resource:i,goal:1e4,name:e,day:Yn,color:l,modal:{show:ze,display:xe}});return{name:e,color:t,logs:i,totalLogs:dt,trees:c,saplings:a,cutTree:te,plantTree:He,cutTreeHK:Dt,plantTreeHK:qe,row1Upgrades:_,row2Upgrades:T,row1Buyables:Ee,manualCutProgress:Fe,manualPlantProgress:le,generalTabCollapsed:ut,minWidth:700,display:B(()=>o(I,null,[re(K),o(ge,null,null),o(St,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:n.gt(Oe.value,0)?`+${ye(s.value)}/s average
equilibrium: +${ci([[Oe.value,"cutting speed"],[De.value,"planting speed"],[n.mul(p.value,20),"forest cap"]],"/s",rt.apply(1))}`:void 0},null),o(St,{resource:a,color:l,style:"margin-bottom: 0",productionDisplay:Xl(ft.value)},null),o(St,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:Xl(Ve.value)},null),o(ge,null,null),ve(te,He),o("div",null,[d("Tip: You can hold down on actions to perform them automatically")]),o(ge,null,null),ve(..._),ve(...T),ve(...Ee)]))}});var Ii="./assets/tree.35808197.png",Bi="./assets/sws.714ad454.png",xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAMuElEQVR42u3dO4zkSAEG4L/Kr5me6dl1QkJAjkDiElJISAiO7CQSyCBHQis08QQrXUJISExKxCNBguQICJCIkBAZOqlmH0LbPW27CKa78XjtabddZVeV/z/ZXe12r11V39TDdllorcEwTHsEgTAMgTAMgTAMgTAMgTAMgTAMgTz5z4Ro/c+01oJVwSwaSBcOQmEWD6QPDiJhFgnkHBxEwiwKyBAcBMIQCIEwBDIcCJEwBEIgDIEQCEMgBMIQCIEwBOIQECJhggfCXoQhEAJhCIRAGAIhEIbxCQiRMARCIMySgXCYxRAIgTAEQiAMgRAIw/gEhEiY4IGwF2EIhEAYAiEQhkAIhGF8AkIkDIEQCLNkIBxmMQRCIAyBEAhDIATCMD4BIRImeCDsRRgCIRCGQAiEIRACYQjEJyBEwhAIgTBLBsJhFkMgBMIQCIEwBEIgDIH4BIRImOCBsBdhCIRAGAIhEIZACIQhEE7UGYZAGMYPIBxmMQRCIAyBEAhDIATCEAgn6gzjEBD2IgyBEAhDIATCEAiBMATCiTrDEAjD+AGEwyyGQAiEIRACYQiEQBgC4USdYRwCwl6EIRACYQiEQBgCIRCGQDhRZxgCYRg/gHCYxRAIgTAEQiAMgRAIQyCcqDME4hAQ9iIMgRAIQyAEwhCIs0CGfgeBMUEDsRGiIRD3DsoxJMRCIARCJK318Nz5ttVTaOVDIERitex9LysngRBJeGXua3k5C4RIwixr38qMQAhk8rL2qdw4xCKS2crah7LjJJ1IZi1v18uOFwoJZPYyz/P820qpLwgkQBwhIHGh3PM8/41S6jMCmaiSbm9fnfXv7+5eLxKJSz+U8jz/m1LqEwKxUEnngqhlB0AAkPtfi7u71wmBzAJkB+BzAL9USv2HQObHUQCo9jB0rTdJl9CLuDikzfN8A+AHSqnfEYiBShqBowJQ7mEcGvXh9zp0JKZw7H/qxwBwf38vDH3n35VS31w8EAM46o37nJR7IM3P16EMRuL80uXAcs/zvM/nxP39fTALILMBmRGHrgFpw1H/d+Lu7nXsK5JmGWutxZhyPwHko/M1DWWOcvUSyO3tq3rjPrfAqlrv0fX5Iz7fgNicV+R5fuxd9+Vz8hxtIJmyfGcBMhJH2VI5fQtL14ZYuu9nXUcyxWR7j6NZjr3Oz2ckkwMxgKOtYsSZSIoeFfykEQxBYrsCp1qFauAYFF+ReAPk9vbVrmVYJQYg0bVhlujTW9zevtq5dG1k6uVZE0BsIrEJZVIgI3HgxLCqfi2jAHBo0LLja4uxQ6g5Ks5XHL4i8QXIA9pXmXTHSoro+PeHv4vxuIw7yRzBRMXNcVHPNA7bQKz8QJoKyMjeQ7c09CYKWfv7LhyHHiOZsqGNrbRQcBCI4UquzTvaeouuIVcTSP1zwuZwykbFhYTDRySTABnRe1QNHBrdV79PZi4cQyttZhxDL8QGhcRZIHscBwBVA0l9Ut61kqX3KCI4knMrbUogtnuNqcF4A2Rk79HsIQ4XCWXHfOTQU0g4mHMqbUk4bKExsjjiIpAOHJ3l4DqMWkP8XCn18x5l9msAP1oiCpNQlgDk5DxjqqVagw3zT0qp77SU0wrAdwF8CuCnBsq9OJS9lBJpmsrdblcB0HEci4uLi8RmA+0LsOu7m5+fC4lVIANxoDEhb4OiXe8tTjScPwP4sVLqn/ty+iqAvwD4F4AbAN8a+v1SygKAllKiLMt6XUAIgTiORZqmMo5jaQPGOVhOfb8JJCED6UTiW6/RUukawKdKqd8KIb4B4PcAHgB8ZT/Puhrw1UWtzMVj29BHHFEUIU1TmWVZr0ULG6tM9Qbf9/uHfMYkEqeAnHo60MTGClNVSh8kWuufvXnz5ocAPsH/V+vSAeVcPG0P+ohCSikA6Kqq9Hq9TufCYaAuNAY+jOUkEAO9x+w4bA853r17V1ZVVWito9rw8axlaSllUVUVhHj8eBw/XuqpqkoLIbBer8+6a8AlHG1AhhxjnufXSqn/eg3EBRx9J5djG1Ge59hsNtXDw4Muy1I0hpHRmeVcRFEEIQS01ojjWMRxLJIkGTRHcw1IY1iKIb1InudfAvi+UuqvwQFxDYephpRlWVkUBfZAjh3CkOFVkiQyyzIRx/GouZmLOBpAxJjjzPP8a0qpfwc1xHJhaGWjUa1Wq+rDhw/Yl//gFbn9PANJkiDLMoQGpOvWl6km7E4DcR3HmMqK47gqimIUjn05I4oiXFxcIEmSoHA8VzdjjvesOxpcXcUyjSNN0w9XV1eXzYI9A0fbLfd638DFXA1MCAEpJW5ubkLuPYwec57nN0qp994B2SM57Ek1+kKglHKzX/LUUkq9Xq9XI76ueUdxs7JmuylSSokXL14QiIVexEUgFYBqzK3pQoiN1loeGrOUUqdpqi8vL1cjcOhnehQA0Pf397PcTp9lGVarVVBA9ntwtd2xbeyY+yBx7l6s29tX5dBb1GswjkunQogqSRJcXV1djG0seZ5XDSD1JdpZgAghsD+/SYHYmBs0cDw5TQIZn+3jfyeOJ34YWt3c3GSmGkoDyZOeZOph1mH+kWXZ5CtYNq4XPbNzo5hrmBUKkK14fOu9kFKiqqoDkCrLMnF5eZmYbCQtPQn2E3U5B5CxE3RbQPp+f489f8VccxGnH7k9I81tgQ6/VnmeJ6YbSEsvUv+eyZBEUWQEx8AyMHkqeiiOsVCWBOSj59SjKNI3NzexhcbRtYnEpEBevnx5vAcrUCDC5jksCUhzK1EhhNBxHIvr62srzz109SJLADICR9eKlDaBw1sgEyApmwUrpUQURTgFZCCOrnPRPgPpuUhhqqcQzwARtpEvEYhoTmDTNBWr1cr4CshzQKbqRQ6Tc9NAniuXATiab+/CM0B6v1JhynmIF1uP9kh9k4djpcRxjPV6bXwN/cSqyyS9iOkJ+gQx1ktM2YuECKTZiIQpGH2AmHpP34lyRBRFWK/XvuKwCsVbIBaRVF0FnSQJdrudsUo4tWZvG8hh84U0TXF5eekyCHHizwQyIRBjy4RnAPloRWaK3qPH8bnYW1iZkAcJxAKS5uvArO0p2+g9nAQyM5I+y7Xe9B4hANG2Ctq1oZVHUE6tVh3LqnbHLoEYRjLZioivOBwCcrKMTB7ngHvKcqXUG+eAGEQyKw6XgcyARA8tn7neg5jn+deVUv8IEYj1XF9fI0kS7SuOGcDoMeUzx94AeZ7/QSn1PSeBuIwkSRJUVYU4jrFarXQoQCxi0SbKY8wxjbgz4hcAvlBK/dE5IC4iOVxrONzGcXju4urqSoeCwzQU2xtd2z6Orsm6E0Bc7kkO+05VVQUp5fERVykl3r9/j1AypGHaeo59IJLBe/cSiIEepf4rAFRVhdAy5c6SlnoR40icAeLDpL0OxqVym7pxTrEDysA7h0cNfZ0H4hOSkDPFDveGkYxaPXsOiXDxJyGREMgZQDrvwzPxbIhwdahAJO4hmWNzuR5IjAJpIhEuj6WJhEB6HOOzd3KP7UWE65NNInECyOgJsMXjPPmow5gbGIUPqzFEMjsSZ4F0HeeigBCKO73IECC2X4pqemHBWyBE4sQwq9fkd+qVMAIhFGeAPNfoGnOC1tcX2AJSliU2mw2klNi//xFCiLPveggCCJFMDuQjJB1/1zZZ1mPnBVMmGCCE4hSQNiTNHqRXL0QghOIbkHM3WuhTDzaQGHnK1HkgQxr6k5MiFFNAxmyn9NFni6IQVVVBCIGHhwcUReHkXdFOAzHRuOtvmGIzH9V7jNpvbLfbHX+/3W6Pd0DvX3/NOcjcQyT2KtMD2W63xycwt9styrJEWZZenftigLSdMMGczmq1OrzzsPd7O7bbLaSUeHh4gNYaZVl6+1CZk0BsN9iTG4QRTHNi3jWXEG09RlEU0FpDa/1kaEUgHuDoi2TJcA6bVGRZhouLi15ANpsNiqKAEAK73e74pKXvK6OLBTIUyVKgSCkhpUSSJCeRFEWB7Xb7pLcI4ZKBcw9MzdHwzkWypOFXkiSIoqjt1QpProW8ffsWQHibVzgDZO5Gdw6SJQGRUj4ZcjX3BwNwXJkKbeOK2TdtcKmhEQjjBBBXGxeBMH3ag1UgLjcsAmH6tAVrQFxvVATC9GkHVoD40KAIhOnTBowDCQ0HgSwXh3EgIeIgkGXCWCSQoVfRiWR5MBYHZAwOIlkWCgIhEIIgEHsFRyhhNH4CsViwRBIWhEmAuNRwpixoYgkThxUgLjSYOQuaWAjE2cbiXPdMLF7jsA7EdsNxtVCJLJw6FKG+rXXpCfWuBgJhpob0EwC/IgwCYWbqgXweChMIwxAIwxAIwxAIwxAIwxAIwxAIwxAIw4Sa/wGDtUAHUuMNRQAAAABJRU5ErkJggg==",Pi="./assets/elf.9fbfa563.png",Di="./assets/paperStacks.4c96ec8c.png",Fi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAANRUlEQVR42u2deXBV5RmHfycLIdvNRiIJRMgCmhCQEINF41arxWltlRlnRGqRVMeZqjjO6GgdreA4pbXWsUXbKaNBhgrt2CJ1plZsLYQkLGGLAcISQgKYBRKy3GxAAm//4NImgdzz3dxzck/O+T0zGf7gved+3znvc5bvfN97NREBIeTaaBSEEApCCAUhhIIQQkEIoSCEUBBCKAghFIQQCkIIoSCEUBBCKAghFIQQCkIIBSGEghBCQQihIIRQEO4FQigIIRSEWD3hNC1FRBooCCFXy3ErgDIAlQC+ArAZwFci0kNBCAXRtBcBvHWN/9p8RRgR2UZBjNnZySLSyLQbU8fsnwDm64S1AvjPlT8ROUJB1HZuOIB7ANzt+fcmAAUiUsbUGxPHLxhAL4BQHz9aPUSYFgry/506b4AQ375GyEsi8hbTb0wIch+ATQZsascQYcQxgmiaNt0jwpW/BJ2PbBKR+Uy/MSHICgAvG7zZc0Me9itsJYimaQlDhJju4yb6AYSLSD9T0PKClAPIN/lr6ocIc2rMCaJp2kAh5hmwyfkisokpaGk5kgCcDsBXVw64HRvRcLLpgmiadtOQh+twg7/iVyLyMtPQ0oIsBLDOAk3ZPODZZVtABNE0bfIQISab3OndIpLPNLS0IKsAPGmxZrUNuR07YoogA4Zfr9w23RSAzk4UkdNMRcsKUgMgXSdMAGgBbOYxjzDbAWwQkc4RC+IZfh34LBFoFonIOqaiJeXIAlA1xpr9lIisUhbEM/w68LYp3mId+kBEnmQ6WlKQZwCsVAg9s3rJzZeON3dX7zjeGrq95uyNXef7YwPU7DQRqRtWEE3TogAswOVRpnsATAvgPla59NaKSDrT0ZKC/M2TS16ZnzNx+8K5qYNGNXsvXDx4uKmzpbS6xbX7RFvuKDX5oIjkeH0G0TTtSQCrxtixmCEiVUxJywnSDiBGL27ZD7JL0iZE3u4l5Hxb94X9+06195RWt0ysae6eblKTfyciz+kJMgVAXSB2aGRYSMe89PhD38pI6MtIjMxcsnp3EIDrFD66VERWMiUtJUcBgBKV2KLHbz4ZHKRdr3xbIWj6pq23pry2FdtqWtJbui4kG9Tsh0Rko1dBPJ3bDyBnNHZk3pS4ioLMhI6sZFdC+LjgQd+5vvzU9i8ONKm8UPxURBYwLS0lyM8BLNeLS42PqH3zwRlp/nzXhf5L1cfOdDWUHTsbUV7XOvNC/6XxI9yU68oIlp4g7wJ4zowdl54YWV2QOaEx9/rY8PjIcTMBDNuZ2pbu0mWfVRUobNYtIjFMS0sJsgXAnXpxC+emlszPmXi7kd/dda6/Yn99R8euuraYPSfaZuPytKQQnY9tFZFB7fUmyA8BbDSisQmR45puzUyomZsWj8lx4RlBmjZR9bMXL8mpwo92pyqG3yEiJUxNS8gRDcCtEvv2w7N2JkaH3WJWW17ZcOBEfXvvFIXQ10XkDVVBogB0jqRBocFB5+emxe2/LXNC97SkqORxIUF+PVC9tvHg8ZOtPSqjVMtEZDnT0xKCKJ9gPyrMd2uAy4x2+HuC9foeRPES2Q8gZM71sRX5afEdMyfFxESPD5ltZCc3HTy9dd3Ok3cohF51iSQBE+S3AJbqxc2cHLP/hfumzzSrHbUt3SXLPqtSuX3rEJGr3rvoCfIagDf0tpwSG35ixYKcKWZ1srnzfPkLn1TOVQyPERE3UzTggigN8vz0roziW9LjTTup+TvIoyeIacN0PuJeXLRL9RI8aJiOBESOqQBqVWLfX5T7dVRYiGnz955dX3HW3duXoBIqIu/5JIins20AdF/5v/5Adkl6YuTtZnX0N18eraz8pmOWQuhKEVnKNA2oIIUAPtSLCwsJ6ln147wIs9pxru/ioafW7s1SDL/mi2YVQUY8VcBIdta2Fv9+c43KpXjQVAESEEH+BGCR7hPx9MTynxRMnWtWO74+1VH8zr+OquTMcRHJuGZfFAR5GsB7et/gGh/SuvLRXNMmMXad7698+uN9sxTD00WklqkaMEEaAOi+2X75/hu3ZiVH32FWO97fXLO3vLZ1jkLosJNdVQRRnq78x8fmVI0PDc42q8NPrd3bfa7vYqRC6BMi8iFTNSBy5AHYrRL7weK8Y6HBQZkmNaV/cdGuYKitMXlURNaPSBBPp48ByNCLe/7eacWzU2NNG5EoKqsrLz7SrHJJXicii5iuARFkuOqJg0iMDmt4++FZKWa1o72nb89zf67IUwwfdsGdqiBKSybz0+L3PnN3xhyzOn24qXPris8Pq1ySm0QkmekaEEFUqifiodxJpQ/mphSY1Y7io83FRaV1KifrXSIy7ElXVZBHAKxXadiawvw++F49T4m+i5dqnlizJ0MxPF9EdjNlR1WOYAA9AMbpxf5iQU7ZpNjw28xqy5v/OHS4+nTXjQqhXot+qAqiXLbl3Udm74mLCM0zq+MvflJZf6bz/CSFUFZdHH1BlKsnfrQk/4ymIcmMdoig+fHVuxIVw78rIl/6JYin8zsB6N7/L7ltavFdNySa9hzy94qG0g1761Uuzay6OPqCKFVPnJYUdeTV72fdYFY76tt7t72y4cCtKjclACK8FR70RRDbdZ4YLohS9cTCgqnFd0437yS6cV9D6af7lE6iX4jI/V775IMg9wL4coxdPll1cfTksOVtuC+C2O4BjBgqiGr1RFlTmN8Pawzk3CwiewwRxLMTPgdwv17cg7kpZQ/lTjJNkK1HW4o/LK1VuUSz6uLoCWLLVwG+CmKrl0DEUEFUqida6WXyxyLyI6MFmQNgj0rsKEwjCAIQpBDLqovmy2Hb6Ug+lx6100Q0YpggStUTXeGhZ1cunJ1gVjt8nND6v+qJRguyFoDupclCU5lZddF8QWy7JGIkgthmMQwxTBCjqif6hRmL6kYiiHLVRbOXUy5dX9HS0ds3QSWUVRdNk8PWy7JH+vMHtliQTwwRZNSqJ3rDx8Ieg6onmiGIVUq6sOpi4AXZggBVTxyIWaWhRiqILYqCEb/lUC4uaHb1RB+KCy4XkWVmC2L7HUN4ohyxIE64tBLeavsriK0fzohSDth+sMYfQVh10dlyOGK436+fgbbzCyKie+wd8cLYX0FYddG5gjhiypG/gth2khrRPfaOmLTqryCsuuhMORyz7MEvQTw7y5YLZYjXY+6YhXNGCMKqi84TxDFLr40QxJaL9cmwx9tRxTuMEIRVF50liKPKP/ktiGen2a5gGBn2WDuqgKBRgrDqonMEcVQJWqMEsV3RYsLbaSMFYdVFZwjiuJ/BMEQQz86z1Q+nkGseY8cN6RspCKsu2l8Qx/0Un5GC2OrHG8lVx9eR04oME8SzE1l10b6COPLnwI0WxDY/IE+uOraOXNpgtCCsumhfQdoAxOrFvf5Adkl6on0WxxktyFQASpc0s5dhPru+4qy7t09lDcqzIvIeFfB6XB27vNpQQTw7k1UX7SfIawDe0ItLiQ0/sWJBzhSz2uFjgY4YEXFbURClUjDTrovCq9/LMu2gbjnSjNVldczuUSZrYjSmXReN7BQXspKjDd322h0n8e8qpVF5w0o8mSGIcjGxPzw2BxGhwWadbfDCJ5XM2AASGhyE7JRoZCe7MCPFhdR4/x47f7bhABrae1VCl4nIcqsKEg1A6dK29J5M5E2JM+0AvfTX/Whyn2OmWoS4iFBkp7guCzPJhbiIccqf9fGEZ1iZWcMF8UiyBQpVF7+TlYTH5hl7y3q4sRMHG9yoPtOFQ41uZqWFSY0PR3ayC9kpl68wocHDLy0vPtqMolKlW2ZDC5WbJYhS1cXk2HD8coF/Q9XftPbiYEMHqho7UdXoxoX+S8y8sfr8kuzCjOTLzy8ZSVGDb8e3HMeO42dVNmPooItZgigPC/764VlIig5T3nZ7Tx8O1LtxqNGNqsYOtHb3MbNsSERYCGYkRyMrxYXc1Fg8/5evVT9q6I8lmSKIRxKlqouEGIyhL37NFERpagIhRiIimqF5bKIgSlUXCXGqIMrTowlxnCAeSZQ2vqYwn0eWeGVx0S4KQggFoSCEglAQQkEoCKEgFIRQEApCKAgFIRSEghAKQkEIBaEghFAQCkIoCAUhFISCEApCQQgFoSCEglAQQkEoCKEgFIRQEApCKAgFIYSCUBBCQSgIoSAUhFAQCkIoCAUhFISCEApCQQgFoSCEglAQQigIBSEUhIIQCkJBCAWhIISCUBBCQSgIoSAUhFAQCkIoCAUhFISCEEJBKAihIBSEUBAKQigIBSEUhIIQCkJBCAWhIISCUBBCQSgIIRSEghAKQkEIBaEghIJQEEJBKAihIBSEUBAKQigIBSEUhIIQCkJBCKEgFIRQEApCKAgFIRSEghAKQkEIBaEghIJQEEJBKAihIBSEEApCCAWhIISC+CwIIUZBQQihIIRQEEIoCA8ZoSAUhFAQCkIoCAUhFISCEApCQQgFsbYghIx1KAghFIQQCkIIBSGEghBCQQihIIRQEEIoCCEUhBBCQQihIIRQEEIoCCEUhBAKQggFIcQ2/BcAB1oWINKo6AAAAABJRU5ErkJggg==",Ti="./assets/metal.7407f5d1.png",Ui="./assets/cloth.7bcd7f37.png",Ri="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Oi="./assets/plastic.b8ac74ff.png";const W=Ut("main",function(){const e=we(1),t=C(()=>(+new Date(new Date().getFullYear(),11,e.value)-j.time)/1e3),l=$(!1),i=$(-1),a=$(""),s=$();function u(m){const b=we(!1),h=we(!1);return Nt(()=>{const w=m(),f=pt(w.shouldNotify),_=pt(()=>r(f)||r(h));return{...w,opened:b,shouldNotify:_,recentlyUpdated:h,[dl]:Jo,[cl]:function(){const{day:A,layer:P,symbol:Y,opened:M,shouldNotify:S,story:T,completedStory:fe,recentlyUpdated:Pe}=this;return{day:A,symbol:Y,layer:P,opened:M,recentlyUpdated:Pe,shouldNotify:S,onOpenLore(){var de,Ue;const Q=W.day.value>A;i.value=Q?A-1:-1;const Ee=r((Ue=(de=vt[P!=null?P:"trees"])==null?void 0:de.name)!=null?Ue:"");a.value=Q?`${Ee} - Completed!`:Ee,s.value=Q?`${T}