/* empty css */import"./vue.92681fcb.js";import{Zasf,lasbt,aaasAe,tasQ,ayasma,arasTl,aEasC,a0asI,aKasXt,a1asy,OasB,aGasia,AasIt,_asye,a8asn,b6aspe,b8asva,bsasdi,Casu,aqasPl,buasJl,bbasfa,Tasnn,a7ass,uasga,jason,bvasNa,qasZl,b1asWt,Gasyt,aCasci,wasYt,b2asjt,aoassn,Iaswt,aNasdt,$asG,Jasxe,aHasvl,aFasfl,zasnl,alassa,aLas_l,Hasrn,aJaspi,bnasun,brasdn,beascn}from"./@vue.4ce677c2.js";import{casmi}from"./nanoevents.1080beb7.js";import{Laskl}from"./lz-string.731cedc5.js";import{iaspn}from"./is-plain-object.906d88e8.js";import{Yasmn}from"./vue-next-select.a2bfab1d.js";import{sasvn,uasvi}from"./vue-toastification.6f567382.js";import{Dasfn}from"./vuedraggable.7949458c.js";import{pasgn}from"./vue-textarea-autosize.35804eaf.js";import{vasyn,nashn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";constbn=function(){constt=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(constoofdocument.querySelectorAll('link[rel="modulepreload"]'))i(o);newMutationObserver(o=>{for(constrofo)if(r.type==="childList")for(constdofr.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});functionl(o){constr={};returno.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}functioni(o){if(o.ep)return;o.ep=!0;constr=l(o);fetch(o.href,r)}};bn();constwn="modulepreload",Ja={},An="./",ra=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${An}${i}`,iinJa)return;Ja[i]=!0;consto=i.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${r}`))return;constd=document.createElement("link");if(d.rel=o?"stylesheet":wn,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)returnnewPromise((c,p)=>{d.addEventListener("load",c),d.addEventListener("error",()=>p(newError(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},kn="./projInfo-schema.json",Cn="Advent Incremental",En="An incremental game you play a day at a time, leading up to Christmas!",_n="advent-incremental",Sn="thepaperpilot and friends",Mn="",Bn="",xn="0.5",Nn="Initial Commit",Dn=!0,In=!1,Tn=2,Pn=!0,Fn=null,Un="",Rn=["main"],On=3600,qn=0,Ln=!0,Gn="base64";varVe={$schema:kn,title:Cn,description:En,id:_n,author:Sn,discordName:Mn,discordLink:Bn,versionNumber:xn,versionTitle:Nn,allowGoBack:Dn,defaultShowSmall:In,defaultDecimalsShown:Tn,useHeader:Pn,banner:Fn,logo:Un,initialTabs:Rn,maxTickLength:On,offlineLimit:qn,enablePausing:Ln,exportEncoding:Gn};constCa=17,Qn=9e15,$n=Math.log10(9e15),Hn=1/9e15,Vn=308,jn=-324,za=5,Wn=function(){conste=[];for(letl=jn+1;l<=Vn;l++)e.push(Number("1e"+l));constt=323;returnfunction(l){returne[l+t]}}(),Nl=[2,Math.E,3,4,5,6,7,8,9,10],Jn=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.167090535
`))||""}function Se(e){const t=bt(e)?e:Q(e);t[Oa]=t,t[El]=bt(e)?e.value:e,t[ca]=No(),t[Bi]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[El]=t[El],t[Kl]=l,t[Wl]=void 0,tl.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
`+p[ca]);return}Rl[e.id].delete(p);const m=[e.id,...r,c];p[Wl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Wl])&&console.error(`Persistentrefisbeingsavedto\`${m.join(".")}\` when it's already present at \`${p[Wl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Wl]=m;constw=r.reduce((A,v)=>(vinA||(A[v]={}),A[v]),t),b=w[c];w[c]=p[Oa],on(w)?b!=null?w[c]=b:w[c]=p[El]:b!=null?w[c].value=b:w[c].value=p[El]}else!(pinstanceofa)&&!bt(p)&&!l.includes(p)&&(typeofp.type=="symbol"&&l.push(p),i(p,[...r,c])&&(Na(p)&&!Na(o)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",ctino?o[ct]:o,c):d=!0))}),d};i(e[ct]),Rl[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,`
Cost:50${l.displayName}<br/>${ke(1e11)}${q.coal.displayName}`}})),Ne=O(()=>({resource:U(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>h(Pe.depthMilestones[4].earned.value)})),Be=Oe(()=>({resource:U(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:S(()=>n(B,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",we(Be.amount.value),s(" ore per operation")]))},visibility:()=>h(a.gte(Be.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),Re=Oe(()=>({resource:U(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:S(()=>n(B,null,[s("Automatically smelts")," ",we(a.times(Re.amount.value,10)),s(" ore per second")]))},visibility:()=>h(a.gte(Re.amount.value,1)||a.gte(Be.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),ge=Se(!0),Me=Oe(()=>({resource:q.coal,cost(){return a.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:S(()=>n(B,null,[s("Gain "),we(a.times(le.value,100)),s("% more metal per ore")]))},visibility:()=>h(a.gte(Me.amount.value,1)||ce.bought.value),style:{width:"200px"}})),le=f(()=>a.times(Me.amount.value,.25));tt.on("update",oe=>{F.value=a.times(oe,E.value).plus(F.value);const je=F.value.trunc();F.value=F.value.minus(je),o.value=a.add(o.value,a.times(je,j.value)),ge.value&&x(a.min(v.value,a.times(m.value,oe)),b.value)});const[lt,Ue]=ol(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Re.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(b.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:T,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),he=Q(!1),st=S(()=>n(Ct,{modelValue:he.value,"onUpdate:modelValue":oe=>he.value=oe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:lt})),{total:et,trackerDisplay:qe}=gl({resource:l,goal:25e3,name:e,day:ni,color:t,modal:{show:he,display:st}});return{name:e,day:ni,color:t,ore:o,bestOre:r,oreProgress:F,metal:l,bestMetal:i,totalMetal:et,simplePickaxe:Ee,doublePickaxe:z,crucible:fe,coalDrill:Le,industrialFurnace:ce,efficientDrill:Ne,oreDrill:Be,industrialCrucible:Re,autoSmeltEnabled:ge,hotterForge:Me,generalTabCollapsed:Ue,minWidth:700,display:S(()=>n(B,null,[re(qe),n(Ce,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>n(B,null,[ge.value&&a.gte(Re.amount.value,1)?`+${wi([[m.value,"smelting speed"],[me.value,"ore gain"],[a.div(q.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(c.value,b.value))}`:void 0]))},null),n(Ce,null,null),re(_),a.gte(Re.amount.value,1)?n("div",{style:{width:"150px"}},[n(pl,{title:"Auto Smelt",modelValue:ge.value,"onUpdate:modelValue":oe=>ge.value=oe},null)]):void 0,n(Ce,null,null),n(Gt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:S(()=>n(B,null,[Ai(ve.value)]))},null),n(Ce,null,null),n("div",null,[s("Currently mining "),ke(j.value),s(" ore every")," ",ke(a.recip(E.value)),s(" seconds")]),re(de),n(Ce,null,null),nt(Ee,z,fe,Le,ce,Ne),nt(Be,Re,Me)]))}}),wr="coal",oi=3,q=$t(wr,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=gt(0,"coal"),r=gt(0,"ash"),d=Se(0),c=f(()=>a.times(d.value,1e3)),p=f(()=>{let N=a.times(d.value,.1);return L.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(N=N.times(5)),N}),m=f(()=>{let N=a.times(d.value,50);return L.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(N=N.times(5)),N}),w=Oe(()=>({resource:se.logs,cost(){let N=a.times(F.amount.value,u(F.cost)).plus(this.amount.value);return a.gte(N,100
margin:10px0;"/>${X}`:F,l.value=!0},onOpenLayer(){if(de.value=!1,window.matchMedia("(min-width:1468px)").matches)if(ue.tabs.includes(T!=null?T:"trees")){const K=ue.tabs.lastIndexOf(T!=null?T:"trees");ue.tabs.splice(K,1)}else ue.tabs.push(T!=null?T:"trees"),R.minimized.value=!0;else ue.tabs.splice(1,1/0,T!=null?T:"trees")},onUnlockLayer(){T&&(M.value=!0,setTimeout(()=>{var K,me;i.value=-1,o.value=u((me=(K=Nt[T!=null?T:"trees"])==null?void 0:K.name)!=null?me:""),r.value=F,ue.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:qi,story:"Ohno!SantaforgotaboutChristmasandit's only 25 days away! He'saskedforyourhelpduetoyourhistorygettinglargequantitiesofthingsinshortamountsoftime.Unfortunatelyyou're really starting from scratch here - let'sstartwithgettingwood,whichyou'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Li,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today'sgoalistogetaworkshopbuiltupfortheelvestoworkin-andapparently,theyneedquitealotofspacetowork!",completedStory:"Theworkshopcomplete,Santaonceagaindismissesyoufortheday.Withastrongfoundation,thisworkshopshouldsufficeforsupportingfutureworktowardthisimpossiblemission.GoodJob!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Gi,story:"Santatellsyouthatunfortunatelytherearequiteafewnaughtychildrenouttherethisyear,andhe's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Qi,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'llneedtoberetrainedonhowtohelp,sincethey've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:$i,story:"With the elves trained, we'realmostreadytostartworkingonthesepresents!Justacouplemorepre-reqsfirst,startingwithturningallthiswoodintowoodpulpandfinallyintopaper,whichwillberequiredforwrappingpaperlateronbutinthemeantimecanbeusedtohelpwriteguideswhichwillhelptheseelvescontinuetheireducation!",completedStory:"Youlookuponyourriversofbookpulpasyouhandoutstacksofpaperstoelvestoreadthrough.You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Hi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there'sprobablyabetterway.Youneedtoputthetoysinboxesanyways,sowhydon't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Vi,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You'resureyou're close to really getting to work, but there'safewmorematerialsyou'regoingtoneed-likemetal!Lotsofthingsneedmetal!",completedStory:"Thesoundsof
${E}`)}}return m[M]}Wt(l,M=>{M&&Object.keys(m).forEach(E=>delete m[E])});const b=f(()=>ut.saves.reduce((M,E)=>(M[E]=w(E),M),{}));function A(M){let E;switch(ue.id===M?E=Ni(ue[ct]):E=JSON.stringify(b.value[M]),Ve.exportEncoding){default:console.warn(`Unknownsaveencoding:${Ve.exportEncoding}.Defaultingtolz`);case"lz":E=kl.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const F=document.createElement("textarea");F.value=E,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(M){ue.id===M&&ll();const E={...b.value[M],id:oa()};ll(E),ut.saves.push(E.id)}function _(M){ut.saves=ut.saves.filter(E=>E!==M),localStorage.removeItem(M),m[M]=void 0}function x(M){b.value[ue.id].time=ue.time,ll(),m[ue.id]=void 0,Il(b.value[M]),m[M]=void 0}function T(M){if(d.value=M,Tl(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=kl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const E=JSON.parse(M);E.id=oa(),ll(E),ut.saves.push(E.id),x(E.id)}function j(M,E){const F=b.value[M];F&&(F.name=E,ue.id===M?(ue.name=E,ll()):(ll(F),m[M]=void 0))}return(M,E)=>(C(),ye(Ct,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=F=>l.value=F),ref_key:"modal",ref:i},{header:pe(()=>[ed]),body:pe(({shown:F})=>[F?(C(),ye(u(fn),{key:0,list:u(ut).saves,handle:".handle",itemKey:X=>X},{item:pe(({element:X})=>[n(Zu,{save:u(b)[X],onOpen:de=>x(X),onExport:de=>A(X),onEditName:de=>j(X,de),onDuplicate:de=>v(X),onDelete:de=>_(X)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:pe(()=>[y("div",td,[n(Yi,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=F=>r.value=F),title:"Import Save",placeholder:"Paste your save here!",class:yt({importingFailed:o.value})},null,8,["modelValue","class"]),y("div",ld,[ad,y("div",id,[y("button",{class:"button",onClick:E[1]||(E[1]=F=>x(u(Ol)().id))},"New Game"),Object.keys(u(p)).length>0?(C(),ye($a,{key:0,options:u(p),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=F=>T(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),y("div",nd,[od,y("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Zi=He(sd,[["__scopeId","data-v-3b9991aa"]]);const Jt=e=>(vl("data-v-8495e562"),e=e(),fl(),e),rd=["src","alt"],ud={key:1,class:"title"},dd=Jt(()=>y("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),cd={class:"discord"},pd={class:"discord-links"},md={key:0},vd=["href"],fd=Jt(()=>y("li",null,[y("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),gd=Jt(()=>y("li",null,[y("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),yd={href:"https://forums.moddingtree.com/",target:"_blank"},hd=Jt(()=>y("span",{class:"material-icons"},"forum",-1)),bd=Jt(()=>y("span",{class:"material-icons"},"info",-1)),wd=Jt(()=>y("span",{class:"material-icons"},"library_books",-1)),Ad=Jt(()=>y("span",{class:"material-icons"},"settings",-1)),kd=Jt(()=>y("span",{class:"material-icons"},"library_books",-1)),Cd=Jt(()=>y("span",{class:"material-icons"},"settings",-1)),Ed=Jt(()=>y("span",{class:"material-icons"},"info",-1)),_d={href:"https://forums.moddingtree.com/",target:"_blank"},Sd=Jt(()=>y("span",{class:"material-icons"},"forum",-1)),Md={class:"discord"},Bd={class:"discord-links"},xd={key:0},Nd=["href"],Dd=Jt(()=>y("li",null,[y("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Id=Jt(()=>y("li",null,[y("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Td=Ae({__name:"Nav",setup(e){const t=Q(null),l=Q(null),i=Q(null),o=Q(null),{useHeader:r,banner:d,title:c,discordName:p,discordLink:m,versionNumber:w}=Ve;function b(){window.open(m,"mywindow")}return(A,v)=>(C(),I(B,null,[u(r)?(C(),I("div",Pl({key:0,
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Io();const{globalBus:e}=await ra(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await ra(()=>import("./gameLoop.40d775c5.js"),["assets/gameLoop.40d775c5.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=cn(fc);e.emit("setupVue",l),l.mount("#app"),Tl(()=>{const i=vi(),{updateServiceWorker:o}=yc({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,ra as _,vt as a,Ve as b,Ir as c,tt as g,qa as l,ue as p,ut as s};