Advent-Incremental/assets/index.53ed950c.js

20 lines
236 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as f,l as ot,aa as ce,t as Q,ay as oa,ar as wl,aE as A,a0 as D,aK as Vt,a1 as v,O as I,aG as zl,A as vt,_ as oe,a8 as i,b6 as ae,b8 as ia,bs as an,C as r,aq as Al,bu as Tl,bb as sa,T as to,a7 as c,u as ra,j as lo,bv as ka,q as ql,b1 as Wt,G as lt,aC as nn,w as Tt,b2 as Pt,ao,I as it,J as be,$ as T,aH as Zt,aF as el,z as Kt,aN as Ke,al as Zl,aL as cl,H as no,aJ as on,bn as oo,br as io,be as so}from"./@vue.4ce677c2.js";import{c as sn}from"./nanoevents.1080beb7.js";import{L as rl}from"./lz-string.731cedc5.js";import{i as ro}from"./is-plain-object.906d88e8.js";import{Y as uo}from"./vue-next-select.a2bfab1d.js";import{s as co,u as rn}from"./vue-toastification.6f567382.js";import{D as po}from"./vuedraggable.7949458c.js";import{p as mo}from"./vue-textarea-autosize.35804eaf.js";import{v as go,n as fo}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const vo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).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 n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}};vo();const ho="modulepreload",qa={},yo="./",ea=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${yo}${n}`,n in qa)return;qa[n]=!0;const o=n.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":ho,o||(u.as="script",u.crossOrigin=""),u.href=n,document.head.appendChild(u),o)return new Promise((d,p)=>{u.addEventListener("load",d),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},bo="./projInfo-schema.json",wo="Advent Incremental",Ao="An incremental game you play a day at a time, leading up to Christmas!",ko="advent-incremental",Co="thepaperpilot and friends",_o="",So="",Eo="0.3",No="Initial Commit",Bo=!0,Io=!1,Mo=2,Do=!0,xo=null,Po="",Fo=["main"],Uo=3600,Ro=0,To=!0,Oo="base64";var De={$schema:bo,title:wo,description:Ao,id:ko,author:Co,discordName:_o,discordLink:So,versionNumber:Eo,versionTitle:No,allowGoBack:Bo,defaultShowSmall:Io,defaultDecimalsShown:Mo,useHeader:Do,banner:xo,logo:Po,initialTabs:Fo,maxTickLength:Uo,offlineLimit:Ro,enablePausing:To,exportEncoding:Oo};const ha=17,Qo=9e15,$o=Math.log10(9e15),Go=1/9e15,qo=308,Vo=-324,Va=5,Ho=function(){const e=[];for(let l=Vo+1;l<=qo;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),hl=[2,Math.E,3,4,5,6,7,8,9,10],Lo=[[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.167090535697259
Stack: ${$t}
Trying to pop ${l.id}`;return $t.pop(),V(l,"color"),V(l,"display"),V(l,"name"),ft(l,"name",l.id),V(l,"minWidth"),ft(l,"minWidth",600),V(l,"minimizable"),ft(l,"minimizable",!0),l})}function wn(e,t){if(console.info("Adding layer",e.id),wt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,wt[e.id]);return}ft(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),wt[e.id]=e,$e.emit("addLayer",e,t.layers[e.id])}function ki(e){return wt[e]}function An(e){console.info("Removing layer",e.id),$e.emit("removeLayer",e),wt[e.id]=void 0}function Ci(e){An(e),wn(e,J)}function _i(e){const t=Q(!1);return{openModal:()=>t.value=!0,modal:E(()=>i(ht,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}$e.on("update",function(t){Object.values(wt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Si=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ea,UnregisterNodeInjectionKey:Na,NodesInjectionKey:Ba,BoundsInjectionKey:Ia,layers:wt,persistentRefs:El,addingLayers:$t,createLayer:Bt,addLayer:wn,getLayer:ki,removeLayer:An,reloadLayer:Ci,setupLayerModal:_i},Symbol.toStringTag,{value:"Module"}));const Ma=Symbol("PersistentState"),dl=Symbol("DefaultValue"),aa=Symbol("StackTrace"),kn=Symbol("Deleted"),Ql=Symbol("NonPersistent"),Rl=Symbol("SaveDataPath");function Ei(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function ke(e){const t=ot(e)?e:Q(e);t[Ma]=t,t[dl]=ot(e)?e.value:e,t[aa]=Ei(),t[kn]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[dl]=t[dl],t[Ql]=l,t[Rl]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[aa]):El[$t[$t.length-1]].add(t),t}function Ni(e){return e&&typeof e=="object"&&Ma in e}function U(e){return e[Ql]}$e.on("addLayer",(e,t)=>{const l=[],n=(o,s=[])=>{let u=!1;return Object.keys(o).forEach(d=>{let p=o[d];if(p&&typeof p=="object")if(Ye in p&&(p=p[Ye]),Ni(p)){if(u=!0,p[kn]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[aa]);return}El[e.id].delete(p);const m=[e.id,...s,d];p[Rl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Rl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Rl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Rl]=m;const y=s.reduce((w,g)=>(g in w||(w[g]={}),w[g]),t),h=y[d];y[d]=p[Ma],lo(y)?h!=null?y[d]=h:y[d]=p[dl]:h!=null?y[d].value=h:y[d].value=p[dl]}else!(p instanceof a)&&!ot(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,d])&&(ka(p)&&!ka(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.",Ye in o?o[Ye]:o,d):u=!0))}),u};n(e[Ye]),El[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[aa])}),El[e.id].clear()});const Ye=Symbol("ProxyState"),Sl=Symbol("ProxyPath");function It(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(s,u){if(u===Ye)return o();const d=o()[u];return d&&typeof d=="object"&&Ql in d?d[Ql]:d},set(s,u,d){return o()[u]=d,!0},has(s,u){return u===Ye?!0:Reflect.has(o(),u)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,u){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(s,u)}})}var et=window.state=ra({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Cn=ql({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function _n(e){return JSON.stringify(e,(t,l)=>r(l))}const Sn={get(e,t){var n;if(t===Ye||t===Sl)return e[t];const l=e[Ye][t];if(t!=="value"&&(ro(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[Ye])){const o=[...e[Sl],t];e[t]=new Proxy({[Ye]:l,[Sl]:o},Sn)}return e[t]}return l},set(e,t,l,n){if(!et.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[Ye][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Cn.autosave=!1,et.hasNaN=!0,et.NaNPath=[...e[Sl],t],et.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Sl],t],e[Ye]),"Attempted to set NaN value. See above for details"}return e[Ye][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Ye])},has(e,t){return Reflect.has(e[Ye],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Ye],t)}};var J=window.player=new Proxy({[Ye]:Cn,[Sl]:["player"]},Sn);function En(e={}){return Object.assign({id:`${De.id}-0`,name:"Default Save",tabs:De.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:De.id,modVersion:De.versionNumber,layers:{}},e)}function Gt(e){const t=rl.compressToUTF16(_n(e!=null?e:J[Ye]));return localStorage.setItem((e!=null?e:J[Ye]).id,t),t}async function Bi(){Mi();try{let e=localStorage.getItem(We.active);if(e==null){await bl(Nl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=rl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==De.id){await bl(Nl());return}t.id=We.active,await bl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await bl(Nl())}}function Nl(){const e=Xl(),t=En({id:e});return Gt(t),We.saves.push(e),t}function Xl(){let e,t=0;do e=`${De.id}-${t++}`;while(localStorage.getItem(e));return e}const Da=Q(!1);async function bl(e){console.info("Loading save",e),Da.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await ea(()=>Promise.resolve().then(function(){return Si}),void 0),{fixOldSave:o,getInitialLayers:s}=await ea(()=>Promise.resolve().then(function(){return Cr}),void 0);for(const u in t){const d=t[u];d&&l(d)}s(e).forEach(u=>n(u,e)),e=En(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,De.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==De.versionNumber&&o(e.modVersion,e),Object.assign(J,e),We.active=J.id,$e.emit("onLoad")}setInterval(()=>{J.autosave&&Gt()},1e3);window.onbeforeunload=()=>{J.autosave&&Gt()};window.save=Gt;const Ii=window.hardReset=async()=>{await bl(Nl())},$l=ql({active:"",saves:[],showTPS:!0,theme:Sa.Nordic,unthrottled:!1});Wt($l,e=>{const t=rl.compressToUTF16(JSON.stringify(e));localStorage.setItem(De.id,t)},{deep:!0});var We=window.settings=$l;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Sa.Nordic};$e.emit("loadSettings",e),Object.assign($l,e),Ii()};function Mi(){try{let e=localStorage.getItem(De.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=rl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign($l,t)}$e.emit("loadSettings",$l)}catch{}}const Nn=ql([]);function Di(e){Nn.push(e)}const Bn=ql([]);function xi(e){Bn.push(e)}const Pi=ql([]),Fi={class:"table"},Et=ce({__name:"Column",setup(e){const t=f(()=>Dl[We.theme].mergeAdjacent);return(l,n)=>(A(),D("div",Fi,[v("div",{class:lt(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),Ui={class:"table"},Il=ce({__name:"Row",setup(e){const t=f(()=>Dl[We.theme].mergeAdjacent);return(l,n)=>(A(),D("div",Ui,[v("div",{class:lt(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function xa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ao(e)}function Be(e,t="span"){return typeof e=="function"?ce({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),ce({template:e})):ce({render:()=>({})}):e}function X(e){if(Xt(e))return typeof e=="function"?e():Be(e);const t=e[ml];return i(t,e[gl](),null)}function Qe(...e){let t;return i(Il,null,xa(t=e.map(X))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Et,null,xa(t=e.map(X))?t:{default:()=>[t]})}function xl(...e){return i("div",{class:"table-grid"},[e.map(t=>i("div",{class:{["row-grid"]:!0,mergeAdjacent:Dl[We.theme].mergeAdjacent}},[t.map(X)]))])}function Lt(e){if(Xt(e))return typeof e=="function"?e():typeof e=="string"?i(I,null,[e]):i(e,null,null);const t=e[ml];return i(t,e[gl](),null)}function Ri(...e){let t;return i(Et,null,xa(t=e.map(Lt))?t:{default:()=>[t]})}function Xt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ol]===!0}function In(e,t,l){const n=Q(null),o=Q(void 0);function s(p){n.value||(n.value=setInterval(d,250)),o.value=p,l&&(l.value=!0)}function u(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function d(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return nn(u),{start:s,stop:u,handleHolding:d}}function Ti(e,t){const l=f(()=>e.filter(n=>r(n.visibility)===st.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:E(()=>Ht(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function na(e,t="div"){const l=Tt();return Pt(()=>{l.value=Be(ut(e),t)}),l}function pl(e,t="div"){const l=Tt(null);return Pt(()=>{const n=ut(e);l.value=n==null?null:Be(n,t)}),l}function Oi(e){return f(()=>ut(e))}function ut(e){return r(r(e))}function H(...e){return e.includes(Object)||e.push(Object),e}const de=ce({__name:"Spacer",prop
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${pe(1e11)} ${O.coal.displayName}`}})),Ce=R(()=>({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:()=>M(Ve.depthMilestones[4].earned.value)})),ve=Ne(()=>({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:E(()=>i(I,null,[c("Mine 2.5x faster. Increase ore mining amount by")," ",ue(ve.amount.value),c(" ore per operation")]))},visibility:()=>M(a.gte(ve.amount.value,1)||a.div(s.value,d.value).plus(n.value).gte(10)),style:{width:"200px"}})),he=Ne(()=>({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:E(()=>i(I,null,[c("Automatically smelts")," ",ue(a.times(he.amount.value,10)),c(" ore per second")]))},visibility:()=>M(a.gte(he.amount.value,1)||a.gte(ve.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Te=ke(!0),Fe=Ne(()=>({resource:O.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:E(()=>i(I,null,[c("Gain "),ue(a.times(at.value,100)),c("% more metal per ore")]))},visibility:()=>M(a.gte(Fe.amount.value,1)||L.bought.value),style:{width:"200px"}})),at=f(()=>a.times(Fe.amount.value,.25));$e.on("update",fe=>{P.value=a.times(fe,k.value).plus(P.value);const ct=P.value.trunc();P.value=P.value.minus(ct),o.value=a.add(o.value,a.times(ct,$.value)),Te.value&&S(a.min(g.value,a.times(m.value,fe)),h.value)});const[Oe,Ut]=tl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(he.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:B,base:.1,unit:"/s"}]),ie=Q(!1),se=E(()=>i(ht,{modelValue:ie.value,"onUpdate:modelValue":fe=>ie.value=fe},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:Oe})),{total:Ze,trackerDisplay:je}=ll({resource:l,goal:25e3,name:e,day:Za,color:t,modal:{show:ie,display:se}});return{name:e,day:Za,color:t,ore:o,bestOre:s,oreProgress:P,metal:l,bestMetal:n,totalMetal:Ze,simplePickaxe:Me,doublePickaxe:xe,crucible:Z,coalDrill:Pe,industrialFurnace:L,efficientDrill:Ce,oreDrill:ve,industrialCrucible:he,autoSmeltEnabled:Te,hotterForge:Fe,generalTabCollapsed:Ut,minWidth:700,display:E(()=>i(I,null,[X(je),i(de,null,null),i(Ct,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>i(I,null,[Te.value&&a.gte(he.amount.value,1)?`+${gn([[m.value,"smelting speed"],[Se.value,"ore gain"],[a.div(O.computedCoalGain.value,w),"coal gain"]],"/s",a.mul(d.value,h.value))}`:void 0]))},null),i(de,null,null),X(_),a.gte(he.amount.value,1)?i("div",{style:{width:"150px"}},[i(Yt,{title:"Auto Smelt",modelValue:Te.value,"onUpdate:modelValue":fe=>Te.value=fe},null)]):void 0,i(de,null,null),i(Ct,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>i(I,null,[fn(Ue.value)]))},null),i(de,null,null),i("div",null,[c("Currently mining "),pe($.value),c(" ore every")," ",pe(a.recip(k.value)),c(" seconds")]),X(ge),i(de,null,null),Qe(Me,xe,Z,Pe,L,Ce),Qe(ve,he,Fe)]))}}),gr="cloth",en=8,gt=Bt(gr,function(){const e="Cloth",t="white",l=tt(0,"cloth"),n=tt(0,"wool"),o=tt(10,"sheep"),s=ke(0),u=jt(()=>({direction:_e.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(s.value,Oe.value)})),d=Nt(()=>({display:{title:"Breed sheep",description:E(()=>i(I,null,[c("Breed "),ue(a.floor(Fe.value)),c(" sheep"),i("br",null,null),X(u)]))},style:{minHeight:"80px"},canCl
margin: 10px 0;"/>${K}`:P,l.value=!0},onOpenLayer(){if(ge.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(J.tabs.includes(x!=null?x:"trees")){const G=J.tabs.lastIndexOf(x!=null?x:"trees");J.tabs.splice(G,1)}else J.tabs.push(x!=null?x:"trees"),j.minimized.value=!0;else J.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(B.value=!0,setTimeout(()=>{var G,Se;n.value=-1,o.value=r((Se=(G=wt[x!=null?x:"trees"])==null?void 0:G.name)!=null?Se:""),s.value=P,J.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Un,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!"})),u(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Rn,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!"})),u(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Tn,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!"})),u(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:On,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!"})),u(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Qn,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!"})),u(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:$n,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!"})),u(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Gn,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 drills
${P}
${k}`)}}return m[B]}Wt(l,B=>{B&&Object.keys(m).forEach(k=>delete m[k])});const h=f(()=>We.saves.reduce((B,k)=>(B[k]=y(k),B),{}));function w(B){let k;switch(J.id===B?k=_n(J[Ye]):k=JSON.stringify(h.value[B]),De.exportEncoding){default:console.warn(`Unknown save encoding: ${De.exportEncoding}. Defaulting to lz`);case"lz":k=rl.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const P=document.createElement("textarea");P.value=k,document.body.appendChild(P),P.select(),P.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(P)}function g(B){J.id===B&&Gt();const k={...h.value[B],id:Xl()};Gt(k),We.saves.push(k.id)}function _(B){We.saves=We.saves.filter(k=>k!==B),localStorage.removeItem(B),m[B]=void 0}function S(B){h.value[J.id].time=J.time,Gt(),m[J.id]=void 0,bl(h.value[B]),m[B]=void 0}function x(B){if(u.value=B,wl(()=>{u.value=null}),B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=rl.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B);return}const k=JSON.parse(B);k.id=Xl(),Gt(k),We.saves.push(k.id),S(k.id)}function $(B,k){const P=h.value[B];P&&(P.name=k,J.id===B?(J.name=k,Gt()):(Gt(P),m[B]=void 0))}return(B,k)=>(A(),oe(ht,{modelValue:l.value,"onUpdate:modelValue":k[4]||(k[4]=P=>l.value=P),ref_key:"modal",ref:n},{header:ae(()=>[Ku]),body:ae(({shown:P})=>[P?(A(),oe(r(po),{key:0,list:r(We).saves,handle:".handle",itemKey:K=>K},{item:ae(({element:K})=>[i(Wu,{save:r(h)[K],onOpen:ge=>S(K),onExport:ge=>w(K),onEditName:ge=>$(K,ge),onDuplicate:ge=>g(K),onDelete:ge=>_(K)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):T("",!0)]),footer:ae(()=>[v("div",zu,[i(Kn,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=P=>s.value=P),title:"Import Save",placeholder:"Paste your save here!",class:lt({importingFailed:o.value})},null,8,["modelValue","class"]),v("div",Ju,[Yu,v("div",Xu,[v("button",{class:"button",onClick:k[1]||(k[1]=P=>S(r(Nl)().id))},"New Game"),Object.keys(r(p)).length>0?(A(),oe(Ua,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":k[2]||(k[2]=P=>x(P)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):T("",!0)])]),v("div",Zu,[ed,v("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=P=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var zn=Ie(td,[["__scopeId","data-v-3b9991aa"]]);const Ft=e=>(Zt("data-v-8495e562"),e=e(),el(),e),ld=["src","alt"],ad={key:1,class:"title"},nd=Ft(()=>v("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),od={class:"discord"},id={class:"discord-links"},sd={key:0},rd=["href"],ud=Ft(()=>v("li",null,[v("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),dd=Ft(()=>v("li",null,[v("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),cd={href:"https://forums.moddingtree.com/",target:"_blank"},pd=Ft(()=>v("span",{class:"material-icons"},"forum",-1)),md=Ft(()=>v("span",{class:"material-icons"},"info",-1)),gd=Ft(()=>v("span",{class:"material-icons"},"library_books",-1)),fd=Ft(()=>v("span",{class:"material-icons"},"settings",-1)),vd=Ft(()=>v("span",{class:"material-icons"},"library_books",-1)),hd=Ft(()=>v("span",{class:"material-icons"},"settings",-1)),yd=Ft(()=>v("span",{class:"material-icons"},"info",-1)),bd={href:"https://forums.moddingtree.com/",target:"_blank"},wd=Ft(()=>v("span",{class:"material-icons"},"forum",-1)),Ad={class:"discord"},kd={class:"discord-links"},Cd={key:0},_d=["href"],Sd=Ft(()=>v("li",null,[v("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ed=Ft(()=>v("li",null,[v("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Nd=ce({__name:"Nav",setup(e){const t=Q(null),l=Q(null),n=Q(null),o=Q(null),{useHeader:s,banner:u,title:d,discordName:p,discordLink:m,versionNumber:y}=De;function h(){window.open(m,"mywindow")}return(w,g)=>(A(),D(I,null,[r(s)?(A(),D("div",Al({key:0,class:"n
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 Bi();const{globalBus:e}=await ea(()=>Promise.resolve().then(function(){return ci}),void 0),{startGameLoop:t}=await ea(()=>import("./gameLoop.9a7ab240.js"),["assets/gameLoop.9a7ab240.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=so(uc);e.emit("setupVue",l),l.mount("#app"),wl(()=>{const n=rn(),{updateServiceWorker:o}=cc({onNeedRefresh(){n.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(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,ea as _,et as a,De as b,Cr as c,$e as g,Da as l,J as p,We as s};