Advent-Incremental/assets/index.976c2b3c.js

34 lines
524 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as b,l as Fi,aa as ze,t as se,ay as gn,ar as Dl,aE as C,a0 as S,aK as Zl,a1 as V,O as N,aG as vn,A as Qi,_ as Ye,a8 as t,b6 as Ne,b8 as Mn,bs as Os,C as I,aq as Bl,bu as un,bb as Xn,T as ft,a7 as o,j as Ct,bv as En,u as xn,q as yn,b1 as yl,G as wi,aC as Ns,w as ol,b2 as Pi,ao as wt,I as Ci,aN as hi,$ as ie,J as Qe,aH as Sl,aF as Hl,z as Vl,al as fn,aL as Rl,H as Ot,aJ as Ys,bn as Nt,br as Yt,be as gt}from"./@vue.4ce677c2.js";import{c as gs}from"./nanoevents.1080beb7.js";import{L as Fl}from"./lz-string.731cedc5.js";import{i as Mt}from"./is-plain-object.906d88e8.js";import{Y as Xt}from"./vue-next-select.a2bfab1d.js";import{s as xt,u as Ms}from"./vue-toastification.6f567382.js";import{D as Gt}from"./vuedraggable.7949458c.js";import{p as Ft}from"./vue-textarea-autosize.35804eaf.js";import{v as zt,n as kt}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const Rt=function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const m of a)if(m.type==="childList")for(const d of m.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function n(a){const m={};return a.integrity&&(m.integrity=a.integrity),a.referrerpolicy&&(m.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?m.credentials="include":a.crossorigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function s(a){if(a.ep)return;a.ep=!0;const m=n(a);fetch(a.href,m)}};Rt();const St="modulepreload",rs={},Ht="./",Cn=function(l,n){return!n||n.length===0?l():Promise.all(n.map(s=>{if(s=`${Ht}${s}`,s in rs)return;rs[s]=!0;const a=s.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${m}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":St,a||(d.as="script",d.crossOrigin=""),d.href=s,document.head.appendChild(d),a)return new Promise((r,c)=>{d.addEventListener("load",r),d.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>l())},Lt="./projInfo-schema.json",Tt="Advent Incremental",Qt="An incremental game you play a day at a time, leading up to Christmas!",Ut="advent-incremental",Et="thepaperpilot and friends",At="",Dt="",Bt="0.5",_t="Initial Commit",Pt=!0,qt=!1,$t=2,Kt=!0,ea=null,ia="",la=["main"],na=3600,sa=0,ta=!0,aa="base64";var si={$schema:Lt,title:Tt,description:Qt,id:Ut,author:Et,discordName:At,discordLink:Dt,versionNumber:Bt,versionTitle:_t,allowGoBack:Pt,defaultShowSmall:qt,defaultDecimalsShown:$t,useHeader:Kt,banner:ea,logo:ia,initialTabs:la,maxTickLength:na,offlineLimit:sa,enablePausing:ta,exportEncoding:aa};const Rn=17,oa=9e15,Ia=Math.log10(9e15),ma=1/9e15,da=308,ra=-324,cs=5,ca=function(){const e=[];for(let n=ra+1;n<=da;n++)e.push(Number("1e"+n));const l=323;return function(n){return e[n+l]}}(),Ul=[2,Math.E,3,4,5,6,7,8,9,10],ua=[[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.1670905
`).slice(3,5).map(l=>l.trim()).join(`
`))||""}function ke(e){const l=Fi(e)?e:se(e);l[_n]=l,l[kl]=Fi(e)?e.value:e,l[Nn]=Qa(),l[Qs]=!1;const n=b({get(){return l.value},set(s){l.value=s}});return n[kl]=l[kl],l[Zn]=n,l[rn]=void 0,cl.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",l,`
Created at:
`+l[Nn]):Kl[cl[cl.length-1]].add(l),l}function Ua(e){return e&&typeof e=="object"&&_n in e}function T(e){return e[Zn]}ci.on("addLayer",(e,l)=>{const n=[],s=(a,m=[])=>{let d=!1;return Object.keys(a).forEach(r=>{let c=a[r];if(c&&typeof c=="object")if(Oi in c&&(c=c[Oi]),Ua(c)){if(d=!0,c[Qs]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Created at:
`+c[Nn]);return}Kl[e.id].delete(c);const u=[e.id,...m,r];c[rn]!=null&&JSON.stringify(u)!==JSON.stringify(c[rn])&&console.error(`Persistent ref is being saved to \`${u.join(".")}\` when it's already present at \`${c[rn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[rn]=u;const j=m.reduce((W,J)=>(J in W||(W[J]={}),W[J]),l),y=j[r];j[r]=c[_n],Ct(j)?y!=null?j[r]=y:j[r]=c[kl]:y!=null?j[r].value=y:j[r].value=c[kl]}else!(c instanceof i)&&!Fi(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),s(c,[...m,r])&&(En(c)&&!En(a)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Oi in a?a[Oi]:a,r):d=!0))}),d};s(e[Oi]),Kl[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,`
Created at:
`+a[Nn])}),Kl[e.id].clear()});var xi=window.state=xn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Us=yn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},autoPause:!0});function Es(e){return JSON.stringify(e,(l,n)=>I(n))}const As={get(e,l){var s;if(l===Oi||l===$l)return e[l];const n=e[Oi][l];if(l!=="value"&&(Mt(n)||Array.isArray(n))){if(n!==((s=e[l])==null?void 0:s[Oi])){const a=[...e[$l],l];e[l]=new Proxy({[Oi]:n,[$l]:a},As)}return e[l]}return n},set(e,l,n,s){if(!xi.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[Oi][l];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Us.autosave=!1,xi.hasNaN=!0,xi.NaNPath=[...e[$l],l],xi.NaNReceiver=s,console.error("Attempted to set NaN value",[...e[$l],l],e[Oi]),"Attempted to set NaN value. See above for details"}return e[Oi][l]=n,!0},ownKeys(e){return Reflect.ownKeys(e[Oi])},has(e,l){return Reflect.has(e[Oi],l)},getOwnPropertyDescriptor(e,l){return Object.getOwnPropertyDescriptor(e[Oi],l)}};var fe=window.player=new Proxy({[Oi]:Us,[$l]:["player"]},As);const Pn=Symbol("RegisterNode"),qn=Symbol("UnregisterNode"),$n=Symbol("Nodes"),Kn=Symbol("Bounds"),yi=xn({});window.layers=yi;const Kl={},cl=[];function Ai(e,l){return qi(()=>{const n={},s=n.emitter=gs();if(n.on=s.on.bind(s),n.emit=s.emit.bind(s),n.nodes=se({}),n.id=e,cl.push(e),Kl[e]=new Set,n.minimized=ke(!1),Object.assign(n,l.call(n)),cl[cl.length-1]==null||cl[cl.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${cl}
Trying to pop ${n.id}`;return cl.pop(),ue(n,"color"),ue(n,"display"),ue(n,"name"),Ti(n,"name",n.id),ue(n,"minWidth"),Ti(n,"minWidth",600),ue(n,"minimizable"),Ti(n,"minimizable",!0),ue(n,"minimizedDisplay"),n})}function Ds(e,l){if(console.info("Adding layer",e.id),yi[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,yi[e.id]);return}Ti(l,"layers",{}),l.layers[e.id]==null&&(l.layers[e.id]={}),yi[e.id]=e,ci.emit("addLayer",e,l.layers[e.id])}function Ea(e){return yi[e]}function Bs(e){console.info("Removing layer",e.id),ci.emit("removeLayer",e),yi[e.id]=void 0}function Aa(e){Bs(e),Ds(e,fe)}function Da(e){const l=se(!1);return{openModal:()=>l.value=!0,modal:h(()=>t(Yi,{modelValue:l.value,"onUpdate:modelValue":n=>l.value=n},{header:()=>t("h2",null,[I(e.name)]),body:I(e.display)}))}}ci.on("update",function(l){Object.values(yi).forEach(n=>{n==null||n.emit("preUpdate",l)}),Object.values(yi).forEach(n=>{n==null||n.emit("update",l)}),Object.values(yi).forEach(n=>{n==null||n.emit("postUpdate",l)})});var Ba=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Pn,UnregisterNodeInjectionKey:qn,NodesInjectionKey:$n,BoundsInjectionKey:Kn,layers:yi,persistentRefs:Kl,addingLayers:cl,createLayer:Ai,addLayer:Ds,getLayer:Ea,removeLayer:Bs,reloadLayer:Aa,setupLayerModal:Da},Symbol.toStringTag,{value:"Module"}));function _s(e={}){return Object.assign({id:`${si.id}-0`,name:"Default Save",tabs:si.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:si.id,modVersion:si.versionNumber,layers:{}},e)}function Bi(e){const l=Fl.compressToUTF16(Es(e!=null?e:fe[Oi]));return localStorage.setItem((e!=null?e:fe[Oi]).id,l),l}async function _a(){qa();try{let e=localStorage.getItem(pi.active);if(e==null){await Al(en());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Fl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const l=JSON.parse(e);if(l.modID!==si.id){await Al(en());return}l.id=pi.active,await Al(l)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Al(en())}}function en(){const e=Jn(),l=_s({id:e});return Bi(l),pi.saves.push(e),l}function Jn(){let e,l=0;do e=`${si.id}-${l++}`;while(localStorage.getItem(e));return e}const es=se(!1);async function Al(e){console.info("Loading save",e),es.value=!0;const{layers:l,removeLayer:n,addLayer:s}=await Cn(()=>Promise.resolve().then(function(){return Ba}),void 0),{fixOldSave:a,getInitialLayers:m}=await Cn(()=>Promise.resolve().then(function(){return PI}),void 0);for(const d in l){const r=l[d];r&&n(r)}m(e).forEach(d=>s(d,e)),e=_s(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,si.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==si.versionNumber&&(a(e.modVersion,e),e.modVersion=si.versionNumber),Object.assign(fe,e),pi.active=fe.id,ci.emit("onLoad")}setInterval(()=>{fe.autosave&&yi.main.days[yi.main.day.value-1].opened.value&&Bi()},1e3);window.onbeforeunload=()=>{fe.autosave&&yi.main.days[yi.main.day.value-1].opened.value&&Bi()};window.save=Bi;const Pa=window.hardReset=async()=>{await Al(en())},pn=yn({active:"",saves:[],showTPS:!0,theme:Bn.Nordic,unthrottled:!1,usingLog:!1,alignUnits:!1});yl(pn,e=>{const l=Fl.compressToUTF16(JSON.stringify(e));localStorage.setItem(si.id,l)},{deep:!0});var pi=window.settings=pn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Bn.Nordic,usingLog:!1,alignUnits:!1};ci.emit("loadSettings",e),Object.assign(pn,e),Pa()};function qa(){try{let e=localStorage.getItem(si.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Fl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const l=JSON.parse(e);typeof l=="object"&&Object.assign(pn,l)}ci.emit("loadSettings",pn)}catch{}}const Ps=yn([]);function $a(e){Ps.push(e)}const qs=yn([]);function Ka(e){qs.push(e)}const eo=yn([]),io={class:"table"},_i=ze({__name:"Column",setup(e){const l=b(()=>on[pi.theme].mergeAdjacent);return(n,s)=>(C(),S("div",io,[V("div",{class:wi(["col",{mergeAdjacent:I(l)}])},[Zl(n.$slots,"default")],2)]))}}),lo={class:"table"},sn=ze({__name:"Row",setup(e){const l=b(()=>on[pi.theme].mergeAdjacent);return(n,s)=>(C(),S("div",lo,[V("div",{class:wi(["row",{mergeAdjacent:I(l)}])},[Zl(n.$slots,"default")],2)]))}});function is(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!wt(e)}function ni(e,l="span"){return typeof e=="function"?ze({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${l}>${e}</${l}>`),ze({template:e})):ze({render:()=>({})}):e}function Ve(e){if(gl(e))return typeof e=="function"?e():ni(e);const l=e[Ll];return t(l,e[Tl](),null)}function ri(...e){let l;return t(sn,null,is(l=e.map(Ve))?l:{default:()=>[l]})}function Il(...e){let l;return t(_i,null,is(l=e.map(Ve))?l:{default:()=>[l]})}function Cl(...e){return t("div",{class:"table-grid"},[e.map(l=>t("div",{class:{["row-grid"]:!0,mergeAdjacent:on[pi.theme].mergeAdjacent}},[l.map(Ve)]))])}function pl(e){if(gl(e))return typeof e=="function"?e():typeof e=="string"?t(N,null,[e]):t(e,null,null);const l=e[Ll];return t(l,e[Tl](),null)}function no(...e){let l;return t(_i,null,is(l=e.map(pl))?l:{default:()=>[l]})}function gl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[bn]===!0}function $s(e,l,n){const s=se(null),a=se(void 0);function m(c){s.value||(s.value=setInterval(r,250)),a.value=c,n&&(n.value=!0)}function d(){s.value&&(clearInterval(s.value),s.value=null),n&&(n.value=!1)}function r(){l&&l.value?l.value():e&&e.value&&e.value(a.value)}return Ns(d),{start:m,stop:d,handleHolding:r}}function so(e,l){const n=b(()=>e.filter(s=>I(s.visibility)===Wi.Visible&&l(s)));return{firstFeature:b(()=>n.value[0]),collapsedContent:h(()=>Il(...n.value.slice(1))),hasCollapsedContent:b(()=>n.value.length>1)}}function Yn(e,l="div"){const n=ol();return Pi(()=>{n.value=ni(Hi(e),l)}),n}function Ml(e,l="div"){const n=ol(null);return Pi(()=>{const s=Hi(e);n
x${q(I(a.christmas1))} to wood production
`)}]}),rainbow:n({name:"Rainbow Wrapping Paper",id:"rainbow",ratio:{red:{base:wl,exponent:Nl+.2},green:{base:Ol,exponent:Yl+.1},blue:{base:wl,exponent:Nl+.2},yellow:{base:wl,exponent:Nl+.2},purple:{base:Ol,exponent:Yl+.1},orange:{base:Ol,exponent:Yl+.1}},background:"linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(255,0,0,1) 2%, rgba(255,155,0,1) 14%, rgba(255,155,0,1) 18%, rgba(255,254,0,1) 31%, rgba(255,254,0,1) 35%, rgba(100,244,61,1) 48%, rgba(100,244,61,1) 52%, rgba(70,218,234,1) 64%, rgba(70,218,234,1) 68%, rgba(205,0,210,1) 81%, rgba(205,0,210,1) 85%, rgba(255,0,0,1) 98%, rgba(255,0,0,1) 100%)",listedBoosts:[{desc:b(()=>`
/${q(I(a.rainbow1))} to coal buyable cost
`)}]}),jazzy:n({name:"Jazzy Wrapping Paper",id:"jazzy",ratio:{purple:{base:Ol*3,exponent:Yl},orange:{base:Ol*3,exponent:Yl}},background:"linear-gradient(90deg, rgba(255,177,0,1) 10.8%, rgba(189,69,255,1) 11.1%, rgba(189,69,255,1) 21.9%, rgba(255,177,0,1) 22.2%, rgba(255,177,0,1) 33.0%, rgba(189,69,255,1) 33.3%, rgba(189,69,255,1) 44.1%, rgba(255,177,0,1) 44.4%, rgba(255,177,0,1) 55.2%, rgba(189,69,255,1) 55.5%, rgba(189,69,255,1) 66.3%, rgba(255,177,0,1) 66.6%, rgba(255,177,0,1) 77.4%, rgba(189,69,255,1) 77.7%, rgba(189,69,255,1) 88.5%, rgba(255,177,0,1) 88.8%)",listedBoosts:[{desc:b(()=>`
-${q(I(a.jazzy1))} to elf cost scaling
`)}]}),sunshine:n({name:"Sunshine Wrapping Paper",id:"sunshine",ratio:{red:{base:wl*2,exponent:Nl+.1},yellow:{base:wl*2,exponent:Nl+.1},orange:{base:Ol*2,exponent:Yl+.05}},background:"radial-gradient(circle, rgba(238,250,0,1) 16%, rgba(250,157,0,1) 50%, rgba(255,76,76,1) 83%)",listedBoosts:[{desc:b(()=>`
x${q(I(a.sunshine1))} to paper production
`)}]}),ocean:n({name:"Ocean Wrapping Paper",id:"ocean",ratio:{blue:{base:wl*2,exponent:Nl+.1},green:{base:Ol*2,exponent:Yl+.05},purple:{base:Ol*2,exponent:Yl+.05}},background:"linear-gradient(20deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%), linear-gradient(340deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%)",listedBoosts:[{desc:b(()=>`
/${q(I(a.ocean1))} to box buyable cost
`)}]}),beach:n({name:"Beach Wrapping Paper",id:"beach",ratio:{yellow:{base:wl*3,exponent:Nl},blue:{base:wl*3,exponent:Nl}},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(()=>`
/${q(I(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))},m=vi(b(()=>Object.values(s).map(P=>P.buyable.amount.value).reduce(i.add,0)),"Total Wrapping Paper"),d=se(!1),r=h(()=>t(Yi,{modelValue:d.value,"onUpdate:modelValue":P=>d.value=P},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:c})),[c,u]=sl(()=>[]),{total:j,trackerDisplay:y}=Wl({resource:m,goal:1e20,name:e,day:XI,color:l,textColor:"var(--feature-foreground)",modal:{show:d,display:r},ignoreTotal:!0}),W=[6,12,18,24,30,36],J=x(()=>({display:{requirement:W[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[0]),visibility:()=>p(!0)})),w=x(()=>({display:{requirement:W[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[1]),visibility:()=>p(J.earned.value)})),g=x(()=>({display:{requirement:W[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[2]),visibility:()=>p(w.earned.value)})),G=x(()=>({display:{requirement:W[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[3]),visibility:()=>p(g.earned.value)})),te=x(()=>({display:{requirement:W[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>i.gte(j.value,W[4]),visibility:()=>p(G.earned.value)})),O=x(()=>({display:{requirement:W[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>i.gte(j.value,W[5]),visibility:()=>p(te.earned.value)})),M={primaryBoost:J,secondaryBoost:w,buyMaxPrimary:g,secondaryNoReset:G,buyMaxSecondary:te,unlockDyeElf:O},{collapseMilestones:X,display:D}=_l(M);return{name:e,display:h(()=>t("div",{style:"width: 620px"},[Ve(y),t(Li,{resource:m},null),ri(s.christmas.display,s.rainbow.display,s.jazzy.display),ri(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(we,null,null),ri(s.sunshine.display,s.ocean.display,s.beach.display),ri(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(we,null,null),o("button goes here"),t(we,null,null),D()])),wrappingPaper:s,totalWrappingPaper:j,generalTabCollapsed:u,boosts:a,milestones:M,collapseMilestones:X}}),xI="workshop",In=2,di=Ai(xI,function(){const e="Workshop",l="#D66B02",n="#D66B02",s=vi(0,"foundation progress"),a=Bo(()=>({scaling:_o(Vs(Vs(ls(250,1.5),5423,1/1e10),1e20,3e8),b(()=>v.elfTraining.expandersElfTraining.milestones[2].earned.value?1e3:100)),baseResource:he.logs,gainResource:T(s),roundUpCost:!0,spend(pe,je){he.logs.value=i.sub(he.logs.value,je)},costModifier:Ie(()=>[Z(()=>({multiplier:b(()=>fi.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>i.gt(fi.boosts.beach1.value,1))})),ll(()=>({exponent:1/.99,description:"Hope Level 5",enabled:v.elfTraining.expandersElfTraining.milestones[4].earned}))])})),m=Ei(()=>({display:h(()=>t(N,null,[t("b",{style:"font-size: x-large"},[o("Build "),re(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",Wn(he.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",he.logs.displayName])])),visibility:()=>p(i.lt(s.value,v.elfTraining.expandersElfTraining.milestones[2].earned.value?1e3:100)),canClick:()=>i.gte(he.logs.value,a.nextAt.value)&&i.lt(s.value,v.elfTraining.expandersElfTraining.milestones[2].earned.value?1e3:100),onClick(){!I(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),d=ln(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{m.canClick.value&&m.onClick()}})),r=b(()=>!ge.milestones[6].earned.value),c=x(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of fo
<br/>
<br/>
Cost: 50 ${n.displayName}<br/>${Ge(1e11)} ${$.coal.displayName}`}})),E=Q(()=>({resource:T(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(me.depthMilestones[4].earned.value)})),de=Se(()=>({resource:T(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 v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(me.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(me.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:h(()=>t(N,null,[o("Mine 2.5x faster. Increase ore mining amount by")," ",Fe(de.amount.value),o(" ore per operation")]))},visibility:()=>p(i.gte(de.amount.value,1)||i.div(m.value,r.value).plus(s.value).gte(10)),style:{width:"200px"}})),ee=Se(()=>({resource:T(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 v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(me.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(me.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:h(()=>t(N,null,[o("Automatically smelts")," ",Fe(i.times(ee.amount.value,10)),o(" ore per second")]))},visibility:()=>p(i.gte(ee.amount.value,1)||i.gte(de.amount.value,4)||i.gte(m.value,50)),style:{width:"200px"}})),Re=ke(!0),Xe=Se(()=>({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 v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(me.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(me.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:h(()=>t(N,null,[o("Gain "),Fe(i.times(gi.value,100)),o("% more metal per ore")]))},visibility:()=>p(i.gte(Xe.amount.value,1)||Je.bought.value),style:{width:"200px"}})),gi=b(()=>i.times(Xe.amount.value,.25));ci.on("update",A=>{X.value=i.times(A,M.value).plus(X.value);const B=X.value.trunc();X.value=X.value.minus(B),a.value=i.add(a.value,i.times(B,te.value)),Re.value&&g(i.min(J.value,i.times(u.value,A)),y.value)});const[$e,Ke]=sl(()=>[{title:"Auto Smelt Speed",modifier:c,base:0,unit:"/s",visible(){return i.gt(ee.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:j,base:1,visible(){return i.gt(y.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:G,base:1},{title:"Mining Speed",modifier:O,base:.1,unit:"/s"}]),Oe=se(!1),ji=h(()=>t(Yi,{modelValue:Oe.value,"onUpdate:modelValue":A=>Oe.value=A},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:$e})),{total:Be,trac
margin: 10px 0;"/>${D}`:X,n.value=!0},onOpenLayer(){if(P.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(fe.tabs.includes(G!=null?G:"trees")){const U=fe.tabs.lastIndexOf(G!=null?G:"trees");fe.tabs.splice(U,1)}else fe.tabs.push(G!=null?G:"trees"),k.minimized.value=!0;else fe.tabs.splice(1,1/0,G!=null?G:"trees");yi[G!=null?G:"trees"].minimized.value=!1},onUnlockLayer(){G&&(O.value=!0,setTimeout(()=>{var U,_;s.value=-1,a.value=I((_=(U=yi[G!=null?G:"trees"])==null?void 0:U.name)!=null?_:""),m.value=X,fe.autoPause&&(fe.devSpeed=null),n.value=!0},1e3))}}}}})}const r=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:bt,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:ut,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:st,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:at,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:rt,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:lt,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:mt,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots
`,"./../../saves/Day 08 Complete.txt":"eyJpZCI6ImFkdmVudC1pbmNyZW1lbnRhbC0yIiwiZGV2U3BlZWQiOjAsIm5hbWUiOiJEZWZhdWx0IFNhdmUiLCJ0YWJzIjpbIm1haW4iLCJjbG90aCJdLCJ0aW1lIjoxNjcwOTY2MDM5MjIwLCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsIm9mZmxpbmVUaW1lIjowLCJ0aW1lUGxheWVkIjoxNDQ4MS43NzkwMDAwMDAxMzMsImtlZXBHb2luZyI6ZmFsc2UsIm1vZElEIjoiYWR2ZW50LWluY3JlbWVudGFsIiwibW9kVmVyc2lvbiI6IjAuNSIsImxheWVycyI6eyJtYWluIjp7Im1pbmltaXplZCI6ZmFsc2UsImRheXMiOnsiMCI6eyJvcGVuZWQiOnRydWUsInJlY2VudGx5VXBkYXRlZCI6ZmFsc2V9LCIxIjp7Im9wZW5lZCI6dHJ1ZSwicmVjZW50bHlVcGRhdGVkIjpmYWxzZX0sIjIiOnsib3BlbmVkIjp0cnVlLCJyZWNlbnRseVVwZGF0ZWQiOmZhbHNlfSwiMyI6eyJvcGVuZWQiOnRydWUsInJlY2VudGx5VXBkYXRlZCI6ZmFsc2V9LCI0Ijp7Im9wZW5lZCI6dHJ1ZS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DA0NmUzMiIsInRvdGFsQ29hbCI6IjEuMjUxNTEwMDAxODAxODUzNWUzMyIsImFzaCI6IjcuMDYxODA2ODk2OTU1NDQ3NWUxNiIsImFjdGl2ZUZpcmVzIjoiMCIsImJ1
${X}
${M}`)}}return u[O]}yl(n,O=>{O&&Object.keys(u).forEach(M=>delete u[M])});const y=b(()=>pi.saves.reduce((O,M)=>(O[M]=j(M),O),{}));function W(O){let M;switch(fe.id===O?M=Es(fe[Oi]):M=JSON.stringify(y.value[O]),si.exportEncoding){default:console.warn(`Unknown save encoding: ${si.exportEncoding}. Defaulting to lz`);case"lz":M=Fl.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const X=document.createElement("textarea");X.value=M,document.body.appendChild(X),X.select(),X.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(X)}function J(O){fe.id===O&&Bi();const M={...y.value[O],id:Jn()};Bi(M),pi.saves.push(M.id)}function w(O){pi.saves=pi.saves.filter(M=>M!==O),localStorage.removeItem(O),u[O]=void 0}function g(O){y.value[fe.id].time=fe.time,Bi(),u[fe.id]=void 0,Al(y.value[O]),u[O]=void 0}function G(O){if(d.value=O,Dl(()=>{d.value=null}),O[0]!=="{")if(O[0]==="e")O=decodeURIComponent(escape(atob(O)));else if(O[0]==="\u1BE1")O=Fl.decompressFromUTF16(O);else{console.warn("Unable to determine preset encoding",O);return}const M=JSON.parse(O);M.id=Jn(),Bi(M),pi.saves.push(M.id),g(M.id)}function te(O,M){const X=y.value[O];X&&(X.name=M,fe.id===O?(fe.name=M,Bi()):(Bi(X),u[O]=void 0))}return(O,M)=>(C(),Ye(Yi,{modelValue:n.value,"onUpdate:modelValue":M[4]||(M[4]=X=>n.value=X),ref_key:"modal",ref:s},{header:Ne(()=>[fd]),body:Ne(({shown:X})=>[X?(C(),Ye(I(Gt),{key:0,list:I(pi).saves,handle:".handle",itemKey:D=>D},{item:Ne(({element:D})=>[t(Jd,{save:I(y)[D],onOpen:P=>g(D),onExport:P=>W(D),onEditName:P=>te(D,P),onDuplicate:P=>J(D),onDelete:P=>w(D)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):ie("",!0)]),footer:Ne(()=>[V("div",Cd,[t(Vt,{modelValue:m.value,"onUpdate:modelValue":M[0]||(M[0]=X=>m.value=X),title:"Import Save",placeholder:"Paste your save here!",class:wi({importingFailed:a.value})},null,8,["modelValue","class"]),V("div",wd,[Od,V("div",Nd,[V("button",{class:"button",onClick:M[1]||(M[1]=X=>g(I(en)().id))},"New Game"),Object.keys(I(c)).length>0?(C(),Ye(ss,{key:0,options:I(c),modelValue:d.value,"onUpdate:modelValue":M[2]||(M[2]=X=>G(X)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):ie("",!0)])]),V("div",Yd,[gd,V("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=X=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Wt=oi(Md,[["__scopeId","data-v-3b9991aa"]]);const tl=e=>(Sl("data-v-8495e562"),e=e(),Hl(),e),Xd=["src","alt"],xd={key:1,class:"title"},Gd=tl(()=>V("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Fd={class:"discord"},zd={class:"discord-links"},kd={key:0},Rd=["href"],Sd=tl(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Hd=tl(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Ld={href:"https://forums.moddingtree.com/",target:"_blank"},Td=tl(()=>V("span",{class:"material-icons"},"forum",-1)),Qd=tl(()=>V("span",{class:"material-icons"},"info",-1)),Ud=tl(()=>V("span",{class:"material-icons"},"library_books",-1)),Ed=tl(()=>V("span",{class:"material-icons"},"settings",-1)),Ad=tl(()=>V("span",{class:"material-icons"},"library_books",-1)),Dd=tl(()=>V("span",{class:"material-icons"},"settings",-1)),Bd=tl(()=>V("span",{class:"material-icons"},"info",-1)),_d={href:"https://forums.moddingtree.com/",target:"_blank"},Pd=tl(()=>V("span",{class:"material-icons"},"forum",-1)),qd={class:"discord"},$d={class:"discord-links"},Kd={key:0},er=["href"],ir=tl(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),lr=tl(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),nr=ze({__name:"Nav",setup(e){const l=se(null),n=se(null),s=se(null),a=se(null),{useHeader:m,banner:d,title:r,discordName:c,discordLink:u,versionNumber:j}=si;function y(){window.open(u,"mywindow")}return(W,J)=>(C(),S(N,null,[I(m)?(C(),S("div",Bl({key:
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 _a();const{globalBus:e}=await Cn(()=>Promise.resolve().then(function(){return Xa}),void 0),{startGameLoop:l}=await Cn(()=>import("./gameLoop.f875f530.js"),["assets/gameLoop.f875f530.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(Sr);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ms(),{updateServiceWorker:a}=Lr({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(m){m&&setInterval(()=>m.update(),60*60*1e3)}})}),l()});export{i as D,Cn as _,xi as a,si as b,PI as c,ci as g,es as l,fe as p,pi as s};