Advent-Incremental/assets/index.0e33fa5e.js

20 lines
230 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as f,l as nt,aa as ue,t as $,ay as aa,ar as wl,aE as k,a0 as B,aK as Lt,a1 as g,O as D,aG as Wl,A as vt,_ as ae,a8 as i,b6 as X,b8 as na,bs as tn,C as r,aq as Cl,bu as Tl,bb as oa,T as Xn,a7 as c,u as ia,j as Zn,bv as wa,q as $l,b1 as jt,G as lt,aC as ln,w as Rt,b2 as Dt,ao as eo,I as ot,J as fe,$ as O,aH as Zt,aF as el,z as Wt,aN as We,al as Jl,aL as cl,H as to,aJ as an,bn as lo,br as ao,be as no}from"./@vue.4ce677c2.js";import{c as nn}from"./nanoevents.1080beb7.js";import{L as rl}from"./lz-string.731cedc5.js";import{i as oo}from"./is-plain-object.906d88e8.js";import{Y as io}from"./vue-next-select.a2bfab1d.js";import{s as so,u as on}from"./vue-toastification.6f567382.js";import{D as ro}from"./vuedraggable.7949458c.js";import{p as uo}from"./vue-textarea-autosize.35804eaf.js";import{v as co,n as po}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const mo=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)}};mo();const go="modulepreload",Ga={},fo="./",Yl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${fo}${n}`,n in Ga)return;Ga[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":go,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())},vo="./projInfo-schema.json",ho="Advent Incremental",yo="An incremental game you play a day at a time, leading up to Christmas!",bo="advent-incremental",wo="thepaperpilot and friends",Co="",ko="",_o="0.3",Ao="Initial Commit",So=!0,No=!1,Eo=2,Mo=!0,Bo=null,Io="",Do=["main"],xo=3600,Po=0,Fo=!0,To="base64";var Be={$schema:vo,title:ho,description:yo,id:bo,author:wo,discordName:Co,discordLink:ko,versionNumber:_o,versionTitle:Ao,allowGoBack:So,defaultShowSmall:No,defaultDecimalsShown:Eo,useHeader:Mo,banner:Bo,logo:Io,initialTabs:Do,maxTickLength:xo,offlineLimit:Po,enablePausing:Fo,exportEncoding:To};const fa=17,Uo=9e15,Ro=Math.log10(9e15),Oo=1/9e15,$o=308,Go=-324,qa=5,qo=function(){const e=[];for(let l=Go+1;l<=$o;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],Vo=[[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.1670905356
Stack: ${Gt}
Trying to pop ${l.id}`;return Gt.pop(),q(l,"color"),q(l,"display"),q(l,"name"),ft(l,"name",l.id),q(l,"minWidth"),ft(l,"minWidth",600),q(l,"minimizable"),ft(l,"minimizable",!0),l})}function yn(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,Re.emit("addLayer",e,t.layers[e.id])}function bi(e){return wt[e]}function bn(e){console.info("Removing layer",e.id),Re.emit("removeLayer",e),wt[e.id]=void 0}function wi(e){bn(e),yn(e,K)}function Ci(e){const t=$(!1);return{openModal:()=>t.value=!0,modal:M(()=>i(ht,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}Re.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 ki=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Aa,UnregisterNodeInjectionKey:Sa,NodesInjectionKey:Na,BoundsInjectionKey:Ea,layers:wt,persistentRefs:Nl,addingLayers:Gt,createLayer:xt,addLayer:yn,getLayer:bi,removeLayer:bn,reloadLayer:wi,setupLayerModal:Ci},Symbol.toStringTag,{value:"Module"}));const Ma=Symbol("PersistentState"),dl=Symbol("DefaultValue"),ea=Symbol("StackTrace"),wn=Symbol("Deleted"),Rl=Symbol("NonPersistent"),Fl=Symbol("SaveDataPath");function _i(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Ce(e){const t=nt(e)?e:$(e);t[Ma]=t,t[dl]=nt(e)?e.value:e,t[ea]=_i(),t[wn]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[dl]=t[dl],t[Rl]=l,t[Fl]=void 0,Gt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[ea]):Nl[Gt[Gt.length-1]].add(t),t}function Ai(e){return e&&typeof e=="object"&&Ma in e}function T(e){return e[Rl]}Re.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(Je in p&&(p=p[Je]),Ai(p)){if(u=!0,p[wn]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[ea]);return}Nl[e.id].delete(p);const m=[e.id,...s,d];p[Fl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Fl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Fl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Fl]=m;const w=s.reduce((C,v)=>(v in C||(C[v]={}),C[v]),t),h=w[d];w[d]=p[Ma],Zn(w)?h!=null?w[d]=h:w[d]=p[dl]:h!=null?w[d].value=h:w[d].value=p[dl]}else!(p instanceof a)&&!nt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,d])&&(wa(p)&&!wa(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.",Je in o?o[Je]:o,d):u=!0))}),u};n(e[Je]),Nl[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[ea])}),Nl[e.id].clear()});const Je=Symbol("ProxyState"),Sl=Symbol("ProxyPath");function At(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===Je)return o();const d=o()[u];return d&&typeof d=="object"&&Rl in d?d[Rl]:d},set(s,u,d){return o()[u]=d,!0},has(s,u){return u===Je?!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=ia({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Cn=$l({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function kn(e){return JSON.stringify(e,(t,l)=>r(l))}const _n={get(e,t){var n;if(t===Je||t===Sl)return e[t];const l=e[Je][t];if(t!=="value"&&(oo(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[Je])){const o=[...e[Sl],t];e[t]=new Proxy({[Je]:l,[Sl]:o},_n)}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[Je][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[Je]),"Attempted to set NaN value. See above for details"}return e[Je][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Je])},has(e,t){return Reflect.has(e[Je],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Je],t)}};var K=window.player=new Proxy({[Je]:Cn,[Sl]:["player"]},_n);function An(e={}){return Object.assign({id:`${Be.id}-0`,name:"Default Save",tabs:Be.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Be.id,modVersion:Be.versionNumber,layers:{}},e)}function qt(e){const t=rl.compressToUTF16(kn(e!=null?e:K[Je]));return localStorage.setItem((e!=null?e:K[Je]).id,t),t}async function Si(){Ei();try{let e=localStorage.getItem(Ye.active);if(e==null){await bl(El());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!==Be.id){await bl(El());return}t.id=Ye.active,await bl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await bl(El())}}function El(){const e=Kl(),t=An({id:e});return qt(t),Ye.saves.push(e),t}function Kl(){let e,t=0;do e=`${Be.id}-${t++}`;while(localStorage.getItem(e));return e}const Ba=$(!1);async function bl(e){console.info("Loading save",e),Ba.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await Yl(()=>Promise.resolve().then(function(){return ki}),void 0),{fixOldSave:o,getInitialLayers:s}=await Yl(()=>Promise.resolve().then(function(){return hr}),void 0);for(const u in t){const d=t[u];d&&l(d)}s(e).forEach(u=>n(u,e)),e=An(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,Be.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Be.versionNumber&&o(e.modVersion,e),Object.assign(K,e),Ye.active=K.id,Re.emit("onLoad")}setInterval(()=>{K.autosave&&qt()},1e3);window.onbeforeunload=()=>{K.autosave&&qt()};window.save=qt;const Ni=window.hardReset=async()=>{await bl(El())},Ol=$l({active:"",saves:[],showTPS:!0,theme:_a.Nordic,unthrottled:!1});jt(Ol,e=>{const t=rl.compressToUTF16(JSON.stringify(e));localStorage.setItem(Be.id,t)},{deep:!0});var Ye=window.settings=Ol;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:_a.Nordic};Re.emit("loadSettings",e),Object.assign(Ol,e),Ni()};function Ei(){try{let e=localStorage.getItem(Be.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(Ol,t)}Re.emit("loadSettings",Ol)}catch{}}const Sn=$l([]);function Mi(e){Sn.push(e)}const Nn=$l([]);function Bi(e){Nn.push(e)}const Ii=$l([]),Di={class:"table"},Et=ue({__name:"Column",setup(e){const t=f(()=>Gl[Ye.theme].mergeAdjacent);return(l,n)=>(k(),B("div",Di,[g("div",{class:lt(["col",{mergeAdjacent:r(t)}])},[Lt(l.$slots,"default")],2)]))}}),xi={class:"table"},Bl=ue({__name:"Row",setup(e){const t=f(()=>Gl[Ye.theme].mergeAdjacent);return(l,n)=>(k(),B("div",xi,[g("div",{class:lt(["row",{mergeAdjacent:r(t)}])},[Lt(l.$slots,"default")],2)]))}});function Ia(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!eo(e)}function Ne(e,t="span"){return typeof e=="function"?ue({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),ue({template:e})):ue({render:()=>({})}):e}function Z(e){if(Xt(e))return typeof e=="function"?e():Ne(e);const t=e[ml];return i(t,e[gl](),null)}function ye(...e){let t;return i(Bl,null,Ia(t=e.map(Z))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Et,null,Ia(t=e.map(Z))?t:{default:()=>[t]})}function Qt(e){if(Xt(e))return typeof e=="function"?e():typeof e=="string"?i(D,null,[e]):i(e,null,null);const t=e[ml];return i(t,e[gl](),null)}function Pi(...e){let t;return i(Et,null,Ia(t=e.map(Qt))?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[Ul]===!0}function En(e,t,l){const n=$(null),o=$(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 ln(u),{start:s,stop:u,handleHolding:d}}function Fi(e,t){const l=f(()=>e.filter(n=>r(n.visibility)===it.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:M(()=>Ht(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ta(e,t="div"){const l=Rt();return Dt(()=>{l.value=Ne(rt(e),t)}),l}function pl(e,t="div"){const l=Rt(null);return Dt(()=>{const n=rt(e);l.value=n==null?null:Ne(n,t)}),l}function Ti(e){return f(()=>rt(e))}function rt(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ce=ue({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(k(),B("div",{style:ot({width:e.width,height:e.height})},null,4))}});const Ui={},R
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${de(1e11)} ${R.coal.displayName}`}})),ke=U(()=>({resource:T(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:()=>I(Ve.depthMilestones[4].earned.value)})),we=Se(()=>({resource:T(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:M(()=>i(D,null,[c("Mine 2.5x faster. Increase ore mining amount by")," ",se(we.amount.value),c(" ore per operation")]))},visibility:()=>I(a.gte(we.amount.value,1)||a.div(s.value,d.value).plus(n.value).gte(10)),style:{width:"200px"}})),be=Se(()=>({resource:T(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:M(()=>i(D,null,[c("Automatically smelts")," ",se(a.times(be.amount.value,10)),c(" ore per second")]))},visibility:()=>I(a.gte(be.amount.value,1)||a.gte(we.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),$e=Ce(!0),Fe=Se(()=>({resource:R.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:M(()=>i(D,null,[c("Gain "),se(a.times(ut.value,100)),c("% more metal per ore")]))},visibility:()=>I(a.gte(Fe.amount.value,1)||Q.bought.value),style:{width:"200px"}})),ut=f(()=>a.times(Fe.amount.value,.25));Re.on("update",pe=>{F.value=a.times(pe,A.value).plus(F.value);const dt=F.value.trunc();F.value=F.value.minus(dt),o.value=a.add(o.value,a.times(dt,W.value)),$e.value&&S(a.min(v.value,a.times(m.value,pe)),h.value)});const[Ue,Ft]=tl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(be.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,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:N,base:.1,unit:"/s"}]),ne=$(!1),oe=M(()=>i(ht,{modelValue:ne.value,"onUpdate:modelValue":pe=>ne.value=pe},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:Ue})),{total:Ze,trackerDisplay:je}=ll({resource:l,goal:25e3,name:e,day:Ya,color:t,modal:{show:ne,display:oe}});return{name:e,day:Ya,color:t,ore:o,bestOre:s,oreProgress:F,metal:l,bestMetal:n,totalMetal:Ze,simplePickaxe:De,doublePickaxe:Pe,crucible:Ie,coalDrill:Te,industrialFurnace:Q,efficientDrill:ke,oreDrill:we,industrialCrucible:be,autoSmeltEnabled:$e,hotterForge:Fe,generalTabCollapsed:Ft,minWidth:700,display:M(()=>i(D,null,[Z(je),i(ce,null,null),i(_t,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:M(()=>i(D,null,[$e.value&&a.gte(be.amount.value,1)?`+${pn([[m.value,"smelting speed"],[Me.value,"ore gain"],[a.div(R.computedCoalGain.value,C),"coal gain"]],"/s",a.mul(d.value,h.value))}`:void 0]))},null),i(ce,null,null),Z(y),a.gte(be.amount.value,1)?i("div",{style:{width:"150px"}},[i(Jt,{title:"Auto Smelt",modelValue:$e.value,"onUpdate:modelValue":pe=>$e.value=pe},null)]):void 0,i(ce,null,null),i(_t,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:M(()=>i(D,null,[mn(Oe.value)]))},null),i(ce,null,null),i("div",null,[c("Currently mining "),de(W.value),c(" ore every")," ",de(a.recip(A.value)),c(" seconds")]),Z(me),i(ce,null,null),ye(De,Pe,Ie,Te,Q,ke),ye(we,be,Fe)]))}}),cr="cloth",Xa=8,mt=xt(cr,function(){const e="Cloth",t="white",l=tt(0,"cloth"),n=tt(0,"wool"),o=tt(10,"sheep"),s=Ce(0),u=Yt(()=>({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,Ue.value)})),d=It(()=>({display:{title:"Breed sheep",description:M(()=>i(D,null,[c("Breed "),se(a.floor(Fe.value)),c(" sheep"),i("br",null,null),Z(u)]))},style:{minHeight:"80px"},can
margin: 10px 0;"/>${ee}`:F,l.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(K.tabs.includes(x!=null?x:"trees")){const L=K.tabs.lastIndexOf(x!=null?x:"trees");K.tabs.splice(L,1)}else K.tabs.push(x!=null?x:"trees"),j.minimized.value=!0;else K.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(N.value=!0,setTimeout(()=>{var L,Me;n.value=-1,o.value=r((Me=(L=wt[x!=null?x:"trees"])==null?void 0:L.name)!=null?Me:""),s.value=F,K.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Pn,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:Fn,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:Un,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:Rn,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:On,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:$n,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
${F}
${A}`)}}return m[N]}jt(l,N=>{N&&Object.keys(m).forEach(A=>delete m[A])});const h=f(()=>Ye.saves.reduce((N,A)=>(N[A]=w(A),N),{}));function C(N){let A;switch(K.id===N?A=kn(K[Je]):A=JSON.stringify(h.value[N]),Be.exportEncoding){default:console.warn(`Unknown save encoding: ${Be.exportEncoding}. Defaulting to lz`);case"lz":A=rl.compressToUTF16(A);break;case"base64":A=btoa(unescape(encodeURIComponent(A)));break;case"plain":break}const F=document.createElement("textarea");F.value=A,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(N){K.id===N&&qt();const A={...h.value[N],id:Kl()};qt(A),Ye.saves.push(A.id)}function y(N){Ye.saves=Ye.saves.filter(A=>A!==N),localStorage.removeItem(N),m[N]=void 0}function S(N){h.value[K.id].time=K.time,qt(),m[K.id]=void 0,bl(h.value[N]),m[N]=void 0}function x(N){if(u.value=N,wl(()=>{u.value=null}),N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=rl.decompressFromUTF16(N);else{console.warn("Unable to determine preset encoding",N);return}const A=JSON.parse(N);A.id=Kl(),qt(A),Ye.saves.push(A.id),S(A.id)}function W(N,A){const F=h.value[N];F&&(F.name=A,K.id===N?(K.name=A,qt()):(qt(F),m[N]=void 0))}return(N,A)=>(k(),ae(ht,{modelValue:l.value,"onUpdate:modelValue":A[4]||(A[4]=F=>l.value=F),ref_key:"modal",ref:n},{header:X(()=>[qu]),body:X(({shown:F})=>[F?(k(),ae(r(ro),{key:0,list:r(Ye).saves,handle:".handle",itemKey:ee=>ee},{item:X(({element:ee})=>[i(Gu,{save:r(h)[ee],onOpen:me=>S(ee),onExport:me=>C(ee),onEditName:me=>W(ee,me),onDuplicate:me=>v(ee),onDelete:me=>y(ee)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):O("",!0)]),footer:X(()=>[g("div",Vu,[i(Qn,{modelValue:s.value,"onUpdate:modelValue":A[0]||(A[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:lt({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",Lu,[Hu,g("div",Qu,[g("button",{class:"button",onClick:A[1]||(A[1]=F=>S(r(El)().id))},"New Game"),Object.keys(r(p)).length>0?(k(),ae(Pa,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":A[2]||(A[2]=F=>x(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):O("",!0)])]),g("div",ju,[Wu,g("button",{class:"button modal-default-button",onClick:A[3]||(A[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var jn=Ee(zu,[["__scopeId","data-v-3b9991aa"]]);const Pt=e=>(Zt("data-v-8495e562"),e=e(),el(),e),Ku=["src","alt"],Ju={key:1,class:"title"},Yu=Pt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Xu={class:"discord"},Zu={class:"discord-links"},ed={key:0},td=["href"],ld=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ad=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),nd={href:"https://forums.moddingtree.com/",target:"_blank"},od=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),id=Pt(()=>g("span",{class:"material-icons"},"info",-1)),sd=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),rd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),ud=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),dd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),cd=Pt(()=>g("span",{class:"material-icons"},"info",-1)),pd={href:"https://forums.moddingtree.com/",target:"_blank"},md=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),gd={class:"discord"},fd={class:"discord-links"},vd={key:0},hd=["href"],yd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),bd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),wd=ue({__name:"Nav",setup(e){const t=$(null),l=$(null),n=$(null),o=$(null),{useHeader:s,banner:u,title:d,discordName:p,discordLink:m,versionNumber:w}=Be;function h(){window.open(m,"mywindow")}return(C,v)=>(k(),B(D,null,[r(s)?(k(),B("div",Cl({key:0,cla
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 Si();const{globalBus:e}=await Yl(()=>Promise.resolve().then(function(){return ri}),void 0),{startGameLoop:t}=await Yl(()=>import("./gameLoop.93d6ed0b.js"),["assets/gameLoop.93d6ed0b.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=no(lc);e.emit("setupVue",l),l.mount("#app"),wl(()=>{const n=on(),{updateServiceWorker:o}=nc({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,Yl as _,et as a,Be as b,hr as c,Re as g,Ba as l,K as p,Ye as s};