Advent-Incremental/assets/index.1774a29b.js

20 lines
178 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as N,l as De,aa as Q,t as O,ay as An,ar as Kt,aE as b,a0 as M,aK as wt,a1 as f,O as B,aG as yn,A as je,_ as G,a8 as o,b6 as L,b8 as In,bs as Nl,C as u,aq as Wt,bu as on,bb as En,T as yi,a7 as p,u as Bn,j as bi,bv as rl,q as dn,b1 as bt,G as Be,aC as Sl,w as rt,b2 as at,ao as _i,I as $e,J,$ as P,aH as Mt,aF as At,z as _t,aN as be,al as kn,aL as Rt,H as wi,aJ as Ml,bn as ki,br as Ci,be as Ni}from"./@vue.4ce677c2.js";import{c as Al}from"./nanoevents.1080beb7.js";import{L as Tt}from"./lz-string.731cedc5.js";import{i as Si}from"./is-plain-object.906d88e8.js";import{Y as Mi}from"./vue-next-select.a2bfab1d.js";import{s as Ai,u as Il}from"./vue-toastification.6f567382.js";import{D as Ii}from"./vuedraggable.7949458c.js";import{p as Ei}from"./vue-textarea-autosize.35804eaf.js";import{v as Bi,n as xi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const Pi=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)}};Pi();const Fi="modulepreload",ul={},Ti="./",Cn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Ti}${l}`,l in ul)return;ul[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":Fi,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())},Di="./projInfo-schema.json",$i="Advent Incremental",Ri="An incremental game you play a day at a time, leading up to Christmas!",Oi="advent-incremental",Ui="thepaperpilot and friends",qi="",Vi="",Li="0.3",Gi="Initial Commit",Hi=!0,Qi=!1,zi=2,ji=!0,Ki=null,Wi="",Ji=["main"],Xi=3600,Yi=0,Zi=!0,ea="base64";var re={$schema:Di,title:$i,description:Ri,id:Oi,author:Ui,discordName:qi,discordLink:Vi,versionNumber:Li,versionTitle:Gi,allowGoBack:Hi,defaultShowSmall:Qi,defaultDecimalsShown:zi,useHeader:ji,banner:Ki,logo:Wi,initialTabs:Ji,maxTickLength:Xi,offlineLimit:Yi,enablePausing:Zi,exportEncoding:ea};const Un=17,ta=9e15,na=Math.log10(9e15),la=1/9e15,ia=308,aa=-324,cl=5,sa=function(){const e=[];for(let n=aa+1;n<=ia;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ht=[2,Math.E,3,4,5,6,7,8,9,10],oa=[[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: ${gt}
Trying to pop ${n.id}`;return gt.pop(),$(n,"color"),$(n,"display"),$(n,"name"),ze(n,"name",n.id),$(n,"minWidth"),ze(n,"minWidth",600),$(n,"minimizable"),ze(n,"minimizable",!0),n})}function Ol(e,t){if(console.info("Adding layer",e.id),Ze[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Ze[e.id]);return}ze(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Ze[e.id]=e,xe.emit("addLayer",e,t.layers[e.id])}function Ua(e){return Ze[e]}function Ul(e){console.info("Removing layer",e.id),xe.emit("removeLayer",e),Ze[e.id]=void 0}function qa(e){Ul(e),Ol(e,V)}function Va(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:x(()=>o(ct,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}xe.on("update",function(t){Object.values(Ze).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Ze).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Ze).forEach(n=>{n==null||n.emit("postUpdate",t)})});var La=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Qn,UnregisterNodeInjectionKey:zn,NodesInjectionKey:jn,BoundsInjectionKey:Kn,layers:Ze,persistentRefs:Yt,addingLayers:gt,createLayer:It,addLayer:Ol,getLayer:Ua,removeLayer:Ul,reloadLayer:qa,setupLayerModal:Va},Symbol.toStringTag,{value:"Module"}));const Wn=Symbol("PersistentState"),$t=Symbol("DefaultValue"),Sn=Symbol("StackTrace"),ql=Symbol("Deleted"),un=Symbol("NonPersistent"),sn=Symbol("SaveDataPath");function Ga(){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=De(e)?e:O(e);t[Wn]=t,t[$t]=De(e)?e.value:e,t[Sn]=Ga(),t[ql]=!1;const n=N({get(){return t.value},set(l){t.value=l}});return n[$t]=t[$t],t[un]=n,t[sn]=void 0,gt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[Sn]):Yt[gt[gt.length-1]].add(t),t}function Ha(e){return e&&typeof e=="object"&&Wn in e}function W(e){return e[un]}xe.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(ke in m&&(m=m[ke]),Ha(m)){if(r=!0,m[ql]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[Sn]);return}Yt[e.id].delete(m);const d=[e.id,...s,c];m[sn]!=null&&JSON.stringify(d)!==JSON.stringify(m[sn])&&console.error(`Persistent ref is being saved to \`${d.join(".")}\` when it's already present at \`${m[sn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[sn]=d;const y=s.reduce((_,g)=>(g in _||(_[g]={}),_[g]),t),v=y[c];y[c]=m[Wn],bi(y)?v!=null?y[c]=v:y[c]=m[$t]:v!=null?y[c].value=v:y[c].value=m[$t]}else!(m instanceof i)&&!De(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),l(m,[...s,c])&&(rl(m)&&!rl(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.",ke in a?a[ke]:a,c):r=!0))}),r};l(e[ke]),Yt[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[Sn])}),Yt[e.id].clear()});const ke=Symbol("ProxyState"),Xt=Symbol("ProxyPath");function lt(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===ke)return a();const c=a()[r];return c&&typeof c=="object"&&un in c?c[un]:c},set(s,r,c){return a()[r]=c,!0},has(s,r){return r===ke?!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 Ie=window.state=Bn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Vl=dn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Ll(e){return JSON.stringify(e,(t,n)=>u(n))}const Gl={get(e,t){var l;if(t===ke||t===Xt)return e[t];const n=e[ke][t];if(t!=="value"&&(Si(n)||Array.isArray(n))){if(n!==((l=e[t])==null?void 0:l[ke])){const a=[...e[Xt],t];e[t]=new Proxy({[ke]:n,[Xt]:a},Gl)}return e[t]}return n},set(e,t,n,l){if(!Ie.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[ke][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Vl.autosave=!1,Ie.hasNaN=!0,Ie.NaNPath=[...e[Xt],t],Ie.NaNReceiver=l,console.error("Attempted to set NaN value",[...e[Xt],t],e[ke]),"Attempted to set NaN value. See above for details"}return e[ke][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[ke])},has(e,t){return Reflect.has(e[ke],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ke],t)}};var V=window.player=new Proxy({[ke]:Vl,[Xt]:["player"]},Gl);function Hl(e={}){return Object.assign({id:`${re.id}-0`,name:"Default Save",tabs:re.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:re.id,modVersion:re.versionNumber,layers:{}},e)}function vt(e){const t=Tt.compressToUTF16(Ll(e!=null?e:V[ke]));return localStorage.setItem((e!=null?e:V[ke]).id,t),t}async function Qa(){ja();try{let e=localStorage.getItem(Ne.active);if(e==null){await zt(Zt());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==re.id){await zt(Zt());return}t.id=Ne.active,await zt(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await zt(Zt())}}function Zt(){const e=_n(),t=Hl({id:e});return vt(t),Ne.saves.push(e),t}function _n(){let e,t=0;do e=`${re.id}-${t++}`;while(localStorage.getItem(e));return e}async function zt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:l}=await Cn(()=>Promise.resolve().then(function(){return La}),void 0),{fixOldSave:a,getInitialLayers:s}=await Cn(()=>Promise.resolve().then(function(){return Io}),void 0);for(const r in t){const c=t[r];c&&n(c)}s(e).forEach(r=>l(r,e)),e=Hl(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,re.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==re.versionNumber&&a(e.modVersion,e),Object.assign(V,e),Ne.active=V.id,xe.emit("onLoad")}setInterval(()=>{V.autosave&&vt()},1e3);window.onbeforeunload=()=>{V.autosave&&vt()};window.save=vt;const za=window.hardReset=async()=>{await zt(Zt())},cn=dn({active:"",saves:[],showTPS:!0,theme:Hn.Nordic,unthrottled:!1});bt(cn,e=>{const t=Tt.compressToUTF16(JSON.stringify(e));localStorage.setItem(re.id,t)},{deep:!0});var Ne=window.settings=cn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Hn.Nordic};xe.emit("loadSettings",e),Object.assign(cn,e),za()};function ja(){try{let e=localStorage.getItem(re.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(cn,t)}xe.emit("loadSettings",cn)}catch{}}const Ql=dn([]);function Ka(e){Ql.push(e)}const zl=dn([]);function Wa(e){zl.push(e)}const Ja=dn([]),Xa={class:"table"},jt=Q({__name:"Column",setup(e){const t=N(()=>mn[Ne.theme].mergeAdjacent);return(n,l)=>(b(),M("div",Xa,[f("div",{class:Be(["col",{mergeAdjacent:u(t)}])},[wt(n.$slots,"default")],2)]))}}),Ya={class:"table"},jl=Q({__name:"Row",setup(e){const t=N(()=>mn[Ne.theme].mergeAdjacent);return(n,l)=>(b(),M("div",Ya,[f("div",{class:Be(["row",{mergeAdjacent:u(t)}])},[wt(n.$slots,"default")],2)]))}});function Jn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!_i(e)}function ie(e,t="span"){return typeof e=="function"?Q({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Q({template:e})):Q({render:()=>({})}):e}function he(e){if(St(e))return typeof e=="function"?e():ie(e);const t=e[Ut];return o(t,e[qt](),null)}function Fe(...e){let t;return o(jl,null,Jn(t=e.map(he))?t:{default:()=>[t]})}function Kl(...e){let t;return o(jt,null,Jn(t=e.map(he))?t:{default:()=>[t]})}function yt(e){if(St(e))return typeof e=="function"?e():typeof e=="string"?o(B,null,[e]):o(e,null,null);const t=e[Ut];return o(t,e[qt](),null)}function Za(...e){let t;return o(jt,null,Jn(t=e.map(yt))?t:{default:()=>[t]})}function St(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[rn]===!0}function Wl(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 Sl(r),{start:s,stop:r,handleHolding:c}}function es(e,t){const n=N(()=>e.filter(l=>u(l.visibility)===Ue.Visible&&t(l)));return{firstFeature:N(()=>n.value[0]),collapsedContent:x(()=>Kl(...n.value.slice(1))),hasCollapsedContent:N(()=>n.value.length>1)}}function Mn(e,t="div"){const n=rt();return at(()=>{n.value=ie(qe(e),t)}),n}function Ot(e,t="div"){const n=rt(null);return at(()=>{const l=qe(e);n.value=l==null?null:ie(l,t)}),n}function ts(e){return N(()=>qe(e))}function qe(e){return u(u(e))}function R(...e){return e.includes(Object)||e.push(Object),e}const fe=Q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),M("div",{style:$e({width:e.width,height:e.height})},null,4))}});const ns={},ls={class:"notif"};function is(
<br/>
<br/>
Cost: 50 ${n.displayName}<br/>${Ce(1e11)} ${U.coal.displayName}`}})),ce=He(()=>({resource:W(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:x(()=>o(B,null,[p("Mine 2.5x faster. Increase ore mining amount by "),Ee(ce.amount.value),p(" ore per operation")]))},visibility:()=>q(i.gte(ce.amount.value,1)||i.div(s.value,c.value).plus(l.value).gte(10)),style:{width:"200px"}})),te=He(()=>({resource:W(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 better and faster",effectDisplay:x(()=>o(B,null,[p("Get 50% more metal per ore, and smelt "),Ee(i.times(te.amount.value,10)),p(" ore per second")]))},visibility:()=>q(i.gte(te.amount.value,1)||i.gte(ce.amount.value,4)||i.gte(s.value,50)),style:{width:"200px"}})),Z=_e(!0),Xe=He(()=>({resource:U.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:x(()=>o(B,null,[p("Gain "),Ee(i.times(we.value,100)),p("% more metal per ore")]))},visibility:()=>q(i.gte(Xe.amount.value,1)||mt.bought.value),style:{width:"200px"}})),we=N(()=>i.times(Xe.amount.value,.25));xe.on("update",me=>{A.value=i.times(me,se.value).plus(A.value);const Le=A.value.div(C).trunc();A.value=A.value.minus(Le.times(C)),a.value=i.add(a.value,i.times(Le,S.value)),Z.value&&i.gte(v.value,i.times(te.amount.value,10).times(me))&&g(i.min(v.value,i.times(te.amount.value,10).times(me)))});const[nt,Oe]=Tn(()=>[{title:"Automatic Smelting",modifier:m,base:0,visible(){return i.gt(te.amount.value,0)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:w,base:1},{title:"Mining Speed",modifier:I,base:1}]),Me=O(!1),et=x(()=>o(ct,{modelValue:Me.value,"onUpdate:modelValue":me=>Me.value=me},{header:()=>o("h2",null,[e,p(" Modifiers")]),body:nt})),{total:Ae,trackerDisplay:pt}=hn({resource:n,goal:5e4,name:e,day:_l,color:t,modal:{show:Me,display:et}});return{name:e,day:_l,color:t,ore:a,bestOre:s,oreProgress:A,metal:n,bestMetal:l,totalMetal:Ae,simplePickaxe:dt,doublePickaxe:Re,crucible:ve,coalDrill:Je,industrialFurnace:mt,oreDrill:ce,industrialCrucible:te,autoSmeltEnabled:Z,hotterForge:Xe,generalTabCollapsed:Oe,minWidth:700,display:x(()=>o(B,null,[he(pt),o(fe,null,null),o(Nt,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>o(B,null,[{[-1]:o(B,null,[Ce(Se.value),p("/s")]),0:void 0,1:o(B,null,[p("+"),Ce(Se.value),p("/s")])}[i.compare(Se.value,0)],i.lt(Ke.value,d.value)?o(B,null,[p(" (Limited by "),a.displayName,p(")")]):i.lt(v.value,i.floor(a.value))?o(B,null,[p(" (Limited by "),U.coal.displayName,p(")")]):void 0]))},null),o(fe,null,null),he(_),i.gte(te.amount.value,1)?o("div",{style:{width:"150px"}},[o(Ct,{title:"Auto Smelt",modelValue:Z.value,"onUpdate:modelValue":me=>Z.value=me},null)]):void 0,o(fe,null,null),o(Nt,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>o(B,null,[{[-1]:o(B,null,[Ce(We.value),p("/s")]),0:void 0,1:o(B,null,[p("+"),Ce(We.value),p("/s")])}[i.compare(We.value,0)]]))},null),o(fe,null,null),o("div",null,[p("Currently mining "),Ce(S.value),p(" ore every "),Ce(i.div(C,se.value)),p(" seconds")]),he(T),o(fe,null,null),Fe(dt,Re,ve,Je,mt),Fe(ce,te,Xe)]))}}),Co="coal",wl=3,U=It(Co,function(){const e="Coal",t="#151716",n="#B2BeB5",l="var(--foreground)",a=ut(0,"coal"),s=ut(0,"ash"),r=_e(0),c=N(()=>i.times(r.value,1e3)),m=N(()=>i.times(r.value,.1)),d=N(()=>i.times(r.value,50)),y=He(()=>({resource:ee.logs,cost(){let E=i.times(T.amount.value,u(T.cost)).plus(this.amount.value);return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),E=i.pow(.95,de.books.smallFireBook.amount.value).times(E),E.pow(1.5).times(1e4)},display:x(()=>o(B,null,[o("h3",null,[p("Small Fire")]),o("br",null,null),p("Burn 1000 logs for 0.1
margin: 10px 0;"/>${ge}`:T,n.value=!0},onOpenLayer(){if(Se.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(V.tabs.includes(I!=null?I:"trees")){const Ve=V.tabs.lastIndexOf(I!=null?I:"trees");V.tabs.splice(Ve,1)}else V.tabs.push(I!=null?I:"trees"),z.minimized.value=!0;else V.tabs.splice(1,1/0,I!=null?I:"trees")},onUnlockLayer(){A.value=!0,setTimeout(()=>{var Ve,Ke;l.value=-1,a.value=u((Ke=(Ve=Ze[I!=null?I:"trees"])==null?void 0:Ve.name)!=null?Ke:""),s.value=T,V.devSpeed=null,n.value=!0},1e3)}}}}})}const c=[r(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:ti,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:ni,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:li,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:ii,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:ai,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:si,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:So,story:"",completedStory:""})),r(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:11,shouldNotify:
${T}
${C}`)}}return d[A]}bt(n,A=>{A&&Object.keys(d).forEach(C=>delete d[C])});const v=N(()=>Ne.saves.reduce((A,C)=>(A[C]=y(C),A),{}));function _(A){let C;switch(V.id===A?C=Ll(V[ke]):C=JSON.stringify(v.value[A]),re.exportEncoding){default:console.warn(`Unknown save encoding: ${re.exportEncoding}. Defaulting to lz`);case"lz":C=Tt.compressToUTF16(C);break;case"base64":C=btoa(unescape(encodeURIComponent(C)));break;case"plain":break}const T=document.createElement("textarea");T.value=C,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function g(A){V.id===A&&vt();const C={...v.value[A],id:_n()};vt(C),Ne.saves.push(C.id)}function w(A){Ne.saves=Ne.saves.filter(C=>C!==A),localStorage.removeItem(A),d[A]=void 0}function S(A){v.value[V.id].time=V.time,vt(),d[V.id]=void 0,zt(v.value[A]),d[A]=void 0}function I(A){if(r.value=A,Kt(()=>{r.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Tt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const C=JSON.parse(A);C.id=_n(),vt(C),Ne.saves.push(C.id),S(C.id)}function se(A,C){const T=v.value[A];T&&(T.name=C,V.id===A?(V.name=C,vt()):(vt(T),d[A]=void 0))}return(A,C)=>(b(),G(ct,{modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=T=>n.value=T),ref_key:"modal",ref:l},{header:L(()=>[jr]),body:L(({shown:T})=>[T?(b(),G(u(Ii),{key:0,list:u(Ne).saves,handle:".handle",itemKey:ge=>ge},{item:L(({element:ge})=>[o(zr,{save:u(v)[ge],onOpen:Se=>S(ge),onExport:Se=>_(ge),onEditName:Se=>se(ge,Se),onDuplicate:Se=>g(ge),onDelete:Se=>w(ge)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:L(()=>[f("div",Kr,[o(ui,{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Be({importingFailed:a.value})},null,8,["modelValue","class"]),f("div",Wr,[Jr,f("div",Xr,[f("button",{class:"button",onClick:C[1]||(C[1]=T=>S(u(Zt)().id))},"New Game"),Object.keys(u(m)).length>0?(b(),G(Zn,{key:0,options:u(m),modelValue:r.value,"onUpdate:modelValue":C[2]||(C[2]=T=>I(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),f("div",Yr,[Zr,f("button",{class:"button modal-default-button",onClick:C[3]||(C[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ci=ue(eu,[["__scopeId","data-v-3b9991aa"]]);const st=e=>(Mt("data-v-4a3f8425"),e=e(),At(),e),tu=["src","alt"],nu={key:1,class:"title"},lu=st(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),iu={class:"discord"},au={class:"discord-links"},su={key:0},ou=["href"],ru=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),uu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),cu={href:"https://forums.moddingtree.com/",target:"_blank"},du=st(()=>f("span",{class:"material-icons"},"forum",-1)),mu=st(()=>f("span",{class:"material-icons"},"info",-1)),pu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),fu=st(()=>f("span",{class:"material-icons"},"settings",-1)),hu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),gu=st(()=>f("span",{class:"material-icons"},"settings",-1)),vu=st(()=>f("span",{class:"material-icons"},"info",-1)),yu={href:"https://forums.moddingtree.com/",target:"_blank"},bu=st(()=>f("span",{class:"material-icons"},"forum",-1)),_u={class:"discord"},wu={class:"discord-links"},ku={key:0},Cu=["href"],Nu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Su=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Mu=Q({__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}=re;function v(){window.open(d,"mywindow")}return(_,g)=>(b(),M(B,null,[u(s)?(b(),M("div",Wt({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 Qa();const{globalBus:e}=await Cn(()=>Promise.resolve().then(function(){return Ia}),void 0),{startGameLoop:t}=await Cn(()=>import("./gameLoop.6e359faa.js"),["assets/gameLoop.6e359faa.js","assets/@fontsource.f66d05e7.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=Ni(rc);e.emit("setupVue",n),n.mount("#app"),Kt(()=>{const l=Il(),{updateServiceWorker:a}=cc({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,Cn as _,Ie as a,re as b,Io as c,xe as g,V as p,Ne as s};