pages/advent/assets/index.2d92bfa3.js

20 lines
260 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as g,l as yt,aa as pe,t as j,ay as sa,ar as Sl,aE as A,a0 as D,aK as Ht,a1 as f,O as N,aG as Yl,A as vt,_ as oe,a8 as n,b6 as de,b8 as ra,bs as si,C as u,aq as hl,bu as Ll,bb as ua,T as nn,a7 as r,u as da,j as on,bv as _a,q as jl,b1 as zt,G as et,aC as ri,w as Ft,b2 as Pt,ao as sn,I as nt,aN as Xe,$ as L,J as Se,aH as rl,aF as ul,z as Kt,al as ta,aL as ll,H as rn,aJ as Ba,bn as un,br as dn,be as cn}from"./@vue.4ce677c2.js";import{c as ui}from"./nanoevents.1080beb7.js";import{L as gl}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 gn}from"./vuedraggable.7949458c.js";import{p as fn}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 o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)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(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.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 o=i.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":wn,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)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 ba=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"),ht(l,"name",l.id),Q(l,"minWidth"),ht(l,"minWidth",600),Q(l,"minimizable"),ht(l,"minimizable",!0),l})}function Ci(e,t){if(console.info("Adding layer",e.id),Et[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Et[e.id]);return}ht(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Et[e.id]=e,je.emit("addLayer",e,t.layers[e.id])}function So(e){return Et[e]}function ki(e){console.info("Removing layer",e.id),je.emit("removeLayer",e),Et[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(()=>n(wt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}je.on("update",function(t){Object.values(Et).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Et).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Et).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Mo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ia,UnregisterNodeInjectionKey:Da,NodesInjectionKey:xa,BoundsInjectionKey:Pa,layers:Et,persistentRefs:Dl,addingLayers:$t,createLayer:Tt,addLayer:Ci,getLayer:So,removeLayer:ki,reloadLayer:Bo,setupLayerModal:No},Symbol.toStringTag,{value:"Module"}));const Ta=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=yt(e)?e:j(e);t[Ta]=t,t[yl]=yt(e)?e.value:e,t[na]=Io(),t[Ei]=!1;const l=g({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"&&Ta in e}function F(e){return e[Ql]}je.on("addLayer",(e,t)=>{const l=[],i=(o,s=[])=>{let c=!1;return Object.keys(o).forEach(d=>{let p=o[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[Ta],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)&&!yt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...s,d])&&(_a(p)&&!_a(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.",st in o?o[st]:o,d):c=!0))}),c};i(e[st]),Dl[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,`
Created at:
`+o[na])}),Dl[e.id].clear()});const st=Symbol("ProxyState"),Il=Symbol("ProxyPath");function St(e,t={}){const l=t;let i=!1;function o(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(s,c){if(c===st)return o();const d=o()[c];return d&&typeof d=="object"&&Ql in d?d[Ql]:d},set(s,c,d){return o()[c]=d,!0},has(s,c){return c===st?!0:Reflect.has(o(),c)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,c){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(s,c)}})}var ct=window.state=da({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)=>u(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 o=[...e[Il],t];e[t]=new Proxy({[st]:l,[Il]:o},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 o=e[st][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.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=gl.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=gl.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 Fa=j(!1);async function _l(e){console.info("Loading save",e),Fa.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await la(()=>Promise.resolve().then(function(){return Mo}),void 0),{fixOldSave:o,getInitialLayers:s}=await la(()=>Promise.resolve().then(function(){return Or}),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&&(o(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:Ma.Nordic,unthrottled:!1});zt(Vl,e=>{const t=gl.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:Ma.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=gl.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=g(()=>Nl[lt.theme].mergeAdjacent);return(l,i)=>(A(),D("div",Oo,[f("div",{class:et(["col",{mergeAdjacent:u(t)}])},[Ht(l.$slots,"default")],2)]))}}),qo={class:"table"},Tl=pe({__name:"Row",setup(e){const t=g(()=>Nl[lt.theme].mergeAdjacent);return(l,i)=>(A(),D("div",qo,[f("div",{class:et(["row",{mergeAdjacent:u(t)}])},[Ht(l.$slots,"default")],2)]))}});function Ua(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 n(t,e[al](),null)}function ze(...e){let t;return n(Tl,null,Ua(t=e.map(le))?t:{default:()=>[t]})}function jt(...e){let t;return n(Dt,null,Ua(t=e.map(le))?t:{default:()=>[t]})}function Bl(...e){return n("div",{class:"table-grid"},[e.map(t=>n("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"?n(N,null,[e]):n(e,null,null);const t=e[Xt];return n(t,e[al](),null)}function Go(...e){let t;return n(Dt,null,Ua(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),o=j(void 0);function s(p){i.value||(i.value=setInterval(d,250)),o.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(o.value)}return ri(c),{start:s,stop:c,handleHolding:d}}function Lo(e,t){const l=g(()=>e.filter(i=>u(i.visibility)===Ke.Visible&&t(i)));return{firstFeature:g(()=>l.value[0]),collapsedContent:B(()=>jt(...l.value.slice(1))),hasCollapsedContent:g(()=>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 g(()=>ot(e))}function ot(e){return u(u(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(()=>n(N,null,[r("Mine 2.5x faster. Increase ore mining amount by")," ",ye(ve.amount.value),r(" 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(()=>n(N,null,[r("Automatically smelts")," ",ye(a.times(ke.amount.value,10)),r(" 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(()=>n(N,null,[r("Gain "),ye(a.times(He.value,100)),r("% more metal per ore")]))},visibility:()=>b(a.gte(Me.amount.value,1)||z.bought.value),style:{width:"200px"}})),He=g(()=>a.times(Me.amount.value,.25));je.on("update",ge=>{T.value=a.times(ge,_.value).plus(T.value);const rt=T.value.trunc();T.value=T.value.minus(rt),o.value=a.add(o.value,a.times(rt,W.value)),xe.value&&S(a.min(v.value,a.times(m.value,ge)),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:M,base:.1,unit:"/s"}]),$=j(!1),K=B(()=>n(wt,{modelValue:$.value,"onUpdate:modelValue":ge=>$.value=ge},{header:()=>n("h2",null,[e,r(" 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:o,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(()=>n(N,null,[le(We),n(we,null,null),n(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>n(N,null,[xe.value&&a.gte(ke.amount.value,1)?`+${fi([[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),n(we,null,null),le(E),a.gte(ke.amount.value,1)?n("div",{style:{width:"150px"}},[n(sl,{title:"Auto Smelt",modelValue:xe.value,"onUpdate:modelValue":ge=>xe.value=ge},null)]):void 0,n(we,null,null),n(It,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>n(N,null,[yi(Le.value)]))},null),n(we,null,null),n("div",null,[r("Currently mining "),be(W.value),r(" ore every")," ",be(a.recip(_.value)),r(" seconds")]),le(me),n(we,null,null),ze(Be,Ce,Fe,qe,z,he),ze(ve,ke,Me)]))}}),Br="coal",ai=3,G=Tt(Br,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=mt(0,"coal"),s=mt(0,"ash"),c=_e(0),d=g(()=>a.times(c.value,1e3)),p=g(()=>a.times(c.value,.1)),m=g(()=>a.times(c.value,50)),h=Pe(()=>({resource:ce.logs,cost(){let U=a.times(T.amount.value,u(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(()=>n(N,null,[n("h3",null,[r("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&&(M.value=!0,setTimeout(()=>{var R,Ae;i.value=-1,o.value=u((Ae=(R=Et[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[M]}zt(l,M=>{M&&Object.keys(m).forEach(_=>delete m[_])});const y=g(()=>lt.saves.reduce((M,_)=>(M[_]=h(_),M),{}));function w(M){let _;switch(ne.id===M?_=Si(ne[st]):_=JSON.stringify(y.value[M]),Oe.exportEncoding){default:console.warn(`Unknown save encoding: ${Oe.exportEncoding}. Defaulting to lz`);case"lz":_=gl.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(M){ne.id===M&&Qt();const _={...y.value[M],id:ea()};Qt(_),lt.saves.push(_.id)}function E(M){lt.saves=lt.saves.filter(_=>_!==M),localStorage.removeItem(M),m[M]=void 0}function S(M){y.value[ne.id].time=ne.time,Qt(),m[ne.id]=void 0,_l(y.value[M]),m[M]=void 0}function x(M){if(c.value=M,Sl(()=>{c.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=gl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const _=JSON.parse(M);_.id=ea(),Qt(_),lt.saves.push(_.id),S(_.id)}function W(M,_){const T=y.value[M];T&&(T.name=_,ne.id===M?(ne.name=_,Qt()):(Qt(T),m[M]=void 0))}return(M,_)=>(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(u(gn),{key:0,list:u(lt).saves,handle:".handle",itemKey:X=>X},{item:de(({element:X})=>[n(nd,{save:u(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(()=>[f("div",sd,[n(Xi,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:o.value})},null,8,["modelValue","class"]),f("div",rd,[ud,f("div",dd,[f("button",{class:"button",onClick:_[1]||(_[1]=T=>S(u(xl)().id))},"New Game"),Object.keys(u(p)).length>0?(A(),oe(qa,{key:0,options:u(p),modelValue:c.value,"onUpdate:modelValue":_[2]||(_[2]=T=>x(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):L("",!0)])]),f("div",cd,[pd,f("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"],gd={key:1,class:"title"},fd=Ut(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yd={class:"discord"},hd={class:"discord-links"},bd={key:0},wd=["href"],Ad=Ut(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Cd=Ut(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),kd={href:"https://forums.moddingtree.com/",target:"_blank"},Ed=Ut(()=>f("span",{class:"material-icons"},"forum",-1)),_d=Ut(()=>f("span",{class:"material-icons"},"info",-1)),Sd=Ut(()=>f("span",{class:"material-icons"},"library_books",-1)),Bd=Ut(()=>f("span",{class:"material-icons"},"settings",-1)),Nd=Ut(()=>f("span",{class:"material-icons"},"library_books",-1)),Md=Ut(()=>f("span",{class:"material-icons"},"settings",-1)),Id=Ut(()=>f("span",{class:"material-icons"},"info",-1)),Dd={href:"https://forums.moddingtree.com/",target:"_blank"},xd=Ut(()=>f("span",{class:"material-icons"},"forum",-1)),Pd={class:"discord"},Td={class:"discord-links"},Fd={key:0},Ud=["href"],Rd=Ut(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Od=Ut(()=>f("li",null,[f("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),o=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(N,null,[u(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 go}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.c218583d.js"),["assets/gameLoop.c218583d.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:o}=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(){o()}})},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,Or as c,je as g,Fa as l,ne as p,lt as s};