diff --git a/assets/gameLoop.4ab98f05.js b/assets/gameLoop.4c10b9c5.js similarity index 91% rename from assets/gameLoop.4ab98f05.js rename to assets/gameLoop.4c10b9c5.js index df0787e..2f54388 100644 --- a/assets/gameLoop.4ab98f05.js +++ b/assets/gameLoop.4c10b9c5.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.708b3867.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.708b3867.js").then(function(t){return t.c}),["assets/index.708b3867.js","assets/index.efcf3a7b.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.32ea9b64.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.32ea9b64.js").then(function(t){return t.c}),["assets/index.32ea9b64.js","assets/index.efcf3a7b.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.708b3867.js b/assets/index.32ea9b64.js similarity index 99% rename from assets/index.708b3867.js rename to assets/index.32ea9b64.js index e4e3633..4ba6c84 100644 --- a/assets/index.708b3867.js +++ b/assets/index.32ea9b64.js @@ -21,7 +21,7 @@ Created at: /${P(m(a.ocean1))} to box buyable cost `)}]}),beach:n({name:"Beach Wrapping Paper",id:"beach",ratio:{yellow:{base:Cl*3,exponent:gl},blue:{base:Cl*3,exponent:gl}},background:"radial-gradient(circle at 80% 10%, rgba(255,255,76,1) 8%, rgba(0,0,0,0) 21%), linear-gradient(180deg, rgba(0,255,246,1) 60%, rgba(0,255,246,0) 61%), linear-gradient(215deg, rgba(0,93,255,0) 0%, rgba(0,93,255,0) 66%, rgba(255,255,76,1) 68%), linear-gradient(180deg, rgba(0,0,0,0) 68%, rgba(0,93,255,1) 70%), linear-gradient(205deg, rgba(0,255,246,1) 0%, rgba(0,255,246,1) 100%)",listedBoosts:[{desc:b(()=>` /${P(m(a.beach1))} to workshop cost - `)}]})},a={christmas1:b(()=>i.add(s.christmas.buyable.amount.value,1)),rainbow1:b(()=>i.pow(2,s.rainbow.buyable.amount.value)),jazzy1:b(()=>i.ln(i.add(i.ln(i.add(s.jazzy.buyable.amount.value,1)),1))),sunshine1:b(()=>i.add(s.sunshine.buyable.amount.value,1)),ocean1:b(()=>i.pow(1.5,s.ocean.buyable.amount.value)),beach1:b(()=>i.add(s.beach.buyable.amount.value,1))},I=ji(b(()=>Object.values(s).map(E=>E.buyable.amount.value).reduce(i.add,0)),"Total Wrapping Paper"),r=se(!1),d=f(()=>t(xi,{modelValue:r.value,"onUpdate:modelValue":E=>r.value=E},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:u})),[u,c]=al(()=>[]),{total:j,trackerDisplay:h}=Jl({resource:I,goal:1e20,name:e,day:Om,color:l,textColor:"var(--feature-foreground)",modal:{show:r,display:d},ignoreTotal:!0}),v=[6,12,18,24,30,36],y=X(()=>({display:{requirement:v[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>i.gte(j.value,v[0]),visibility:()=>p(!0)})),N=X(()=>({display:{requirement:v[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>i.gte(j.value,v[1]),visibility:()=>p(y.earned.value)})),x=X(()=>({display:{requirement:v[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>i.gte(j.value,v[2]),visibility:()=>p(N.earned.value)})),M=X(()=>({display:{requirement:v[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>i.gte(j.value,v[3]),visibility:()=>p(x.earned.value)})),le=X(()=>({display:{requirement:v[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>i.gte(j.value,v[4]),visibility:()=>p(M.earned.value)})),Y=X(()=>({display:{requirement:v[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>i.gte(j.value,v[5]),visibility:()=>p(le.earned.value)})),g={primaryBoost:y,secondaryBoost:N,buyMaxPrimary:x,secondaryNoReset:M,buyMaxSecondary:le,unlockDyeElf:Y},{collapseMilestones:G,display:_}=sn(g);return{name:e,display:f(()=>t("div",{style:"width: 620px"},[Ve(h),t(Hi,{resource:I},null),ai(s.christmas.display,s.rainbow.display,s.jazzy.display),ai(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(we,null,null),ai(s.sunshine.display,s.ocean.display,s.beach.display),ai(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(we,null,null),o("button goes here"),t(we,null,null),_()])),wrappingPaper:s,totalWrappingPaper:j,generalTabCollapsed:c,boosts:a,milestones:g,collapseMilestones:G}}),Ym="paper",Rn=5,F=Ai(Ym,function(){const e="Paper",l="#E8DCB8",n=ji(0,"paper"),s=ji(b(()=>i.min(i.div(ye.logs.value,1e9),i.div($.ash.value,Oe.value))),"pulp"),a=Ks(()=>({scaling:es(1,1.2),baseResource:s,gainResource:Q(n),roundUpCost:!0,spend(Ie,A){ye.logs.value=i.sub(ye.logs.value,i.times(A,1e9)),$.ash.value=i.sub($.ash.value,i.times(A,Oe.value))},gainModifier:q})),I=Ei(()=>({display:f(()=>{const Ie=i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),yn(ye.logs,Ie),o(" "),s.displayName,o(" ("),me(i.times(Ie,1e9)),o(" "),ye.logs.displayName,o(";")," ",me(i.times(Ie,Oe.value))," ",$.ash.displayName,o(")")])])}),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function r(Ie){const A=He(()=>({...Ie,display:{title:Ie.name,description:`Print a copy of "${Ie.name}", which ${Ie.elfName} will use to improve their skills! Each copy printed will reduce the "${Ie.buyableName}" price scaling by 0.95x and make ${Ie.elfName} purchase +10% faster!`,effectDisplay:f(()=>t(O,null,[En(i.pow(.95,A.totalAmount.value)),o("x price scaling,")," ",P(i.div(A.totalAmount.value,10).add(1)),o("x auto-purchase speed")])),showAmount:!1},resource:Q(n),cost(){let B=A.amount.value;Ie.elfName==="Star"&&i.gte(B,10)&&(B=i.pow(10,i.div(B,10))),(Ie.elfName==="Star"||Ie.elfName==="Bell")&&(B=i.pow(B,2)),i.gte(B,100)&&(B=i.pow(B,2).div(100)),i.gte(B,1e4)&&(B=i.pow(B,2).div(1e4)),B=i.pow(.95,M.totalAmount.value).times(B);let $e=5;W.elfTraining.paperElfTraining.milestones[2].earned.value&&$e--;let fe=i.pow($e,B).times(10);return W.elfTraining.paperElfTraining.milestones[0].earned.value&&(fe=i.div(fe,he.value.max(1))),ve.bought.value&&(fe=fe.div(10)),fe},inverseCost(B){ve.bought.value&&(B=i.mul(B,10)),W.elfTraining.paperElfTraining.milestones[0].earned.value&&(B=i.mul(B,he.value.max(1)));let $e=5;W.elfTraining.paperElfTraining.milestones[2].earned.value&&$e--;let fe=i.div(B,10).log($e);return fe=fe.div(i.pow(.95,M.totalAmount.value)),i.gte(fe,1e4)&&(fe=i.mul(fe,1e4).root(2)),i.gte(fe,100)&&(fe=i.mul(fe,100).root(2)),(Ie.elfName==="Star"||Ie.elfName==="Bell")&&(fe=i.root(fe,2)),Ie.elfName==="Star"&&i.gte(fe,10)&&(fe=fe.mul(10).log10()),i.isNaN(fe)?i.dZero:fe.floor().max(0)},style:"width: 600px",freeLevels:b(()=>W.elfTraining.paperElfTraining.milestones[4].earned.value?i.times(5,W.level5Elves.value):0),totalAmount:b(()=>i.add(A.amount.value,A.freeLevels.value))}));return A}const d=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),u=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),c=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),j=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),v=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),y=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>p(ze.elves.smallFireElf.bought.value)}),N=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>p(ze.elves.bonfireElf.bought.value)}),x=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>p(ze.elves.kilnElf.bought.value)}),M=r({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>p(ze.elves.paperElf.bought.value)}),le=r({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>p(ze.elves.boxElf.bought.value)}),Y=r({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>p(ze.elves.clothElf.bought.value)}),g=r({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Coal Drill",visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[3].earned.value)}),G=r({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>p(W.elfTraining.fertilizerElfTraining.milestones[4].earned.value)}),_=r({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>p(W.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)}),E=r({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[4].earned.value)}),D=r({name:"Arts and Crafts",elfName:"Carol",buyableName:"Dye Buyables",visibility:()=>p(ze.elves.dyeElf.bought.value)}),Ze={cuttersBook:d,plantersBook:u,expandersBook:c,heatedCuttersBook:j,heatedPlantersBook:h,fertilizerBook:v,smallFireBook:y,bonfireBook:N,kilnBook:x,paperBook:M,boxBook:le,clothBook:Y,coalDrillBook:g,heavyDrillBook:G,oilBook:_,metalBook:E,dyeBook:D},he=b(()=>Object.values(Ze).reduce((Ie,A)=>Ie.add(A.amount.value),new i(0))),Ge=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),Fe=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ce=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),De={clothUpgrade:Ge,drillingUpgrade:Fe,oilUpgrade:ce},Re=T(()=>({resource:Q(n),cost:1e36,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Paper Burning",description:"Paper adds to ash gain after all other modifiers"}})),ve=T(()=>({resource:Q(n),cost:1e40,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Book Cheapener",description:"Books are less expensive"}})),U=T(()=>({resource:Q(n),cost:1e44,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Classroom Supplies",description:"Classrooms' effect is raised to the 1.1"}})),oe={ashUpgrade:Re,bookUpgrade:ve,classroomUpgrade:U},q=ae(()=>[Z(()=>({multiplier:2,description:"Scholar's shoes",enabled:wi.paperUpgrades.paperUpgrade1.bought})),Z(()=>({multiplier:2,description:"Scholar's slacks",enabled:wi.paperUpgrades.paperUpgrade2.bought})),Z(()=>({multiplier:2,description:"Scholar's jacket",enabled:wi.paperUpgrades.paperUpgrade3.bought})),Z(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:wi.paperUpgrades.paperUpgrade4.bought})),Z(()=>({multiplier:We.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(We.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:Wi.boosts.sunshine1,description:"Sunshine Wrapping Paper",enabled:()=>i.gte(Wi.boosts.sunshine1.value,2)}))]),ke=ae(()=>[Z(()=>({multiplier:.1,description:"Star Level 2",enabled:W.elfTraining.paperElfTraining.milestones[1].earned}))]),Oe=b(()=>ke.apply(1e6)),[gi,Pe]=al(()=>[{title:"Paper Gain",modifier:q,base:1},{title:"Ash Cost",modifier:ke,base:1e6,unit:" ash/pulp"}]),qe=se(!1),Je=f(()=>t(xi,{modelValue:qe.value,"onUpdate:modelValue":Ie=>qe.value=Ie},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:gi}));ui.on("update",Ie=>{i.lt(H.day.value,Rn)||(n.value=i.times(Ie,di.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(n.value))});const{total:yi,trackerDisplay:Ee}=Jl({resource:n,goal:5e3,name:e,day:Rn,color:l,textColor:"var(--feature-foreground)",modal:{show:qe,display:Je}});return{name:e,day:Rn,color:l,paper:n,totalPaper:yi,paperConversion:a,books:Ze,upgrades:De,upgrades2:oe,generalTabCollapsed:Pe,minWidth:700,display:f(()=>t(O,null,[Ve(Ee),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(we,null,null),Ve(I),t(we,null,null),ai(...Object.values(De)),t(we,null,null),sl(...Object.values(Ze))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}}),Nm="trees",Vs=1,Ws=.1,ye=Ai(Nm,function(){const e="Trees",l="#4BDC13",n="green",s=ji(0,"logs"),a=ji(0,"saplings"),I=se(0),r=se(0),d=se(0),u=ae(()=>[pe(()=>({addend:()=>i.times(he.amount.value,10),description:"Expand Forest",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,2),description:"75% Foundation Completed",enabled:ri.milestones.morePlantsMilestone1.earned})),Z(()=>({multiplier:2,description:"5 Elves Trained",enabled:ze.milestones[4].earned})),Z(()=>({multiplier:2,description:"8 Elves Trained",enabled:ze.milestones[7].earned})),Z(()=>({multiplier:4,description:"Lumberjack Boots",enabled:wi.treesUpgrades.treesUpgrade1.bought})),pe(()=>({addend:We.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>i.gte(We.dyes.blue.amount.value,1)})),pe(()=>({addend:()=>i.pow(ce.value,.99),description:"Hope Level 1",enabled:W.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=ji(b(()=>i.sub(u.apply(10),a.value)),"trees"),j=b(()=>u.apply(10)),h=T(()=>({resource:Q(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),v=T(()=>({resource:Q(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),y=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),N=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),x=T(()=>({resource:Q(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),M=[h,v,y,N,x],le=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),Y=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),g=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),G=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),_=T(()=>({resource:Q(s),cost:300,visibility:()=>p(x.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),E=[le,Y,g,G,_],D=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,1e4).div(i.pow(2e30,9999))),k=i.pow(.95,F.books.cuttersBook.totalAmount.value).times(k),i.times(100,k).add(200)},inverseCost(k){let ee=i.sub(k,200).div(100);return ee=ee.div(i.pow(.95,F.books.cuttersBook.totalAmount.value)),i.gte(ee,2e30)&&(ee=i.mul(ee,i.pow(2e30,9999)).root(1e4)),i.gte(ee,2e6)&&(ee=i.mul(ee,2e6).root(2)),i.gte(ee,200)&&(ee=i.mul(ee,200).root(2)),i.gte(ee,50)&&(ee=i.mul(ee,50).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>p(_.bought.value)})),Ze=He(()=>({resource:Q(s),cost(){let k=this.amount.value;i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,1e4).div(i.pow(2e30,9999))),k=i.pow(.95,F.books.plantersBook.totalAmount.value).times(k);let ee=i.times(100,k).add(200);return W.elfTraining.planterElfTraining.milestones[3].earned.value&&(ee=i.div(ee,10)),ee},inverseCost(k){W.elfTraining.planterElfTraining.milestones[3].earned.value&&(k=i.mul(k,10));let ee=i.sub(k,200).div(100);return ee=ee.div(i.pow(.95,F.books.plantersBook.totalAmount.value)),i.gte(ee,2e30)&&(ee=i.mul(ee,i.pow(2e30,9999)).root(1e4)),i.gte(ee,2e6)&&(ee=i.mul(ee,2e6).root(2)),i.gte(ee,200)&&(ee=i.mul(ee,200).root(2)),i.gte(ee,50)&&(ee=i.mul(ee,50).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>p(_.bought.value)})),he=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,100)&&(k=i.pow(k,2).div(100)),i.gte(k,1e5)&&(k=i.pow(k,2).div(1e5)),i.gte(k,1e15)&&(k=i.pow(k,10).div(1e135)),k=i.pow(.95,F.books.expandersBook.totalAmount.value).times(k),i.pow(i.add(k,1),1.5).times(500)},inverseCost(k){let ee=i.div(k,500).root(1.5).sub(1);return ee=ee.div(i.pow(.95,F.books.expandersBook.totalAmount.value)),i.gte(ee,1e15)&&(ee=i.mul(ee,1e135).root(10)),i.gte(ee,1e5)&&(ee=i.mul(ee,1e5).root(2)),i.gte(ee,100)&&(ee=i.mul(ee,100).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>p(_.bought.value)})),Ge=[D,Ze,he],Fe=ae(()=>[pe(()=>({addend:1,description:"Wooden Fingers",enabled:h.bought})),pe(()=>({addend:U,description:"Smart Knives",enabled:g.bought}))]),ce=b(()=>Fe.apply(1)),De=ae(()=>[Z(()=>({multiplier:.5,description:"Sharper Fingers",enabled:le.bought})),Z(()=>({multiplier:()=>i.pow(.5,ze.totalElves.value),description:"1 Elf Trained",enabled:ze.milestones[0].earned}))]),Re=b(()=>De.apply(1)),ve=ae(()=>[pe(()=>({addend:1,description:"Automated Knives",enabled:y.bought})),pe(()=>({addend:D.amount,description:"Generic Cutters",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:ri.milestones.autoCutMilestone1.earned})),Z(()=>({multiplier:2,description:"30% Foundation Completed",enabled:ri.milestones.autoCutMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Cutters",enabled:$.warmerCutters.bought})),Z(()=>({multiplier:$.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>i.gt($.heatedCutters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:wi.treesUpgrades.treesUpgrade2.bought})),Z(()=>({multiplier:()=>i.pow(1.1,H.day.value),description:"Holly Level 4",enabled:W.elfTraining.cutterElfTraining.milestones[3].earned})),pe(()=>({addend:()=>i.sub(d.value,r.value).max(0),description:"Ivy Level 5",enabled:W.elfTraining.planterElfTraining.milestones[4].earned}))]),U=b(()=>ve.apply(0)),oe=ae(()=>[pe(()=>({addend:1,description:"Leafy Fingers",enabled:v.bought})),pe(()=>({addend:Pe,description:"Smart Spades",enabled:G.bought}))]),q=b(()=>oe.apply(1)),ke=ae(()=>[Z(()=>({multiplier:.5,description:"Greener Fingers",enabled:Y.bought})),Z(()=>({multiplier:()=>i.pow(.5,ze.totalElves.value),description:"1 Elf Trained",enabled:ze.milestones[0].earned}))]),Oe=b(()=>ke.apply(1)),gi=ae(()=>[pe(()=>({addend:1,description:"Automated Spade",enabled:N.bought})),pe(()=>({addend:()=>i.div(Ze.amount.value,2),description:"Generic Planters",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:ri.milestones.autoPlantMilestone1.earned})),Z(()=>({multiplier:2,description:"40% Foundation Completed",enabled:ri.milestones.autoPlantMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Planters",enabled:$.warmerPlanters.bought})),Z(()=>({multiplier:$.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>i.gt($.heatedPlanters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:wi.treesUpgrades.treesUpgrade3.bought})),Z(()=>({multiplier:2,description:"Ivy Level 1",enabled:W.elfTraining.planterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:W.elfTraining.planterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"Mary Level 4",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),pe(()=>({addend:()=>i.sub(r.value,d.value).max(0),description:"Ivy Level 5",enabled:W.elfTraining.planterElfTraining.milestones[4].earned}))]),Pe=b(()=>gi.apply(0)),qe=ae(()=>[Z(()=>({multiplier:1.25,description:"Research I",enabled:x.bought})),Z(()=>({multiplier:1.25,description:"Research II",enabled:_.bought})),Z(()=>({multiplier:()=>ri.milestones.extraExpansionMilestone1.earned.value?i.pow(1.02,ri.foundationProgress.value):i.div(ri.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:ri.milestones.logGainMilestone1.earned})),Z(()=>({multiplier:2,description:"50% Foundation Completed",enabled:ri.milestones.logGainMilestone2.earned})),Z(()=>({multiplier:1.25,description:"Ashy Soil",enabled:$.basicFertilizer.bought})),Z(()=>({multiplier:$.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>i.gt($.moreFertilizer.amount.value,0)})),Z(()=>({multiplier:2,description:"4 Elves Trained",enabled:ze.milestones[3].earned})),Z(()=>({multiplier:2,description:"Carry logs in boxes",enabled:li.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:()=>i.div(li.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:li.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:wi.treesUpgrades.treesUpgrade4.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:We.upgrades.blueDyeUpg.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).root(9)),description:"Holly Level 1",enabled:W.elfTraining.cutterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.sqrt(W.totalElfLevels.value),description:"Noel Level 1",enabled:W.elfTraining.fertilizerElfTraining.milestones[0].earned})),Z(()=>({multiplier:Wi.boosts.christmas1,description:"Christmas Wrapping Paper",enabled:b(()=>i.gt(Wi.boosts.christmas1.value,1))})),ll(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:ri.milestones.logGainMilestone3.earned}))]),Je=Se(0),yi=tl(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Je.value,Re.value)})),Ee=Ei(()=>({display:{title:"Cut trees",description:f(()=>t(O,null,[o("Cut down up to "),me(i.floor(ce.value))," ",o("tree"),i.eq(ce.value,1)?"":"s",o(" at once!"),t("br",null,null),Ve(yi)]))},style:{minHeight:"80px"},canClick:()=>i.gte(c.value,1)&&i.gte(Je.value,Re.value),onClick(){if(i.lt(Je.value,Re.value))return;const k=i.floor(i.min(c.value,i.times(ce.value,i.div(Je.value,Re.value).floor())));s.value=i.add(s.value,i.times(qe.apply(1),k)),a.value=i.add(a.value,k),Je.value=0}})),Ie=Se(0),A=tl(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Ie.value,Oe.value)})),B=Ei(()=>({display:{title:"Plant trees",description:f(()=>t(O,null,[o("Plant up to "),me(i.floor(q.value))," ",o("tree"),i.eq(q.value,1)?"":"s",o(" at once!"),t("br",null,null),Ve(A)]))},style:{minHeight:"80px"},canClick:()=>i.gte(a.value,1)&&i.gte(Ie.value,Oe.value),onClick(){if(i.lt(Ie.value,Oe.value))return;const k=i.floor(i.min(a.value,i.times(q.value,i.div(Ie.value,Oe.value).floor())));a.value=i.sub(a.value,k),Ie.value=0}})),[$e,fe]=al(()=>[{title:"Logs per Tree",modifier:qe,base:1,visible:x.bought},{title:"Manual Cutting Amount",modifier:Fe,base:1,visible:h.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:De,base:1,visible:h.bought,unit:"s"},{title:"Manual Planting Amount",modifier:oe,base:1,visible:v.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:ke,base:1,visible:v.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:ve,base:0,visible:y.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:gi,base:0,visible:N.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:_.bought}]),mi=se(!1),hi=f(()=>t(xi,{modelValue:mi.value,"onUpdate:modelValue":k=>mi.value=k},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:$e}));ui.on("update",k=>{if(i.lt(H.day.value,Vs))return;i.gte(Je.value,Re.value)?Je.value=Re.value:(Je.value=i.add(Je.value,k),Ee.isHolding.value&&Ee.onClick()),i.gte(Ie.value,Oe.value)?Ie.value=Oe.value:(Ie.value=i.add(Ie.value,k),B.isHolding.value&&B.onClick());const ee=i.sub(Pe.value,i.sub(r.value,d.value).max(0)),Qe=i.sub(U.value,i.sub(d.value,r.value).max(0));d.value=ee,r.value=Qe;const Pi=i.min(c.value,i.times(U.value,k)),si=i.mul(qe.apply(1),Pi),Oi=i.div(si,k);I.value=i.mul(Oi,Ws).add(i.mul(I.value,i.dOne.sub(Ws))),s.value=i.add(s.value,si),a.value=i.add(a.value,Pi);const qi=i.min(a.value,i.times(Pe.value,k));a.value=i.sub(a.value,qi)});const Fi=b(()=>i.sub(U.value,Pe.value)),Qi=b(()=>i.sub(Pe.value,U.value)),Zi=en(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Ee.canClick.value&&Ee.onClick()}})),Ae=en(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{B.canClick.value&&B.onClick()}})),{total:Be,trackerDisplay:be}=Jl({resource:s,goal:1e4,name:e,day:Vs,color:n,modal:{show:mi,display:hi}});return{name:e,color:l,logs:s,totalLogs:Be,trees:c,saplings:a,cutTree:Ee,plantTree:B,cutTreeHK:Zi,plantTreeHK:Ae,row1Upgrades:M,row2Upgrades:E,row1Buyables:Ge,manualCutProgress:Je,manualPlantProgress:Ie,generalTabCollapsed:fe,computedAutoCuttingAmount:U,minWidth:700,display:f(()=>t(O,null,[Ve(be),t(we,null,null),t(Hi,{resource:s,color:l,style:"margin-bottom: 0",productionDisplay:i.gt(U.value,0)?`+${P(I.value)}/s average
equilibrium: +${zs([[U.value,"cutting speed"],[Pe.value,"planting speed"],[i.mul(j.value,20),"forest cap"]],"/s",qe.apply(1))}`:void 0},null),t(Hi,{resource:a,color:n,style:"margin-bottom: 0",productionDisplay:Cn(Fi.value)},null),t(Hi,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:Cn(Qi.value)},null),t(we,null,null),ai(Ee,B),t("div",null,[o("Tip: You can hold down on actions to perform them automatically")]),t(we,null,null),zl(M,E),t(we,null,null),ai(...Ge)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(s.value),o(" "),s.displayName]))}}),Xm="workshop",on=2,ri=Ai(Xm,function(){const e="Workshop",l="#D66B02",n="#D66B02",s=ji(0,"foundation progress"),a=Eo(()=>({scaling:ps(ps(es(250,1.5),5387,1/1e10),1e20,3e8),baseResource:ye.logs,gainResource:Q(s),roundUpCost:!0,spend(he,Ge){ye.logs.value=i.sub(ye.logs.value,Ge)},costModifier:ae(()=>[Z(()=>({multiplier:b(()=>Wi.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>i.gt(Wi.boosts.beach1.value,1))})),ll(()=>({exponent:1/.99,description:"Holly Level 5",enabled:W.elfTraining.cutterElfTraining.milestones[4].earned}))])})),I=Ei(()=>({display:f(()=>t(O,null,[t("b",{style:"font-size: x-large"},[o("Build "),me(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",yn(ye.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",ye.logs.displayName])])),visibility:()=>p(i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>i.gte(ye.logs.value,a.currentAt.value)&&(i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=en(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{I.canClick.value&&I.onClick()}})),d=b(()=>!ze.milestones[6].earned.value),u=X(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>i.gte(s.value,1),showPopups:d})),c=X(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>i.gte(s.value,10),visibility:()=>p(u.earned.value),showPopups:d})),j=X(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>i.gte(s.value,20),visibility:()=>p(c.earned.value),showPopups:d})),h=X(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>i.gte(s.value,30),visibility:()=>p(j.earned.value),showPopups:d})),v=X(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>i.gte(s.value,40),visibility:()=>p(h.earned.value),showPopups:d})),y=X(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(s.value,50),visibility:()=>p(v.earned.value),showPopups:d})),N=X(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>i.gte(s.value,75),visibility:()=>p(y.earned.value),showPopups:d})),x=X(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>i.gte(s.value,100),visibility:()=>p(N.earned.value),showPopups:d})),M=X(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>i.gte(s.value,200),visibility:()=>p(x.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),le=X(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,400),visibility:()=>p(M.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),Y=X(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,600),visibility:()=>p(le.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),g=X(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,800),visibility:()=>p(Y.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),G=X(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>i.gte(s.value,1e3),visibility:()=>p(g.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),_={logGainMilestone1:u,autoCutMilestone1:c,autoPlantMilestone1:j,autoCutMilestone2:h,autoPlantMilestone2:v,logGainMilestone2:y,morePlantsMilestone1:N,logGainMilestone3:x,extraExpansionMilestone1:M,extraExpansionMilestone2:le,extraExpansionMilestone3:Y,extraExpansionMilestone4:g,extraExpansionMilestone5:G},{collapseMilestones:E,display:D}=sn(_),Ze=tl(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>H.day.value===on?i.div(s.value,100):1,display:f(()=>H.day.value===on?t(O,null,[me(s.value),o("%")]):"")}));return Di(()=>{H.day.value===on&&i.gte(s.value,100)&&H.completeDay()}),{name:e,day:on,color:l,foundationProgress:s,foundationConversion:a,milestones:_,collapseMilestones:E,minWidth:700,buildFoundationHK:r,display:f(()=>t(O,null,[t("div",null,[H.day.value===on?"Complete the foundation to complete the day":`${e} Complete!`]),Ve(Ze),t(we,null,null),t("div",null,[t("span",null,[o("The foundation is ")]),t("h2",{style:`color: ${l}; text-shadow: 0 0 10px ${l}`},[me(s.value)]),o("% completed")]),i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value?t(we,null,null):null,Ve(I),t(we,null,null),D()])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(s.value),o(" "),s.displayName]))}}),Mm="plastic",vs=10,di=Ai(Mm,function(){const e="Plastic",l="#DCD9CD",n=ji(0,"plastic"),[s,a]=al(()=>[{title:"Plastic Gain",modifier:Fe,base:0}]),I=se(!1),r=f(()=>t(xi,{modelValue:I.value,"onUpdate:modelValue":ve=>I.value=ve},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:s})),d=Se(0),u=b(()=>i.times(d.value,100).times(W.elfTraining.oilElfTraining.milestones[3].earned.value?5:1)),c=He(()=>({resource:ci.metal,cost(){const ve=new i(this.amount.value);let U=i.pow(1.2,ve).times(1e7);return W.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(U=i.sub(U,i.pow(n.value,2)).max(0)),U},display:f(()=>t(O,null,[t("h3",null,[o("Refinery")]),t("br",null,null),o("Refines oil into plastic pellets"),t("br",null,null),o("Consumes 100 oil/s to create 1 plastic/s"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),P(u.value),o(" oil/sec"),t("br",null,null),o("+"),P(d.value),o(" plastic/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(c.cost))," ",c.resource.displayName])),onPurchase(){d.value=i.add(d.value,1)},style:{width:"300px"}})),{min:j,max:h,add:v,remove:y}=cl({buyable:c,active:d,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),N=b(()=>i.pow(5,i.add([...Object.values(Y),...Object.values(E)].filter(ve=>ve.bought.value).length,2))),x=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!x.bought.value})})),M=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!M.bought.value})})),le=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!le.bought.value})})),Y={paperTools:x,boxTools:M,clothTools:le},g=T(()=>({resource:Q(n),cost:N,visibility:()=>p(x.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!g.bought.value})})),G=T(()=>({resource:Q(n),cost:N,visibility:()=>p(M.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!G.bought.value})})),_=T(()=>({resource:Q(n),cost:N,visibility:()=>p(le.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!_.bought.value})})),E={paperElf:g,boxElf:G,clothElf:_},D=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(g.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:f(()=>t(O,null,[me(D.amount.value),o("%")])),showAmount:!1}})),Ze=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(G.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:f(()=>t(O,null,[me(Ze.amount.value),o("%")])),showAmount:!1}})),he=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(_.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:f(()=>t(O,null,[me(i.times(he.amount.value,10)),o("%")])),showAmount:!1}})),Ge={passivePaper:D,passiveBoxes:Ze,clothGains:he},Fe=ae(()=>[pe(()=>({addend:()=>W.elfTraining.oilElfTraining.milestones[3].earned.value?i.times(d.value,5):d.value,description:"Oil Refinery",enabled:()=>i.gt(d.value,0)})),Z(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:g.bought})),Z(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:G.bought})),Z(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:_.bought})),Z(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:li.row2Upgrades.plasticUpgrade.bought})),Z(()=>({multiplier:()=>te.oilEffectiveness.value,description:"Effectiveness",enabled:()=>i.lt(te.oilEffectiveness.value,1)})),Z(()=>({multiplier:We.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(We.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone4.earned})),Z(()=>({multiplier:()=>i.add(te.buildExtractor.amount.value,1),description:"Snowball Level 4",enabled:W.elfTraining.kilnElfTraining.milestones[3].earned}))]),ce=b(()=>Fe.apply(0));ui.on("update",ve=>{i.lt(H.day.value,vs)||(n.value=i.times(ve,ce.value).add(n.value))});const{total:De,trackerDisplay:Re}=Jl({resource:n,goal:25e4,name:e,day:vs,color:l,textColor:"var(--feature-foreground)",modal:{show:I,display:r}});return{name:e,color:l,plastic:n,totalPlastic:De,buildRefinery:c,activeRefinery:d,oilCost:u,upgrades:Y,elfUpgrades:E,buyables:Ge,generalTabCollapsed:a,minWidth:700,display:f(()=>t(O,null,[Ve(Re),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0",effectDisplay:i.gt(ce.value,0)?`+${P(ce.value)}/s`:void 0},null),t(we,null,null),t(Bi,null,{default:()=>[Ve(c),t("div",null,[me(i.floor(d.value)),o("/"),me(i.floor(c.amount.value))]),ai(j,y,v,h)]}),t(nn,null,{default:()=>[sl(x,g,D),sl(M,G,Ze),sl(le,_,he)]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}}),xm="oil",Hn=9,te=Ai(xm,function(){const e="Oil",l="#000000",n="var(--foreground)",s=ji(0,"oil"),a=ji(0,"depth"),I=Se(0),r=b(()=>i.lt(a.value,990)?i.add(10,a.value):i.pow(1.001,i.sub(a.value,990)).mul(1e3));function d(){if(i.lt(a.value,990)){const L=i.min(i.affordArithmeticSeries(I.value,10,1,a.value),i.sub(990,a.value)),ie=i.sumArithmeticSeries(L,10,1,a.value);I.value=i.sub(I.value,ie),a.value=i.add(a.value,L)}if(i.gte(a.value,990)){const L=i.affordGeometricSeries(I.value,1e3,1.001,i.sub(a.value,990)),ie=i.sumGeometricSeries(L,1e3,1.001,i.sub(a.value,990));I.value=i.sub(I.value,ie),a.value=i.add(a.value,L)}}const u=Se(0),c=b(()=>i.times(i.pow(u.value,le.value).pow(W.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2),1e14)),j=b(()=>i.times(i.pow(u.value,le.value),1)),h=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(1.3,L).times(25e3)},inverseCost(L){let ie=i.div(L,25e3).log(1.3);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill")]),t("br",null,null),o("A large drill specialized at deep mining."),t("br",null,null),o("Consumes 1e14*(Heavy Drills amount)"),t("sup",null,[W.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2])," ",o("coal/sec for (Heavy Drills amount) drill power."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(c.value),o(" coal/sec"),t("br",null,null),o("+"),Xe(j.value),o(" drill power"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(h.cost)),o(" "),h.resource.displayName])),onPurchase(){u.value=i.add(u.value,1)},style:{color:n,width:"160px"}})),{min:v,max:y,add:N,remove:x}=cl({buyable:h,active:u}),M=Se(0),le=b(()=>{let L=i.add(M.value,Math.E);return W.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?L=L.log(2.5):L=L.ln(),L}),Y=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,50)&&(L=i.pow(L,4).div(50**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(2,L).times(1e5)},inverseCost(L){let ie=i.div(L,1e5).log(2);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,50)&&(ie=i.mul(ie,50**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill Drill")]),t("br",null,null),o("Attach extra drills to Heavy Drills to make them faster"),t("br",null,null),o("Raise amount of effective Heavy Drills by ^"),W.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?t(O,null,[o("log"),t("sub",null,[o("2.5")])]):t(O,null,[o("ln")]),o("(Heavy Drill Drill amount + e)."),t("br",null,null),o("(also affects coal consumption)."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("^"),Xe(le.value),o(" Heavy Drill amount"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Y.cost)),o(" "),Y.resource.displayName])),onPurchase(){M.value=i.add(M.value,1)},style:{color:n,width:"160px"}})),{min:g,max:G,add:_,remove:E}=cl({buyable:Y,active:M}),D=Se(0),Ze=b(()=>i.pow(1/3,D.value)),he=b(()=>i.pow(2,D.value)),Ge=b(()=>i.pow(1.2,D.value)),Fe=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(8,L).times(2e5)},inverseCost(L){let ie=i.div(L,2e5).log(8);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Extractor")]),t("br",null,null),o("Attach extractors to the drill to mine coal and ore, but with a price."),t("br",null,null),o("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),En(Ze.value),o(" drill power"),t("br",null,null),o("\xD7"),Xe(he.value),o(" coal/sec"),t("br",null,null),o("\xD7"),Xe(Ge.value),o(" ore/sec"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Fe.cost))," ",Fe.resource.displayName])),onPurchase(){D.value=i.add(D.value,1)},style:{color:n,width:"160px"}})),{min:ce,max:De,add:Re,remove:ve}=cl({buyable:Fe,active:D}),U=Se(0),oe=b(()=>i.pow(ki[3].bought.value?4:5,U.value)),q=b(()=>i.add(U.value,Tl.value).pow(2).mul(u.value).mul(i.add(M.value,1)).mul(D.value).mul(i.pow(a.value,W.elfTraining.oilElfTraining.milestones[0].earned.value?1.2:1)).div(1e5)),ke=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);i.gte(L,100)&&(L=i.pow(L,4).div(100)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L);let ie=i.pow(16,L).times(2e6);return ki[4].bought.value&&(ie=ie.div(i.add(Vi.value,1).root(6))),W.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(ie=ie.div(10)),ie},inverseCost(L){W.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(L=i.mul(L,10)),ki[4].bought.value&&(L=i.mul(L,i.add(Vi.value,1).root(6)));let ie=i.div(L,2e6).log(16);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Pump")]),t("br",null,null),o("Pump that oil from the ground."),t("br",null,null),o("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),ki[3].bought.value?4:5,o("\xD7."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),Xe(oe.value),o(" coal usage"),t("br",null,null),o("+"),Xe(q.value),o(" oil/sec"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(ke.cost)),o(" "),ke.resource.displayName])),onPurchase(){U.value=i.add(U.value,1)},style:{color:n,width:"160px"}})),{max:Oe,min:gi,add:Pe,remove:qe}=cl({buyable:ke,active:U}),Je=Se(0),yi=b(()=>{let L=Je.value;return W.elfTraining.heavyDrillElfTraining.milestones[2].earned.value&&(L=i.pow(L,1.5)),L}),Ee=b(()=>i.pow(yi.value,2)),Ie=b(()=>i.pow(yi.value,3).mul(1e19)),A=b(()=>i.add(yi.value,1)),B=He(()=>({resource:Q(s),cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L),i.pow(2,L).times(50)},inverseCost(L){let ie=i.div(L,50).log(2);return ie=ie.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Burner")]),t("br",null,null),o("Burn oil as fuel."),t("br",null,null),o("(Oil Burner Amount)"),t("sup",null,[o("2")]),o(" unit of oil can give 1e19*(Oil Burner Amount)"),t("sup",null,[o("3")]),o(" units of coal."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(Ee.value),o(" oil/sec"),t("br",null,null),o("-"),Xe(Ie.value),o(" coal consumption"),ki[2].bought.value?t(O,null,[t("br",null,null),o("\xD7"),Xe(A.value),o(" to auto smelting multi")]):"",t("br",null,null),t("br",null,null),o("Cost: "),Me(m(B.cost)),o(" "),B.resource.displayName])),onPurchase(){Je.value=i.add(Je.value,1)},style:{color:n,width:"160px"}})),{max:$e,min:fe,add:mi,remove:hi}=cl({buyable:B,active:Je}),Fi=Se(0),Qi=b(()=>i.pow(Fi.value,2).mul(100)),Zi=b(()=>i.add(Fi.value,1)),Ae=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);i.gte(L,50)&&(L=i.pow(L,2).div(50)),i.gte(L,200)&&(L=i.pow(L,2).div(200)),i.gte(L,1e4)&&(L=i.pow(L,2).div(1e4)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L);let ie=i.pow(10,L).times(1e7);return ki[4].bought.value&&(ie=ie.div(i.add(Vi.value,1).root(6))),ie},inverseCost(L){ki[4].bought.value&&(L=i.mul(L,i.add(Vi.value,1).root(6)));let ie=i.div(L,1e7).log(10);return ie=ie.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Smelter")]),t("br",null,null),o("Use oil as a crucible fuel."),t("br",null,null),o("Burn 100*(Oil Smelter amount)"),t("sup",null,[o("2")]),o(" oil to smelt +100% faster."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(Qi.value),o(" oil/sec"),t("br",null,null),o("\xD7"),Xe(Zi.value),o(" smelting speed"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Ae.cost)),o(" "),Ae.resource.displayName])),onPurchase(){Fi.value=i.add(Fi.value,1)},style:{color:n,width:"160px"}})),{max:Be,min:be,add:k,remove:ee}=cl({buyable:Ae,active:Fi}),Qe=[X(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>i.gte(a.value,5)})),X(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>i.gte(a.value,10),visibility:()=>p(Qe[0].earned.value)})),X(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>i.gte(a.value,25),visibility:()=>p(Qe[1].earned.value)})),X(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>i.gte(a.value,60),visibility:()=>p(Qe[2].earned.value)})),X(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>i.gte(a.value,150),visibility:()=>p(Qe[3].earned.value)})),X(()=>({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:()=>i.gte(a.value,350),visibility:()=>p(Qe[4].earned.value)})),X(()=>({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:()=>i.gte(a.value,1e3),visibility:()=>p(i.gte(a.value,1e3))})),X(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>i.gte(a.value,3e3),visibility:()=>p(i.gte(a.value,2e3))}))],{collapseMilestones:Pi,display:si}=sn(Qe),Oi=[X(()=>({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:()=>i.gte(Vi.value,100)})),X(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>i.gte(Vi.value,500),visibility:()=>p(Oi[0].earned.value)})),X(()=>({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:()=>i.gte(Vi.value,1e4),visibility:()=>p(Oi[1].earned.value)}))],{collapseMilestones:qi,display:hl}=sn(Oi),ei=[T(()=>({resource:$.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per Coal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[0].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per Metal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[1].value)]))},style:{color:n}})),T(()=>({resource:$.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[2].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[3].value)]))},style:{color:n}})),T(()=>({resource:Q(s),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:f(()=>t(O,null,[o("+"),Xe(i.mul(Yi[4].value,100)),o("%")]))},style:{color:n}}))],Yi=[b(()=>i.mul($.buildDrill.amount.value,i.add(.04,Ti.value)).add(1)),b(()=>i.mul(ci.oreDrill.amount.value,i.add(.04,Ti.value)).add(1)),b(()=>i.mul(i.max($.coal.value,1).log10().floor(),i.add(.06,Ti.value)).add(1)),b(()=>i.mul(i.max(ci.metal.value,1).log10().floor(),i.add(.1,Ti.value)).add(1)),b(()=>i.mul(h.amount.value,.001))],ki=[T(()=>({resource:Q(s),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:n}})),T(()=>({resource:Q(s),cost:500,display:{title:"Oil the Metal Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:n}})),T(()=>({resource:Q(s),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your auto smelting multi."},style:{color:n}})),T(()=>({resource:Q(s),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:n}})),T(()=>({resource:Q(s),cost:5e4,display:{title:"Be One with the Oil",description:f(()=>t(O,null,[o("Divide metal ingot prices of oil buildings by "),t("sup",null,[o("6")]),t(xl,null,{default:()=>[o("total oil + 1")]})]))},style:{color:n}}))],ol=[T(()=>({resource:Q(s),cost:1e11,display:{title:"Dye Synergy I",description:"Red dye boosts yellow dye gain *(log(x)^0.75)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e12,display:{title:"Orange-colored boxes",description:"Orange dye's 2nd effect is raised to the 2.5"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e13,display:{title:"Colorful Focus",description:"Sum of secondary dyes increases max focus multiplier by cbrt(x)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e14,display:{title:"Dye Synergy II",description:"Blue dye boosts red dye gain *log(x)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e15,display:{title:"The Ultimate Metal Dye",description:"Sum of primary dyes boosts auto smelt speed"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}}))],Vl=ae(()=>[pe(()=>({addend:()=>i.negate(c.value),description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:oe,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),pe(()=>({addend:z,description:"Oil to Coal Substitution",enabled:()=>i.gt(z.value,0)}))]),Wl=b(()=>Vl.apply(0)),vl=ae(()=>[pe(()=>({addend:j,description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ze,description:"Heavy Extractor",enabled:()=>i.gt(D.value,0)})),Z(()=>({multiplier:Yi[0],description:"Coal Drill Synergy",enabled:ei[0].bought})),Z(()=>({multiplier:Yi[1],description:"Metal Drill Synergy",enabled:ei[1].bought})),Z(()=>({multiplier:Yi[2],description:"Coal Drill Upgrade",enabled:ei[2].bought})),Z(()=>({multiplier:Yi[3],description:"Metal Drill Upgrade",enabled:ei[3].bought})),Z(()=>({multiplier:2,description:"Guide to drilling",enabled:F.upgrades.drillingUpgrade.bought})),Z(()=>({multiplier:()=>i.add(Vi.value,1).log10().add(1),description:"Cocoa Level 2",enabled:W.elfTraining.oilElfTraining.milestones[1].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:W.elfTraining.oilElfTraining.milestones[2].earned})),Z(()=>({multiplier:()=>Ye.value,description:"Effectiveness",enabled:()=>i.lt(Ye.value,1)}))]),re=b(()=>vl.apply(0)),_e=ae(()=>[pe(()=>({addend:Yi[4],description:"Drill Oil",enabled:ei[4].bought}))]),Ti=b(()=>_e.apply(0)),Ui=ae(()=>[pe(()=>({addend:q,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),Z(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:ki[0].bought})),Z(()=>({multiplier:2,description:"3000m Well Depth",enabled:Qe[7].earned})),Z(()=>({multiplier:2,description:"Oil and where to find it",enabled:F.upgrades.oilUpgrade.bought})),Z(()=>({multiplier:()=>Ye.value,description:"Effectiveness",enabled:()=>i.lt(Ye.value,1)})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone3.earned})),Z(()=>({multiplier:()=>i.sqrt(W.totalElfLevels.value),description:"Jack Level 4",enabled:W.elfTraining.heatedCutterElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(Y.amount.value,1).sqrt(),description:"Faith Level 4",enabled:W.elfTraining.bonfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:W.elfTraining.oilElfTraining.milestones[2].earned}))]),ml=b(()=>Ui.apply(0)),Ke=ae(()=>[pe(()=>({addend:()=>i.negate(Ee.value),description:"Oil Burner",enabled:()=>i.gt(Je.value,0)})),pe(()=>({addend:()=>i.negate(Qi.value),description:"Oil Smelter",enabled:()=>i.gt(Fi.value,0)})),pe(()=>({addend:()=>i.negate(di.oilCost.value),description:"Oil Refinery",enabled:()=>i.gt(di.activeRefinery.value,0)}))]),Ii=b(()=>Ke.apply(0)),J=ae(()=>[pe(()=>({addend:Ie,description:"Oil Burner",enabled:()=>i.gt(Je.value,0)})),Z(()=>({multiplier:()=>ti.value,description:"Effectiveness",enabled:()=>i.lt(ti.value,1)}))]),z=b(()=>J.apply(0)),Il=ae(()=>[pe(()=>({addend:We.boosts.red1,description:"Red Dye Boost 1",enabled:()=>i.gte(We.dyes.red.amount.value,1)}))]),Tl=b(()=>Il.apply(0)),[rl,fl]=al(()=>[{title:"Coal Consumption",modifier:Vl,unit:"/s",base:0},{title:"Drill Power",modifier:vl,base:0},{title:"Upgrade Bonus",modifier:_e,base:0,visible(){return i.gt(Ti.value,0)}},{title:"Oil Speed",modifier:Ui,unit:"/s",base:0,visible(){return i.gt(ml.value,0)}},{title:"Oil Consumption",modifier:Ke,unit:"/s",base:0,visible(){return i.lt(Ii.value,0)}},{title:"Oil to Coal Substitution",modifier:J,unit:"/s",base:0,visible(){return i.gt(z.value,0)}},{title:"Extra Oil Pumps",modifier:Il,base:0,visible(){return i.gt(Tl.value,0)}}]),el=se(!1),ne=f(()=>t(xi,{modelValue:el.value,"onUpdate:modelValue":L=>el.value=L},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:rl})),Ye=se(i.dOne),ti=se(i.dOne);ui.on("update",L=>{if(i.lt(H.day.value,Hn))return;const ie=i.negate(Wl.value);i.gt(ie,0)?(Ye.value=i.min(i.div($.coal.value,ie),1),$.coal.value=i.sub($.coal.value,i.mul(ie,Ye.value).mul(L))):Ye.value=i.dOne,I.value=i.add(I.value,i.mul(re.value,L)),s.value=i.add(s.value,i.mul(ml.value,L)),d();const dl=i.negate(Ii.value);i.gt(dl,0)?(ti.value=i.min(i.div(s.value,dl),1),s.value=i.sub(s.value,i.mul(dl,ti.value).mul(L)).max(0)):ti.value=i.dOne});const{total:Vi,trackerDisplay:Ul}=Jl({resource:s,goal:25e4,name:e,day:Hn,color:l,modal:{show:el,display:ne}});return{name:e,day:Hn,color:l,oil:s,totalOil:Vi,depth:a,drillProgress:I,activeHeavy:u,buildHeavy:h,activeHeavy2:M,buildHeavy2:Y,activeExtractor:D,buildExtractor:Fe,activePump:U,buildPump:ke,activeBurner:Je,effectiveBurners:yi,buildBurner:B,activeSmelter:Fi,buildSmelter:Ae,extractorCoal:he,extractorOre:Ge,coalEffectiveness:Ye,oilEffectiveness:ti,depthMilestones:Qe,collapsedDepthMilestones:Pi,row1Upgrades:ei,row2Upgrades:ki,row3Upgrades:ol,minWidth:700,oilMilestones:Oi,collapsedOilMilestones:qi,generalTabCollapsed:fl,display:f(()=>{const L=[];return Qe[1].earned.value&&L.push(ei),Oi[1].earned.value&&L.push(ki),W.elfTraining.oilElfTraining.milestones[4].earned.value&&L.push(ol),t(O,null,[Ve(Ul),t(we,null,null),i.lt(Ye.value,1)?t("div",null,[o("Coal efficiency: "),Xe(i.mul(Ye.value,100)),o("%")]):null,i.lt(ti.value,1)?t("div",null,[o("Oil efficiency: "),Xe(i.mul(ti.value,100)),o("%")]):null,t(Hi,{resource:s,color:l,resourceStyle:{textShadow:"grey 0px 0px 10px"},sticky:!0,productionDisplay:f(()=>t(O,null,[i.lt(a.value,1e3)?"Reach 1000m to start gaining oil":t(O,null,[Cn(i.add(ml.value,Ii.value))])]))},null),i.eq(ml.value,0)?t(O,null,[o("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),t("br",null,null)]):"",t(nn,null,{default:()=>[Qe[6].earned.value?t(Bi,null,{default:()=>[Ve(ke),t("div",null,[Me(i.floor(U.value)),o("/"),Me(i.floor(ke.amount.value))]),ai(gi,qe,Pe,Oe)]}):null,Oi[0].earned.value?t(Bi,null,{default:()=>[Ve(B),t("div",null,[Me(i.floor(Je.value)),o("/"),Me(i.floor(B.amount.value))]),ai(fe,hi,mi,$e)]}):null,Oi[2].earned.value?t(Bi,null,{default:()=>[Ve(Ae),t("div",null,[Me(i.floor(Fi.value)),o("/"),Me(i.floor(Ae.amount.value))]),ai(be,ee,k,Be)]}):null]}),t("br",null,null),t("div",null,[t("span",null,[o("The well is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Me(a.value)]),o("m deep"),t("br",null,null),o("Next at "),Xe(i.sub(r.value,I.value))," ",o("drill power seconds")]),t("div",null,[t("span",null,[o("Your drill power is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Xe(re.value)])]),t(we,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[Ve(h),t("div",null,[Me(i.floor(u.value)),o("/"),Me(i.floor(h.amount.value))]),ai(v,x,N,y)]}),Qe[3].earned.value?t(Bi,null,{default:()=>[Ve(Y),t("div",null,[Me(i.floor(M.value)),o("/"),Me(i.floor(Y.amount.value))]),ai(g,E,_,G)]}):null,Qe[5].earned.value?t(Bi,null,{default:()=>[Ve(Fe),t("div",null,[Me(i.floor(D.value)),o("/"),Me(i.floor(Fe.amount.value))]),ai(ce,ve,Re,De)]}):null]}),t(we,null,null),zl(...L),t(we,null,null),si(),i.gte(Vi.value,50)?hl():""])}),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Xe(s.value),o(" "),s.displayName]))}}),Gm="metal",js=7,ci=Ai(Gm,function(){const e="Metal",l="#888B8D",n=ji(0,"metal ingots",void 0,!0),s=Zs(n),a=ji(0,"ore"),I=Zs(a),r=ae(()=>[Z(()=>({multiplier:5,description:"Crucible",enabled:De.bought})),Z(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>i.gte(q.amount.value,1)})),Z(()=>({multiplier:2,description:"Industrial Furnace",enabled:ve.bought})),Z(()=>({multiplier:()=>i.add(gi.value,1),description:"Hotter Forges",enabled:()=>i.gte(Oe.amount.value,1)})),Z(()=>({multiplier:2,description:"Carry metal in boxes",enabled:li.row2Upgrades.metalUpgrade.bought})),Z(()=>({multiplier:We.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(We.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(wi.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:We.upgrades.redDyeUpg.bought})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone2.earned})),Z(()=>({multiplier:()=>i.add(te.buildHeavy.amount.value,1).sqrt(),description:"Joy Level 4",enabled:W.elfTraining.smallfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(W.schools.amount.value,1),description:"Twinkle Level 1",enabled:W.elfTraining.metalElfTraining.milestones[0].earned})),ll(()=>({exponent:1.1,description:"Mary Level 2",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),d=b(()=>r.apply(.1)),u=ae(()=>[pe(()=>({addend:()=>i.times(q.amount.value,10),description:"Industrial Crucibles",enabled:()=>i.gte(q.amount.value,1)})),ll(()=>({exponent:1.1,description:"Joy Level 5",enabled:W.elfTraining.smallfireElfTraining.milestones[4].earned})),ll(()=>({exponent:1.1,description:"Faith Level 5",enabled:W.elfTraining.bonfireElfTraining.milestones[4].earned})),ll(()=>({exponent:1.1,description:"Snowball Level 5",enabled:W.elfTraining.kilnElfTraining.milestones[4].earned})),Z(()=>({multiplier:2,description:"Efficient Crucibles",enabled:$.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.mul(te.activeSmelter.value,te.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>i.gt(te.activeSmelter.value,0)})),Z(()=>({multiplier:We.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(We.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(di.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:We.upgrades.redDyeUpg2.bought})),Z(()=>({multiplier:()=>i.div(W.totalElfExp.value,1e3).add(1).sqrt(),description:"Mary Level 5",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[4].earned})),Z(()=>({multiplier:()=>i.pow(1.25,W.elfTraining.metalElfTraining.level.value),description:"Twinkle Level 2",enabled:W.elfTraining.metalElfTraining.milestones[1].earned})),Z(()=>({multiplier:()=>i.add(We.dyes.red.amount.value,We.dyes.blue.amount.value).add(We.dyes.yellow.amount.value).add(1).log10(),description:"The Ultimate Metal Dye",enabled:te.row3Upgrades[4].bought}))]),c=b(()=>u.apply(0)),j=ae(()=>[Z(()=>({multiplier:3,description:"Efficient Crucibles",enabled:$.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.add(te.effectiveBurners.value,1).mul(te.oilEffectiveness.value),description:"Blaster Burner",enabled:te.row2Upgrades[2].bought})),Z(()=>({multiplier:3,description:"Twinkle Level 3",enabled:W.elfTraining.metalElfTraining.milestones[2].earned}))]),h=b(()=>j.apply(1)),v=1e10,y=b(()=>i.min(a.value,i.div($.coal.value,v)).floor().max(0)),N=Ei(()=>({display:f(()=>{const A=i.gte(y.value,1)?y.value:i.add(y.value,1);return t(O,null,[t("span",{style:"font-size: large"},[o("Smelt "),Xe(i.times(y.value,d.value))," ",n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),Me(A),o(" "),a.displayName,o(";")," ",Me(i.times(A,v)),o(" "),$.coal.displayName])])}),canClick:()=>i.gte(y.value,1),onClick(){!m(this.canClick)||x(y.value)},style:{width:"600px",minHeight:"unset"}}));function x(A,B=1){const[$e,fe,mi]=[i.times(A,d.value).times(B),A,i.times(A,v)];n.value=i.add(n.value,$e),a.value=i.sub(a.value,fe),$.coal.value=i.sub($.coal.value,mi)}const M=ae(()=>[pe(()=>({addend:()=>oe.amount.value,description:"Metal Drills",enabled:()=>i.gte(oe.amount.value,1)})),Z(()=>({multiplier:()=>i.mul(te.depth.value,.05).add(1),description:"25m Well Depth",enabled:te.depthMilestones[2].earned})),Z(()=>({multiplier:te.extractorOre,description:"Heavy Extractor",enabled:()=>i.gt(te.activeExtractor.value,0)})),Z(()=>({multiplier:2,description:"Carry ore in boxes",enabled:li.row2Upgrades.oreUpgrade.bought}))]),le=b(()=>M.apply(1)),Y=ae(()=>[Z(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Fe.bought})),Z(()=>({multiplier:2,description:"Double Pickaxe",enabled:ce.bought})),Z(()=>({multiplier:2.5,description:"Metal Drills",enabled:()=>i.gte(oe.amount.value,1)})),Z(()=>({multiplier:2,description:"Efficient Drills",enabled:U.bought})),Z(()=>({multiplier:2,description:"Oil the Metal Drills",enabled:te.row2Upgrades[1].bought}))]),g=b(()=>Y.apply(i.recip(_))),G=Se(0),_=10,E=tl(()=>({width:400,height:25,direction:Ue.Right,fillStyle:{backgroundColor:l},progress:()=>G.value})),D=ae(()=>[pe(()=>({addend:le})),Z(()=>({multiplier:g}))]),Ze=b(()=>D.apply(0)),he=ae(()=>[pe(()=>({addend:Ze})),pe(()=>({addend:()=>i.negate(c.value),enabled:ke}))]),Ge=b(()=>he.apply(0)),Fe=T(()=>({resource:Q(n),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

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

Halve the time to mine ore, again"},visibility:()=>p(ce.bought.value)})),De=T(()=>({resource:Q(n),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>p(De.bought.value||i.div(I.value,d.value).plus(s.value).gte(1))})),Re=T(()=>({resource:Q(n),cost:0,display:{title:"Coal Drilling",description:"These metal drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>p(i.gte(oe.amount.value,1)&&(Re.bought.value||H.days[7].opened.value||i.lt($.computedCoalGain.value,i.times(le.value,g.value).times(v)))),onPurchase(){H.days[2].recentlyUpdated.value=!0}})),ve=T(()=>({canAfford(){return i.gte(n.value,50)&&i.gte($.coal.value,1e11)},onPurchase(){n.value=i.sub(n.value,50),$.coal.value=i.sub($.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 + `)}]})},a={christmas1:b(()=>i.add(s.christmas.buyable.amount.value,1)),rainbow1:b(()=>i.pow(2,s.rainbow.buyable.amount.value)),jazzy1:b(()=>i.ln(i.add(i.ln(i.add(s.jazzy.buyable.amount.value,1)),1))),sunshine1:b(()=>i.add(s.sunshine.buyable.amount.value,1)),ocean1:b(()=>i.pow(1.5,s.ocean.buyable.amount.value)),beach1:b(()=>i.add(s.beach.buyable.amount.value,1))},I=ji(b(()=>Object.values(s).map(E=>E.buyable.amount.value).reduce(i.add,0)),"Total Wrapping Paper"),r=se(!1),d=f(()=>t(xi,{modelValue:r.value,"onUpdate:modelValue":E=>r.value=E},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:u})),[u,c]=al(()=>[]),{total:j,trackerDisplay:h}=Jl({resource:I,goal:1e20,name:e,day:Om,color:l,textColor:"var(--feature-foreground)",modal:{show:r,display:d},ignoreTotal:!0}),v=[6,12,18,24,30,36],y=X(()=>({display:{requirement:v[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>i.gte(j.value,v[0]),visibility:()=>p(!0)})),N=X(()=>({display:{requirement:v[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>i.gte(j.value,v[1]),visibility:()=>p(y.earned.value)})),x=X(()=>({display:{requirement:v[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>i.gte(j.value,v[2]),visibility:()=>p(N.earned.value)})),M=X(()=>({display:{requirement:v[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>i.gte(j.value,v[3]),visibility:()=>p(x.earned.value)})),le=X(()=>({display:{requirement:v[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>i.gte(j.value,v[4]),visibility:()=>p(M.earned.value)})),Y=X(()=>({display:{requirement:v[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>i.gte(j.value,v[5]),visibility:()=>p(le.earned.value)})),g={primaryBoost:y,secondaryBoost:N,buyMaxPrimary:x,secondaryNoReset:M,buyMaxSecondary:le,unlockDyeElf:Y},{collapseMilestones:G,display:_}=sn(g);return{name:e,display:f(()=>t("div",{style:"width: 620px"},[Ve(h),t(Hi,{resource:I},null),ai(s.christmas.display,s.rainbow.display,s.jazzy.display),ai(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(we,null,null),ai(s.sunshine.display,s.ocean.display,s.beach.display),ai(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(we,null,null),o("button goes here"),t(we,null,null),_()])),wrappingPaper:s,totalWrappingPaper:j,generalTabCollapsed:c,boosts:a,milestones:g,collapseMilestones:G}}),Ym="paper",Rn=5,F=Ai(Ym,function(){const e="Paper",l="#E8DCB8",n=ji(0,"paper"),s=ji(b(()=>i.min(i.div(ye.logs.value,1e9),i.div($.ash.value,Oe.value))),"pulp"),a=Ks(()=>({scaling:es(1,1.2),baseResource:s,gainResource:Q(n),roundUpCost:!0,spend(Ie,A){ye.logs.value=i.sub(ye.logs.value,i.times(A,1e9)),$.ash.value=i.sub($.ash.value,i.times(A,Oe.value))},gainModifier:q})),I=Ei(()=>({display:f(()=>{const Ie=i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),yn(ye.logs,Ie),o(" "),s.displayName,o(" ("),me(i.times(Ie,1e9)),o(" "),ye.logs.displayName,o(";")," ",me(i.times(Ie,Oe.value))," ",$.ash.displayName,o(")")])])}),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function r(Ie){const A=He(()=>({...Ie,display:{title:Ie.name,description:`Print a copy of "${Ie.name}", which ${Ie.elfName} will use to improve their skills! Each copy printed will reduce the "${Ie.buyableName}" price scaling by 0.95x and make ${Ie.elfName} purchase +10% faster!`,effectDisplay:f(()=>t(O,null,[En(i.pow(.95,A.totalAmount.value)),o("x price scaling,")," ",P(i.div(A.totalAmount.value,10).add(1)),o("x auto-purchase speed")])),showAmount:!1},resource:Q(n),cost(){let B=A.amount.value;Ie.elfName==="Star"&&i.gte(B,10)&&(B=i.pow(10,i.div(B,10))),(Ie.elfName==="Star"||Ie.elfName==="Bell")&&(B=i.pow(B,2)),i.gte(B,100)&&(B=i.pow(B,2).div(100)),i.gte(B,1e4)&&(B=i.pow(B,2).div(1e4)),B=i.pow(.95,M.totalAmount.value).times(B);let $e=5;W.elfTraining.paperElfTraining.milestones[2].earned.value&&$e--;let fe=i.pow($e,B).times(10);return W.elfTraining.paperElfTraining.milestones[0].earned.value&&(fe=i.div(fe,he.value.max(1))),ve.bought.value&&(fe=fe.div(10)),fe},inverseCost(B){ve.bought.value&&(B=i.mul(B,10)),W.elfTraining.paperElfTraining.milestones[0].earned.value&&(B=i.mul(B,he.value.max(1)));let $e=5;W.elfTraining.paperElfTraining.milestones[2].earned.value&&$e--;let fe=i.div(B,10).log($e);return fe=fe.div(i.pow(.95,M.totalAmount.value)),i.gte(fe,1e4)&&(fe=i.mul(fe,1e4).root(2)),i.gte(fe,100)&&(fe=i.mul(fe,100).root(2)),(Ie.elfName==="Star"||Ie.elfName==="Bell")&&(fe=i.root(fe,2)),Ie.elfName==="Star"&&i.gte(fe,10)&&(fe=fe.log10().mul(10)),i.isNaN(fe)?i.dZero:fe.floor().max(0)},style:"width: 600px",freeLevels:b(()=>W.elfTraining.paperElfTraining.milestones[4].earned.value?i.times(5,W.level5Elves.value):0),totalAmount:b(()=>i.add(A.amount.value,A.freeLevels.value))}));return A}const d=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),u=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),c=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),j=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),v=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),y=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>p(ze.elves.smallFireElf.bought.value)}),N=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>p(ze.elves.bonfireElf.bought.value)}),x=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>p(ze.elves.kilnElf.bought.value)}),M=r({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>p(ze.elves.paperElf.bought.value)}),le=r({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>p(ze.elves.boxElf.bought.value)}),Y=r({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>p(ze.elves.clothElf.bought.value)}),g=r({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Coal Drill",visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[3].earned.value)}),G=r({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>p(W.elfTraining.fertilizerElfTraining.milestones[4].earned.value)}),_=r({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>p(W.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)}),E=r({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[4].earned.value)}),D=r({name:"Arts and Crafts",elfName:"Carol",buyableName:"Dye Buyables",visibility:()=>p(ze.elves.dyeElf.bought.value)}),Ze={cuttersBook:d,plantersBook:u,expandersBook:c,heatedCuttersBook:j,heatedPlantersBook:h,fertilizerBook:v,smallFireBook:y,bonfireBook:N,kilnBook:x,paperBook:M,boxBook:le,clothBook:Y,coalDrillBook:g,heavyDrillBook:G,oilBook:_,metalBook:E,dyeBook:D},he=b(()=>Object.values(Ze).reduce((Ie,A)=>Ie.add(A.amount.value),new i(0))),Ge=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),Fe=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ce=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(di.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),De={clothUpgrade:Ge,drillingUpgrade:Fe,oilUpgrade:ce},Re=T(()=>({resource:Q(n),cost:1e36,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Paper Burning",description:"Paper adds to ash gain after all other modifiers"}})),ve=T(()=>({resource:Q(n),cost:1e40,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Book Cheapener",description:"Books are less expensive"}})),U=T(()=>({resource:Q(n),cost:1e44,visibility:()=>p(W.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Classroom Supplies",description:"Classrooms' effect is raised to the 1.1"}})),oe={ashUpgrade:Re,bookUpgrade:ve,classroomUpgrade:U},q=ae(()=>[Z(()=>({multiplier:2,description:"Scholar's shoes",enabled:wi.paperUpgrades.paperUpgrade1.bought})),Z(()=>({multiplier:2,description:"Scholar's slacks",enabled:wi.paperUpgrades.paperUpgrade2.bought})),Z(()=>({multiplier:2,description:"Scholar's jacket",enabled:wi.paperUpgrades.paperUpgrade3.bought})),Z(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:wi.paperUpgrades.paperUpgrade4.bought})),Z(()=>({multiplier:We.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(We.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:Wi.boosts.sunshine1,description:"Sunshine Wrapping Paper",enabled:()=>i.gte(Wi.boosts.sunshine1.value,2)}))]),ke=ae(()=>[Z(()=>({multiplier:.1,description:"Star Level 2",enabled:W.elfTraining.paperElfTraining.milestones[1].earned}))]),Oe=b(()=>ke.apply(1e6)),[gi,Pe]=al(()=>[{title:"Paper Gain",modifier:q,base:1},{title:"Ash Cost",modifier:ke,base:1e6,unit:" ash/pulp"}]),qe=se(!1),Je=f(()=>t(xi,{modelValue:qe.value,"onUpdate:modelValue":Ie=>qe.value=Ie},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:gi}));ui.on("update",Ie=>{i.lt(H.day.value,Rn)||(n.value=i.times(Ie,di.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(n.value))});const{total:yi,trackerDisplay:Ee}=Jl({resource:n,goal:5e3,name:e,day:Rn,color:l,textColor:"var(--feature-foreground)",modal:{show:qe,display:Je}});return{name:e,day:Rn,color:l,paper:n,totalPaper:yi,paperConversion:a,books:Ze,upgrades:De,upgrades2:oe,generalTabCollapsed:Pe,minWidth:700,display:f(()=>t(O,null,[Ve(Ee),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(we,null,null),Ve(I),t(we,null,null),ai(...Object.values(De)),t(we,null,null),sl(...Object.values(Ze))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}}),Nm="trees",Vs=1,Ws=.1,ye=Ai(Nm,function(){const e="Trees",l="#4BDC13",n="green",s=ji(0,"logs"),a=ji(0,"saplings"),I=se(0),r=se(0),d=se(0),u=ae(()=>[pe(()=>({addend:()=>i.times(he.amount.value,10),description:"Expand Forest",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,2),description:"75% Foundation Completed",enabled:ri.milestones.morePlantsMilestone1.earned})),Z(()=>({multiplier:2,description:"5 Elves Trained",enabled:ze.milestones[4].earned})),Z(()=>({multiplier:2,description:"8 Elves Trained",enabled:ze.milestones[7].earned})),Z(()=>({multiplier:4,description:"Lumberjack Boots",enabled:wi.treesUpgrades.treesUpgrade1.bought})),pe(()=>({addend:We.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>i.gte(We.dyes.blue.amount.value,1)})),pe(()=>({addend:()=>i.pow(ce.value,.99),description:"Hope Level 1",enabled:W.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=ji(b(()=>i.sub(u.apply(10),a.value)),"trees"),j=b(()=>u.apply(10)),h=T(()=>({resource:Q(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),v=T(()=>({resource:Q(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),y=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),N=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),x=T(()=>({resource:Q(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),M=[h,v,y,N,x],le=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),Y=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),g=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),G=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),_=T(()=>({resource:Q(s),cost:300,visibility:()=>p(x.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),E=[le,Y,g,G,_],D=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,1e4).div(i.pow(2e30,9999))),k=i.pow(.95,F.books.cuttersBook.totalAmount.value).times(k),i.times(100,k).add(200)},inverseCost(k){let ee=i.sub(k,200).div(100);return ee=ee.div(i.pow(.95,F.books.cuttersBook.totalAmount.value)),i.gte(ee,2e30)&&(ee=i.mul(ee,i.pow(2e30,9999)).root(1e4)),i.gte(ee,2e6)&&(ee=i.mul(ee,2e6).root(2)),i.gte(ee,200)&&(ee=i.mul(ee,200).root(2)),i.gte(ee,50)&&(ee=i.mul(ee,50).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>p(_.bought.value)})),Ze=He(()=>({resource:Q(s),cost(){let k=this.amount.value;i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,1e4).div(i.pow(2e30,9999))),k=i.pow(.95,F.books.plantersBook.totalAmount.value).times(k);let ee=i.times(100,k).add(200);return W.elfTraining.planterElfTraining.milestones[3].earned.value&&(ee=i.div(ee,10)),ee},inverseCost(k){W.elfTraining.planterElfTraining.milestones[3].earned.value&&(k=i.mul(k,10));let ee=i.sub(k,200).div(100);return ee=ee.div(i.pow(.95,F.books.plantersBook.totalAmount.value)),i.gte(ee,2e30)&&(ee=i.mul(ee,i.pow(2e30,9999)).root(1e4)),i.gte(ee,2e6)&&(ee=i.mul(ee,2e6).root(2)),i.gte(ee,200)&&(ee=i.mul(ee,200).root(2)),i.gte(ee,50)&&(ee=i.mul(ee,50).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>p(_.bought.value)})),he=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,100)&&(k=i.pow(k,2).div(100)),i.gte(k,1e5)&&(k=i.pow(k,2).div(1e5)),i.gte(k,1e15)&&(k=i.pow(k,10).div(1e135)),k=i.pow(.95,F.books.expandersBook.totalAmount.value).times(k),i.pow(i.add(k,1),1.5).times(500)},inverseCost(k){let ee=i.div(k,500).root(1.5).sub(1);return ee=ee.div(i.pow(.95,F.books.expandersBook.totalAmount.value)),i.gte(ee,1e15)&&(ee=i.mul(ee,1e135).root(10)),i.gte(ee,1e5)&&(ee=i.mul(ee,1e5).root(2)),i.gte(ee,100)&&(ee=i.mul(ee,100).root(2)),i.isNaN(ee)?i.dZero:ee.floor().max(0)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>p(_.bought.value)})),Ge=[D,Ze,he],Fe=ae(()=>[pe(()=>({addend:1,description:"Wooden Fingers",enabled:h.bought})),pe(()=>({addend:U,description:"Smart Knives",enabled:g.bought}))]),ce=b(()=>Fe.apply(1)),De=ae(()=>[Z(()=>({multiplier:.5,description:"Sharper Fingers",enabled:le.bought})),Z(()=>({multiplier:()=>i.pow(.5,ze.totalElves.value),description:"1 Elf Trained",enabled:ze.milestones[0].earned}))]),Re=b(()=>De.apply(1)),ve=ae(()=>[pe(()=>({addend:1,description:"Automated Knives",enabled:y.bought})),pe(()=>({addend:D.amount,description:"Generic Cutters",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:ri.milestones.autoCutMilestone1.earned})),Z(()=>({multiplier:2,description:"30% Foundation Completed",enabled:ri.milestones.autoCutMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Cutters",enabled:$.warmerCutters.bought})),Z(()=>({multiplier:$.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>i.gt($.heatedCutters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:wi.treesUpgrades.treesUpgrade2.bought})),Z(()=>({multiplier:()=>i.pow(1.1,H.day.value),description:"Holly Level 4",enabled:W.elfTraining.cutterElfTraining.milestones[3].earned})),pe(()=>({addend:()=>i.sub(d.value,r.value).max(0),description:"Ivy Level 5",enabled:W.elfTraining.planterElfTraining.milestones[4].earned}))]),U=b(()=>ve.apply(0)),oe=ae(()=>[pe(()=>({addend:1,description:"Leafy Fingers",enabled:v.bought})),pe(()=>({addend:Pe,description:"Smart Spades",enabled:G.bought}))]),q=b(()=>oe.apply(1)),ke=ae(()=>[Z(()=>({multiplier:.5,description:"Greener Fingers",enabled:Y.bought})),Z(()=>({multiplier:()=>i.pow(.5,ze.totalElves.value),description:"1 Elf Trained",enabled:ze.milestones[0].earned}))]),Oe=b(()=>ke.apply(1)),gi=ae(()=>[pe(()=>({addend:1,description:"Automated Spade",enabled:N.bought})),pe(()=>({addend:()=>i.div(Ze.amount.value,2),description:"Generic Planters",enabled:_.bought})),pe(()=>({addend:()=>i.div(ri.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:ri.milestones.autoPlantMilestone1.earned})),Z(()=>({multiplier:2,description:"40% Foundation Completed",enabled:ri.milestones.autoPlantMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Planters",enabled:$.warmerPlanters.bought})),Z(()=>({multiplier:$.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>i.gt($.heatedPlanters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:wi.treesUpgrades.treesUpgrade3.bought})),Z(()=>({multiplier:2,description:"Ivy Level 1",enabled:W.elfTraining.planterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:W.elfTraining.planterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"Mary Level 4",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),pe(()=>({addend:()=>i.sub(r.value,d.value).max(0),description:"Ivy Level 5",enabled:W.elfTraining.planterElfTraining.milestones[4].earned}))]),Pe=b(()=>gi.apply(0)),qe=ae(()=>[Z(()=>({multiplier:1.25,description:"Research I",enabled:x.bought})),Z(()=>({multiplier:1.25,description:"Research II",enabled:_.bought})),Z(()=>({multiplier:()=>ri.milestones.extraExpansionMilestone1.earned.value?i.pow(1.02,ri.foundationProgress.value):i.div(ri.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:ri.milestones.logGainMilestone1.earned})),Z(()=>({multiplier:2,description:"50% Foundation Completed",enabled:ri.milestones.logGainMilestone2.earned})),Z(()=>({multiplier:1.25,description:"Ashy Soil",enabled:$.basicFertilizer.bought})),Z(()=>({multiplier:$.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>i.gt($.moreFertilizer.amount.value,0)})),Z(()=>({multiplier:2,description:"4 Elves Trained",enabled:ze.milestones[3].earned})),Z(()=>({multiplier:2,description:"Carry logs in boxes",enabled:li.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:()=>i.div(li.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:li.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:wi.treesUpgrades.treesUpgrade4.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:We.upgrades.blueDyeUpg.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).root(9)),description:"Holly Level 1",enabled:W.elfTraining.cutterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.sqrt(W.totalElfLevels.value),description:"Noel Level 1",enabled:W.elfTraining.fertilizerElfTraining.milestones[0].earned})),Z(()=>({multiplier:Wi.boosts.christmas1,description:"Christmas Wrapping Paper",enabled:b(()=>i.gt(Wi.boosts.christmas1.value,1))})),ll(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:ri.milestones.logGainMilestone3.earned}))]),Je=Se(0),yi=tl(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Je.value,Re.value)})),Ee=Ei(()=>({display:{title:"Cut trees",description:f(()=>t(O,null,[o("Cut down up to "),me(i.floor(ce.value))," ",o("tree"),i.eq(ce.value,1)?"":"s",o(" at once!"),t("br",null,null),Ve(yi)]))},style:{minHeight:"80px"},canClick:()=>i.gte(c.value,1)&&i.gte(Je.value,Re.value),onClick(){if(i.lt(Je.value,Re.value))return;const k=i.floor(i.min(c.value,i.times(ce.value,i.div(Je.value,Re.value).floor())));s.value=i.add(s.value,i.times(qe.apply(1),k)),a.value=i.add(a.value,k),Je.value=0}})),Ie=Se(0),A=tl(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Ie.value,Oe.value)})),B=Ei(()=>({display:{title:"Plant trees",description:f(()=>t(O,null,[o("Plant up to "),me(i.floor(q.value))," ",o("tree"),i.eq(q.value,1)?"":"s",o(" at once!"),t("br",null,null),Ve(A)]))},style:{minHeight:"80px"},canClick:()=>i.gte(a.value,1)&&i.gte(Ie.value,Oe.value),onClick(){if(i.lt(Ie.value,Oe.value))return;const k=i.floor(i.min(a.value,i.times(q.value,i.div(Ie.value,Oe.value).floor())));a.value=i.sub(a.value,k),Ie.value=0}})),[$e,fe]=al(()=>[{title:"Logs per Tree",modifier:qe,base:1,visible:x.bought},{title:"Manual Cutting Amount",modifier:Fe,base:1,visible:h.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:De,base:1,visible:h.bought,unit:"s"},{title:"Manual Planting Amount",modifier:oe,base:1,visible:v.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:ke,base:1,visible:v.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:ve,base:0,visible:y.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:gi,base:0,visible:N.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:_.bought}]),mi=se(!1),hi=f(()=>t(xi,{modelValue:mi.value,"onUpdate:modelValue":k=>mi.value=k},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:$e}));ui.on("update",k=>{if(i.lt(H.day.value,Vs))return;i.gte(Je.value,Re.value)?Je.value=Re.value:(Je.value=i.add(Je.value,k),Ee.isHolding.value&&Ee.onClick()),i.gte(Ie.value,Oe.value)?Ie.value=Oe.value:(Ie.value=i.add(Ie.value,k),B.isHolding.value&&B.onClick());const ee=i.sub(Pe.value,i.sub(r.value,d.value).max(0)),Qe=i.sub(U.value,i.sub(d.value,r.value).max(0));d.value=ee,r.value=Qe;const Pi=i.min(c.value,i.times(U.value,k)),si=i.mul(qe.apply(1),Pi),Oi=i.div(si,k);I.value=i.mul(Oi,Ws).add(i.mul(I.value,i.dOne.sub(Ws))),s.value=i.add(s.value,si),a.value=i.add(a.value,Pi);const qi=i.min(a.value,i.times(Pe.value,k));a.value=i.sub(a.value,qi)});const Fi=b(()=>i.sub(U.value,Pe.value)),Qi=b(()=>i.sub(Pe.value,U.value)),Zi=en(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Ee.canClick.value&&Ee.onClick()}})),Ae=en(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{B.canClick.value&&B.onClick()}})),{total:Be,trackerDisplay:be}=Jl({resource:s,goal:1e4,name:e,day:Vs,color:n,modal:{show:mi,display:hi}});return{name:e,color:l,logs:s,totalLogs:Be,trees:c,saplings:a,cutTree:Ee,plantTree:B,cutTreeHK:Zi,plantTreeHK:Ae,row1Upgrades:M,row2Upgrades:E,row1Buyables:Ge,manualCutProgress:Je,manualPlantProgress:Ie,generalTabCollapsed:fe,computedAutoCuttingAmount:U,minWidth:700,display:f(()=>t(O,null,[Ve(be),t(we,null,null),t(Hi,{resource:s,color:l,style:"margin-bottom: 0",productionDisplay:i.gt(U.value,0)?`+${P(I.value)}/s average
equilibrium: +${zs([[U.value,"cutting speed"],[Pe.value,"planting speed"],[i.mul(j.value,20),"forest cap"]],"/s",qe.apply(1))}`:void 0},null),t(Hi,{resource:a,color:n,style:"margin-bottom: 0",productionDisplay:Cn(Fi.value)},null),t(Hi,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:Cn(Qi.value)},null),t(we,null,null),ai(Ee,B),t("div",null,[o("Tip: You can hold down on actions to perform them automatically")]),t(we,null,null),zl(M,E),t(we,null,null),ai(...Ge)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(s.value),o(" "),s.displayName]))}}),Xm="workshop",on=2,ri=Ai(Xm,function(){const e="Workshop",l="#D66B02",n="#D66B02",s=ji(0,"foundation progress"),a=Eo(()=>({scaling:ps(ps(es(250,1.5),5387,1/1e10),1e20,3e8),baseResource:ye.logs,gainResource:Q(s),roundUpCost:!0,spend(he,Ge){ye.logs.value=i.sub(ye.logs.value,Ge)},costModifier:ae(()=>[Z(()=>({multiplier:b(()=>Wi.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>i.gt(Wi.boosts.beach1.value,1))})),ll(()=>({exponent:1/.99,description:"Holly Level 5",enabled:W.elfTraining.cutterElfTraining.milestones[4].earned}))])})),I=Ei(()=>({display:f(()=>t(O,null,[t("b",{style:"font-size: x-large"},[o("Build "),me(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",yn(ye.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",ye.logs.displayName])])),visibility:()=>p(i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>i.gte(ye.logs.value,a.currentAt.value)&&(i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=en(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{I.canClick.value&&I.onClick()}})),d=b(()=>!ze.milestones[6].earned.value),u=X(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>i.gte(s.value,1),showPopups:d})),c=X(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>i.gte(s.value,10),visibility:()=>p(u.earned.value),showPopups:d})),j=X(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>i.gte(s.value,20),visibility:()=>p(c.earned.value),showPopups:d})),h=X(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>i.gte(s.value,30),visibility:()=>p(j.earned.value),showPopups:d})),v=X(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>i.gte(s.value,40),visibility:()=>p(h.earned.value),showPopups:d})),y=X(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(s.value,50),visibility:()=>p(v.earned.value),showPopups:d})),N=X(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>i.gte(s.value,75),visibility:()=>p(y.earned.value),showPopups:d})),x=X(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>i.gte(s.value,100),visibility:()=>p(N.earned.value),showPopups:d})),M=X(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>i.gte(s.value,200),visibility:()=>p(x.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),le=X(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,400),visibility:()=>p(M.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),Y=X(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,600),visibility:()=>p(le.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),g=X(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,800),visibility:()=>p(Y.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),G=X(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>i.gte(s.value,1e3),visibility:()=>p(g.earned.value&&W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),_={logGainMilestone1:u,autoCutMilestone1:c,autoPlantMilestone1:j,autoCutMilestone2:h,autoPlantMilestone2:v,logGainMilestone2:y,morePlantsMilestone1:N,logGainMilestone3:x,extraExpansionMilestone1:M,extraExpansionMilestone2:le,extraExpansionMilestone3:Y,extraExpansionMilestone4:g,extraExpansionMilestone5:G},{collapseMilestones:E,display:D}=sn(_),Ze=tl(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>H.day.value===on?i.div(s.value,100):1,display:f(()=>H.day.value===on?t(O,null,[me(s.value),o("%")]):"")}));return Di(()=>{H.day.value===on&&i.gte(s.value,100)&&H.completeDay()}),{name:e,day:on,color:l,foundationProgress:s,foundationConversion:a,milestones:_,collapseMilestones:E,minWidth:700,buildFoundationHK:r,display:f(()=>t(O,null,[t("div",null,[H.day.value===on?"Complete the foundation to complete the day":`${e} Complete!`]),Ve(Ze),t(we,null,null),t("div",null,[t("span",null,[o("The foundation is ")]),t("h2",{style:`color: ${l}; text-shadow: 0 0 10px ${l}`},[me(s.value)]),o("% completed")]),i.lt(s.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value?t(we,null,null):null,Ve(I),t(we,null,null),D()])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(s.value),o(" "),s.displayName]))}}),Mm="plastic",vs=10,di=Ai(Mm,function(){const e="Plastic",l="#DCD9CD",n=ji(0,"plastic"),[s,a]=al(()=>[{title:"Plastic Gain",modifier:Fe,base:0}]),I=se(!1),r=f(()=>t(xi,{modelValue:I.value,"onUpdate:modelValue":ve=>I.value=ve},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:s})),d=Se(0),u=b(()=>i.times(d.value,100).times(W.elfTraining.oilElfTraining.milestones[3].earned.value?5:1)),c=He(()=>({resource:ci.metal,cost(){const ve=new i(this.amount.value);let U=i.pow(1.2,ve).times(1e7);return W.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(U=i.sub(U,i.pow(n.value,2)).max(0)),U},display:f(()=>t(O,null,[t("h3",null,[o("Refinery")]),t("br",null,null),o("Refines oil into plastic pellets"),t("br",null,null),o("Consumes 100 oil/s to create 1 plastic/s"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),P(u.value),o(" oil/sec"),t("br",null,null),o("+"),P(d.value),o(" plastic/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(c.cost))," ",c.resource.displayName])),onPurchase(){d.value=i.add(d.value,1)},style:{width:"300px"}})),{min:j,max:h,add:v,remove:y}=cl({buyable:c,active:d,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),N=b(()=>i.pow(5,i.add([...Object.values(Y),...Object.values(E)].filter(ve=>ve.bought.value).length,2))),x=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!x.bought.value})})),M=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!M.bought.value})})),le=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!le.bought.value})})),Y={paperTools:x,boxTools:M,clothTools:le},g=T(()=>({resource:Q(n),cost:N,visibility:()=>p(x.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!g.bought.value})})),G=T(()=>({resource:Q(n),cost:N,visibility:()=>p(M.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!G.bought.value})})),_=T(()=>({resource:Q(n),cost:N,visibility:()=>p(le.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!_.bought.value})})),E={paperElf:g,boxElf:G,clothElf:_},D=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(g.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:f(()=>t(O,null,[me(D.amount.value),o("%")])),showAmount:!1}})),Ze=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(G.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:f(()=>t(O,null,[me(Ze.amount.value),o("%")])),showAmount:!1}})),he=He(()=>({resource:Q(n),cost(){const ve=this.amount.value;return i.pow(1.3,ve).times(100)},visibility:()=>p(_.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:f(()=>t(O,null,[me(i.times(he.amount.value,10)),o("%")])),showAmount:!1}})),Ge={passivePaper:D,passiveBoxes:Ze,clothGains:he},Fe=ae(()=>[pe(()=>({addend:()=>W.elfTraining.oilElfTraining.milestones[3].earned.value?i.times(d.value,5):d.value,description:"Oil Refinery",enabled:()=>i.gt(d.value,0)})),Z(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:g.bought})),Z(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:G.bought})),Z(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:_.bought})),Z(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:li.row2Upgrades.plasticUpgrade.bought})),Z(()=>({multiplier:()=>te.oilEffectiveness.value,description:"Effectiveness",enabled:()=>i.lt(te.oilEffectiveness.value,1)})),Z(()=>({multiplier:We.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(We.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone4.earned})),Z(()=>({multiplier:()=>i.add(te.buildExtractor.amount.value,1),description:"Snowball Level 4",enabled:W.elfTraining.kilnElfTraining.milestones[3].earned}))]),ce=b(()=>Fe.apply(0));ui.on("update",ve=>{i.lt(H.day.value,vs)||(n.value=i.times(ve,ce.value).add(n.value))});const{total:De,trackerDisplay:Re}=Jl({resource:n,goal:25e4,name:e,day:vs,color:l,textColor:"var(--feature-foreground)",modal:{show:I,display:r}});return{name:e,color:l,plastic:n,totalPlastic:De,buildRefinery:c,activeRefinery:d,oilCost:u,upgrades:Y,elfUpgrades:E,buyables:Ge,generalTabCollapsed:a,minWidth:700,display:f(()=>t(O,null,[Ve(Re),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0",effectDisplay:i.gt(ce.value,0)?`+${P(ce.value)}/s`:void 0},null),t(we,null,null),t(Bi,null,{default:()=>[Ve(c),t("div",null,[me(i.floor(d.value)),o("/"),me(i.floor(c.amount.value))]),ai(j,y,v,h)]}),t(nn,null,{default:()=>[sl(x,g,D),sl(M,G,Ze),sl(le,_,he)]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}}),xm="oil",Hn=9,te=Ai(xm,function(){const e="Oil",l="#000000",n="var(--foreground)",s=ji(0,"oil"),a=ji(0,"depth"),I=Se(0),r=b(()=>i.lt(a.value,990)?i.add(10,a.value):i.pow(1.001,i.sub(a.value,990)).mul(1e3));function d(){if(i.lt(a.value,990)){const L=i.min(i.affordArithmeticSeries(I.value,10,1,a.value),i.sub(990,a.value)),ie=i.sumArithmeticSeries(L,10,1,a.value);I.value=i.sub(I.value,ie),a.value=i.add(a.value,L)}if(i.gte(a.value,990)){const L=i.affordGeometricSeries(I.value,1e3,1.001,i.sub(a.value,990)),ie=i.sumGeometricSeries(L,1e3,1.001,i.sub(a.value,990));I.value=i.sub(I.value,ie),a.value=i.add(a.value,L)}}const u=Se(0),c=b(()=>i.times(i.pow(u.value,le.value).pow(W.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2),1e14)),j=b(()=>i.times(i.pow(u.value,le.value),1)),h=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(1.3,L).times(25e3)},inverseCost(L){let ie=i.div(L,25e3).log(1.3);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill")]),t("br",null,null),o("A large drill specialized at deep mining."),t("br",null,null),o("Consumes 1e14*(Heavy Drills amount)"),t("sup",null,[W.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2])," ",o("coal/sec for (Heavy Drills amount) drill power."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(c.value),o(" coal/sec"),t("br",null,null),o("+"),Xe(j.value),o(" drill power"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(h.cost)),o(" "),h.resource.displayName])),onPurchase(){u.value=i.add(u.value,1)},style:{color:n,width:"160px"}})),{min:v,max:y,add:N,remove:x}=cl({buyable:h,active:u}),M=Se(0),le=b(()=>{let L=i.add(M.value,Math.E);return W.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?L=L.log(2.5):L=L.ln(),L}),Y=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,50)&&(L=i.pow(L,4).div(50**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(2,L).times(1e5)},inverseCost(L){let ie=i.div(L,1e5).log(2);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,50)&&(ie=i.mul(ie,50**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill Drill")]),t("br",null,null),o("Attach extra drills to Heavy Drills to make them faster"),t("br",null,null),o("Raise amount of effective Heavy Drills by ^"),W.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?t(O,null,[o("log"),t("sub",null,[o("2.5")])]):t(O,null,[o("ln")]),o("(Heavy Drill Drill amount + e)."),t("br",null,null),o("(also affects coal consumption)."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("^"),Xe(le.value),o(" Heavy Drill amount"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Y.cost)),o(" "),Y.resource.displayName])),onPurchase(){M.value=i.add(M.value,1)},style:{color:n,width:"160px"}})),{min:g,max:G,add:_,remove:E}=cl({buyable:Y,active:M}),D=Se(0),Ze=b(()=>i.pow(1/3,D.value)),he=b(()=>i.pow(2,D.value)),Ge=b(()=>i.pow(1.2,D.value)),Fe=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100**3)),L=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(L),i.pow(8,L).times(2e5)},inverseCost(L){let ie=i.div(L,2e5).log(8);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100**3).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Extractor")]),t("br",null,null),o("Attach extractors to the drill to mine coal and ore, but with a price."),t("br",null,null),o("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),En(Ze.value),o(" drill power"),t("br",null,null),o("\xD7"),Xe(he.value),o(" coal/sec"),t("br",null,null),o("\xD7"),Xe(Ge.value),o(" ore/sec"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Fe.cost))," ",Fe.resource.displayName])),onPurchase(){D.value=i.add(D.value,1)},style:{color:n,width:"160px"}})),{min:ce,max:De,add:Re,remove:ve}=cl({buyable:Fe,active:D}),U=Se(0),oe=b(()=>i.pow(ki[3].bought.value?4:5,U.value)),q=b(()=>i.add(U.value,Tl.value).pow(2).mul(u.value).mul(i.add(M.value,1)).mul(D.value).mul(i.pow(a.value,W.elfTraining.oilElfTraining.milestones[0].earned.value?1.2:1)).div(1e5)),ke=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);i.gte(L,100)&&(L=i.pow(L,4).div(100)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L);let ie=i.pow(16,L).times(2e6);return ki[4].bought.value&&(ie=ie.div(i.add(Vi.value,1).root(6))),W.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(ie=ie.div(10)),ie},inverseCost(L){W.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(L=i.mul(L,10)),ki[4].bought.value&&(L=i.mul(L,i.add(Vi.value,1).root(6)));let ie=i.div(L,2e6).log(16);return ie=ie.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Pump")]),t("br",null,null),o("Pump that oil from the ground."),t("br",null,null),o("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),ki[3].bought.value?4:5,o("\xD7."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),Xe(oe.value),o(" coal usage"),t("br",null,null),o("+"),Xe(q.value),o(" oil/sec"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(ke.cost)),o(" "),ke.resource.displayName])),onPurchase(){U.value=i.add(U.value,1)},style:{color:n,width:"160px"}})),{max:Oe,min:gi,add:Pe,remove:qe}=cl({buyable:ke,active:U}),Je=Se(0),yi=b(()=>{let L=Je.value;return W.elfTraining.heavyDrillElfTraining.milestones[2].earned.value&&(L=i.pow(L,1.5)),L}),Ee=b(()=>i.pow(yi.value,2)),Ie=b(()=>i.pow(yi.value,3).mul(1e19)),A=b(()=>i.add(yi.value,1)),B=He(()=>({resource:Q(s),cost(){let L=new i(this.amount.value);return i.gte(L,100)&&(L=i.pow(L,4).div(100)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L),i.pow(2,L).times(50)},inverseCost(L){let ie=i.div(L,50).log(2);return ie=ie.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Burner")]),t("br",null,null),o("Burn oil as fuel."),t("br",null,null),o("(Oil Burner Amount)"),t("sup",null,[o("2")]),o(" unit of oil can give 1e19*(Oil Burner Amount)"),t("sup",null,[o("3")]),o(" units of coal."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(Ee.value),o(" oil/sec"),t("br",null,null),o("-"),Xe(Ie.value),o(" coal consumption"),ki[2].bought.value?t(O,null,[t("br",null,null),o("\xD7"),Xe(A.value),o(" to auto smelting multi")]):"",t("br",null,null),t("br",null,null),o("Cost: "),Me(m(B.cost)),o(" "),B.resource.displayName])),onPurchase(){Je.value=i.add(Je.value,1)},style:{color:n,width:"160px"}})),{max:$e,min:fe,add:mi,remove:hi}=cl({buyable:B,active:Je}),Fi=Se(0),Qi=b(()=>i.pow(Fi.value,2).mul(100)),Zi=b(()=>i.add(Fi.value,1)),Ae=He(()=>({resource:ci.metal,cost(){let L=new i(this.amount.value);i.gte(L,50)&&(L=i.pow(L,2).div(50)),i.gte(L,200)&&(L=i.pow(L,2).div(200)),i.gte(L,1e4)&&(L=i.pow(L,2).div(1e4)),L=i.pow(.95,F.books.oilBook.totalAmount.value).times(L);let ie=i.pow(10,L).times(1e7);return ki[4].bought.value&&(ie=ie.div(i.add(Vi.value,1).root(6))),ie},inverseCost(L){ki[4].bought.value&&(L=i.mul(L,i.add(Vi.value,1).root(6)));let ie=i.div(L,1e7).log(10);return ie=ie.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(4)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Smelter")]),t("br",null,null),o("Use oil as a crucible fuel."),t("br",null,null),o("Burn 100*(Oil Smelter amount)"),t("sup",null,[o("2")]),o(" oil to smelt +100% faster."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Xe(Qi.value),o(" oil/sec"),t("br",null,null),o("\xD7"),Xe(Zi.value),o(" smelting speed"),t("br",null,null),t("br",null,null),o("Cost: "),Me(m(Ae.cost)),o(" "),Ae.resource.displayName])),onPurchase(){Fi.value=i.add(Fi.value,1)},style:{color:n,width:"160px"}})),{max:Be,min:be,add:k,remove:ee}=cl({buyable:Ae,active:Fi}),Qe=[X(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>i.gte(a.value,5)})),X(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>i.gte(a.value,10),visibility:()=>p(Qe[0].earned.value)})),X(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>i.gte(a.value,25),visibility:()=>p(Qe[1].earned.value)})),X(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>i.gte(a.value,60),visibility:()=>p(Qe[2].earned.value)})),X(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>i.gte(a.value,150),visibility:()=>p(Qe[3].earned.value)})),X(()=>({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:()=>i.gte(a.value,350),visibility:()=>p(Qe[4].earned.value)})),X(()=>({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:()=>i.gte(a.value,1e3),visibility:()=>p(i.gte(a.value,1e3))})),X(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>i.gte(a.value,3e3),visibility:()=>p(i.gte(a.value,2e3))}))],{collapseMilestones:Pi,display:si}=sn(Qe),Oi=[X(()=>({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:()=>i.gte(Vi.value,100)})),X(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>i.gte(Vi.value,500),visibility:()=>p(Oi[0].earned.value)})),X(()=>({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:()=>i.gte(Vi.value,1e4),visibility:()=>p(Oi[1].earned.value)}))],{collapseMilestones:qi,display:hl}=sn(Oi),ei=[T(()=>({resource:$.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per Coal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[0].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per Metal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[1].value)]))},style:{color:n}})),T(()=>({resource:$.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[2].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:f(()=>t(O,null,[o("x"),Xe(Yi[3].value)]))},style:{color:n}})),T(()=>({resource:Q(s),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:f(()=>t(O,null,[o("+"),Xe(i.mul(Yi[4].value,100)),o("%")]))},style:{color:n}}))],Yi=[b(()=>i.mul($.buildDrill.amount.value,i.add(.04,Ti.value)).add(1)),b(()=>i.mul(ci.oreDrill.amount.value,i.add(.04,Ti.value)).add(1)),b(()=>i.mul(i.max($.coal.value,1).log10().floor(),i.add(.06,Ti.value)).add(1)),b(()=>i.mul(i.max(ci.metal.value,1).log10().floor(),i.add(.1,Ti.value)).add(1)),b(()=>i.mul(h.amount.value,.001))],ki=[T(()=>({resource:Q(s),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:n}})),T(()=>({resource:Q(s),cost:500,display:{title:"Oil the Metal Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:n}})),T(()=>({resource:Q(s),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your auto smelting multi."},style:{color:n}})),T(()=>({resource:Q(s),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:n}})),T(()=>({resource:Q(s),cost:5e4,display:{title:"Be One with the Oil",description:f(()=>t(O,null,[o("Divide metal ingot prices of oil buildings by "),t("sup",null,[o("6")]),t(xl,null,{default:()=>[o("total oil + 1")]})]))},style:{color:n}}))],ol=[T(()=>({resource:Q(s),cost:1e11,display:{title:"Dye Synergy I",description:"Red dye boosts yellow dye gain *(log(x)^0.75)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e12,display:{title:"Orange-colored boxes",description:"Orange dye's 2nd effect is raised to the 2.5"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e13,display:{title:"Colorful Focus",description:"Sum of secondary dyes increases max focus multiplier by cbrt(x)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e14,display:{title:"Dye Synergy II",description:"Blue dye boosts red dye gain *log(x)"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e15,display:{title:"The Ultimate Metal Dye",description:"Sum of primary dyes boosts auto smelt speed"},visibility:()=>p(W.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}}))],Vl=ae(()=>[pe(()=>({addend:()=>i.negate(c.value),description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:oe,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),pe(()=>({addend:z,description:"Oil to Coal Substitution",enabled:()=>i.gt(z.value,0)}))]),Wl=b(()=>Vl.apply(0)),vl=ae(()=>[pe(()=>({addend:j,description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ze,description:"Heavy Extractor",enabled:()=>i.gt(D.value,0)})),Z(()=>({multiplier:Yi[0],description:"Coal Drill Synergy",enabled:ei[0].bought})),Z(()=>({multiplier:Yi[1],description:"Metal Drill Synergy",enabled:ei[1].bought})),Z(()=>({multiplier:Yi[2],description:"Coal Drill Upgrade",enabled:ei[2].bought})),Z(()=>({multiplier:Yi[3],description:"Metal Drill Upgrade",enabled:ei[3].bought})),Z(()=>({multiplier:2,description:"Guide to drilling",enabled:F.upgrades.drillingUpgrade.bought})),Z(()=>({multiplier:()=>i.add(Vi.value,1).log10().add(1),description:"Cocoa Level 2",enabled:W.elfTraining.oilElfTraining.milestones[1].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:W.elfTraining.oilElfTraining.milestones[2].earned})),Z(()=>({multiplier:()=>Ye.value,description:"Effectiveness",enabled:()=>i.lt(Ye.value,1)}))]),re=b(()=>vl.apply(0)),_e=ae(()=>[pe(()=>({addend:Yi[4],description:"Drill Oil",enabled:ei[4].bought}))]),Ti=b(()=>_e.apply(0)),Ui=ae(()=>[pe(()=>({addend:q,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),Z(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:ki[0].bought})),Z(()=>({multiplier:2,description:"3000m Well Depth",enabled:Qe[7].earned})),Z(()=>({multiplier:2,description:"Oil and where to find it",enabled:F.upgrades.oilUpgrade.bought})),Z(()=>({multiplier:()=>Ye.value,description:"Effectiveness",enabled:()=>i.lt(Ye.value,1)})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone3.earned})),Z(()=>({multiplier:()=>i.sqrt(W.totalElfLevels.value),description:"Jack Level 4",enabled:W.elfTraining.heatedCutterElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(Y.amount.value,1).sqrt(),description:"Faith Level 4",enabled:W.elfTraining.bonfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:W.elfTraining.oilElfTraining.milestones[2].earned}))]),ml=b(()=>Ui.apply(0)),Ke=ae(()=>[pe(()=>({addend:()=>i.negate(Ee.value),description:"Oil Burner",enabled:()=>i.gt(Je.value,0)})),pe(()=>({addend:()=>i.negate(Qi.value),description:"Oil Smelter",enabled:()=>i.gt(Fi.value,0)})),pe(()=>({addend:()=>i.negate(di.oilCost.value),description:"Oil Refinery",enabled:()=>i.gt(di.activeRefinery.value,0)}))]),Ii=b(()=>Ke.apply(0)),J=ae(()=>[pe(()=>({addend:Ie,description:"Oil Burner",enabled:()=>i.gt(Je.value,0)})),Z(()=>({multiplier:()=>ti.value,description:"Effectiveness",enabled:()=>i.lt(ti.value,1)}))]),z=b(()=>J.apply(0)),Il=ae(()=>[pe(()=>({addend:We.boosts.red1,description:"Red Dye Boost 1",enabled:()=>i.gte(We.dyes.red.amount.value,1)}))]),Tl=b(()=>Il.apply(0)),[rl,fl]=al(()=>[{title:"Coal Consumption",modifier:Vl,unit:"/s",base:0},{title:"Drill Power",modifier:vl,base:0},{title:"Upgrade Bonus",modifier:_e,base:0,visible(){return i.gt(Ti.value,0)}},{title:"Oil Speed",modifier:Ui,unit:"/s",base:0,visible(){return i.gt(ml.value,0)}},{title:"Oil Consumption",modifier:Ke,unit:"/s",base:0,visible(){return i.lt(Ii.value,0)}},{title:"Oil to Coal Substitution",modifier:J,unit:"/s",base:0,visible(){return i.gt(z.value,0)}},{title:"Extra Oil Pumps",modifier:Il,base:0,visible(){return i.gt(Tl.value,0)}}]),el=se(!1),ne=f(()=>t(xi,{modelValue:el.value,"onUpdate:modelValue":L=>el.value=L},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:rl})),Ye=se(i.dOne),ti=se(i.dOne);ui.on("update",L=>{if(i.lt(H.day.value,Hn))return;const ie=i.negate(Wl.value);i.gt(ie,0)?(Ye.value=i.min(i.div($.coal.value,ie),1),$.coal.value=i.sub($.coal.value,i.mul(ie,Ye.value).mul(L))):Ye.value=i.dOne,I.value=i.add(I.value,i.mul(re.value,L)),s.value=i.add(s.value,i.mul(ml.value,L)),d();const dl=i.negate(Ii.value);i.gt(dl,0)?(ti.value=i.min(i.div(s.value,dl),1),s.value=i.sub(s.value,i.mul(dl,ti.value).mul(L)).max(0)):ti.value=i.dOne});const{total:Vi,trackerDisplay:Ul}=Jl({resource:s,goal:25e4,name:e,day:Hn,color:l,modal:{show:el,display:ne}});return{name:e,day:Hn,color:l,oil:s,totalOil:Vi,depth:a,drillProgress:I,activeHeavy:u,buildHeavy:h,activeHeavy2:M,buildHeavy2:Y,activeExtractor:D,buildExtractor:Fe,activePump:U,buildPump:ke,activeBurner:Je,effectiveBurners:yi,buildBurner:B,activeSmelter:Fi,buildSmelter:Ae,extractorCoal:he,extractorOre:Ge,coalEffectiveness:Ye,oilEffectiveness:ti,depthMilestones:Qe,collapsedDepthMilestones:Pi,row1Upgrades:ei,row2Upgrades:ki,row3Upgrades:ol,minWidth:700,oilMilestones:Oi,collapsedOilMilestones:qi,generalTabCollapsed:fl,display:f(()=>{const L=[];return Qe[1].earned.value&&L.push(ei),Oi[1].earned.value&&L.push(ki),W.elfTraining.oilElfTraining.milestones[4].earned.value&&L.push(ol),t(O,null,[Ve(Ul),t(we,null,null),i.lt(Ye.value,1)?t("div",null,[o("Coal efficiency: "),Xe(i.mul(Ye.value,100)),o("%")]):null,i.lt(ti.value,1)?t("div",null,[o("Oil efficiency: "),Xe(i.mul(ti.value,100)),o("%")]):null,t(Hi,{resource:s,color:l,resourceStyle:{textShadow:"grey 0px 0px 10px"},sticky:!0,productionDisplay:f(()=>t(O,null,[i.lt(a.value,1e3)?"Reach 1000m to start gaining oil":t(O,null,[Cn(i.add(ml.value,Ii.value))])]))},null),i.eq(ml.value,0)?t(O,null,[o("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),t("br",null,null)]):"",t(nn,null,{default:()=>[Qe[6].earned.value?t(Bi,null,{default:()=>[Ve(ke),t("div",null,[Me(i.floor(U.value)),o("/"),Me(i.floor(ke.amount.value))]),ai(gi,qe,Pe,Oe)]}):null,Oi[0].earned.value?t(Bi,null,{default:()=>[Ve(B),t("div",null,[Me(i.floor(Je.value)),o("/"),Me(i.floor(B.amount.value))]),ai(fe,hi,mi,$e)]}):null,Oi[2].earned.value?t(Bi,null,{default:()=>[Ve(Ae),t("div",null,[Me(i.floor(Fi.value)),o("/"),Me(i.floor(Ae.amount.value))]),ai(be,ee,k,Be)]}):null]}),t("br",null,null),t("div",null,[t("span",null,[o("The well is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Me(a.value)]),o("m deep"),t("br",null,null),o("Next at "),Xe(i.sub(r.value,I.value))," ",o("drill power seconds")]),t("div",null,[t("span",null,[o("Your drill power is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Xe(re.value)])]),t(we,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[Ve(h),t("div",null,[Me(i.floor(u.value)),o("/"),Me(i.floor(h.amount.value))]),ai(v,x,N,y)]}),Qe[3].earned.value?t(Bi,null,{default:()=>[Ve(Y),t("div",null,[Me(i.floor(M.value)),o("/"),Me(i.floor(Y.amount.value))]),ai(g,E,_,G)]}):null,Qe[5].earned.value?t(Bi,null,{default:()=>[Ve(Fe),t("div",null,[Me(i.floor(D.value)),o("/"),Me(i.floor(Fe.amount.value))]),ai(ce,ve,Re,De)]}):null]}),t(we,null,null),zl(...L),t(we,null,null),si(),i.gte(Vi.value,50)?hl():""])}),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Xe(s.value),o(" "),s.displayName]))}}),Gm="metal",js=7,ci=Ai(Gm,function(){const e="Metal",l="#888B8D",n=ji(0,"metal ingots",void 0,!0),s=Zs(n),a=ji(0,"ore"),I=Zs(a),r=ae(()=>[Z(()=>({multiplier:5,description:"Crucible",enabled:De.bought})),Z(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>i.gte(q.amount.value,1)})),Z(()=>({multiplier:2,description:"Industrial Furnace",enabled:ve.bought})),Z(()=>({multiplier:()=>i.add(gi.value,1),description:"Hotter Forges",enabled:()=>i.gte(Oe.amount.value,1)})),Z(()=>({multiplier:2,description:"Carry metal in boxes",enabled:li.row2Upgrades.metalUpgrade.bought})),Z(()=>({multiplier:We.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(We.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(wi.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:We.upgrades.redDyeUpg.bought})),Z(()=>({multiplier:()=>i.div(ri.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone2.earned})),Z(()=>({multiplier:()=>i.add(te.buildHeavy.amount.value,1).sqrt(),description:"Joy Level 4",enabled:W.elfTraining.smallfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(W.schools.amount.value,1),description:"Twinkle Level 1",enabled:W.elfTraining.metalElfTraining.milestones[0].earned})),ll(()=>({exponent:1.1,description:"Mary Level 2",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),d=b(()=>r.apply(.1)),u=ae(()=>[pe(()=>({addend:()=>i.times(q.amount.value,10),description:"Industrial Crucibles",enabled:()=>i.gte(q.amount.value,1)})),ll(()=>({exponent:1.1,description:"Joy Level 5",enabled:W.elfTraining.smallfireElfTraining.milestones[4].earned})),ll(()=>({exponent:1.1,description:"Faith Level 5",enabled:W.elfTraining.bonfireElfTraining.milestones[4].earned})),ll(()=>({exponent:1.1,description:"Snowball Level 5",enabled:W.elfTraining.kilnElfTraining.milestones[4].earned})),Z(()=>({multiplier:2,description:"Efficient Crucibles",enabled:$.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.mul(te.activeSmelter.value,te.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>i.gt(te.activeSmelter.value,0)})),Z(()=>({multiplier:We.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(We.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(di.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:We.upgrades.redDyeUpg2.bought})),Z(()=>({multiplier:()=>i.div(W.totalElfExp.value,1e3).add(1).sqrt(),description:"Mary Level 5",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[4].earned})),Z(()=>({multiplier:()=>i.pow(1.25,W.elfTraining.metalElfTraining.level.value),description:"Twinkle Level 2",enabled:W.elfTraining.metalElfTraining.milestones[1].earned})),Z(()=>({multiplier:()=>i.add(We.dyes.red.amount.value,We.dyes.blue.amount.value).add(We.dyes.yellow.amount.value).add(1).log10(),description:"The Ultimate Metal Dye",enabled:te.row3Upgrades[4].bought}))]),c=b(()=>u.apply(0)),j=ae(()=>[Z(()=>({multiplier:3,description:"Efficient Crucibles",enabled:$.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.add(te.effectiveBurners.value,1).mul(te.oilEffectiveness.value),description:"Blaster Burner",enabled:te.row2Upgrades[2].bought})),Z(()=>({multiplier:3,description:"Twinkle Level 3",enabled:W.elfTraining.metalElfTraining.milestones[2].earned}))]),h=b(()=>j.apply(1)),v=1e10,y=b(()=>i.min(a.value,i.div($.coal.value,v)).floor().max(0)),N=Ei(()=>({display:f(()=>{const A=i.gte(y.value,1)?y.value:i.add(y.value,1);return t(O,null,[t("span",{style:"font-size: large"},[o("Smelt "),Xe(i.times(y.value,d.value))," ",n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),Me(A),o(" "),a.displayName,o(";")," ",Me(i.times(A,v)),o(" "),$.coal.displayName])])}),canClick:()=>i.gte(y.value,1),onClick(){!m(this.canClick)||x(y.value)},style:{width:"600px",minHeight:"unset"}}));function x(A,B=1){const[$e,fe,mi]=[i.times(A,d.value).times(B),A,i.times(A,v)];n.value=i.add(n.value,$e),a.value=i.sub(a.value,fe),$.coal.value=i.sub($.coal.value,mi)}const M=ae(()=>[pe(()=>({addend:()=>oe.amount.value,description:"Metal Drills",enabled:()=>i.gte(oe.amount.value,1)})),Z(()=>({multiplier:()=>i.mul(te.depth.value,.05).add(1),description:"25m Well Depth",enabled:te.depthMilestones[2].earned})),Z(()=>({multiplier:te.extractorOre,description:"Heavy Extractor",enabled:()=>i.gt(te.activeExtractor.value,0)})),Z(()=>({multiplier:2,description:"Carry ore in boxes",enabled:li.row2Upgrades.oreUpgrade.bought}))]),le=b(()=>M.apply(1)),Y=ae(()=>[Z(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Fe.bought})),Z(()=>({multiplier:2,description:"Double Pickaxe",enabled:ce.bought})),Z(()=>({multiplier:2.5,description:"Metal Drills",enabled:()=>i.gte(oe.amount.value,1)})),Z(()=>({multiplier:2,description:"Efficient Drills",enabled:U.bought})),Z(()=>({multiplier:2,description:"Oil the Metal Drills",enabled:te.row2Upgrades[1].bought}))]),g=b(()=>Y.apply(i.recip(_))),G=Se(0),_=10,E=tl(()=>({width:400,height:25,direction:Ue.Right,fillStyle:{backgroundColor:l},progress:()=>G.value})),D=ae(()=>[pe(()=>({addend:le})),Z(()=>({multiplier:g}))]),Ze=b(()=>D.apply(0)),he=ae(()=>[pe(()=>({addend:Ze})),pe(()=>({addend:()=>i.negate(c.value),enabled:ke}))]),Ge=b(()=>he.apply(0)),Fe=T(()=>({resource:Q(n),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

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

Halve the time to mine ore, again"},visibility:()=>p(ce.bought.value)})),De=T(()=>({resource:Q(n),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>p(De.bought.value||i.div(I.value,d.value).plus(s.value).gte(1))})),Re=T(()=>({resource:Q(n),cost:0,display:{title:"Coal Drilling",description:"These metal drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>p(i.gte(oe.amount.value,1)&&(Re.bought.value||H.days[7].opened.value||i.lt($.computedCoalGain.value,i.times(le.value,g.value).times(v)))),onPurchase(){H.days[2].recentlyUpdated.value=!0}})),ve=T(()=>({canAfford(){return i.gte(n.value,50)&&i.gte($.coal.value,1e11)},onPurchase(){n.value=i.sub(n.value,50),$.coal.value=i.sub($.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore

Cost: 50 ${n.displayName}
${Xe(1e11)} ${$.coal.displayName}`}})),U=T(()=>({resource:Q(n),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:()=>p(te.depthMilestones[4].earned.value)})),oe=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,A).times(10);return W.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(te.depth.value,1).sqrt())),W.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){W.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),W.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(te.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Metal Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:f(()=>t(O,null,[o("Mine 2.5x faster. Increase ore mining amount by")," ",Me(oe.amount.value),o(" ore per operation")]))},visibility:()=>p(i.gte(oe.amount.value,1)||i.div(I.value,d.value).plus(s.value).gte(10)),style:{width:"200px"}})),q=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,i.times(A,10)).times(10);return W.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(te.depth.value,1).sqrt())),W.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){W.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),W.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(te.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15).div(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:f(()=>t(O,null,[o("Automatically smelts")," ",Me(i.times(q.amount.value,10)),o(" ore per second")]))},visibility:()=>p(i.gte(q.amount.value,1)||i.gte(oe.amount.value,4)||i.gte(I.value,50)),style:{width:"200px"}})),ke=Se(!0),Oe=He(()=>({resource:$.coal,cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(10,A).times(1e12);return W.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(te.depth.value,1).sqrt())),W.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){W.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),W.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(te.depth.value,1).sqrt()));let B=i.div(A,1e12).log(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},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:f(()=>t(O,null,[o("Gain "),Me(i.times(gi.value,100)),o("% more metal per ore")]))},visibility:()=>p(i.gte(Oe.amount.value,1)||ve.bought.value),style:{width:"200px"}})),gi=b(()=>i.times(Oe.amount.value,.25));ui.on("update",A=>{G.value=i.times(A,g.value).plus(G.value);const B=G.value.trunc();G.value=G.value.minus(B),a.value=i.add(a.value,i.times(B,le.value)),ke.value&&x(i.min(y.value,i.times(c.value,A)),h.value)});const[Pe,qe]=al(()=>[{title:"Auto Smelt Speed",modifier:u,base:0,unit:"/s",visible(){return i.gt(q.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:j,base:1,visible(){return i.gt(h.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:M,base:1},{title:"Mining Speed",modifier:Y,base:.1,unit:"/s"}]),Je=se(!1),yi=f(()=>t(xi,{modelValue:Je.value,"onUpdate:modelValue":A=>Je.value=A},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Pe})),{total:Ee,trackerDisplay:Ie}=Jl({resource:n,goal:25e3,name:e,day:js,color:l,modal:{show:Je,display:yi}});return{name:e,day:js,color:l,ore:a,bestOre:I,oreProgress:G,metal:n,bestMetal:s,totalMetal:Ee,simplePickaxe:Fe,doublePickaxe:ce,crucible:De,coalDrill:Re,industrialFurnace:ve,efficientDrill:U,oreDrill:oe,industrialCrucible:q,autoSmeltEnabled:ke,hotterForge:Oe,generalTabCollapsed:qe,minWidth:700,display:f(()=>t(O,null,[Ve(Ie),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0",sticky:!1,productionDisplay:f(()=>t(O,null,[ke.value&&i.gte(q.amount.value,1)?`+${Fs([[c.value,"smelting speed"],[Ze.value,"ore gain"],[i.div($.computedCoalGain.value,v),"coal gain"]],"/s",i.mul(d.value,h.value))}`:void 0]))},null),t(we,null,null),Ve(N),i.gte(q.amount.value,1)?t("div",{style:{width:"150px"}},[t(jl,{title:"Auto Smelt",modelValue:ke.value,"onUpdate:modelValue":A=>ke.value=A},null)]):void 0,t(we,null,null),t(Hi,{resource:a,color:l,style:"margin-bottom: 0",sticky:!1,productionDisplay:f(()=>t(O,null,[ks(Ge.value)]))},null),t(we,null,null),t("div",null,[o("Currently mining "),Xe(le.value),o(" ore every")," ",Xe(i.recip(g.value)),o(" seconds")]),Ve(E),t(we,null,null),ai(Fe,ce,De,Re,ve,U),ai(oe,q,Oe)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Xe(n.value),o(" "),n.displayName]))}}),Fm="elves",mn=4,ze=Ai(Fm,function(){const e="Elves",l="red",n="#911D21",a=tl(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>H.day.value===mn?i.div(Be.value,6).times(.8333333333333334).add(i.div(i.add($.coal.value,1).log10(),i.log10(1e9)).clamp(0,1).div(6)):1,display:f(()=>H.day.value===mn?i.lt(Be.value,6)?t(O,null,[me(Be.value),o("/6 elves")]):t(O,null,[me($.coal.value),o("/"),me(1e9),o(" coal")]):"")})),I=wm(()=>({thingsToReset:[ye,ri,$],onReset(){setTimeout(()=>{hl.earned.value?(ye.row1Upgrades.forEach(re=>re.bought.value=!0),ye.row2Upgrades.forEach(re=>re.bought.value=!0)):k.earned.value&&(ye.row1Upgrades[4].bought.value=!0,ye.row2Upgrades[4].bought.value=!0),Oi.earned.value&&(ri.foundationProgress.value=100),Yi.earned.value&&($.warmerCutters.bought.value=!0,$.warmerPlanters.bought.value=!0,$.basicFertilizer.bought.value=!0,$.unlockBonfire.bought.value=!0,$.dedicatedCutters.bought.value=!0,$.dedicatedPlanters.bought.value=!0,$.betterFertilizer.bought.value=!0,$.unlockKiln.bought.value=!0,$.efficientSmelther.bought.value=!0)})}})),r=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.cuttersBook.totalAmount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>i.gt(F.books.cuttersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),d=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.plantersBook.totalAmount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>i.gt(F.books.plantersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),u=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.expandersBook.totalAmount.value,.1).add(1),description:"Logjam",enabled:()=>i.gt(F.books.expandersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),c=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heatedCuttersBook.totalAmount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>i.gt(F.books.heatedCuttersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),j=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heatedPlantersBook.totalAmount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>i.gt(F.books.heatedPlantersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),h=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.fertilizerBook.totalAmount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>i.gt(F.books.fertilizerBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),v=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.smallFireBook.totalAmount.value,.1).add(1),description:"Firestarter",enabled:()=>i.gt(F.books.smallFireBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),y=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.bonfireBook.totalAmount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>i.gt(F.books.bonfireBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),N=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.kilnBook.totalAmount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>i.gt(F.books.kilnBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),x=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.paperBook.totalAmount.value,.1).add(1),description:"The Book Thief",enabled:()=>i.gt(F.books.paperBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),M=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.boxBook.totalAmount.value,.1).add(1),description:"Not a box",enabled:()=>i.gt(F.books.boxBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),le=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.clothBook.totalAmount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>i.gt(F.books.clothBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),Y=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.coalDrillBook.totalAmount.value,.1).add(1),description:"Drills and Mills",enabled:()=>i.gt(F.books.coalDrillBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),g=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heavyDrillBook.totalAmount.value,.1).add(1),description:"Deep in the Earth",enabled:()=>i.gt(F.books.heavyDrillBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),G=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.oilBook.totalAmount.value,.1).add(1),description:"Burning the Midnight Oil",enabled:()=>i.gt(F.books.oilBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),_=ae(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.metalBook.totalAmount.value,.1).add(1),description:"Physical Metallurgy",enabled:()=>i.gt(F.books.metalBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),E=ae(()=>[Z(()=>({multiplier:1/0,description:"Dye",enabled:()=>!0}))]),[D,Ze]=al(()=>[{title:"Holly Auto-Buy Frequency",modifier:r,base:10,unit:"/s",visible:Ae.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:Ae.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:Ae.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:Ae.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:j,base:10,unit:"/s",visible:Ae.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:Ae.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:Ae.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:Ae.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:Ae.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:Ae.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:M,base:10,unit:"/s",visible:Ae.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:le,base:10,unit:"/s",visible:Ae.clothElf.bought},{title:"Peppermint Auto-Buy Frequency",modifier:Y,base:10,unit:"/s",visible:W.elfTraining.expandersElfTraining.milestones[3].earned},{title:"Frosty Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:W.elfTraining.fertilizerElfTraining.milestones[4].earned.value},{title:"Cocoa Auto-Buy Frequency",modifier:G,base:10,unit:"/s",visible:W.elfTraining.heatedCutterElfTraining.milestones[4].earned.value},{title:"Twinkle Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:W.elfTraining.expandersElfTraining.milestones[4].earned}]),he=se(!1),Ge=f(()=>t(xi,{modelValue:he.value,"onUpdate:modelValue":re=>he.value=re},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:D})),Fe=b(()=>{let re=i.pow(i.sub(4,Wi.boosts.jazzy1.value),Be.value).times(1e6);return i.gte(Be.value,9)&&(re=i.times(re,1e15)),i.gte(Be.value,12)&&(re=i.times(re,1e15)),re});function ce(re){var Il,Tl;const _e=Se(0),Ti=Se(0),Ui=re.hasToggle?Se(!1):se(!0),ml=b(()=>re.cooldownModifier.apply(10)),Ke=Gi((Il=re.canBuy)!=null?Il:!0),Ii=Gi((Tl=re.buyMax)!=null?Tl:!1);function J(rl){if(z.bought.value&&m(Ke)){_e.value=i.add(_e.value,rl);const fl=i.recip(ml.value);Ti.value+=rl/fl.toNumber();let el=i.div(_e.value,fl).floor();_e.value=i.sub(_e.value,el.mul(fl)),m(Ii)&&(el=i.dInf),(Qn(re.buyable)?re.buyable:[re.buyable]).forEach(ne=>{var ti,Vi;const Ye=i.min(i.sub(ne.inverseCost((ti=ne.resource)==null?void 0:ti.value),ne.amount.value),el);Ye.lte(0)||(ne.amount.value=i.add(ne.amount.value,Ye),el=i.sub(el,Ye),(Vi=re.onAutoPurchase)==null||Vi.call(re,ne,Ye),el.lte(0))})}}const z=T(()=>({...re,buyable:void 0,toggle:Ui,buyProgress:_e,update:J,resource:$.coal,cost:Fe,computedAutoBuyCooldown:ml,amountOfTimesDone:Ti,name:re.name,display:()=>({title:re.name,description:f(()=>t(O,null,[re.description,z.bought.value?null:t(O,null,[" ",o("Training this elf will require resetting all your progress from days 1-3.")]),z.bought.value&&re.hasToggle===!0?t(O,null,[t(jl,{title:re.toggleDesc,"onUpdate:modelValue":rl=>Ui.value=rl,modelValue:Ui.value},null)]):null])),showCost:!z.bought.value}),style:"width: 190px",onPurchase(){var rl;(rl=re.onPurchase)==null||rl.call(re),I.reset()}}));return z}const De=ce({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:ye.row1Buyables[0],cooldownModifier:r,buyMax:()=>W.elfTraining.cutterElfTraining.milestones[1].earned.value}),Re=ce({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:ye.row1Buyables[1],cooldownModifier:d,buyMax:()=>W.elfTraining.planterElfTraining.milestones[1].earned.value}),ve=ce({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:ye.row1Buyables[2],cooldownModifier:u,buyMax:()=>W.elfTraining.expandersElfTraining.milestones[1].earned.value}),U=[De,Re,ve],oe=ce({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:$.heatedCutters,cooldownModifier:c,buyMax:()=>W.elfTraining.heatedCutterElfTraining.milestones[2].earned.value}),q=ce({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:$.heatedPlanters,cooldownModifier:j,buyMax:()=>W.elfTraining.heatedPlanterElfTraining.milestones[2].earned.value}),ke=ce({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:$.moreFertilizer,cooldownModifier:h}),Oe=[oe,q,ke],gi=ce({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:$.buildFire,cooldownModifier:v,visibility:()=>p(li.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(re,_e){gi.toggle.value&&($.activeFires.value=i.add($.activeFires.value,_e))},onPurchase(){H.days[4].recentlyUpdated.value=!0}}),Pe=ce({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:$.buildBonfire,cooldownModifier:y,visibility:()=>p(li.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(re,_e){var Ui;const Ti=i.mul(m((Ui=re.cost)!=null?Ui:0),_e);$.activeFires.value=i.sub($.activeFires.value,Ti).max(0),$.buildFire.amount.value=i.sub($.buildFire.amount.value,Ti).max(0),Pe.toggle.value&&($.activeBonfires.value=i.add($.activeBonfires.value,_e))},onPurchase(){H.days[4].recentlyUpdated.value=!0},canBuy:$.unlockBonfire.bought}),qe=ce({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:$.buildKiln,cooldownModifier:N,visibility:()=>p(li.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(re,_e){qe.toggle.value&&($.activeKilns.value=i.add($.activeKilns.value,_e))},onPurchase(){H.days[4].recentlyUpdated.value=!0},canBuy:$.unlockKiln.bought}),Je=[gi,Pe,qe],yi=ce({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(F.books),cooldownModifier:x,visibility:()=>p(di.elfUpgrades.paperElf.bought.value)}),Ee=ce({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(li.buyables),cooldownModifier:M,visibility:()=>p(di.elfUpgrades.boxElf.bought.value)}),Ie=ce({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[wi.buildPens,wi.betterShears,wi.fasterSpinning],cooldownModifier:le,visibility:()=>p(di.elfUpgrades.clothElf.bought.value)}),A=[yi,Ee,Ie],B=ce({name:"Peppermint",description:"Peppermint will automatically purchase all coal drills you can afford, without actually spending any resources.",buyable:$.buildDrill,cooldownModifier:Y,visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[3].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased coal drills",onAutoPurchase(re,_e){B.toggle.value&&($.activeDrills.value=i.add($.activeDrills.value,_e))}}),$e=ce({name:"Frosty",description:"Frosty will automatically purchase all drill types in the oil section, without actually spending any resources.",buyable:[te.buildHeavy,te.buildHeavy2,te.buildExtractor],cooldownModifier:g,visibility:()=>p(W.elfTraining.fertilizerElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil drills",onAutoPurchase(re,_e){$e.toggle.value&&(re===te.buildHeavy?te.activeHeavy.value=i.add(te.activeHeavy.value,_e):re===te.buildHeavy2?te.activeHeavy2.value=i.add(te.activeHeavy2.value,_e):re===te.buildExtractor&&(te.activeExtractor.value=i.add(te.activeExtractor.value,_e)))}}),fe=ce({name:"Cocoa",description:"Cocoa will automatically purchase all oil-using machines you can afford, without actually spending any resources.",buyable:[te.buildPump,te.buildBurner,te.buildSmelter],cooldownModifier:G,visibility:()=>p(W.elfTraining.heatedCutterElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil-using machines",onAutoPurchase(re,_e){$e.toggle.value&&(re===te.buildPump?te.activePump.value=i.add(te.activePump.value,_e):re===te.buildBurner?te.activeBurner.value=i.add(te.activeBurner.value,_e):re===te.buildSmelter&&(te.activeSmelter.value=i.add(te.activeSmelter.value,_e)))}}),mi=[B,$e,fe],hi=ce({name:"Twinkle",description:"Twinkle will automatically purchase all metal buyables you can afford, without actually spending any resources.",buyable:[ci.oreDrill,ci.industrialCrucible,ci.hotterForge],cooldownModifier:_,visibility:()=>p(W.elfTraining.expandersElfTraining.milestones[4].earned.value)}),Fi=[hi],Qi=ce({name:"Carol",description:"Carol will automatically purchase all dyes you can afford, without actually spending any resources.",buyable:Object.values(We.dyes).map(re=>re.buyable),cooldownModifier:E,visibility:()=>p(Wi.milestones.unlockDyeElf.earned.value)}),Zi=[Qi],Ae={cuttersElf:De,plantersElf:Re,expandersElf:ve,heatedCuttersElf:oe,heatedPlantersElf:q,fertilizerElf:ke,smallFireElf:gi,bonfireElf:Pe,kilnElf:qe,paperElf:yi,boxElf:Ee,clothElf:Ie,coalDrillElf:B,heavyDrillElf:$e,oilElf:fe,metalElf:hi,dyeElf:Qi},Be=b(()=>Object.values(Ae).filter(re=>re.bought.value).length),be=X(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>i.gte(Be.value,1)})),k=X(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>i.gte(Be.value,2),visibility:()=>p(be.earned.value)})),ee=X(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>i.gte(Be.value,3),visibility:()=>p(k.earned.value)})),Qe=X(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(Be.value,4),visibility:()=>p(ee.earned.value)})),Pi=X(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>i.gte(Be.value,5),visibility:()=>p(Qe.earned.value)})),si=X(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>i.gte(Be.value,6),visibility:()=>p(Pi.earned.value)})),Oi=X(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>i.gte(Be.value,7),visibility:()=>p(si.earned.value&&H.day.value>5)})),qi=X(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>i.gte(Be.value,8),visibility:()=>p(Oi.earned.value)})),hl=X(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>i.gte(Be.value,9),visibility:()=>p(qi.earned.value)})),ei=X(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>i.gte(Be.value,10),visibility:()=>p(H.day.value>=10)})),Yi=X(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>i.gte(Be.value,11),visibility:()=>p(ei.earned.value)})),ki=X(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>i.gte(Be.value,12),visibility:()=>p(Yi.earned.value)})),ol=[be,k,ee,Qe,Pi,si,Oi,qi,hl,ei,Yi,ki],Vl={manualMilestone:be,researchMilestone:k,coalGainMilestone:ee,logGainMilestone:Qe,forestMilestone:Pi,elvesMilestone:si,foundationMilestone:Oi,forestMilestone2:qi,treeUpgradesMilestone:hl,elvesMilestone2:ei,coalUpgradesMilestone:Yi,coalGainMilestone2:ki},{collapseMilestones:Wl,display:vl}=sn(Vl);return ui.on("update",re=>{i.lt(H.day.value,mn)||Object.values(Ae).forEach(_e=>_e.update(re))}),Di(()=>{H.day.value===mn&&i.gte(Be.value,6)&&i.gte($.coal.value,1e9)&&H.completeDay()}),{name:e,color:l,elves:Ae,totalElves:Be,milestones:ol,collapseMilestones:Wl,generalTabCollapsed:Ze,minWidth:700,display:f(()=>t(O,null,[t("div",null,[H.day.value===mn?`Reach ${me(6)} trained elves and ${me(1e9)} ${$.coal.displayName} to complete the day`:`${e} Complete!`," ",o("-")," ",t("button",{class:"button",style:"display: inline-block;",onClick:()=>he.value=!0},[o("Check Modifiers")])]),Ve(a),Ve(Ge),t(we,null,null),t("div",{style:"width: 600px"},[zl(U,Oe,Je,A,mi,Fi.concat(Zi))]),vl()]))}}),km="coal",Js=3,$=Ai(km,function(){const e="Coal",l="#151716",n="#B2BeB5",s="var(--foreground)",a=ji(0,"coal"),I=ji(0,"ash"),r=Se(0),d=b(()=>i.times(r.value,1e3)),u=b(()=>i.times(r.value,.1)),c=b(()=>{let J=i.times(r.value,50);return W.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),j=He(()=>({resource:ye.logs,cost(){let J=i.times(G.amount.value,m(G.cost)).plus(this.amount.value);return i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.smallFireBook.totalAmount.value).times(J),J.pow(1.5).times(1e4)},inverseCost(J){let z=i.div(J,1e4).root(1.5);return z=z.div(i.pow(.95,F.books.smallFireBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),z=z.sub(i.times(G.amount.value,m(G.cost))),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Small Fire")]),t("br",null,null),o("Burn 1000 logs for 0.1 coal and 50 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),P(d.value),o(" logs/sec"),t("br",null,null),o("+"),P(u.value),o(" coal/sec"),t("br",null,null),o("+"),P(c.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(j.cost)),o(" "),j.resource.displayName])),onPurchase(){r.value=i.add(r.value,1)},style:{color:s,width:"160px"}})),{min:h,max:v,add:y,remove:N}=cl({active:r,buyable:j}),x=ji(j.amount,"small fires"),M=Se(0),le=b(()=>i.times(M.value,1e4)),Y=b(()=>{let J=i.times(M.value,10);return W.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),g=b(()=>{let J=i.times(M.value,1e3);return W.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),G=He(()=>({resource:x,cost(){return i.pow(.95,F.books.bonfireBook.totalAmount.value).times(10)},inverseCost(J){return i.div(J,i.pow(.95,F.books.bonfireBook.totalAmount.value).times(10)).floor()},display:f(()=>t(O,null,[t("h3",null,[o("Bonfire")]),t("br",null,null),o("Burn 10,000 logs for 10 coal and 1000 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),P(le.value),o(" logs/sec"),t("br",null,null),o("+"),P(Y.value),o(" coal/sec"),t("br",null,null),o("+"),P(g.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(G.cost)),o(" "),G.resource.displayName])),onPurchase(J){r.value=i.sub(r.value,J).max(0),M.value=i.add(M.value,1)},style:{color:s,width:"160px"},visibility:()=>p(A.bought.value)})),{min:_,max:E,add:D,remove:Ze}=cl({buyable:G,active:M}),he=Se(0),Ge=b(()=>i.times(he.value,1e6)),Fe=b(()=>{let J=i.times(he.value,1e4);return W.elfTraining.kilnElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),ce=b(()=>{let J=i.times(he.value,1e4);return W.elfTraining.kilnElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),De=He(()=>({resource:ye.logs,cost(){let J=this.amount.value;return i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.kilnBook.totalAmount.value).times(J),i.pow(1.1,J).times(1e7)},inverseCost(J){let z=i.div(J,1e7).log(1.1);return z=z.div(i.pow(.95,F.books.kilnBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Charcoal Kiln")]),t("br",null,null),o("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),P(Ge.value),o(" logs/sec"),t("br",null,null),o("+"),P(Fe.value),o(" coal/sec"),t("br",null,null),o("+"),P(ce.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(De.cost)),o(" "),De.resource.displayName])),onPurchase(){he.value=i.add(he.value,1)},style:{color:s,width:"160px"},visibility:()=>p(hi.bought.value)})),{min:Re,max:ve,add:U,remove:oe}=cl({buyable:De,active:he}),q=Se(0),ke=b(()=>i.times(i.pow(q.value,te.row2Upgrades[1].bought.value?2:1),5e7).times(ci.efficientDrill.bought.value?2:1).times(W.elfTraining.smallfireElfTraining.milestones[2].earned.value?2:1).times(W.elfTraining.bonfireElfTraining.milestones[2].earned.value?2:1).times(W.elfTraining.kilnElfTraining.milestones[2].earned.value?2:1)),Oe=He(()=>({resource:ci.metal,cost(){let J=this.amount.value;i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.coalDrillBook.totalAmount.value).times(J);let z=i.pow(1.15,J).times(10);return W.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(z=z.div(i.add(ye.totalLogs.value,Math.E).ln())),W.elfTraining.coalDrillElfTraining.milestones[2].earned.value&&(z=z.div(10)),z},inverseCost(J){W.elfTraining.coalDrillElfTraining.milestones[2].earned.value&&(J=i.div(J,10)),W.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(J=i.div(J,i.add(ye.totalLogs.value,Math.E).ln()));let z=i.div(J,10).log(1.15);return z=z.div(i.pow(.95,F.books.coalDrillBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Coal Drill")]),t("br",null,null),o("Dig through the ground to find 50,000,000 coal"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("+"),P(ke.value),o(" coal/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(Oe.cost)),o(" "),Oe.resource.displayName])),onPurchase(){q.value=i.add(q.value,1)},style:{color:s,width:"160px"},visibility:()=>p(ci.coalDrill.bought.value)})),{max:gi,min:Pe,add:qe,remove:Je}=cl({buyable:Oe,active:q}),yi=T(()=>({resource:Q(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:s}})),Ee=T(()=>({resource:Q(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:s}})),Ie=T(()=>({resource:Q(I),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:s}})),A=T(()=>({resource:x,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){x.value=i.add(x.value,this.cost)},style:{color:s}})),B=[yi,Ee,Ie,A],$e=T(()=>({resource:Q(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:s},visibility:()=>p(A.bought.value)})),fe=T(()=>({resource:Q(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:s},visibility:()=>p(A.bought.value)})),mi=T(()=>({canAfford(){return i.gte(ye.logs.value,1e5)&&i.gte(I.value,1e5)},onPurchase(){ye.logs.value=i.sub(ye.logs.value,1e5),I.value=i.sub(I.value,1e5)},display:f(()=>t(O,null,[t("h3",null,[o("Mulched Soil")]),t("br",null,null),o("Double the bonus from Fertilized Soil"),t("br",null,null),t("br",null,null),o("Cost: "),me(1e5),o(" "),ye.logs.displayName,t("br",null,null),me(1e5),o(" "),I.displayName])),style:{color:s},visibility:()=>p(A.bought.value)})),hi=T(()=>({resource:ye.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:s},visibility:()=>p(A.bought.value)})),Fi=[$e,fe,mi,hi],Qi=T(()=>({resource:Q(a),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:s},visibility:()=>p(te.depthMilestones[4].earned.value)})),Zi=T(()=>({resource:Q(a),cost:1e45,display:{title:"Arsonist Assistance",description:"Every elf at or above level 5 doubles ash gain"},style:{color:s},visibility:()=>p(W.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),Ae=T(()=>({resource:Q(a),cost:1e50,display:{title:"Refined Coal",description:"Refineries boost coal gain"},style:{color:s},visibility:()=>p(W.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),Be=T(()=>({resource:Q(a),cost:1e55,display:{title:"Colored Fire",description:"Green dye also affects small fire synergy"},style:{color:s},visibility:()=>p(W.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),be=[Qi,Zi,Ae,Be],k=He(()=>({resource:Q(a),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.heatedCuttersBook.totalAmount.value).times(J),W.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(J=i.pow(.95,F.books.heatedCuttersBook.totalAmount.value).times(J)),J=J.div(Wi.boosts.rainbow1.value),i.add(J,1).pow(2.5).times(10)},inverseCost(J){let z=i.div(J,10).root(2.5).sub(1);return z=z.mul(Wi.boosts.rainbow1.value),W.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.heatedCuttersBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.heatedCuttersBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:f(()=>t(O,null,[o("Cutters cut down trees "),P(Oi.value),o("x faster")]))},style:{color:s},visibility:()=>p(yi.bought.value)})),ee=He(()=>({resource:Q(a),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.heatedPlantersBook.totalAmount.value).times(J),W.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(J=i.pow(.95,F.books.heatedPlantersBook.totalAmount.value).times(J)),J=J.div(Wi.boosts.rainbow1.value),i.add(J,1).pow(2.5).times(10)},inverseCost(J){let z=i.div(J,10).root(2.5).sub(1);return z=z.mul(Wi.boosts.rainbow1.value),W.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.heatedPlantersBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.heatedPlantersBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:f(()=>t(O,null,[o("Planters plant trees "),P(hl.value),o("x faster")]))},style:{color:s},visibility:()=>p(Ee.bought.value)})),Qe=He(()=>({resource:Q(I),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.fertilizerBook.totalAmount.value).times(J),W.elfTraining.fertilizerElfTraining.milestones[1].earned.value&&(J=i.pow(.95,F.books.fertilizerBook.totalAmount.value).times(J)),J=J.div(Wi.boosts.rainbow1.value),i.add(J,1).pow(1.5).times(5e4)},inverseCost(J){let z=i.div(J,5e4).root(1.5).sub(1);return z=z.mul(Wi.boosts.rainbow1.value),W.elfTraining.fertilizerElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.fertilizerBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.fertilizerBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:f(()=>t(O,null,[o("Trees give "),P(Yi.value),o("x more logs")]))},style:{color:s},visibility:()=>p(Ie.bought.value)})),Pi=[k,ee,Qe],si=ae(()=>[pe(()=>({addend(){return i.times(k.amount.value,.25)},description:"Heated Cutters",enabled(){return i.gt(k.amount.value,0)}})),Z(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:$e.bought}))]),Oi=b(()=>si.apply(1)),qi=ae(()=>[pe(()=>({addend(){return i.times(ee.amount.value,.25)},description:"Heated Planters",enabled(){return i.gt(ee.amount.value,0)}})),Z(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:fe.bought}))]),hl=b(()=>qi.apply(1)),ei=ae(()=>[pe(()=>({addend(){return i.times(Qe.amount.value,.25)},description:"Fertilized Soil",enabled(){return i.gt(Qe.amount.value,0)}})),Z(()=>({multiplier:2,description:"Mulched Soil",enabled:mi.bought}))]),Yi=b(()=>ei.apply(1)),ki=ae(()=>[pe(()=>({addend(){return u.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),pe(()=>({addend(){return Y.value},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),pe(()=>({addend(){return Fe.value},description:"Charcoal Kilns",enabled(){return i.gt(he.value,0)}})),pe(()=>({addend(){return ke.value},description:"Coal Drills",enabled(){return i.gt(q.value,0)}})),Z(()=>({multiplier:2,description:"Carry coal in boxes",enabled:li.upgrades.coalUpgrade.bought})),Z(()=>({multiplier:()=>i.div(li.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:li.upgrades.coalUpgrade.bought})),Z(()=>({multiplier:()=>{let J=j.amount.value;W.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=i.div(G.amount.value,10).add(J));let z=i.div(J,1e4).add(1);return Be.bought.value&&(z=i.add(z,We.dyes.green.amount.value)),z},description:"Small Fires Synergy",enabled:ze.elves.smallFireElf.bought})),Z(()=>({multiplier:()=>i.div(G.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ze.elves.bonfireElf.bought})),Z(()=>({multiplier:()=>i.div(De.amount.value,100).times(We.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ze.elves.kilnElf.bought})),Z(()=>({multiplier:2,description:"Mining overalls",enabled:wi.metalUpgrades.metalUpgrade2.bought})),Z(()=>({multiplier:3,description:"Mining helmet",enabled:wi.metalUpgrades.metalUpgrade3.bought})),Z(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:wi.metalUpgrades.metalUpgrade4.bought})),Z(()=>({multiplier:2,description:"12 Elves Trained",enabled:ze.milestones[11].earned})),ll(()=>({exponent:1.25,description:"3 Elves Trained",enabled:ze.milestones[2].earned,supportLowNumbers:!0})),Z(()=>({multiplier:()=>i.mul(te.depth.value,.25).pow(W.elfTraining.coalDrillElfTraining.milestones[4].earned.value?1.5:1).add(1),description:"5m Well Depth",enabled:te.depthMilestones[0].earned})),Z(()=>({multiplier:te.extractorCoal,description:"Heavy Extractor",enabled:()=>i.gt(te.activeExtractor.value,0)})),Z(()=>({multiplier:i.add(a.value,1).log10().add(1).sqrt(),description:"Peppermint Level 2",enabled:W.elfTraining.coalDrillElfTraining.milestones[1].earned})),Z(()=>({multiplier:i.add(di.buildRefinery.amount.value,1).sqrt(),description:"Refined Coal",enabled:Ae.bought})),ll(()=>({exponent:1.05,description:"Jack Level 2",enabled:W.elfTraining.heatedCutterElfTraining.milestones[1].earned}))]),ol=b(()=>ki.apply(0)),Vl=ae(()=>[pe(()=>({addend(){return c.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),pe(()=>({addend(){return g.value},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),pe(()=>({addend(){return ce.value},description:"Charcoal Kilns",enabled(){return i.gt(he.value,0)}})),Z(()=>({multiplier:2,description:"Carry ash in boxes",enabled:li.upgrades.ashUpgrade.bought})),Z(()=>({multiplier:()=>i.div(li.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:li.upgrades.ashUpgrade.bought})),Z(()=>({multiplier:()=>{let J=j.amount.value;return W.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=i.div(G.amount.value,100).add(J)),i.div(J,1e3).add(1)},description:"Small Fires Synergy",enabled:ze.elves.smallFireElf.bought})),Z(()=>({multiplier:()=>i.div(G.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ze.elves.bonfireElf.bought})),Z(()=>({multiplier:()=>i.div(De.amount.value,100).times(We.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ze.elves.kilnElf.bought})),Z(()=>({multiplier:4,description:"Mining boots",enabled:wi.metalUpgrades.metalUpgrade1.bought})),Z(()=>({multiplier:()=>i.pow(2,W.level5Elves.value),description:"Arson Assistance",enabled:Zi.bought})),ll(()=>({exponent:1.1,description:"Joy Level 2",enabled:W.elfTraining.smallfireElfTraining.milestones[1].earned})),ll(()=>({exponent:1.1,description:"Faith Level 2",enabled:W.elfTraining.bonfireElfTraining.milestones[1].earned})),ll(()=>({exponent:1.1,description:"Snowball Level 2",enabled:W.elfTraining.kilnElfTraining.milestones[1].earned})),pe(()=>({addend:F.paper,description:"Paper Burning",enabled:F.upgrades2.ashUpgrade.bought}))]),Wl=b(()=>Vl.apply(0)),vl=ae(()=>[pe(()=>({addend(){return i.negate(d.value)},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),pe(()=>({addend(){return i.negate(le.value)},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),pe(()=>({addend(){return i.negate(Ge.value)},description:"Charcoal Kilns",enabled(){return i.gt(he.value,0)}}))]),re=b(()=>vl.apply(0)),[_e,Ti]=al(()=>[{title:"Log Consumption",modifier:vl,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(he.value,0)}},{title:"Coal Gain",modifier:ki,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(he.value,0)}},{title:"Ash Gain",modifier:Vl,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(he.value,0)}}]),Ui=se(!1),ml=f(()=>t(xi,{modelValue:Ui.value,"onUpdate:modelValue":J=>Ui.value=J},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:_e}));ui.on("update",J=>{i.lt(H.day.value,Js)||i.times(J,re.value).negate().gt(ye.logs.value)||(ye.logs.value=i.times(J,re.value).plus(ye.logs.value),a.value=i.times(J,ol.value).plus(a.value),I.value=i.times(J,Wl.value).plus(I.value),r.value=i.max(r.value,0))});const{total:Ke,trackerDisplay:Ii}=Jl({resource:a,goal:1e7,name:e,day:Js,color:l,modal:{show:Ui,display:ml}});return{name:e,color:l,coal:a,totalCoal:Ke,computedCoalGain:ol,ash:I,activeFires:r,buildFire:j,activeBonfires:M,buildBonfire:G,activeKilns:he,buildKiln:De,activeDrills:q,buildDrill:Oe,warmerCutters:yi,warmerPlanters:Ee,basicFertilizer:Ie,unlockBonfire:A,dedicatedCutters:$e,dedicatedPlanters:fe,betterFertilizer:mi,unlockKiln:hi,efficientSmelther:Qi,arsonistAssistance:Zi,refinedCoal:Ae,coloredFire:Be,heatedCutters:k,heatedPlanters:ee,moreFertilizer:Qe,computedHeatedCutterEffect:Oi,computedHeatedPlanterEffect:hl,computedFertilizerEffect:Yi,generalTabCollapsed:Ti,minWidth:700,display:f(()=>t(O,null,[Ve(Ii),t(we,null,null),t(Hi,{resource:a,color:l,style:{marginBottom:0},resourceStyle:{textShadow:"grey 0px 0px 10px"},effectDisplay:i.gt(ol.value,0)?`+${P(ol.value)}/s`:void 0},null),t(we,null,null),t(Hi,{resource:I,color:n,style:"margin-bottom: 0",effectDisplay:i.gt(Wl.value,0)?`+${P(Wl.value)}/s`:void 0},null),t(we,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[Ve(j),t("div",null,[me(i.floor(r.value)),o("/"),me(i.floor(j.amount.value))]),ai(h,N,y,v)]}),A.bought.value?t(O,null,[t(we,null,null),t(Bi,null,{default:()=>[Ve(G),t("div",null,[me(M.value),o("/"),me(G.amount.value)]),ai(_,Ze,D,E)]})]):void 0,hi.bought.value?t(O,null,[t(we,null,null),t(Bi,null,{default:()=>[Ve(De),t("div",null,[me(he.value),o("/"),me(De.amount.value)]),ai(Re,oe,U,ve)]})]):void 0,ci.coalDrill.bought.value?t(O,null,[t(we,null,null),t(Bi,null,{default:()=>[Ve(Oe),t("div",null,[me(q.value),o("/"),me(Oe.amount.value)]),ai(Pe,Je,qe,gi)]})]):void 0]}),t(we,null,null),zl(B,Fi,be),ai(...Pi)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(a.value),o(" "),a.displayName]))}});const zm="management",Pl=12,il=13,W=Ai(zm,()=>{const e="Management",l="green",n=tl(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>H.day.value===Pl?Ae.reduce((ne,Ye)=>ne+Math.min(1,Ye.level.value/3),0)/Ae.length:H.day.value===il&&H.days[il-1].opened.value?Be.reduce((ne,Ye)=>ne+Math.min(1,Ye.level.value/5),0)/Be.length:1,display:f(()=>H.day.value===Pl||H.day.value===il&&H.days[il-1].opened.value?t(O,null,[me(i.times(m(n.progress),H.day.value===il?80:36)),o("/"),H.day.value===il?80:36,o(" elf levels")]):"")})),s=b(()=>{let ne=0;for(const Ye of Object.values(Zi))ne+=Ye.level.value;return ne}),a=b(()=>Object.values(Zi).reduce((ne,Ye)=>ne.add(Ye.exp.value),new i(0))),I=b(()=>Object.values(Zi).filter(ne=>ne.level.value>=5).length),r=T(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:ye.logs,cost:1e21})),d=T(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},visibility:()=>p(r.bought.value),resource:li.boxes,style:"width: 150px",cost:1e13})),u=T(()=>({display:{title:"Advanced Training",description:"Time for some advanced training! Now that all the elves know the basics, you have a foundation you can truly build off of. Everyone seems to be learning twice as quickly!"},visibility:()=>p(H.day.value>=il&&H.days[il-1].opened.value),resource:li.boxes,style:"width: 150px",cost:1e26})),c=ae(()=>[Z(()=>({multiplier:z,description:"Classroom Effect",enabled:d.bought})),Z(()=>({multiplier:2,description:"Advanced Training",enabled:u.bought})),Z(()=>({multiplier:2,description:"Carry experience in boxes???",enabled:li.row3Upgrades.xpUpgrade.bought}))]),j=b(()=>c.apply(1));function h(ne,Ye,...ti){const Vi=Se(0);let Ul=["Holly","Ivy","Hope","Jack","Mary","Noel","Joy","Faith","Snowball","Star","Bell","Gingersnap","Peppermint","Frosty","Cocoa","Twinkle","Carol"].indexOf(ne.name)+1;(ne.name=="Star"||ne.name=="Bell")&&(Ul/=3);const L=i.mul(_[3].earned.value?2e3:4e3,Ul),ie=b(()=>i.pow(5,dl.value).mul(L)),dl=b(()=>i.affordGeometricSeries(Vi.value,L,5,0).min(Ii.amount.value).toNumber()),as=b(()=>i.sub(Vi.value,i.sumGeometricSeries(dl.value,L,5,0))),ht=tl(()=>({direction:Ue.Right,width:160,height:14,style:()=>({"margin-top":"8px",background:l,"box-shadow":ce.value==ne.name?"0 0 12px black":k.value[ne.name]?"0 0 12px white":""}),baseStyle:"margin-top: -1px",fillStyle:()=>({"margin-top":"-1px","transition-duration":"0s",background:"white",animation:k.value[ne.name]?".5s focused-xp-bar linear infinite":""}),borderStyle:()=>i.gte(dl.value,Ii.amount.value)?"border-color: red":"",progress:()=>i.div(as.value,ie.value),display:f(()=>i.gte(dl.value,Ii.amount.value)?t(O,null,[o("Limit reached")]):t(O,null,[P(as.value),o("/"),P(ie.value),o(" XP")]))})),{collapseMilestones:Vt,display:Wt}=sn(Ye),os=ae(()=>[Z(()=>({multiplier:j,description:"Global XP Multiplier"})),Z(()=>({multiplier:be,description:"Focus Multiplier",enabled:()=>i.gt(Qe.value,0)&&k.value[ne.name]==!0})),...ti]),ms=b(()=>os.apply(.1));return Ei(()=>({display:{title:f(()=>t(O,null,[ne.name,o(" - LV "),me(dl.value)])),description:f(()=>t(O,null,[ne.name,o(" can buy buyables "),me(ne.computedAutoBuyCooldown.value)," ",o("times per second, gaining")," ",i.gte(dl.value,Ii.amount.value)?0:P(i.mul(ms.value,ne.computedAutoBuyCooldown.value))," ",o("XP/sec."),Ve(ht)]))},style:()=>({width:"190px",background:ce.value==ne.name?"var(--accent2)":""}),onClick(){ce.value=ne.name},canClick(){return ce.value!==ne.name},visibility:()=>p(ne.bought.value),name:ne.name,state:Vt,displayMilestone:Wt,level:dl,exp:Vi,milestones:Ye,timeForExp:ne.computedAutoBuyCooldown,amountOfTimesDone:ne.amountOfTimesDone,elfXPGainComputed:ms,elfXPGain:os}))}const v=[X(()=>({display:{requirement:"Holly Level 1",effectDisplay:f(()=>t(O,null,[o("Multiply log gain by "),t("sup",null,[o("9")]),t(xl,null,{default:()=>[o("Cutter amount")]}),o(".")]))},shouldEarn:()=>Re.level.value>=1})),X(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>p(v[0].earned.value),shouldEarn:()=>Re.level.value>=2})),X(()=>({display:{requirement:"Holly Level 3",effectDisplay:f(()=>t(O,null,[o("Multiply all cloth actions' effectiveness by log"),t("sub",null,[o("10")]),o("(Cutter amount).")]))},visibility:()=>p(v[1].earned.value),shouldEarn:()=>Re.level.value>=3})),X(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply auto cutting amount by 1.1 per day completed"},visibility:()=>p(v[2].earned.value&&H.day.value>=13),shouldEarn:()=>Re.level.value>=4})),X(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Raise workshop expansion cost by 0.99"},visibility:()=>p(v[3].earned.value&&H.day.value>=13),shouldEarn:()=>Re.level.value>=5}))],y=[X(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>ve.level.value>=1})),X(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>p(y[0].earned.value),shouldEarn:()=>ve.level.value>=2})),X(()=>({display:{requirement:"Ivy Level 3",effectDisplay:f(()=>t(O,null,[o("Auto planting speed is multiplied by 2"),t("sup",null,[o("(log"),t("sub",null,[o("10")]),o("(logs)"),t("sup",null,[o("0.2")]),o(")")])]))},visibility:()=>p(y[1].earned.value),shouldEarn:()=>ve.level.value>=3})),X(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>p(y[2].earned.value&&H.day.value>=13),shouldEarn:()=>ve.level.value>=4})),X(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"The lesser of auto planting and cutting amounts is increased to match the greater"},visibility:()=>p(y[3].earned.value&&H.day.value>=13),shouldEarn:()=>ve.level.value>=5}))],N=[X(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Forest size grows by trees planted per second raised to ^0.99"},shouldEarn:()=>U.level.value>=1})),X(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>p(N[0].earned.value),shouldEarn:()=>U.level.value>=2})),X(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster. It also buys max now."},visibility:()=>p(N[1].earned.value),shouldEarn:()=>U.level.value>=3})),X(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},visibility:()=>p(N[2].earned.value&&H.day.value>=13),shouldEarn:()=>U.level.value>=4})),X(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},visibility:()=>p(N[3].earned.value&&H.day.value>=13),shouldEarn:()=>U.level.value>=5}))],x=[X(()=>({display:{requirement:"Jack Level 1",effectDisplay:'"Fahrenheit 451" affects "Heated Cutters" twice.'},shouldEarn:()=>q.level.value>=1})),X(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>p(x[0].earned.value),shouldEarn:()=>q.level.value>=2})),X(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>p(x[1].earned.value),shouldEarn:()=>q.level.value>=3})),X(()=>({display:{requirement:"Jack Level 4",effectDisplay:f(()=>t(O,null,[o("Oil gain is multiplied by "),t(xl,null,{default:()=>[o("total elf levels")]}),o(".")]))},visibility:()=>p(x[2].earned.value&&H.day.value>=13),shouldEarn:()=>q.level.value>=4})),X(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil-using machines."},visibility:()=>p(x[3].earned.value&&H.day.value>=13),shouldEarn:()=>q.level.value>=5}))],M=[X(()=>({display:{requirement:"Mary Level 1",effectDisplay:'"Tillamook Burn Country" affects "Heated Planters" twice.'},shouldEarn:()=>ke.level.value>=1})),X(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>p(M[0].earned.value),shouldEarn:()=>ke.level.value>=2})),X(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>p(M[1].earned.value),shouldEarn:()=>ke.level.value>=3})),X(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Double automatic tree planting speed"},visibility:()=>p(M[2].earned.value&&H.day.value>=13),shouldEarn:()=>ke.level.value>=4})),X(()=>({display:{requirement:"Mary Level 5",effectDisplay:f(()=>t(O,null,[o("Auto smelting speed is multiplied by "),t(xl,null,{default:()=>[o("total XP/1000")]}),o(".")]))},visibility:()=>p(M[3].earned.value&&H.day.value>=13),shouldEarn:()=>ke.level.value>=5}))],le=[X(()=>({display:{requirement:"Noel Level 1",effectDisplay:f(()=>t(O,null,[o("Log gain is multiplied by "),t(xl,null,{default:()=>[o("total elf levels")]}),o(".")]))},shouldEarn:()=>Oe.level.value>=1})),X(()=>({display:{requirement:"Noel Level 2",effectDisplay:`"The Garden Tree's Handbook" affects "Fertilized Soil" twice`},visibility:()=>p(le[0].earned.value),shouldEarn:()=>Oe.level.value>=2})),X(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the coal drill cost by ln(Total logs + e)"},visibility:()=>p(le[1].earned.value),shouldEarn:()=>Oe.level.value>=3})),X(()=>({display:{requirement:"Noel Level 4",effectDisplay:f(()=>t(O,null,[o("Reduce oil refinery cost by (Plastic amount)"),t("sup",null,[o("2")])]))},visibility:()=>p(le[2].earned.value&&H.day.value>=13),shouldEarn:()=>Oe.level.value>=4})),X(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>p(le[3].earned.value&&H.day.value>=13),shouldEarn:()=>Oe.level.value>=5}))],Y=[X(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Small Fire synergy counts bonfires at reduced rate."},shouldEarn:()=>Pe.level.value>=1})),X(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(Y[0].earned.value),shouldEarn:()=>Pe.level.value>=2})),X(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>p(Y[1].earned.value),shouldEarn:()=>Pe.level.value>=3})),X(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>p(Y[2].earned.value&&H.day.value>=13),shouldEarn:()=>Pe.level.value>=4})),X(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(Y[3].earned.value&&H.day.value>=13),shouldEarn:()=>Pe.level.value>=5}))],g=[X(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>qe.level.value>=1})),X(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(g[0].earned.value),shouldEarn:()=>qe.level.value>=2})),X(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>p(g[1].earned.value),shouldEarn:()=>qe.level.value>=3})),X(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>p(g[2].earned.value&&H.day.value>=13),shouldEarn:()=>qe.level.value>=4})),X(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(g[3].earned.value&&H.day.value>=13),shouldEarn:()=>qe.level.value>=5}))],G=[X(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>Je.level.value>=1})),X(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(G[0].earned.value),shouldEarn:()=>Je.level.value>=2})),X(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>p(G[1].earned.value),shouldEarn:()=>Je.level.value>=3})),X(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>p(G[2].earned.value&&H.day.value>=13),shouldEarn:()=>Je.level.value>=4})),X(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(G[3].earned.value&&H.day.value>=13),shouldEarn:()=>Je.level.value>=5}))],_=[X(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>Ee.level.value>=1})),X(()=>({display:{requirement:"Star Level 2",effectDisplay:"Pulp requires 10x less ash"},visibility:()=>p(_[0].earned.value),shouldEarn:()=>Ee.level.value>=2})),X(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>p(_[1].earned.value),shouldEarn:()=>Ee.level.value>=3})),X(()=>({display:{requirement:"Star Level 4",effectDisplay:"Halve xp requirements"},visibility:()=>p(_[2].earned.value&&H.day.value>=13),shouldEarn:()=>Ee.level.value>=4})),X(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all elves that are at level 5 or above."},visibility:()=>p(_[3].earned.value&&H.day.value>=13),shouldEarn:()=>Ee.level.value>=5}))],E=[X(()=>({display:{requirement:"Bell Level 1",effectDisplay:f(()=>t(O,null,[o("Every box buyable adds "),t(xl,null,{default:()=>[o("level")]}),o(" levels to same-row box buyables.")]))},shouldEarn:()=>Ie.level.value>=1})),X(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>p(E[0].earned.value),shouldEarn:()=>Ie.level.value>=2})),X(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>p(E[1].earned.value),shouldEarn:()=>Ie.level.value>=3})),X(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>p(E[2].earned.value&&H.day.value>=13),shouldEarn:()=>Ie.level.value>=4})),X(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>p(E[3].earned.value&&H.day.value>=13),shouldEarn:()=>Ie.level.value>=5}))],D=[X(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>A.level.value>=1})),X(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:f(()=>t(O,null,[o("Multiply all cloth actions' effectiveness by log"),t("sub",null,[o("10")]),o("(dye sum + 10)")]))},visibility:()=>p(D[0].earned.value),shouldEarn:()=>A.level.value>=2})),X(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>p(D[1].earned.value),shouldEarn:()=>A.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(ne=>{We.dyes[ne].amount.value=0,We.dyes[ne].buyable.amount.value=0})}})),X(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:"Raise secondary dyes' first effects to the 1.1 but reset primary dyes"},visibility:()=>p(D[2].earned.value&&H.day.value>=13),shouldEarn:()=>A.level.value>=4,onComplete(){["red","yellow","blue"].forEach(ne=>{We.dyes[ne].amount.value=0,We.dyes[ne].buyable.amount.value=0})}})),X(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:f(()=>t(O,null,[t(xl,null,{default:()=>[o("Well depth")]}),o(" divides metal machine costs")]))},visibility:()=>p(D[3].earned.value&&H.day.value>=13),shouldEarn:()=>A.level.value>=5}))],Ze=[X(()=>({display:{requirement:"Peppermint Level 1",effectDisplay:"The mining drill exponent is increased from 2 to 2.5"},shouldEarn:()=>$e.level.value>=1})),X(()=>({display:{requirement:"Peppermint Level 2",effectDisplay:"Coal boosts its own gain"},visibility:()=>p(Ze[0].earned.value),shouldEarn:()=>$e.level.value>=2})),X(()=>({display:{requirement:"Peppermint Level 3",effectDisplay:"The coal drill cost is 10x cheaper"},visibility:()=>p(Ze[1].earned.value),shouldEarn:()=>$e.level.value>=3})),X(()=>({display:{requirement:"Peppermint Level 4",effectDisplay:"Unlock 3 coal upgrades"},visibility:()=>p(Ze[2].earned.value&&H.day.value>=13),shouldEarn:()=>$e.level.value>=4})),X(()=>({display:{requirement:"Peppermint Level 5",effectDisplay:"Well depth boosts coal gain an additional half time"},visibility:()=>p(Ze[3].earned.value&&H.day.value>=13),shouldEarn:()=>$e.level.value>=5}))],he=[X(()=>({display:{requirement:"Twinkle Level 1",effectDisplay:"Schools multiply metal gain per ore"},shouldEarn:()=>fe.level.value>=1})),X(()=>({display:{requirement:"Twinkle Level 2",effectDisplay:"Each Twinkle level multiplies auto smelting speed by 1.25"},visibility:()=>p(he[0].earned.value),shouldEarn:()=>fe.level.value>=2})),X(()=>({display:{requirement:"Twinkle Level 3",effectDisplay:"Auto smelting multi is tripled."},visibility:()=>p(he[1].earned.value),shouldEarn:()=>fe.level.value>=3})),X(()=>({display:{requirement:"Twinkle Level 4",effectDisplay:"All metal machines are 10x cheaper"},visibility:()=>p(he[2].earned.value&&H.day.value>=13),shouldEarn:()=>fe.level.value>=4})),X(()=>({display:{requirement:"Twinkle Level 5",effectDisplay:"Unlock another row of focus upgrades"},visibility:()=>p(he[3].earned.value&&H.day.value>=13),shouldEarn:()=>fe.level.value>=5}))],Ge=[X(()=>({display:{requirement:"Cocoa Level 1",effectDisplay:"The depth boost to oil gain is better"},shouldEarn:()=>mi.level.value>=1})),X(()=>({display:{requirement:"Cocoa Level 2",effectDisplay:"Total oil gained boosts drill power"},visibility:()=>p(Ge[0].earned.value),shouldEarn:()=>mi.level.value>=2})),X(()=>({display:{requirement:"Cocoa Level 3",effectDisplay:"Double drill power and oil gain"},visibility:()=>p(Ge[1].earned.value),shouldEarn:()=>mi.level.value>=3})),X(()=>({display:{requirement:"Cocoa Level 4",effectDisplay:"Plastics are produced 5x faster but cost 5x as much oil"},visibility:()=>p(Ge[2].earned.value&&H.day.value>=13),shouldEarn:()=>mi.level.value>=4})),X(()=>({display:{requirement:"Cocoa Level 5",effectDisplay:"Unlock another row of oil upgrades"},visibility:()=>p(Ge[3].earned.value&&H.day.value>=13),shouldEarn:()=>mi.level.value>=5}))],Fe=[X(()=>({display:{requirement:"Frosty Level 1",effectDisplay:"Oil boosts Star and Bell's xp gain"},shouldEarn:()=>hi.level.value>=1})),X(()=>({display:{requirement:"Frosty Level 2",effectDisplay:"Oil pumps are 10x cheaper"},visibility:()=>p(Fe[0].earned.value),shouldEarn:()=>hi.level.value>=2})),X(()=>({display:{requirement:"Frosty Level 3",effectDisplay:"Oil burners act like there are ^1.5 of them"},visibility:()=>p(Fe[1].earned.value),shouldEarn:()=>hi.level.value>=3})),X(()=>({display:{requirement:"Frosty Level 4",effectDisplay:f(()=>t(O,null,[o("Heavy drill drill's ln is now log"),t("sub",null,[o("2.5")])]))},visibility:()=>p(Fe[2].earned.value&&H.day.value>=13),shouldEarn:()=>hi.level.value>=4})),X(()=>({display:{requirement:"Frosty Level 5",effectDisplay:"Unlock another row of paper upgrades"},visibility:()=>p(Fe[3].earned.value&&H.day.value>=13),shouldEarn:()=>hi.level.value>=5}))],ce=Se("Holly"),De=f(()=>{const ne=Object.values(Zi).find(Ye=>Ye.name===ce.value);return ne==null?(console.warn("This should not happen.",ce.value),""):t(O,null,[ce.value,o("'s milestones: "),ne.displayMilestone()])}),Re=h(ze.elves.cuttersElf,v),ve=h(ze.elves.plantersElf,y),U=h(ze.elves.expandersElf,N),oe=[Re,ve,U],q=h(ze.elves.heatedCuttersElf,x),ke=h(ze.elves.heatedPlantersElf,M),Oe=h(ze.elves.fertilizerElf,le),gi=[q,ke,Oe],Pe=h(ze.elves.smallFireElf,Y),qe=h(ze.elves.bonfireElf,g),Je=h(ze.elves.kilnElf,G),yi=[Pe,qe,Je],Ee=h(ze.elves.paperElf,_,Z(()=>({multiplier:()=>i.add(te.oil.value,1).log10(),description:"Frosty Level 1",enabled:Fe[0].earned}))),Ie=h(ze.elves.boxElf,E,Z(()=>({multiplier:()=>i.add(te.oil.value,1).log10(),description:"Frosty Level 1",enabled:Fe[0].earned}))),A=h(ze.elves.clothElf,D),B=[Ee,Ie,A],$e=h(ze.elves.coalDrillElf,Ze),fe=h(ze.elves.metalElf,he),mi=h(ze.elves.oilElf,Ge),hi=h(ze.elves.heavyDrillElf,Fe),Fi=[$e,hi,mi],Qi=[fe],Zi={cutterElfTraining:Re,planterElfTraining:ve,expandersElfTraining:U,heatedCutterElfTraining:q,heatedPlanterElfTraining:ke,fertilizerElfTraining:Oe,smallfireElfTraining:Pe,bonfireElfTraining:qe,kilnElfTraining:Je,paperElfTraining:Ee,boxElfTraining:Ie,clothElfTraining:A,coalDrillElfTraining:$e,metalElfTraining:fe,oilElfTraining:mi,heavyDrillElfTraining:hi},Ae=[Re,ve,U,q,ke,Oe,Pe,qe,Je,Ee,Ie,A],Be=[Re,ve,U,q,ke,Oe,Pe,qe,Je,Ee,Ie,A,$e,fe,mi,hi];ui.on("update",ne=>{if(!(H.day.value=1&&(Ye.amountOfTimesDone.value-=ti,i.lt(Ye.level.value,Ii.amount.value)&&(Ye.exp.value=i.mul(Ye.elfXPGainComputed.value,ti).add(Ye.exp.value)))}if(Qe.value=Math.max(Qe.value-ne,0),ee.value=Math.max(ee.value-ne,0),i.eq(Qe.value,0)){k.value={};const Ye=Ti.bought.value?2e3:1e3;let ti=1-Math.abs(Math.sin(Date.now()/Ye*2));_e.bought.value&&(ti=1-(1-ti)**2),be.value=i.pow(qi.value,ti)}}});const be=Se(1),k=Se({}),ee=Se(0),Qe=Se(0),Pi=ae(()=>[Z(()=>({multiplier:2,description:"Focus Upgrade 1",enabled:Vl.bought})),pe(()=>({addend(){return i.add(We.dyes.orange.amount.value,We.dyes.purple.amount.value).add(We.dyes.green.amount.value).add(1).cbrt()},description:"Colorful Focus",enabled:te.row3Upgrades[2].bought}))]),si=ae(()=>[pe(()=>({addend:1,description:"Focus Upgrade 2",enabled:Wl.bought})),pe(()=>({addend:1,description:"Focus Upgrade 6",enabled:Ui.bought}))]),Oi=ae(()=>[pe(()=>({addend:-5,description:"Focus Upgrade 3",enabled:vl.bought}))]),qi=b(()=>Pi.apply(10)),hl=b(()=>si.apply(3)),ei=b(()=>Oi.apply(15)),Yi=tl(()=>({direction:Ue.Right,width:566,height:50,style:"border-radius: 4px 4px 0 0",borderStyle:"border-radius: 4px 4px 0 0",fillStyle:()=>({background:Qe.value>0?l:"#7f7f00",animation:Qe.value>0?"1s focused-focus-bar linear infinite":"",opacity:Qe.value>0?Qe.value/10:1,transition:"none"}),progress:()=>i.sub(be.value,1).div(i.sub(qi.value,1)).toNumber(),display:f(()=>t(O,null,[P(be.value),o("x"),Qe.value>0?t(O,null,[" ",o("to "),Object.keys(k.value).join(", "),o(" for")," ",ln(Qe.value)]):""]))})),ki=Ei(()=>({display:{title:"Focus",description:f(()=>t(O,null,[o("Motivate elves to focus, multiplying 3 random elves' XP gain by up to")," ",P(qi.value),o("x for 10 seconds, equal to the focus bar's effect."),i.gte(ee.value,0)?t(O,null,[t("br",null,null),o("Reroll cooldown: "),ln(ee.value)]):""]))},style:{width:"300px"},canClick:()=>i.eq(ee.value,0),onClick(){ee.value=i.fromValue(ei.value).toNumber(),Qe.value=10,ol(Object.values(Zi).filter(ne=>m(ne.visibility)===Ci.Visible).length,hl.value)}}));function ol(ne,Ye){var Ul,L;let ti=0;k.value={};const Vi=i.min(Ye,ne);for(;Vi.gt(ti);){const ie=(L=(Ul=Object.values(Zi)[Math.floor(Math.random()*ne)])==null?void 0:Ul.name)!=null?L:"";k.value[ie]||(k.value[ie]=!0,ti++)}}const Vl=T(()=>({display:{title:"Focus Booster",description:"Multiplies the maximum experience multiplier from focus by 2"},resource:ye.logs,cost:1e25})),Wl=T(()=>({display:{title:"Focus Buffer",description:"Increase elves affected by focus by 1"},resource:ye.logs,cost:1e30})),vl=T(()=>({display:{title:"Focus Upgrader",description:"Focus can now be rerolled every 10 seconds"},resource:ye.logs,cost:1e35})),re=[Vl,Wl,vl],_e=T(()=>({display:{title:"Focus Improver",description:"The bar moves slower when it's closer to the right and faster when it's closer to the left"},resource:ye.logs,visibility:()=>p(Zi.metalElfTraining.milestones[4].earned.value),cost:1e40})),Ti=T(()=>({display:{title:"Focus Focuser",description:"The bar moves 2x slower"},resource:ye.logs,visibility:()=>p(Zi.metalElfTraining.milestones[4].earned.value),cost:1e45})),Ui=T(()=>({display:{title:"Focus Doubler",description:"Focus now applies to 6 elves."},resource:ye.logs,visibility:()=>p(Zi.metalElfTraining.milestones[4].earned.value),cost:1e50})),ml=[_e,Ti,Ui],Ke=b(()=>{const ne=i.pow(10,Ii.amount.value),Ye=i.pow(4,Ii.amount.value);let ti=i.pow(2e4,i.pow(Ii.amount.value,.75));i.gte(Ii.amount.value,4)&&(ti=ti.div(1e3));const Vi=i.pow(2e3,Ii.amount.value);return{wood:ti.mul(1e21),coal:Vi.mul(1e32),paper:Vi.mul(1e18),boxes:ti.mul(1e13),metalIngots:Ye.mul(1e12),cloth:ne.mul(1e4),plastic:Ye.mul(1e6),dye:i.add(Ii.amount.value,1).mul(1e4)}}),Ii=He(()=>({display:f(()=>t(O,null,[t("h3",null,[o("Build a School")]),t("div",null,[o("You gotta start somewhere, right? Each school increases the maximum level for elves by 1, maximum of "),H.days[13].opened.value?5:3,o(" schools.")]),t("div",null,[o("You have "),me(Ii.amount.value),o(" schools, which are currently letting elves learn up to level "),me(Ii.amount.value),o(".")]),i.lt(Ii.amount.value,m(Ii.purchaseLimit))?t("div",null,[o("Costs "),P(Ke.value.wood),o(" logs, "),P(Ke.value.coal)," ",o("coal, "),P(Ke.value.paper),o(" paper,")," ",P(Ke.value.boxes),o(" boxes,")," ",P(Ke.value.metalIngots),o(" metal ingots,")," ",P(Ke.value.cloth),o(" cloth, "),P(Ke.value.plastic)," ",o("plastic, and requires "),P(Ke.value.dye),o(" of red, yellow, and blue dye")]):null])),canPurchase(){return Ke.value.wood.lte(ye.logs.value)&&Ke.value.coal.lte($.coal.value)&&Ke.value.paper.lte(F.paper.value)&&Ke.value.boxes.lte(li.boxes.value)&&Ke.value.metalIngots.lte(ci.metal.value)&&Ke.value.cloth.lte(wi.cloth.value)&&Ke.value.plastic.lte(di.plastic.value)&&Ke.value.dye.lte(We.dyes.blue.amount.value)&&Ke.value.dye.lte(We.dyes.red.amount.value)&&Ke.value.dye.lte(We.dyes.yellow.amount.value)&&i.lt(Ii.amount.value,m(Ii.purchaseLimit))},onPurchase(){ye.logs.value=i.sub(ye.logs.value,Ke.value.wood),$.coal.value=i.sub($.coal.value,Ke.value.coal),F.paper.value=i.sub(F.paper.value,Ke.value.paper),li.boxes.value=i.sub(li.boxes.value,Ke.value.boxes),ci.metal.value=i.sub(ci.metal.value,Ke.value.metalIngots),wi.cloth.value=i.sub(wi.cloth.value,Ke.value.cloth),di.plastic.value=i.sub(di.plastic.value,Ke.value.plastic),this.amount.value=i.add(this.amount.value,1)},purchaseLimit(){return H.days[il-1].opened.value?5:3},visibility:b(()=>p(r.bought.value)),style:"width: 600px"})),J=b(()=>{const ne=i.add(Il.amount.value,1).pow(1.5);return{wood:ne.mul(1e21),paper:ne.mul(1e18),boxes:ne.mul(1e13),metalIngots:ne.mul(1e12)}}),z=b(()=>i.add(Il.amount.value,1).pow(.9).pow(F.upgrades2.classroomUpgrade.bought.value?1.1:1)),Il=He(()=>({display:f(()=>t(O,null,[t("h3",null,[o("Build a Classroom")]),t("div",null,[o("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",o("(Classrooms + 1)"),t("sup",null,[o("0.9")]),o(".")]),t("div",null,[o("You have "),me(Il.amount.value),o(" classrooms, which are currently multiplying elves' XP gain by "),P(z.value)]),t("div",null,[o("Costs "),P(J.value.wood),o(" logs,"),P(J.value.paper),o(" paper, "),P(J.value.boxes)," ",o("boxes, "),P(J.value.metalIngots),o(" metal ingots")])])),canPurchase(){return J.value.wood.lte(ye.logs.value)&&J.value.paper.lte(F.paper.value)&&J.value.boxes.lte(li.boxes.value)&&J.value.metalIngots.lte(ci.metal.value)},onPurchase(){ye.logs.value=i.sub(ye.logs.value,J.value.wood),F.paper.value=i.sub(F.paper.value,J.value.paper),li.boxes.value=i.sub(li.boxes.value,J.value.boxes),ci.metal.value=i.sub(ci.metal.value,J.value.metalIngots),this.amount.value=i.add(this.amount.value,1)},visibility:b(()=>p(d.bought.value)),style:"width: 600px"})),[Tl,rl]=al(()=>[{title:"Elves affected by Focus",modifier:si,base:3},{title:"Maximum Focus Effect",modifier:Pi,base:10},{title:"Focus Cooldown",modifier:Oi,unit:" secs",base:15},{title:"Global XP Gain",modifier:c,unit:" XP"},{title:"Holly XP Gain per Action",modifier:Re.elfXPGain,base:.1,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:ve.elfXPGain,base:.1,unit:" XP"},{title:"Hope XP Gain per Action",modifier:U.elfXPGain,base:.1,unit:" XP"},{title:"Jack XP Gain per Action",modifier:q.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:ke.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Oe.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:Pe.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:qe.elfXPGain,base:.1,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:Je.elfXPGain,base:.1,unit:" XP"},{title:"Star XP Gain per Action",modifier:Ee.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Ie.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:A.elfXPGain,base:.1,unit:" XP"}]),fl=se(!1),el=f(()=>t(xi,{modelValue:fl.value,"onUpdate:modelValue":ne=>fl.value=ne},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Tl}));return Di(()=>{(H.day.value===Pl&&Ae.every(ne=>ne.level.value>=3)||H.day.value===il&&Be.every(ne=>ne.level.value>=5))&&H.completeDay()}),{name:e,day:Pl,color:l,minWidth:700,elfTraining:Zi,totalElfLevels:s,totalElfExp:a,level5Elves:I,currentShown:ce,generalTabCollapsed:rl,teaching:r,schools:Ii,classrooms:Il,classroomUpgrade:d,advancedUpgrade:u,focusMultiplier:be,upgrades:re,upgrades2:ml,focusTargets:k,focusCooldown:ee,focusTime:Qe,display:f(()=>t(O,null,[H.day.value===Pl?"Get all elves to level 3.":H.day.value===il&&H.days[il-1].opened.value?"Get all elves to level 5.":`${e} Complete!`," ",o("-"),t("button",{class:"button",style:"display: inline-block;",onClick:()=>fl.value=!0},[o("Check Modifiers")]),Ve(el),Ve(n),t("br",null,null),sl(Ii,Il),zl([r,d,u]),t(we,null,null),i.gt(Ii.amount.value,0)?t(O,null,[t("br",null,null),o("Click on an elf to see their milestones."),t("br",null,null),t("br",null,null),Ve(ki),zl(re),t("br",null,null),zl([Yi],oe,gi,yi,B,Fi,Qi),t(we,null,null),De()]):""]))}}),Sm="cloth",fs=8,wi=Ai(Sm,function(){const e="Cloth",l="white",n=ji(0,"cloth"),s=ji(0,"wool"),a=ji(10,"sheep"),I=Se(0),r=tl(()=>({direction:Ue.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:()=>i.div(I.value,Je.value)})),d=Ei(()=>({display:{title:"Breed sheep",description:f(()=>t(O,null,[o("Breed "),Me(i.floor(Pe.value)),o(" sheep"),t("br",null,null),Ve(r)]))},style:{minHeight:"80px"},canClick:()=>i.gte(I.value,Je.value),onClick(){if(i.lt(I.value,Je.value))return;const be=i.floor(Pe.value);a.value=i.add(a.value,be),I.value=0}})),u=Se(0),c=tl(()=>({direction:Ue.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:()=>i.div(u.value,A.value)})),j=Ei(()=>({display:{title:"Shear sheep",description:f(()=>t(O,null,[o("Shear up to "),Me(i.floor(Ee.value)),o(" sheep"),t("br",null,null),Ve(c)]))},style:{minHeight:"80px"},canClick:()=>i.gte(u.value,A.value),onClick(){if(i.lt(u.value,A.value))return;const be=i.min(a.value,Ee.value).floor();s.value=i.add(s.value,be),u.value=0}})),h=Se(0),v=tl(()=>({direction:Ue.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:()=>i.div(h.value,mi.value)})),y=Ei(()=>({display:{title:"Spinning wool",description:f(()=>t(O,null,[o("Spin "),Me(i.floor($e.value)),o(" wool"),t("br",null,null),Ve(v)]))},style:{minHeight:"80px"},canClick:()=>i.gte(h.value,mi.value),onClick(){if(i.lt(h.value,mi.value))return;const be=i.min(s.value,$e.value).floor();n.value=i.add(n.value,be),s.value=i.sub(s.value,be),h.value=0}})),N=en(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{d.canClick.value&&d.onClick()}})),x=en(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{j.canClick.value&&j.onClick()}})),M=en(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{y.canClick.value&&y.onClick()}})),le=He(()=>({resource:ye.logs,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.5,be).times(1e14)},inverseCost(be){let k=i.div(be,1e14).log(1.5);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),Y=He(()=>({resource:ci.metal,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.4,be).times(1e4)},inverseCost(be){let k=i.div(be,1e4).log(1.4);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),g=He(()=>({resource:F.paper,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.3,be).times(1e6)},inverseCost(be){let k=i.div(be,1e6).log(1.3);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),G=T(()=>({resource:Q(n),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),_=T(()=>({resource:Q(s),cost:150,visibility:()=>p(G.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),E=T(()=>({resource:Q(a),cost:200,visibility:()=>p(_.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ze={treesUpgrade4:T(()=>({resource:Q(n),cost:1e3,visibility:()=>p(di.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:E,treesUpgrade2:_,treesUpgrade1:G},he=T(()=>({resource:Q(n),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Ge=T(()=>({resource:Q(s),cost:225,visibility:()=>p(he.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Fe=T(()=>({resource:Q(a),cost:300,visibility:()=>p(Ge.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),De={metalUpgrade4:T(()=>({resource:Q(n),cost:2e3,visibility:()=>p(di.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Fe,metalUpgrade2:Ge,metalUpgrade1:he},Re=T(()=>({resource:Q(n),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),ve=T(()=>({resource:Q(s),cost:200,visibility:()=>p(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),U=T(()=>({resource:Q(a),cost:400,visibility:()=>p(ve.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),q={paperUpgrade4:T(()=>({resource:Q(n),cost:4e3,visibility:()=>p(di.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:U,paperUpgrade2:ve,paperUpgrade1:Re},ke=b(()=>i.add(ye.computedAutoCuttingAmount.value,1).root(9)),Oe=b(()=>i.add(We.dyeSum.value,10).log10()),gi=ae(()=>[pe(()=>({addend:le.amount,description:"Build more pens"})),Z(()=>({multiplier:()=>i.div(di.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(di.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Oe,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ke,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:li.row3Upgrades.clothUpgrade.bought}))]),Pe=b(()=>gi.apply(1)),qe=ae(()=>[]),Je=b(()=>qe.apply(1)),yi=ae(()=>[pe(()=>({addend:Y.amount,description:"Make stronger shears"})),Z(()=>({multiplier:()=>i.div(di.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(di.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Oe,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ke,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:li.row3Upgrades.clothUpgrade.bought}))]),Ee=b(()=>yi.apply(1)),Ie=ae(()=>[]),A=b(()=>Ie.apply(1)),B=ae(()=>[pe(()=>({addend:g.amount,description:"Learn how to spin"})),Z(()=>({multiplier:()=>i.div(di.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(di.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Oe,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ke,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:li.row3Upgrades.clothUpgrade.bought}))]),$e=b(()=>B.apply(1)),fe=ae(()=>[]),mi=b(()=>fe.apply(1)),[hi,Fi]=al(()=>[{title:"Sheep Gain",modifier:gi,base:1},{title:"Sheep Breeding Cooldown",modifier:qe,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:yi,base:1},{title:"Shearing Cooldown",modifier:Ie,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:B,base:1},{title:"Spinning Cooldown",modifier:fe,base:1,visible:!1,unit:"s"}]),Qi=se(!1),Zi=f(()=>t(xi,{modelValue:Qi.value,"onUpdate:modelValue":be=>Qi.value=be},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:hi}));ui.on("update",be=>{i.lt(H.day.value,fs)||(i.gte(I.value,Je.value)?I.value=Je.value:(I.value=i.add(I.value,be),d.isHolding.value&&d.onClick()),i.gte(u.value,A.value)?u.value=A.value:(u.value=i.add(u.value,be),j.isHolding.value&&j.onClick()),i.gte(h.value,mi.value)?h.value=mi.value:(h.value=i.add(h.value,be),y.isHolding.value&&y.onClick()))});const{total:Ae,trackerDisplay:Be}=Jl({resource:n,goal:1e3,name:e,day:fs,color:l,textColor:"var(--feature-foreground)",modal:{show:Qi,display:Zi}});return{name:e,color:l,cloth:n,totalCloth:Ae,wool:s,sheep:a,buildPens:le,betterShears:Y,fasterSpinning:g,treesUpgrades:Ze,metalUpgrades:De,paperUpgrades:q,generalTabCollapsed:Fi,breedingProgress:I,shearingProgress:u,spinningProgress:h,breedSheepHK:N,shearSheepHK:x,spinWoolHK:M,minWidth:700,display:f(()=>t(O,null,[Ve(Be),t(we,null,null),t(Hi,{resource:n,style:"margin-bottom: 0"},null),t(Hi,{resource:s,style:"margin-bottom: 0"},null),t(Hi,{resource:a,style:"margin-bottom: 0"},null),ai(d,j,y),ai(le,Y,g),t(we,null,null),t(nn,null,{default:()=>[sl(...Object.values(Ze)),sl(...Object.values(De)),sl(...Object.values(q))]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}}),Rm="dyes",Hm=11,We=Ai(Rm,function(){const e="Dyes",l="#D4D4F4";function n(y){const N=ji(0,y.name),x=ae(()=>{const Y=[pe(()=>({addend:()=>i.add(le.amount.value,1),description:`${y.name} Chambers`}))];return y.color==="yellow"&&te.row3Upgrades[0].bought.value&&Y.push(Z(()=>({multiplier(){return i.add(s.red.amount.value,1).log10().pow(.75)},description:"Dye Synergy I"}))),y.color==="red"&&te.row3Upgrades[3].bought.value&&Y.push(Z(()=>({multiplier(){return i.add(s.blue.amount.value,1).log10()},description:"Dye Synergy II"}))),(y.color==="red"||y.color==="yellow")&&Y.push(Z(()=>({multiplier:a.orange1,description:"Orange Dye Boost 1"}))),(y.color=="yellow"||y.color=="blue")&&Y.push(Z(()=>({multiplier:a.green1,description:"Green Dye Boost 1"}))),(y.color=="red"||y.color=="blue")&&Y.push(Z(()=>({multiplier:a.purple1,description:"Purple Dye Boost 1"}))),(y.color=="red"||y.color=="yellow"||y.color=="blue")&&(Y.push(Z(()=>({multiplier:2,description:"Wetter Dyes",enabled:d.yellowDyeUpg.bought}))),Y.push(Z(()=>({multiplier:()=>i.add(wi.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:W.elfTraining.clothElfTraining.milestones[0].earned}))),Y.push(Z(()=>({multiplier:2,description:"Wrapping Paper Milestone 1",enabled:Wi.milestones.primaryBoost.earned})))),(y.color=="orange"||y.color=="green"||y.color=="purple")&&Y.push(Z(()=>({multiplier:2,description:"Wrapping Paper Milestone 2",enabled:Wi.milestones.secondaryBoost.earned}))),Y.push(Z(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:W.elfTraining.clothElfTraining.milestones[2].earned}))),Y.push(Z(()=>({multiplier:2,description:"Carry dye in boxes",enabled:li.row3Upgrades.dyeUpgrade.bought}))),Y}),M=b(()=>x.apply(0)),le=He(()=>{const Y=Gi(y.costs);return{...y,style:()=>({backgroundColor:m(le.canPurchase)?l:"#545454",minWidth:"200px"}),display:f(()=>t("span",null,[t("h3",null,[y.name,o(" Chambers")]),t("br",null,null),o("Create "),P(M.value),o(" "),y.name,y.dyesToReset.length>0?", but reset "+y.dyesToReset.map(g=>g.name).join(", "):"",o("."),t("br",null,null),t("br",null,null),t("span",{class:"white-space: pre-wrap"},[o("Currently:")," ",y.listedBoosts.filter(g=>m(g.visible)).map(g=>Ve(f(()=>t("div",null,[m(g.desc)]))))]),t("br",null,null),t("div",null,[o("Cost:")," ",m(Y).map(g=>Ve(f(()=>{var G,_;return t("div",null,[P(m(i.pow((G=m(le.cost))!=null?G:i.dInf,m((_=g.root)!=null?_:1)).times(m(g.base))))," ",g.res.displayName,t("br",null,null)])})))])])),cost(){let g=le.amount.value;return i.gte(g,25)&&(g=i.pow(g,2).div(20)),i.gte(g,10)&&(g=i.pow(g,2).div(5)),g=i.mul(g,i.pow(.95,F.books.dyeBook.totalAmount.value)),i.div(g,10).plus(1)},inverseCostPre(g){let G=i.sub(g,1).mul(10);return G=G.div(i.pow(.95,F.books.dyeBook.totalAmount.value)),i.gte(G,10)&&(G=i.mul(G,5).root(2)),i.gte(G,25)&&(G=i.mul(G,20).root(2)),i.isNaN(G)?i.dZero:G.floor().max(0)},inverseCost(){return m(le.visibility)!=Ci.Visible?i.dZero:m(Y).reduce((g,G)=>{var _;return i.min(this.inverseCostPre(i.div(G.res.value,m(G.base)).root(m((_=G.root)!=null?_:1))),g)},i.dInf)},canPurchase:b(g=>{var _;if(m(le.visibility)!=Ci.Visible)return!1;const G=(_=g!=null?g:m(le.cost))!=null?_:i.dInf;return m(Y).every(E=>{var D;return i.div(E.res.value,m(E.base)).root(m((D=E.root)!=null?D:1)).gte(G)})}),onPurchase(g){var _;const G=(_=g!=null?g:m(le.cost))!=null?_:i.dInf;N.value=i.add(N.value,M.value),le.amount.value=i.add(le.amount.value,1),Wi.milestones.secondaryNoReset.earned.value||(m(Y).forEach(E=>{var D;E.res.value=i.sub(E.res.value,i.pow(G,m((D=E.root)!=null?D:1)).times(m(E.base)))}),y.dyesToReset.forEach(E=>E.reset()))}}});return{name:y.name,amount:N,buyable:le,toGenerate:x,computedToGenerate:M,display:f(()=>t(Hi,{resource:N,color:y.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const s={red:n({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:ye.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:te.oil}],listedBoosts:[{visible:!0,desc:b(()=>`+${P(a.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:n({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:ye.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:te.oil}],listedBoosts:[{visible:!0,desc:b(()=>`x${P(a.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:n({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:ye.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:te.oil}],listedBoosts:[{visible:!0,desc:b(()=>`+${me(a.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:n({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:s.red.amount},{base:10,root:2,res:s.yellow.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${P(a.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:b(()=>`/${P(a.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){s.red.amount.value=0,s.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}}]}),green:n({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:s.yellow.amount},{base:10,root:2,res:s.blue.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${P(a.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:b(()=>`+${me(i.sub(a.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}}]}),purple:n({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:s.blue.amount},{base:10,root:2,res:s.red.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${P(a.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:b(()=>`x${P(a.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){s.red.amount.value=0,s.red.buyable.amount.value=0}}]})},a={red1:b(()=>i.pow(i.add(s.red.amount.value,1).log2().plus(1).log2().div(2),d.blueDyeUpg2.bought.value?1.5:1)),yellow1:b(()=>i.add(s.yellow.amount.value,1).log2().plus(1)),blue1:b(()=>i.add(s.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:b(()=>i.pow(2,i.add(s.orange.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(W.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),orange2:b(()=>i.add(s.orange.amount.value,1).log2().plus(1).pow(te.row3Upgrades[1].bought.value?2.5:1)),green1:b(()=>i.pow(2,i.add(s.green.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(W.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),green2:b(()=>i.add(s.green.amount.value,1).log2().plus(1).pow(d.coalUpg.bought.value?2:1)),purple1:b(()=>i.pow(2,i.add(s.purple.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(W.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),purple2:b(()=>i.add(s.purple.amount.value,1).log2().plus(1))},[I,r]=al(()=>[{title:"Red Dye Creation",modifier:s.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:s.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:s.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:s.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:s.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:s.purple.toGenerate,base:0}]),d={blueDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(1)||d.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:f(()=>t(O,null,[o("Multiply Log gain by log"),t("sub",null,[o("10")]),o("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:Q(s.blue.amount),onPurchase(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),redDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(10)||d.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:f(()=>t(O,null,[o("Multiply Ore Purity by log"),t("sub",null,[o("10")]),o("(Cloth)+1.")]))},cost:1500,resource:Q(s.red.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0}})),yellowDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(100)||d.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:Q(s.yellow.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0,s.yellow.amount.value=0,s.yellow.buyable.amount.value=0,s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),yellowDyeUpg2:T(()=>({visibility:()=>p(d.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:Q(s.yellow.amount),onPurchase(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}})),redDyeUpg2:T(()=>({visibility:()=>p(d.redDyeUpg.bought.value),display:{title:"De Louvre",description:f(()=>t(O,null,[o("Multiply Smelting Speed by "),t(xl,null,{default:()=>[o("Refineries+1")]}),o(".")]))},cost:6e3,resource:Q(s.red.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0}})),blueDyeUpg2:T(()=>({visibility:()=>p(d.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:Q(s.blue.amount),onPurchase(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),coalUpg:T(()=>({visibility:()=>p(d.blueDyeUpg2.bought.value&&d.redDyeUpg2.bought.value&&d.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:$.coal,onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0,s.yellow.amount.value=0,s.yellow.buyable.amount.value=0,s.blue.amount.value=0,s.blue.buyable.amount.value=0}}))},u=se(!1),c=f(()=>t(xi,{modelValue:u.value,"onUpdate:modelValue":y=>u.value=y},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:I})),j=ji(b(()=>Object.values(s).reduce((y,N)=>i.add(y,N.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:v}=Jl({resource:j,goal:6e4,name:e,day:Hm,color:l,textColor:"var(--feature-foreground)",modal:{show:u,display:c},ignoreTotal:!0});return{name:e,color:l,dyes:s,dyeSum:j,boosts:a,totalDyeSum:h,minWidth:700,generalTabCollapsed:r,upgrades:d,display:f(()=>t(O,null,[Ve(v),t(we,null,null),t("div",{style:"width: 620px"},[ai(s.red.display,s.yellow.display,s.blue.display),ai(s.red.buyable,s.yellow.buyable,s.blue.buyable),t(we,null,null),ai(s.orange.display,s.green.display,s.purple.display),ai(s.orange.buyable,s.green.buyable,s.purple.buyable)]),t(we,null,null),t("div",{class:"row",style:"vertical-align: top"},[sl(d.redDyeUpg,d.redDyeUpg2),sl(d.yellowDyeUpg,d.yellowDyeUpg2),sl(d.blueDyeUpg,d.blueDyeUpg2)]),Ve(d.coalUpg)]))}}),Lm="boxes",Ln=6,li=Ai(Lm,function(){const e="Boxes",l="#964B00",n=ji(0,"boxes"),s=ae(()=>[Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:ri.milestones.extraExpansionMilestone5.earned})),ll(()=>({exponent:1.1,description:"Bell Level 2",enabled:W.elfTraining.boxElfTraining.milestones[1].earned}))]),a=Ks(()=>({scaling:es(1e10,1),baseResource:ye.logs,gainResource:Q(n),roundUpCost:!0,gainModifier:s})),I=Ei(()=>({display:f(()=>t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",yn(ye.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",ye.logs.displayName])])),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=T(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){H.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:100})),d=T(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){H.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:1e3})),u=T(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){H.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:4e3})),c={logsUpgrade:r,ashUpgrade:d,coalUpgrade:u},j=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(di.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),h=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(di.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),v=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(di.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),y={oreUpgrade:j,metalUpgrade:h,plasticUpgrade:v},N=T(()=>({resource:Q(n),cost:1e16,visibility:()=>p(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),x=T(()=>({resource:Q(n),cost:1e17,visibility:()=>p(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"},onPurchase(){["red","yellow","blue","orange","green","purple"].forEach(U=>{We.dyes[U].amount.value=0,We.dyes[U].buyable.amount.value=0})}})),M=T(()=>({resource:Q(n),cost:1e18,visibility:()=>p(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),le={clothUpgrade:N,dyeUpgrade:x,xpUpgrade:M},Y=He(()=>({display:{title:"Carry more logs",description:f(()=>t(O,null,[o("Use boxes to carry even more logs, boosting their gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(Y.amount.value),i.gt(Y.freeLevels.value,0)?t(O,null,[o(" (+"),me(Y.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(Y.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let oe=3;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(100).div(We.boosts.orange2.value).div(Wi.boosts.ocean1.value)},inverseCost(U){let oe=3;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,Wi.boosts.ocean1.value).mul(We.boosts.orange2.value).div(100).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(r.bought.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(g.amount.value,1).sqrt().floor().add(i.max(G.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(Y.amount.value,Y.freeLevels.value))})),g=He(()=>({display:{title:"Carry more ash",description:f(()=>t(O,null,[o("Use boxes to carry even more ash, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(g.amount.value),i.gt(g.freeLevels.value,0)?t(O,null,[o(" (+"),me(g.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(g.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let oe=5;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(1e3).div(We.boosts.orange2.value)},inverseCost(U){let oe=5;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,We.boosts.orange2.value).div(1e3).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(d.bought.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(Y.amount.value,1).sqrt().floor().add(i.max(G.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(g.amount.value,g.freeLevels.value))})),G=He(()=>({display:{title:"Carry more coal",description:f(()=>t(O,null,[o("Use boxes to carry even more coal, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(G.amount.value),i.gt(G.freeLevels.value,0)?t(O,null,[o(" (+"),me(G.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(G.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let oe=7;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(1e3).div(We.boosts.orange2.value)},inverseCost(U){let oe=7;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,We.boosts.orange2.value).div(1e3).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(u.bought.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(Y.amount.value,1).sqrt().floor().add(i.max(g.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(G.amount.value,G.freeLevels.value))})),_={logBoxesBuyable:Y,ashBoxesBuyable:g,coalBoxesBuyable:G},E=He(()=>({display:{title:"Carry more ore",description:f(()=>t(O,null,[o("Use boxes to carry even more ore, boosting their gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(E.amount.value),i.gt(E.freeLevels.value,0)?t(O,null,[o(" (+"),me(E.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(E.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let oe=10;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(1e25).div(We.boosts.orange2.value).div(Wi.boosts.ocean1.value)},inverseCost(U){let oe=10;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,Wi.boosts.ocean1.value).mul(We.boosts.orange2.value).div(1e25).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(W.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(D.amount.value,1).sqrt().floor().add(i.max(Ze.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(E.amount.value,E.freeLevels.value))})),D=He(()=>({display:{title:"Carry more metal",description:f(()=>t(O,null,[o("Use boxes to carry even more metal, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(D.amount.value),i.gt(D.freeLevels.value,0)?t(O,null,[o(" (+"),me(D.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(D.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let oe=15;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(1e28).div(We.boosts.orange2.value)},inverseCost(U){let oe=15;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,We.boosts.orange2.value).div(1e28).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(W.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(E.amount.value,1).sqrt().floor().add(i.max(Ze.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(D.amount.value,D.freeLevels.value))})),Ze=He(()=>({display:{title:"Carry more plastic",description:f(()=>t(O,null,[o("Use boxes to carry even more plastic, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(Ze.amount.value),i.gt(Ze.freeLevels.value,0)?t(O,null,[o(" (+"),me(Ze.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[P(i.div(Ze.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let oe=20;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--,i.pow(oe,U).times(1e31).div(We.boosts.orange2.value)},inverseCost(U){let oe=20;W.elfTraining.boxElfTraining.milestones[2].earned.value&&oe--;let q=i.mul(U,We.boosts.orange2.value).div(1e31).log(oe);return q=q.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN(q)?i.dZero:q.floor().max(0)},visibility:()=>p(W.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(E.amount.value,1).sqrt().floor().add(i.max(D.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(Ze.amount.value,Ze.freeLevels.value))})),he={oreBoxesBuyable:E,metalBoxesBuyable:D,plasticBoxesBuyable:Ze};ui.on("update",U=>{i.lt(H.day.value,Ln)||(n.value=i.times(U,di.buyables.passiveBoxes.amount.value).times(a.currentGain.value).div(100).add(n.value))});const[Ge,Fe]=al(()=>[{title:"Boxes Gain",modifier:s,base:()=>a.scaling.currentGain(a)}]),ce=se(!1),De=f(()=>t(xi,{modelValue:ce.value,"onUpdate:modelValue":U=>ce.value=U},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Ge})),{total:Re,trackerDisplay:ve}=Jl({resource:n,goal:5e4,name:e,day:Ln,color:l,modal:{display:De,show:ce}});return{name:e,day:Ln,color:l,boxes:n,totalBoxes:Re,boxesConversion:a,upgrades:c,row2Upgrades:y,row3Upgrades:le,buyables:_,buyables2:he,minWidth:700,generalTabCollapsed:Fe,display:f(()=>t(O,null,[Ve(ve),t(we,null,null),t(Hi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(we,null,null),Ve(I),t(we,null,null),zl(Object.values(c),Object.values(y),Object.values(le)),t(we,null,null),ai(...Object.values(_))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),P(n.value),o(" "),n.displayName]))}});var et="data:image/png;base64,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",it="./assets/cloth.7bcd7f37.png",lt="data:image/png;base64,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",nt="data:image/png;base64,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",st="./assets/elf.9fbfa563.png",tt="./assets/elfManagement.436c8744.png",at="./assets/metal.7407f5d1.png",ot="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==",mt="./assets/paperStacks.4c96ec8c.png",It="./assets/plastic.b8ac74ff.png",rt="./assets/sws.714ad454.png",dt="./assets/tree.35808197.png",ut="./assets/workshopMansion.f5e58b53.png",Qm="./assets/wrappingPaper.7d754375.png";const H=Ai("main",function(){const e=Se(1),l=b(()=>(+new Date(new Date().getFullYear(),11,e.value)-je.time)/1e3),n=se(!1),s=se(-1),a=se(""),I=se();function r(c){const j=Se(!1),h=Se(!1);return _i(()=>{const v=c(),y=Gi(v.shouldNotify),N=Gi(()=>m(y)||m(h));return{...v,opened:j,shouldNotify:N,recentlyUpdated:h,[Ll]:fo,[Ql]:function(){const{day:x,layer:M,symbol:le,opened:Y,shouldNotify:g,story:G,completedStory:_,recentlyUpdated:E}=this;return{day:x,symbol:le,layer:M,opened:Y,recentlyUpdated:E,shouldNotify:g,onOpenLore(){var he,Ge;const D=H.day.value>x;s.value=D?x-1:-1;const Ze=m((Ge=(he=zi[M!=null?M:"trees"])==null?void 0:he.name)!=null?Ge:"");a.value=D?`${Ze} - Completed!`:Ze,I.value=D?`${G}
(Y.push({label:g.split("/").slice(-1)[0].slice(0,-4),value:d[g]}),Y),[]));const c=Xn({});function j(Y){if(c[Y]==null){let g=localStorage.getItem(Y);if(g==null)c[Y]={error:"Save doesn't exist in localStorage",id:Y};else if(g==="dW5kZWZpbmVk")c[Y]={error:"Save is undefined",id:Y};else try{if(g[0]!=="{")if(g[0]==="e")g=decodeURIComponent(escape(atob(g)));else if(g[0]==="\u1BE1")g=Gl.decompressFromUTF16(g);else return console.warn("Unable to determine preset encoding",g),a.value=!0,c[Y]={error:"Unable to determine preset encoding",id:Y},c[Y];c[Y]={...JSON.parse(g),id:Y}}catch(G){c[Y]={error:G,id:Y},console.warn(`SavesManager: Failed to load info about save with id ${Y}: ${G} ${g}`)}}return c[Y]}pl(n,Y=>{Y&&Object.keys(c).forEach(g=>delete c[g])});const h=b(()=>bi.saves.reduce((Y,g)=>(Y[g]=j(g),Y),{}));function v(Y){let g;switch(je.id===Y?g=Es(je[fi]):g=JSON.stringify(h.value[Y]),ni.exportEncoding){default:console.warn(`Unknown save encoding: ${ni.exportEncoding}. Defaulting to lz`);case"lz":g=Gl.compressToUTF16(g);break;case"base64":g=btoa(unescape(encodeURIComponent(g)));break;case"plain":break}const G=document.createElement("textarea");G.value=g,document.body.appendChild(G),G.select(),G.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(G)}function y(Y){je.id===Y&&$i();const g={...h.value[Y],id:vn()};$i(g),bi.saves.push(g.id)}function N(Y){bi.saves=bi.saves.filter(g=>g!==Y),localStorage.removeItem(Y),c[Y]=void 0}function x(Y){h.value[je.id].time=je.time,$i(),c[je.id]=void 0,Bl(h.value[Y]),c[Y]=void 0}function M(Y){if(r.value=Y,Dl(()=>{r.value=null}),Y[0]!=="{")if(Y[0]==="e")Y=decodeURIComponent(escape(atob(Y)));else if(Y[0]==="\u1BE1")Y=Gl.decompressFromUTF16(Y);else{console.warn("Unable to determine preset encoding",Y);return}const g=JSON.parse(Y);g.id=vn(),$i(g),bi.saves.push(g.id),x(g.id)}function le(Y,g){const G=h.value[Y];G&&(G.name=g,je.id===Y?(je.name=g,$i()):($i(G),c[Y]=void 0))}return(Y,g)=>(C(),ge(xi,{modelValue:n.value,"onUpdate:modelValue":g[4]||(g[4]=G=>n.value=G),ref_key:"modal",ref:s},{header:Ce(()=>[pr]),body:Ce(({shown:G})=>[G?(C(),ge(m(Xt),{key:0,list:m(bi).saves,handle:".handle",itemKey:_=>_},{item:Ce(({element:_})=>[t(Zr,{save:m(h)[_],onOpen:E=>x(_),onExport:E=>v(_),onEditName:E=>le(_,E),onDuplicate:E=>y(_),onDelete:E=>N(_)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):K("",!0)]),footer:Ce(()=>[V("div",yr,[t(Zt,{modelValue:I.value,"onUpdate:modelValue":g[0]||(g[0]=G=>I.value=G),title:"Import Save",placeholder:"Paste your save here!",class:Ji({importingFailed:a.value})},null,8,["modelValue","class"]),V("div",hr,[Vr,V("div",Wr,[V("button",{class:"button",onClick:g[1]||(g[1]=G=>x(m(Kl)().id))},"New Game"),Object.keys(m(u)).length>0?(C(),ge(ls,{key:0,options:m(u),modelValue:r.value,"onUpdate:modelValue":g[2]||(g[2]=G=>M(G)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):K("",!0)])]),V("div",vr,[jr,V("button",{class:"button modal-default-button",onClick:g[3]||(g[3]=G=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var pt=oi(Jr,[["__scopeId","data-v-3b9991aa"]]);const Ki=e=>(Rl("data-v-8495e562"),e=e(),Hl(),e),fr=["src","alt"],Cr={key:1,class:"title"},wr=Ki(()=>V("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),gr={class:"discord"},Or={class:"discord-links"},Yr={key:0},Nr=["href"],Xr=Ki(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Mr=Ki(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),xr={href:"https://forums.moddingtree.com/",target:"_blank"},Gr=Ki(()=>V("span",{class:"material-icons"},"forum",-1)),Fr=Ki(()=>V("span",{class:"material-icons"},"info",-1)),kr=Ki(()=>V("span",{class:"material-icons"},"library_books",-1)),zr=Ki(()=>V("span",{class:"material-icons"},"settings",-1)),Sr=Ki(()=>V("span",{class:"material-icons"},"library_books",-1)),Rr=Ki(()=>V("span",{class:"material-icons"},"settings",-1)),Hr=Ki(()=>V("span",{class:"material-icons"},"info",-1)),Lr={href:"https://forums.moddingtree.com/",target:"_blank"},Qr=Ki(()=>V("span",{class:"material-icons"},"forum",-1)),Tr={class:"discord"},Ur={class:"discord-links"},Er={key:0},Ar=["href"],Br=Ki(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Dr=Ki(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),_r=xe({__name:"Nav",setup(e){const l=se(null),n=se(null),s=se(null),a=se(null),{useHeader:I,banner:r,title:d,discordName:u,discordLink:c,versionNumber:j}=ni;function h(){window.open(c,"mywindow")}return(v,y)=>(C(),R(O,null,[m(I)?(C(),R("div",_l({key:0,class:"nav"},v.$attrs),[m(r)?(C(),R("img",{key:0,src:m(r),class:"banner",alt:m(d)},null,8,fr)):(C(),R("div",Cr,Le(m(d)),1)),V("div",{onClick:y[0]||(y[0]=N=>{var x;return(x=a.value)==null?void 0:x.open()}),class:"version-container"},[t(Xi,{display:"Changelog",direction:m(Ue).Down,class:"version"},{default:Ce(()=>[V("span",null,"v"+Le(m(j)),1)]),_:1},8,["direction"])]),wr,V("div",gr,[V("span",{onClick:h,class:"material-icons"},"discord"),V("ul",Or,[m(c)?(C(),R("li",Yr,[V("a",{href:m(c),target:"_blank"},Le(m(u)),9,Nr)])):K("",!0),Xr,Mr])]),V("div",null,[V("a",xr,[t(Xi,{display:"Forums",direction:m(Ue).Down,yoffset:"5px"},{default:Ce(()=>[Gr]),_:1},8,["direction"])])]),V("div",{onClick:y[1]||(y[1]=N=>{var x;return(x=l.value)==null?void 0:x.open()})},[t(Xi,{display:"Info",direction:m(Ue).Down,class:"info"},{default:Ce(()=>[Fr]),_:1},8,["direction"])]),V("div",{onClick:y[2]||(y[2]=N=>{var x;return(x=n.value)==null?void 0:x.open()})},[t(Xi,{display:"Saves",direction:m(Ue).Down,xoffset:"-20px"},{default:Ce(()=>[kr]),_:1},8,["direction"])]),V("div",{onClick:y[3]||(y[3]=N=>{var x;return(x=s.value)==null?void 0:x.open()})},[t(Xi,{display:"Options",direction:m(Ue).Down,xoffset:"-66px"},{default:Ce(()=>[zr]),_:1},8,["direction"])])],16)):(C(),R("div",_l({key:1,class:"overlay-nav"},v.$attrs),[V("div",{onClick:y[4]||(y[4]=N=>{var x;return(x=a.value)==null?void 0:x.open()}),class:"version-container"},[t(Xi,{display:"Changelog",direction:m(Ue).Right,xoffset:"25%",class:"version"},{default:Ce(()=>[V("span",null,"v"+Le(m(j)),1)]),_:1},8,["direction"])]),V("div",{onClick:y[5]||(y[5]=N=>{var x;return(x=n.value)==null?void 0:x.open()})},[t(Xi,{display:"Saves",direction:m(Ue).Right},{default:Ce(()=>[Sr]),_:1},8,["direction"])]),V("div",{onClick:y[6]||(y[6]=N=>{var x;return(x=s.value)==null?void 0:x.open()})},[t(Xi,{display:"Options",direction:m(Ue).Right},{default:Ce(()=>[Rr]),_:1},8,["direction"])]),V("div",{onClick:y[7]||(y[7]=N=>{var x;return(x=l.value)==null?void 0:x.open()})},[t(Xi,{display:"Info",direction:m(Ue).Right},{default:Ce(()=>[Hr]),_:1},8,["direction"])]),V("div",null,[V("a",Lr,[t(Xi,{display:"Forums",direction:m(Ue).Right,xoffset:"7px"},{default:Ce(()=>[Qr]),_:1},8,["direction"])])]),V("div",Tr,[V("span",{onClick:h,class:"material-icons"},"discord"),V("ul",Ur,[m(c)?(C(),R("li",Er,[V("a",{href:m(c),target:"_blank"},Le(m(u)),9,Ar)])):K("",!0),Br,Dr])])],16)),t(XI,{ref_key:"info",ref:l,changelog:a.value},null,8,["changelog"]),t(pt,{ref_key:"savesManager",ref:n},null,512),t(RI,{ref_key:"options",ref:s},null,512),t(ZI,{ref_key:"changelog",ref:a},null,512)],64))}});var yt=oi(_r,[["__scopeId","data-v-8495e562"]]);const ts=e=>(Rl("data-v-e251e576"),e=e(),Hl(),e),Pr={class:"inner-tab"},qr={key:1},$r=ts(()=>V("br",null,null,-1)),Kr=o(" You can help continue the "),ed=ts(()=>V("i",null,"advent",-1)),id=o("ure at: "),ld=ts(()=>V("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[V("span",{class:"material-icons info-modal-discord"},"discord"),o(" The Paper Pilot Community ")],-1)),nd=xe({__name:"Game",setup(e){const l=yl(je,"tabs"),n=b(()=>Object.keys(zi)),s=ni.useHeader,a=Nl(H.loreBody);function I(r){const{display:d,minimized:u,minWidth:c,name:j,color:h,minimizable:v,nodes:y,minimizedDisplay:N}=r;return{display:d,minimized:u,minWidth:c,name:j,color:h,minimizable:v,nodes:y,minimizedDisplay:N}}return(r,d)=>(C(),R("div",{class:Ji(["tabs-container",{useHeader:m(s)}])},[(C(!0),R(O,null,gs(m(l),(u,c)=>{var j,h;return C(),R("div",{key:c,class:Ji(["tab",m((j=m(zi)[u])==null?void 0:j.classes)]),ref_for:!0,ref:`tab-${c}`,style:vi(m((h=m(zi)[u])==null?void 0:h.style))},[c===0&&!m(s)?(C(),ge(yt,{key:0})):K("",!0),V("div",Pr,[m(n).includes(u)?(C(),ge(dI,_l({key:0},I(m(zi)[u]),{index:c,tab:()=>{var v;return(v=r.$refs[`tab-${c}`])==null?void 0:v[0]}}),null,16,["index","tab"])):(C(),ge(pi(u),{key:1,index:c},null,8,["index"]))])],6)}),128)),t(xi,{modelValue:m(H).showLoreModal.value,"onUpdate:modelValue":d[0]||(d[0]=u=>m(H).showLoreModal.value=u)},{header:Ce(()=>[V("h2",null,Le(m(H).loreTitle.value),1)]),body:Ce(()=>[m(a)?(C(),ge(pi(m(a)),{key:0})):K("",!0),m(H).loreScene.value!==-1?(C(),R("div",qr,[t(oI,{day:m(H).loreScene.value},null,8,["day"]),$r,Kr,ed,id,ld])):K("",!0)]),_:1},8,["modelValue"])],2))}});var sd=oi(nd,[["__scopeId","data-v-e251e576"]]);const hn=e=>(Rl("data-v-4a50ce42"),e=e(),Hl(),e),td={class:"game-over-modal-header"},ad=["src","alt"],od={class:"game-over-modal-title"},md=hn(()=>V("h2",null,"Congratulations!",-1)),Id={key:0},rd=hn(()=>V("br",null,null,-1)),dd=hn(()=>V("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ud=hn(()=>V("br",null,null,-1)),cd=["href"],bd=hn(()=>V("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Zd=xe({__name:"GameOverScreen",setup(e){const{title:l,logo:n,discordName:s,discordLink:a,versionNumber:I,versionTitle:r}=ni,d=b(()=>ln(je.timePlayed)),u=b(()=>ns.value&&!je.keepGoing),c=yl(je,"autosave");function j(){je.keepGoing=!0}function h(){Bl(Kl())}return(v,y)=>(C(),ge(xi,{"model-value":m(u)},{header:Ce(()=>[V("div",td,[m(n)?(C(),R("img",{key:0,class:"game-over-modal-logo",src:m(n),alt:m(l)},null,8,ad)):K("",!0),V("div",od,[md,V("h4",null,"You've beaten "+Le(m(l))+" v"+Le(m(I))+": "+Le(m(r)),1)])])]),body:Ce(({shown:N})=>[N?(C(),R("div",Id,[V("div",null,"It took you "+Le(m(d))+" to beat the game.",1),rd,dd,ud,V("div",null,[V("a",{href:m(a),class:"game-over-modal-discord-link"},[bd,o(" "+Le(m(s)),1)],8,cd)]),t(jl,{title:"Autosave",modelValue:m(c),"onUpdate:modelValue":y[0]||(y[0]=x=>Mi(c)?c.value=x:null)},null,8,["modelValue"])])):K("",!0)]),footer:Ce(()=>[V("div",{class:"game-over-footer"},[V("button",{onClick:j,class:"button"},"Keep Going"),V("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var pd=oi(Zd,[["__scopeId","data-v-4a50ce42"]]);const Fn=e=>(Rl("data-v-3de07c06"),e=e(),Hl(),e),yd=Fn(()=>V("div",{class:"nan-modal-header"},[V("h2",null,"NaN value detected!")],-1)),hd={key:0},Vd=Fn(()=>V("br",null,null,-1)),Wd=["href"],vd=Fn(()=>V("span",{class:"material-icons nan-modal-discord"},"discord",-1)),jd=Fn(()=>V("br",null,null,-1)),Jd={class:"nan-footer"},fd=xe({__name:"NaNScreen",setup(e){const{discordName:l,discordLink:n}=ni,s=yl(je,"autosave"),a=yl(Ni,"hasNaN"),I=se(null),r=b(()=>{var y;return(y=Ni.NaNPath)==null?void 0:y.join(".")}),d=b(()=>{var y;return(y=Ni.NaNPath)==null?void 0:y.slice(-1)[0]}),u=b(()=>Ni.NaNReceiver&&d.value?Ni.NaNReceiver[d.value]:null),c=b({get(){return je.devSpeed===0},set(y){je.devSpeed=y?null:0}});function j(){Ni.NaNReceiver&&d.value&&(Ni.NaNReceiver[d.value]=new i(0),Ni.hasNaN=!1)}function h(){Ni.NaNReceiver&&d.value&&(Ni.NaNReceiver[d.value]=new i(1),Ni.hasNaN=!1)}function v(){Ni.NaNReceiver&&d.value&&(Ni.NaNReceiver[d.value]=new i(NaN),Ni.hasNaN=!1)}return(y,N)=>(C(),R(O,null,[t(xi,_l({modelValue:m(a),"onUpdate:modelValue":N[4]||(N[4]=x=>Mi(a)?a.value=x:null)},y.$attrs),{header:Ce(()=>[yd]),body:Ce(()=>[V("div",null,[o(' Attempted to assign "'+Le(m(r))+'" to NaN',1),m(u)?(C(),R("span",hd,Le(" ")+"(previously "+Le(m(P)(m(u)))+")",1)):K("",!0),o(". Auto-saving has been "+Le(m(s)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Vd,V("div",null,[V("a",{href:m(n),class:"nan-modal-discord-link"},[vd,o(" "+Le(m(l)),1)],8,Wd)]),jd,t(jl,{title:"Autosave",modelValue:m(s),"onUpdate:modelValue":N[0]||(N[0]=x=>Mi(s)?s.value=x:null)},null,8,["modelValue"]),m(ni).enablePausing?(C(),ge(jl,{key:0,title:"Pause game",modelValue:m(c),"onUpdate:modelValue":N[1]||(N[1]=x=>Mi(c)?c.value=x:null)},null,8,["modelValue"])):K("",!0)]),footer:Ce(()=>[V("div",Jd,[V("button",{onClick:N[2]||(N[2]=x=>{var M;return(M=I.value)==null?void 0:M.open()}),class:"button"},"Open Saves Manager"),V("button",{onClick:j,class:"button"},"Set to 0"),V("button",{onClick:h,class:"button"},"Set to 1"),m(u)&&m(i).neq(m(u),0)&&m(i).neq(m(u),1)?(C(),R("button",{key:0,onClick:N[3]||(N[3]=x=>a.value=!1),class:"button"}," Set to previous ")):K("",!0),V("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),t(pt,{ref_key:"savesManager",ref:I},null,512)],64))}});var Cd=oi(fd,[["__scopeId","data-v-3de07c06"]]);const wd={key:0,class:"tpsDisplay"},gd={key:0,class:"low"},Od=xe({__name:"TPS",setup(e){const l=b(()=>i.div(Ni.lastTenTicks.length,Ni.lastTenTicks.reduce((I,r)=>I+r,0))),n=se([]);Di(()=>{n.value.push(Math.round(l.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const s=b(()=>n.value.reduce((I,r)=>i.max(I,r),0)),a=b(()=>i.sub(l.value,s.value).gt(1));return(I,r)=>m(l).isNan()?K("",!0):(C(),R("div",wd,[o(" TPS: "+Le(m(me)(m(l)))+" ",1),t(Nn,{name:"fade"},{default:Ce(()=>[m(a)?(C(),R("span",gd,Le(m(me)(m(s))),1)):K("",!0)]),_:1})]))}});var Yd=oi(Od,[["__scopeId","data-v-46a3ed5b"]]);var Nd=xe({__name:"App",setup(e){const l=ni.useHeader,n=b(()=>an[bi.theme].variables),s=yl(bi,"showTPS"),a=b(()=>ii(f(()=>t(O,null,[qa.map(Ve)]))));return(I,r)=>(C(),R(O,null,[V("div",{id:"modal-root",style:vi(m(n))},null,4),V("div",{class:Ji(["app",{useHeader:m(l)}]),style:vi(m(n))},[m(l)?(C(),ge(yt,{key:0})):K("",!0),t(sd),m(m(s))?(C(),ge(Yd,{key:1})):K("",!0),t(pd),t(Cd),(C(),ge(pi(m(a))))],6)],64))}});var Xd=oi(Nd,[["__scopeId","data-v-580927bb"]]);function Md(e={}){const{immediate:l=!1,onNeedRefresh:n,onOfflineReady:s,onRegistered:a,onRegisterError:I}=e;let r,d;const u=async(c=!0)=>{c&&(r==null||r.addEventListener("controlling",j=>{j.isUpdate&&window.location.reload()})),d&&d.waiting&&await Gt(d.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new xt("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",c=>{c.isUpdate||s==null||s()});{const c=()=>{n==null||n()};r.addEventListener("waiting",c),r.addEventListener("externalwaiting",c)}r.register({immediate:l}).then(c=>{d=c,a==null||a(c)}).catch(c=>{I==null||I(c)})}return u}function xd(e={}){const{immediate:l=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:a,onRegisterError:I}=e,r=se(!1),d=se(!1);return{updateServiceWorker:Md({immediate:l,onNeedRefresh(){r.value=!0,n==null||n()},onOfflineReady(){d.value=!0,s==null||s()},onRegistered:a,onRegisterError:I}),offlineReady:d,needRefresh:r}}document.title=ni.title;window.projInfo=ni;if(ni.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Aa();const{globalBus:e}=await Jn(()=>Promise.resolve().then(function(){return Ya}),void 0),{startGameLoop:l}=await Jn(()=>import("./gameLoop.4ab98f05.js"),["assets/gameLoop.4ab98f05.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),n=window.vue=gt(Xd);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ys(),{updateServiceWorker:a}=xd({onNeedRefresh(){s.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(I){I&&setInterval(()=>I.update(),60*60*1e3)}})}),l()});export{i as D,Jn as _,Ni as a,ni as b,Em as c,ui as g,$n as l,je as p,bi as s}; +Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Aa();const{globalBus:e}=await Jn(()=>Promise.resolve().then(function(){return Ya}),void 0),{startGameLoop:l}=await Jn(()=>import("./gameLoop.4c10b9c5.js"),["assets/gameLoop.4c10b9c5.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),n=window.vue=gt(Xd);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ys(),{updateServiceWorker:a}=xd({onNeedRefresh(){s.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(I){I&&setInterval(()=>I.update(),60*60*1e3)}})}),l()});export{i as D,Jn as _,Ni as a,ni as b,Em as c,ui as g,$n as l,je as p,bi as s}; diff --git a/index.html b/index.html index d0842d8..2d1a2fd 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index a361c20..f8b30a4 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.4ab98f05.js",revision:null},{url:"assets/index.708b3867.js",revision:null},{url:"assets/index.efcf3a7b.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"ef4ec92d19f878245bb41eebebefeb97"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),a={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>a[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.4c10b9c5.js",revision:null},{url:"assets/index.32ea9b64.js",revision:null},{url:"assets/index.efcf3a7b.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"f42e56aa60bfd70f943d2aea5d4ae0fa"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));