Advent-Incremental/assets/index.c6c71963.js

20 lines
186 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as k,l as Le,aa as K,t as O,ay as xn,ar as Jt,aE as b,a0 as M,aK as Ct,a1 as f,O as P,aG as Cn,A as tt,_ as Q,a8 as o,b6 as H,b8 as Pn,bs as Bl,C as u,aq as Xt,bu as pn,bb as Fn,T as Mi,a7 as p,u as Tn,j as Ai,bv as pl,q as vn,b1 as _t,G as Oe,aC as xl,w as ht,b2 as mt,ao as Ii,I as Ge,J,$ as F,aH as Bt,aF as xt,z as kt,aN as Ie,al as Mn,aL as qt,H as Ei,aJ as Pl,bn as Bi,br as xi,be as Pi}from"./@vue.4ce677c2.js";import{c as Fl}from"./nanoevents.1080beb7.js";import{L as Rt}from"./lz-string.731cedc5.js";import{i as Fi}from"./is-plain-object.906d88e8.js";import{Y as Ti}from"./vue-next-select.a2bfab1d.js";import{s as Di,u as Tl}from"./vue-toastification.6f567382.js";import{D as $i}from"./vuedraggable.7949458c.js";import{p as Ri}from"./vue-textarea-autosize.35804eaf.js";import{v as Ui,n as Oi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const qi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}};qi();const Vi="modulepreload",fl={},Li="./",An=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Li}${l}`,l in fl)return;fl[l]=!0;const a=l.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${s}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":Vi,a||(r.as="script",r.crossOrigin=""),r.href=l,document.head.appendChild(r),a)return new Promise((c,m)=>{r.addEventListener("load",c),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},Gi="./projInfo-schema.json",Hi="Advent Incremental",Qi="An incremental game you play a day at a time, leading up to Christmas!",ji="advent-incremental",zi="thepaperpilot and friends",Ki="",Wi="",Ji="0.3",Xi="Initial Commit",Yi=!0,Zi=!1,ea=2,ta=!0,na=null,la="",ia=["main"],aa=3600,sa=0,oa=!0,ra="base64";var fe={$schema:Gi,title:Hi,description:Qi,id:ji,author:zi,discordName:Ki,discordLink:Wi,versionNumber:Ji,versionTitle:Xi,allowGoBack:Yi,defaultShowSmall:Zi,defaultDecimalsShown:ea,useHeader:ta,banner:na,logo:la,initialTabs:ia,maxTickLength:aa,offlineLimit:sa,enablePausing:oa,exportEncoding:ra};const Ln=17,ua=9e15,ca=Math.log10(9e15),da=1/9e15,ma=308,pa=-324,hl=5,fa=function(){const e=[];for(let n=pa+1;n<=ma;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),jt=[2,Math.E,3,4,5,6,7,8,9,10],ha=[[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.1670905356972596,1
Stack: ${yt}
Trying to pop ${n.id}`;return yt.pop(),$(n,"color"),$(n,"display"),$(n,"name"),et(n,"name",n.id),$(n,"minWidth"),et(n,"minWidth",600),$(n,"minimizable"),et(n,"minimizable",!0),n})}function jl(e,t){if(console.info("Adding layer",e.id),it[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,it[e.id]);return}et(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),it[e.id]=e,Te.emit("addLayer",e,t.layers[e.id])}function ja(e){return it[e]}function zl(e){console.info("Removing layer",e.id),Te.emit("removeLayer",e),it[e.id]=void 0}function za(e){zl(e),jl(e,L)}function Ka(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(rt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}Te.on("update",function(t){Object.values(it).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(it).forEach(n=>{n==null||n.emit("update",t)}),Object.values(it).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Wa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Kn,UnregisterNodeInjectionKey:Wn,NodesInjectionKey:Jn,BoundsInjectionKey:Xn,layers:it,persistentRefs:en,addingLayers:yt,createLayer:St,addLayer:jl,getLayer:ja,removeLayer:zl,reloadLayer:za,setupLayerModal:Ka},Symbol.toStringTag,{value:"Module"}));const Yn=Symbol("PersistentState"),Ot=Symbol("DefaultValue"),En=Symbol("StackTrace"),Kl=Symbol("Deleted"),hn=Symbol("NonPersistent"),cn=Symbol("SaveDataPath");function Ja(){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=Le(e)?e:O(e);t[Yn]=t,t[Ot]=Le(e)?e.value:e,t[En]=Ja(),t[Kl]=!1;const n=k({get(){return t.value},set(l){t.value=l}});return n[Ot]=t[Ot],t[hn]=n,t[cn]=void 0,yt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[En]):en[yt[yt.length-1]].add(t),t}function Xa(e){return e&&typeof e=="object"&&Yn in e}function G(e){return e[hn]}Te.on("addLayer",(e,t)=>{const n=[],l=(a,s=[])=>{let r=!1;return Object.keys(a).forEach(c=>{let m=a[c];if(m&&typeof m=="object")if(xe in m&&(m=m[xe]),Xa(m)){if(r=!0,m[Kl]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[En]);return}en[e.id].delete(m);const d=[e.id,...s,c];m[cn]!=null&&JSON.stringify(d)!==JSON.stringify(m[cn])&&console.error(`Persistent ref is being saved to \`${d.join(".")}\` when it's already present at \`${m[cn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[cn]=d;const y=s.reduce((w,v)=>(v in w||(w[v]={}),w[v]),t),g=y[c];y[c]=m[Yn],Ai(y)?g!=null?y[c]=g:y[c]=m[Ot]:g!=null?y[c].value=g:y[c].value=m[Ot]}else!(m instanceof i)&&!Le(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),l(m,[...s,c])&&(pl(m)&&!pl(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.",xe in a?a[xe]:a,c):r=!0))}),r};l(e[xe]),en[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[En])}),en[e.id].clear()});const xe=Symbol("ProxyState"),Zt=Symbol("ProxyPath");function ut(e,t={}){const n=t;let l=!1;function a(){return l||(Object.assign(n,e(n)),l=!0),n}return new Proxy(n,{get(s,r){if(r===xe)return a();const c=a()[r];return c&&typeof c=="object"&&hn in c?c[hn]:c},set(s,r,c){return a()[r]=c,!0},has(s,r){return r===xe?!0:Reflect.has(a(),r)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,r){return l||(Object.assign(n,e(n)),l=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Re=window.state=Tn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Wl=vn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Jl(e){return JSON.stringify(e,(t,n)=>u(n))}const Xl={get(e,t){var l;if(t===xe||t===Zt)return e[t];const n=e[xe][t];if(t!=="value"&&(Fi(n)||Array.isArray(n))){if(n!==((l=e[t])==null?void 0:l[xe])){const a=[...e[Zt],t];e[t]=new Proxy({[xe]:n,[Zt]:a},Xl)}return e[t]}return n},set(e,t,n,l){if(!Re.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[xe][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Wl.autosave=!1,Re.hasNaN=!0,Re.NaNPath=[...e[Zt],t],Re.NaNReceiver=l,console.error("Attempted to set NaN value",[...e[Zt],t],e[xe]),"Attempted to set NaN value. See above for details"}return e[xe][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[xe])},has(e,t){return Reflect.has(e[xe],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[xe],t)}};var L=window.player=new Proxy({[xe]:Wl,[Zt]:["player"]},Xl);function Yl(e={}){return Object.assign({id:`${fe.id}-0`,name:"Default Save",tabs:fe.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:fe.id,modVersion:fe.versionNumber,layers:{}},e)}function bt(e){const t=Rt.compressToUTF16(Jl(e!=null?e:L[xe]));return localStorage.setItem((e!=null?e:L[xe]).id,t),t}async function Ya(){es();try{let e=localStorage.getItem(Pe.active);if(e==null){await Kt(tn());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Rt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==fe.id){await Kt(tn());return}t.id=Pe.active,await Kt(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Kt(tn())}}function tn(){const e=Sn(),t=Yl({id:e});return bt(t),Pe.saves.push(e),t}function Sn(){let e,t=0;do e=`${fe.id}-${t++}`;while(localStorage.getItem(e));return e}const Zn=O(!1);async function Kt(e){console.info("Loading save",e),Zn.value=!0;const{layers:t,removeLayer:n,addLayer:l}=await An(()=>Promise.resolve().then(function(){return Wa}),void 0),{fixOldSave:a,getInitialLayers:s}=await An(()=>Promise.resolve().then(function(){return Do}),void 0);for(const r in t){const c=t[r];c&&n(c)}s(e).forEach(r=>l(r,e)),e=Yl(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,fe.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==fe.versionNumber&&a(e.modVersion,e),Object.assign(L,e),Pe.active=L.id,Te.emit("onLoad")}setInterval(()=>{L.autosave&&bt()},1e3);window.onbeforeunload=()=>{L.autosave&&bt()};window.save=bt;const Za=window.hardReset=async()=>{await Kt(tn())},gn=vn({active:"",saves:[],showTPS:!0,theme:zn.Nordic,unthrottled:!1});_t(gn,e=>{const t=Rt.compressToUTF16(JSON.stringify(e));localStorage.setItem(fe.id,t)},{deep:!0});var Pe=window.settings=gn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:zn.Nordic};Te.emit("loadSettings",e),Object.assign(gn,e),Za()};function es(){try{let e=localStorage.getItem(fe.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Rt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(gn,t)}Te.emit("loadSettings",gn)}catch{}}const Zl=vn([]);function ts(e){Zl.push(e)}const ei=vn([]);function ns(e){ei.push(e)}const ls=vn([]),is={class:"table"},Wt=K({__name:"Column",setup(e){const t=k(()=>yn[Pe.theme].mergeAdjacent);return(n,l)=>(b(),M("div",is,[f("div",{class:Oe(["col",{mergeAdjacent:u(t)}])},[Ct(n.$slots,"default")],2)]))}}),as={class:"table"},el=K({__name:"Row",setup(e){const t=k(()=>yn[Pe.theme].mergeAdjacent);return(n,l)=>(b(),M("div",as,[f("div",{class:Oe(["row",{mergeAdjacent:u(t)}])},[Ct(n.$slots,"default")],2)]))}});function tl(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ii(e)}function ce(e,t="span"){return typeof e=="function"?K({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),K({template:e})):K({render:()=>({})}):e}function de(e){if(Et(e))return typeof e=="function"?e():ce(e);const t=e[Lt];return o(t,e[Gt](),null)}function Fe(...e){let t;return o(el,null,tl(t=e.map(de))?t:{default:()=>[t]})}function dn(...e){let t;return o(Wt,null,tl(t=e.map(de))?t:{default:()=>[t]})}function wt(e){if(Et(e))return typeof e=="function"?e():typeof e=="string"?o(P,null,[e]):o(e,null,null);const t=e[Lt];return o(t,e[Gt](),null)}function ss(...e){let t;return o(Wt,null,tl(t=e.map(wt))?t:{default:()=>[t]})}function Et(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[fn]===!0}function ti(e,t,n){const l=O(null),a=O(void 0);function s(m){l.value||(l.value=setInterval(c,250)),a.value=m,n&&(n.value=!0)}function r(){l.value&&(clearInterval(l.value),l.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return xl(r),{start:s,stop:r,handleHolding:c}}function os(e,t){const n=k(()=>e.filter(l=>u(l.visibility)===Ke.Visible&&t(l)));return{firstFeature:k(()=>n.value[0]),collapsedContent:B(()=>dn(...n.value.slice(1))),hasCollapsedContent:k(()=>n.value.length>1)}}function Bn(e,t="div"){const n=ht();return mt(()=>{n.value=ce(We(e),t)}),n}function Vt(e,t="div"){const n=ht(null);return mt(()=>{const l=We(e);n.value=l==null?null:ce(l,t)}),n}function rs(e){return k(()=>We(e))}function We(e){return u(u(e))}function R(...e){return e.includes(Object)||e.push(Object),e}const ve=K({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),M("div",{style:Ge({width:e.width,height:e.height})},null,4))}});const us={},cs={
<br/>
<br/>
Cost: 50 ${n.displayName}<br/>${He(1e11)} ${q.coal.displayName}`}})),Ce=Ue(()=>({resource:G(n),cost(){return i.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(P,null,[p("Mine 2.5x faster. Increase ore mining amount by")," ",Se(Ce.amount.value),p(" ore per operation")]))},visibility:()=>U(i.gte(Ce.amount.value,1)||i.div(s.value,c.value).plus(l.value).gte(10)),style:{width:"200px"}})),Ee=Ue(()=>({resource:G(n),cost(){return i.pow(1.15,i.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(P,null,[p("Automatically smelts")," ",Se(i.times(Ee.amount.value,10)),p(" ore per second")]))},visibility:()=>U(i.gte(Ee.amount.value,1)||i.gte(Ce.amount.value,4)||i.gte(s.value,50)),style:{width:"200px"}})),ge=_e(!0),me=Ue(()=>({resource:q.coal,cost(){return i.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(P,null,[p("Gain "),Se(i.times(ie.value,100)),p("% more metal per ore")]))},visibility:()=>U(i.gte(me.amount.value,1)||be.bought.value),style:{width:"200px"}})),ie=k(()=>i.times(me.amount.value,.25));Te.on("update",ee=>{A.value=i.times(ee,ne.value).plus(A.value);const Xe=A.value.div(S).trunc();A.value=A.value.minus(Xe.times(S)),a.value=i.add(a.value,i.times(Xe,N.value)),ge.value&&v(i.min(g.value,i.times(Ee.amount.value,10).times(ee)))});const[je,Ne]=an(()=>[{title:"Automatic Smelting",modifier:m,base:0,visible(){return i.gt(Ee.amount.value,0)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:_,base:1},{title:"Mining Speed",modifier:I,base:1}]),Je=O(!1),Be=B(()=>o(rt,{modelValue:Je.value,"onUpdate:modelValue":ee=>Je.value=ee},{header:()=>o("h2",null,[e,p(" Modifiers")]),body:je})),{total:ke,trackerDisplay:ze}=sn({resource:n,goal:25e3,name:e,day:Ml,color:t,modal:{show:Je,display:Be}});return{name:e,day:Ml,color:t,ore:a,bestOre:s,oreProgress:A,metal:n,bestMetal:l,totalMetal:ke,simplePickaxe:V,doublePickaxe:Qe,crucible:at,coalDrill:De,industrialFurnace:be,oreDrill:Ce,industrialCrucible:Ee,autoSmeltEnabled:ge,hotterForge:me,generalTabCollapsed:Ne,minWidth:700,display:B(()=>o(P,null,[de(ze),o(ve,null,null),o(gt,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(P,null,[ge.value&&i.gte(Ee.amount.value,1)?`+${ql([[d.value,"smelting speed"],[Me.value,"ore gain"],[i.div(q.computedCoalGain.value,y),"coal gain"]],"/s",c.value)}`:void 0]))},null),o(ve,null,null),de(w),i.gte(Ee.amount.value,1)?o("div",{style:{width:"150px"}},[o(At,{title:"Auto Smelt",modelValue:ge.value,"onUpdate:modelValue":ee=>ge.value=ee},null)]):void 0,o(ve,null,null),o(gt,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(P,null,[Vl(oe.value)]))},null),o(ve,null,null),o("div",null,[p("Currently mining "),He(N.value),p(" ore every")," ",He(i.div(S,ne.value)),p(" seconds")]),de(T),o(ve,null,null),Fe(V,Qe,at,De,be),Fe(Ce,Ee,me)]))}}),xo="cloth",Al=8,Nt=St(xo,function(){const e="Cloth",t="white",n=ot(0,"cloth"),l=ot(0,"wool"),a=ot(10,"sheep"),s=_e(0),r=It(()=>({direction:re.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(s.value,je.value)})),c=we(()=>({display:{title:"Breed sheep",description:B(()=>o(P,null,[p("Breed "),Se(i.floor(me.value)),p(" sheep"),o("br",null,null),de(r)]))},style:{minHeight:"80px"},canClick:()=>i.gte(s.value,je.value),onClick(){if(i.lt(s.value,je.value))return;const te=i.floor(me.value);a.value=i.add(a.value,te),s.value=0}})),m=_e(0),d=It(()=>({direction:re.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(m.value,ke.value)})),y=we(()=>({display:{title:"Shear sheep",descriptio
margin: 10px 0;"/>${ye}`:T,n.value=!0},onOpenLayer(){if(Me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(L.tabs.includes(I!=null?I:"trees")){const Ae=L.tabs.lastIndexOf(I!=null?I:"trees");L.tabs.splice(Ae,1)}else L.tabs.push(I!=null?I:"trees"),W.minimized.value=!0;else L.tabs.splice(1,1/0,I!=null?I:"trees")},onUnlockLayer(){A.value=!0,setTimeout(()=>{var Ae,oe;l.value=-1,a.value=u((oe=(Ae=it[I!=null?I:"trees"])==null?void 0:Ae.name)!=null?oe:""),s.value=T,L.devSpeed=null,n.value=!0},1e3)}}}}})}const c=[r(()=>({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!"})),r(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:ri,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!"})),r(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:ui,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!"})),r(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:ci,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!"})),r(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:di,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!"})),r(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:mi,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!"})),r(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:pi,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 drill
${T}
${S}`)}}return d[A]}_t(n,A=>{A&&Object.keys(d).forEach(S=>delete d[S])});const g=k(()=>Pe.saves.reduce((A,S)=>(A[S]=y(S),A),{}));function w(A){let S;switch(L.id===A?S=Jl(L[xe]):S=JSON.stringify(g.value[A]),fe.exportEncoding){default:console.warn(`Unknown save encoding: ${fe.exportEncoding}. Defaulting to lz`);case"lz":S=Rt.compressToUTF16(S);break;case"base64":S=btoa(unescape(encodeURIComponent(S)));break;case"plain":break}const T=document.createElement("textarea");T.value=S,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function v(A){L.id===A&&bt();const S={...g.value[A],id:Sn()};bt(S),Pe.saves.push(S.id)}function _(A){Pe.saves=Pe.saves.filter(S=>S!==A),localStorage.removeItem(A),d[A]=void 0}function N(A){g.value[L.id].time=L.time,bt(),d[L.id]=void 0,Kt(g.value[A]),d[A]=void 0}function I(A){if(r.value=A,Jt(()=>{r.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Rt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const S=JSON.parse(A);S.id=Sn(),bt(S),Pe.saves.push(S.id),N(S.id)}function ne(A,S){const T=g.value[A];T&&(T.name=S,L.id===A?(L.name=S,bt()):(bt(T),d[A]=void 0))}return(A,S)=>(b(),Q(rt,{modelValue:n.value,"onUpdate:modelValue":S[4]||(S[4]=T=>n.value=T),ref_key:"modal",ref:l},{header:H(()=>[lu]),body:H(({shown:T})=>[T?(b(),Q(u($i),{key:0,list:u(Pe).saves,handle:".handle",itemKey:ye=>ye},{item:H(({element:ye})=>[o(nu,{save:u(g)[ye],onOpen:Me=>N(ye),onExport:Me=>w(ye),onEditName:Me=>ne(ye,Me),onDuplicate:Me=>v(ye),onDelete:Me=>_(ye)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):F("",!0)]),footer:H(()=>[f("div",iu,[o(vi,{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Oe({importingFailed:a.value})},null,8,["modelValue","class"]),f("div",au,[su,f("div",ou,[f("button",{class:"button",onClick:S[1]||(S[1]=T=>N(u(tn)().id))},"New Game"),Object.keys(u(m)).length>0?(b(),Q(il,{key:0,options:u(m),modelValue:r.value,"onUpdate:modelValue":S[2]||(S[2]=T=>I(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):F("",!0)])]),f("div",ru,[uu,f("button",{class:"button modal-default-button",onClick:S[3]||(S[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var yi=he(cu,[["__scopeId","data-v-3b9991aa"]]);const pt=e=>(Bt("data-v-8495e562"),e=e(),xt(),e),du=["src","alt"],mu={key:1,class:"title"},pu=pt(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),fu={class:"discord"},hu={class:"discord-links"},gu={key:0},vu=["href"],yu=pt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),bu=pt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),wu={href:"https://forums.moddingtree.com/",target:"_blank"},_u=pt(()=>f("span",{class:"material-icons"},"forum",-1)),ku=pt(()=>f("span",{class:"material-icons"},"info",-1)),Cu=pt(()=>f("span",{class:"material-icons"},"library_books",-1)),Nu=pt(()=>f("span",{class:"material-icons"},"settings",-1)),Su=pt(()=>f("span",{class:"material-icons"},"library_books",-1)),Mu=pt(()=>f("span",{class:"material-icons"},"settings",-1)),Au=pt(()=>f("span",{class:"material-icons"},"info",-1)),Iu={href:"https://forums.moddingtree.com/",target:"_blank"},Eu=pt(()=>f("span",{class:"material-icons"},"forum",-1)),Bu={class:"discord"},xu={class:"discord-links"},Pu={key:0},Fu=["href"],Tu=pt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Du=pt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),$u=K({__name:"Nav",setup(e){const t=O(null),n=O(null),l=O(null),a=O(null),{useHeader:s,banner:r,title:c,discordName:m,discordLink:d,versionNumber:y}=fe;function g(){window.open(d,"mywindow")}return(w,v)=>(b(),M(P,null,[u(s)?(b(),M("div",Xt({key:0,class
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 Ya();const{globalBus:e}=await An(()=>Promise.resolve().then(function(){return Da}),void 0),{startGameLoop:t}=await An(()=>import("./gameLoop.e7fe227b.js"),["assets/gameLoop.e7fe227b.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=Pi(yc);e.emit("setupVue",n),n.mount("#app"),Jt(()=>{const l=Tl(),{updateServiceWorker:a}=wc({onNeedRefresh(){l.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){l.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(s.update,60*60*1e3)}})}),t()});export{i as D,An as _,Re as a,fe as b,Do as c,Te as g,Zn as l,L as p,Pe as s};