Advent-Incremental/assets/index.fb73a2a8.js

20 lines
260 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as f,l as gt,aa as pe,t as j,ay as oa,ar as Sl,aE as A,a0 as D,aK as Ht,a1 as g,O as M,aG as Yl,A as mt,_ as oe,a8 as o,b6 as de,b8 as sa,bs as si,C as r,aq as hl,bu as Ll,bb as ra,T as nn,a7 as u,u as ua,j as on,bv as Ea,q as jl,b1 as zt,G as et,aC as ri,w as Ft,b2 as Pt,ao as sn,I as nt,J as Se,$ as L,aH as rl,aF as ul,z as Kt,aN as Xe,al as ta,aL as ll,H as rn,aJ as Sa,bn as un,br as dn,be as cn}from"./@vue.4ce677c2.js";import{c as ui}from"./nanoevents.1080beb7.js";import{L as fl}from"./lz-string.731cedc5.js";import{i as pn}from"./is-plain-object.906d88e8.js";import{Y as mn}from"./vue-next-select.a2bfab1d.js";import{s as vn,u as di}from"./vue-toastification.6f567382.js";import{D as fn}from"./vuedraggable.7949458c.js";import{p as gn}from"./vue-textarea-autosize.35804eaf.js";import{v as yn,n as hn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerpolicy&&(s.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?s.credentials="include":n.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=l(n);fetch(n.href,s)}};bn();const wn="modulepreload",ja={},An="./",la=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${An}${i}`,i in ja)return;ja[i]=!0;const n=i.endsWith(".css"),s=n?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const c=document.createElement("link");if(c.rel=n?"stylesheet":wn,n||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),n)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Cn="./projInfo-schema.json",kn="Advent Incremental",En="An incremental game you play a day at a time, leading up to Christmas!",_n="advent-incremental",Sn="thepaperpilot and friends",Bn="",Nn="",Mn="0.4",In="Initial Commit",Dn=!0,xn=!1,Pn=2,Tn=!0,Fn=null,Un="",Rn=["main"],On=3600,qn=0,Gn=!0,Ln="base64";var Oe={$schema:Cn,title:kn,description:En,id:_n,author:Sn,discordName:Bn,discordLink:Nn,versionNumber:Mn,versionTitle:In,allowGoBack:Dn,defaultShowSmall:xn,defaultDecimalsShown:Pn,useHeader:Tn,banner:Fn,logo:Un,initialTabs:Rn,maxTickLength:On,offlineLimit:qn,enablePausing:Gn,exportEncoding:Ln};const ha=17,$n=9e15,Qn=Math.log10(9e15),Vn=1/9e15,Hn=308,jn=-324,Wa=5,Wn=function(){const e=[];for(let l=jn+1;l<=Hn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),kl=[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
Stack: ${$t}
Trying to pop ${l.id}`;return $t.pop(),Q(l,"color"),Q(l,"display"),Q(l,"name"),yt(l,"name",l.id),Q(l,"minWidth"),yt(l,"minWidth",600),Q(l,"minimizable"),yt(l,"minimizable",!0),l})}function Ci(e,t){if(console.info("Adding layer",e.id),_t[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,_t[e.id]);return}yt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_t[e.id]=e,je.emit("addLayer",e,t.layers[e.id])}function So(e){return _t[e]}function ki(e){console.info("Removing layer",e.id),je.emit("removeLayer",e),_t[e.id]=void 0}function Bo(e){ki(e),Ci(e,ne)}function No(e){const t=j(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(wt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[r(e.name)]),body:r(e.display)}))}}je.on("update",function(t){Object.values(_t).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("update",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Mo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ma,UnregisterNodeInjectionKey:Ia,NodesInjectionKey:Da,BoundsInjectionKey:xa,layers:_t,persistentRefs:Dl,addingLayers:$t,createLayer:Tt,addLayer:Ci,getLayer:So,removeLayer:ki,reloadLayer:Bo,setupLayerModal:No},Symbol.toStringTag,{value:"Module"}));const Pa=Symbol("PersistentState"),yl=Symbol("DefaultValue"),na=Symbol("StackTrace"),Ei=Symbol("Deleted"),Ql=Symbol("NonPersistent"),Gl=Symbol("SaveDataPath");function Io(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function _e(e){const t=gt(e)?e:j(e);t[Pa]=t,t[yl]=gt(e)?e.value:e,t[na]=Io(),t[Ei]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[yl]=t[yl],t[Ql]=l,t[Gl]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[na]):Dl[$t[$t.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&Pa in e}function F(e){return e[Ql]}je.on("addLayer",(e,t)=>{const l=[],i=(n,s=[])=>{let c=!1;return Object.keys(n).forEach(d=>{let p=n[d];if(p&&typeof p=="object")if(st in p&&(p=p[st]),Do(p)){if(c=!0,p[Ei]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[na]);return}Dl[e.id].delete(p);const m=[e.id,...s,d];p[Gl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Gl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Gl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Gl]=m;const h=s.reduce((w,v)=>(v in w||(w[v]={}),w[v]),t),y=h[d];h[d]=p[Pa],on(h)?y!=null?h[d]=y:h[d]=p[yl]:y!=null?h[d].value=y:h[d].value=p[yl]}else!(p instanceof a)&&!gt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...s,d])&&(Ea(p)&&!Ea(n)?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.",st in n?n[st]:n,d):c=!0))}),c};i(e[st]),Dl[e.id].forEach(n=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,n,`
Created at:
`+n[na])}),Dl[e.id].clear()});const st=Symbol("ProxyState"),Il=Symbol("ProxyPath");function St(e,t={}){const l=t;let i=!1;function n(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(s,c){if(c===st)return n();const d=n()[c];return d&&typeof d=="object"&&Ql in d?d[Ql]:d},set(s,c,d){return n()[c]=d,!0},has(s,c){return c===st?!0:Reflect.has(n(),c)},ownKeys(){return Reflect.ownKeys(n())},getOwnPropertyDescriptor(s,c){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(s,c)}})}var ct=window.state=ua({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const _i=jl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Si(e){return JSON.stringify(e,(t,l)=>r(l))}const Bi={get(e,t){var i;if(t===st||t===Il)return e[t];const l=e[st][t];if(t!=="value"&&(pn(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[st])){const n=[...e[Il],t];e[t]=new Proxy({[st]:l,[Il]:n},Bi)}return e[t]}return l},set(e,t,l,i){if(!ct.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const n=e[st][t];if(!(typeof n=="number"&&isNaN(n)||n instanceof a&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag))))throw _i.autosave=!1,ct.hasNaN=!0,ct.NaNPath=[...e[Il],t],ct.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Il],t],e[st]),"Attempted to set NaN value. See above for details"}return e[st][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[st])},has(e,t){return Reflect.has(e[st],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[st],t)}};var ne=window.player=new Proxy({[st]:_i,[Il]:["player"]},Bi);function Ni(e={}){return Object.assign({id:`${Oe.id}-0`,name:"Default Save",tabs:Oe.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Oe.id,modVersion:Oe.versionNumber,layers:{}},e)}function Qt(e){const t=fl.compressToUTF16(Si(e!=null?e:ne[st]));return localStorage.setItem((e!=null?e:ne[st]).id,t),t}async function xo(){To();try{let e=localStorage.getItem(lt.active);if(e==null){await _l(xl());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 t=JSON.parse(e);if(t.modID!==Oe.id){await _l(xl());return}t.id=lt.active,await _l(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await _l(xl())}}function xl(){const e=ea(),t=Ni({id:e});return Qt(t),lt.saves.push(e),t}function ea(){let e,t=0;do e=`${Oe.id}-${t++}`;while(localStorage.getItem(e));return e}const Ta=j(!1);async function _l(e){console.info("Loading save",e),Ta.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await la(()=>Promise.resolve().then(function(){return Mo}),void 0),{fixOldSave:n,getInitialLayers:s}=await la(()=>Promise.resolve().then(function(){return Fr}),void 0);for(const c in t){const d=t[c];d&&l(d)}s(e).forEach(c=>i(c,e)),e=Ni(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,Oe.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Oe.versionNumber&&(n(e.modVersion,e),e.modVersion=Oe.versionNumber),Object.assign(ne,e),lt.active=ne.id,je.emit("onLoad")}setInterval(()=>{ne.autosave&&Qt()},1e3);window.onbeforeunload=()=>{ne.autosave&&Qt()};window.save=Qt;const Po=window.hardReset=async()=>{await _l(xl())},Vl=jl({active:"",saves:[],showTPS:!0,theme:Na.Nordic,unthrottled:!1});zt(Vl,e=>{const t=fl.compressToUTF16(JSON.stringify(e));localStorage.setItem(Oe.id,t)},{deep:!0});var lt=window.settings=Vl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Na.Nordic};je.emit("loadSettings",e),Object.assign(Vl,e),Po()};function To(){try{let e=localStorage.getItem(Oe.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 t=JSON.parse(e);typeof t=="object"&&Object.assign(Vl,t)}je.emit("loadSettings",Vl)}catch{}}const Mi=jl([]);function Fo(e){Mi.push(e)}const Ii=jl([]);function Uo(e){Ii.push(e)}const Ro=jl([]),Oo={class:"table"},Dt=pe({__name:"Column",setup(e){const t=f(()=>Nl[lt.theme].mergeAdjacent);return(l,i)=>(A(),D("div",Oo,[g("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Ht(l.$slots,"default")],2)]))}}),qo={class:"table"},Tl=pe({__name:"Row",setup(e){const t=f(()=>Nl[lt.theme].mergeAdjacent);return(l,i)=>(A(),D("div",qo,[g("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Ht(l.$slots,"default")],2)]))}});function Fa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!sn(e)}function Te(e,t="span"){return typeof e=="function"?pe({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),pe({template:e})):pe({render:()=>({})}):e}function le(e){if(Gt(e))return typeof e=="function"?e():Te(e);const t=e[Xt];return o(t,e[al](),null)}function ze(...e){let t;return o(Tl,null,Fa(t=e.map(le))?t:{default:()=>[t]})}function jt(...e){let t;return o(Dt,null,Fa(t=e.map(le))?t:{default:()=>[t]})}function Bl(...e){return o("div",{class:"table-grid"},[e.map(t=>o("div",{class:{["row-grid"]:!0,mergeAdjacent:Nl[lt.theme].mergeAdjacent}},[t.map(le)]))])}function Wt(e){if(Gt(e))return typeof e=="function"?e():typeof e=="string"?o(M,null,[e]):o(e,null,null);const t=e[Xt];return o(t,e[al](),null)}function Go(...e){let t;return o(Dt,null,Fa(t=e.map(Wt))?t:{default:()=>[t]})}function Gt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[$l]===!0}function Di(e,t,l){const i=j(null),n=j(void 0);function s(p){i.value||(i.value=setInterval(d,250)),n.value=p,l&&(l.value=!0)}function c(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function d(){t&&t.value?t.value():e&&e.value&&e.value(n.value)}return ri(c),{start:s,stop:c,handleHolding:d}}function Lo(e,t){const l=f(()=>e.filter(i=>r(i.visibility)===Ke.Visible&&t(i)));return{firstFeature:f(()=>l.value[0]),collapsedContent:B(()=>jt(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function Fl(e,t="div"){const l=Ft();return Pt(()=>{l.value=Te(ot(e),t)}),l}function bl(e,t="div"){const l=Ft(null);return Pt(()=>{const i=ot(e);l.value=i==null?null:Te(i,t)}),l}function $o(e){return f(()=>ot(e))}function ot(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Obj
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${be(1e11)} ${G.coal.displayName}`}})),he=q(()=>({resource:F(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>b(Ye.depthMilestones[4].earned.value)})),ve=Pe(()=>({resource:F(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:B(()=>o(M,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",ye(ve.amount.value),u(" ore per operation")]))},visibility:()=>b(a.gte(ve.amount.value,1)||a.div(s.value,d.value).plus(i.value).gte(10)),style:{width:"200px"}})),ke=Pe(()=>({resource:F(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:B(()=>o(M,null,[u("Automatically smelts")," ",ye(a.times(ke.amount.value,10)),u(" ore per second")]))},visibility:()=>b(a.gte(ke.amount.value,1)||a.gte(ve.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),xe=_e(!0),Me=Pe(()=>({resource:G.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:B(()=>o(M,null,[u("Gain "),ye(a.times(He.value,100)),u("% more metal per ore")]))},visibility:()=>b(a.gte(Me.amount.value,1)||z.bought.value),style:{width:"200px"}})),He=f(()=>a.times(Me.amount.value,.25));je.on("update",fe=>{T.value=a.times(fe,_.value).plus(T.value);const rt=T.value.trunc();T.value=T.value.minus(rt),n.value=a.add(n.value,a.times(rt,W.value)),xe.value&&S(a.min(v.value,a.times(m.value,fe)),y.value)});const[Qe,At]=il(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(ke.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:h,base:1,visible(){return a.gt(y.value,1)}},{title:"Metal per Ore",modifier:c,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:N,base:.1,unit:"/s"}]),$=j(!1),K=B(()=>o(wt,{modelValue:$.value,"onUpdate:modelValue":fe=>$.value=fe},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Qe})),{total:se,trackerDisplay:We}=dl({resource:l,goal:25e3,name:e,day:li,color:t,modal:{show:$,display:K}});return{name:e,day:li,color:t,ore:n,bestOre:s,oreProgress:T,metal:l,bestMetal:i,totalMetal:se,simplePickaxe:Be,doublePickaxe:Ce,crucible:Fe,coalDrill:qe,industrialFurnace:z,efficientDrill:he,oreDrill:ve,industrialCrucible:ke,autoSmeltEnabled:xe,hotterForge:Me,generalTabCollapsed:At,minWidth:700,display:B(()=>o(M,null,[le(We),o(we,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(M,null,[xe.value&&a.gte(ke.amount.value,1)?`+${gi([[m.value,"smelting speed"],[Ae.value,"ore gain"],[a.div(G.computedCoalGain.value,w),"coal gain"]],"/s",a.mul(d.value,y.value))}`:void 0]))},null),o(we,null,null),le(E),a.gte(ke.amount.value,1)?o("div",{style:{width:"150px"}},[o(sl,{title:"Auto Smelt",modelValue:xe.value,"onUpdate:modelValue":fe=>xe.value=fe},null)]):void 0,o(we,null,null),o(It,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(M,null,[yi(Le.value)]))},null),o(we,null,null),o("div",null,[u("Currently mining "),be(W.value),u(" ore every")," ",be(a.recip(_.value)),u(" seconds")]),le(me),o(we,null,null),ze(Be,Ce,Fe,qe,z,he),ze(ve,ke,Me)]))}}),Er="coal",ai=3,G=Tt(Er,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",n=pt(0,"coal"),s=pt(0,"ash"),c=_e(0),d=f(()=>a.times(c.value,1e3)),p=f(()=>a.times(c.value,.1)),m=f(()=>a.times(c.value,50)),h=Pe(()=>({resource:ce.logs,cost(){let U=a.times(T.amount.value,r(T.cost)).plus(this.amount.value);return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,Z.books.smallFireBook.amount.value).times(U),U.pow(1.5).times(1e4)},display:B(()=>o(M,null,[o("h3",null,[u("Small Fire")
margin: 10px 0;"/>${X}`:T,l.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ne.tabs.includes(x!=null?x:"trees")){const R=ne.tabs.lastIndexOf(x!=null?x:"trees");ne.tabs.splice(R,1)}else ne.tabs.push(x!=null?x:"trees"),O.minimized.value=!0;else ne.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(N.value=!0,setTimeout(()=>{var R,Ae;i.value=-1,n.value=r((Ae=(R=_t[x!=null?x:"trees"])==null?void 0:R.name)!=null?Ae:""),s.value=T,ne.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[c(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Oi,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),c(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:qi,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!"})),c(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Gi,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!"})),c(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Li,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!"})),c(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:$i,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!"})),c(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Qi,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!"})),c(()=>({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're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of
${T}
${_}`)}}return m[N]}zt(l,N=>{N&&Object.keys(m).forEach(_=>delete m[_])});const y=f(()=>lt.saves.reduce((N,_)=>(N[_]=h(_),N),{}));function w(N){let _;switch(ne.id===N?_=Si(ne[st]):_=JSON.stringify(y.value[N]),Oe.exportEncoding){default:console.warn(`Unknown save encoding: ${Oe.exportEncoding}. Defaulting to lz`);case"lz":_=fl.compressToUTF16(_);break;case"base64":_=btoa(unescape(encodeURIComponent(_)));break;case"plain":break}const T=document.createElement("textarea");T.value=_,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function v(N){ne.id===N&&Qt();const _={...y.value[N],id:ea()};Qt(_),lt.saves.push(_.id)}function E(N){lt.saves=lt.saves.filter(_=>_!==N),localStorage.removeItem(N),m[N]=void 0}function S(N){y.value[ne.id].time=ne.time,Qt(),m[ne.id]=void 0,_l(y.value[N]),m[N]=void 0}function x(N){if(c.value=N,Sl(()=>{c.value=null}),N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=fl.decompressFromUTF16(N);else{console.warn("Unable to determine preset encoding",N);return}const _=JSON.parse(N);_.id=ea(),Qt(_),lt.saves.push(_.id),S(_.id)}function W(N,_){const T=y.value[N];T&&(T.name=_,ne.id===N?(ne.name=_,Qt()):(Qt(T),m[N]=void 0))}return(N,_)=>(A(),oe(wt,{modelValue:l.value,"onUpdate:modelValue":_[4]||(_[4]=T=>l.value=T),ref_key:"modal",ref:i},{header:de(()=>[od]),body:de(({shown:T})=>[T?(A(),oe(r(fn),{key:0,list:r(lt).saves,handle:".handle",itemKey:X=>X},{item:de(({element:X})=>[o(nd,{save:r(y)[X],onOpen:me=>S(X),onExport:me=>w(X),onEditName:me=>W(X,me),onDuplicate:me=>v(X),onDelete:me=>E(X)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):L("",!0)]),footer:de(()=>[g("div",sd,[o(Xi,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:n.value})},null,8,["modelValue","class"]),g("div",rd,[ud,g("div",dd,[g("button",{class:"button",onClick:_[1]||(_[1]=T=>S(r(xl)().id))},"New Game"),Object.keys(r(p)).length>0?(A(),oe(qa,{key:0,options:r(p),modelValue:c.value,"onUpdate:modelValue":_[2]||(_[2]=T=>x(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):L("",!0)])]),g("div",cd,[pd,g("button",{class:"button modal-default-button",onClick:_[3]||(_[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Yi=Ue(md,[["__scopeId","data-v-3b9991aa"]]);const Ut=e=>(rl("data-v-8495e562"),e=e(),ul(),e),vd=["src","alt"],fd={key:1,class:"title"},gd=Ut(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yd={class:"discord"},hd={class:"discord-links"},bd={key:0},wd=["href"],Ad=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Cd=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),kd={href:"https://forums.moddingtree.com/",target:"_blank"},Ed=Ut(()=>g("span",{class:"material-icons"},"forum",-1)),_d=Ut(()=>g("span",{class:"material-icons"},"info",-1)),Sd=Ut(()=>g("span",{class:"material-icons"},"library_books",-1)),Bd=Ut(()=>g("span",{class:"material-icons"},"settings",-1)),Nd=Ut(()=>g("span",{class:"material-icons"},"library_books",-1)),Md=Ut(()=>g("span",{class:"material-icons"},"settings",-1)),Id=Ut(()=>g("span",{class:"material-icons"},"info",-1)),Dd={href:"https://forums.moddingtree.com/",target:"_blank"},xd=Ut(()=>g("span",{class:"material-icons"},"forum",-1)),Pd={class:"discord"},Td={class:"discord-links"},Fd={key:0},Ud=["href"],Rd=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Od=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),qd=pe({__name:"Nav",setup(e){const t=j(null),l=j(null),i=j(null),n=j(null),{useHeader:s,banner:c,title:d,discordName:p,discordLink:m,versionNumber:h}=Oe;function y(){window.open(m,"mywindow")}return(w,v)=>(A(),D(M,null,[r(s)?(A(),D("div",hl({key:0,
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 xo();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.bbd16de3.js"),["assets/gameLoop.bbd16de3.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(Ac);e.emit("setupVue",l),l.mount("#app"),Sl(()=>{const i=di(),{updateServiceWorker:n}=kc({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(){n()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,ct as a,Oe as b,Fr as c,je as g,Ta as l,ne as p,lt as s};