Advent-Incremental/assets/index.8a5a6cbd.js

20 lines
277 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as f,l as gt,aa as _e,t as j,ay as ya,ar as Ol,aE as A,a0 as T,aK as Yt,a1 as y,O as S,aG as ra,A as It,_ as ye,a8 as n,b6 as fe,b8 as ha,bs as pi,C as u,aq as Ll,bu as Zl,bb as ba,T as on,a7 as s,u as wa,j as sn,bv as Ia,q as ia,b1 as Jt,G as vt,aC as mi,w as Zt,b2 as Qt,ao as rn,I as At,aN as ct,$ as G,J as Te,aH as Bl,aF as Nl,z as sl,al as ca,aL as xl,H as un,aJ as vi,bn as dn,br as cn,be as pn}from"./@vue.4ce677c2.js";import{c as fi}from"./nanoevents.1080beb7.js";import{L as El}from"./lz-string.731cedc5.js";import{i as mn}from"./is-plain-object.906d88e8.js";import{Y as vn}from"./vue-next-select.a2bfab1d.js";import{s as fn,u as gi}from"./vue-toastification.6f567382.js";import{D as gn}from"./vuedraggable.7949458c.js";import{p as yn}from"./vue-textarea-autosize.35804eaf.js";import{v as hn,n as bn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const wn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const d of r.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};wn();const An="modulepreload",Ka={},kn="./",pa=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${kn}${i}`,i in Ka)return;Ka[i]=!0;const o=i.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":An,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Cn="./projInfo-schema.json",En="Advent Incremental",_n="An incremental game you play a day at a time, leading up to Christmas!",Sn="advent-incremental",Mn="thepaperpilot and friends",xn="",Bn="",Nn="0.5",Dn="Initial Commit",In=!0,Tn=!1,Pn=2,Fn=!0,Un=null,Rn="",On=["main"],Ln=3600,qn=0,Gn=!0,$n="base64";var Ve={$schema:Cn,title:En,description:_n,id:Sn,author:Mn,discordName:xn,discordLink:Bn,versionNumber:Nn,versionTitle:Dn,allowGoBack:In,defaultShowSmall:Tn,defaultDecimalsShown:Pn,useHeader:Fn,banner:Un,logo:Rn,initialTabs:On,maxTickLength:Ln,offlineLimit:qn,enablePausing:Gn,exportEncoding:$n};const Sa=17,Qn=9e15,Hn=Math.log10(9e15),Vn=1/9e15,jn=308,zn=-324,Xa=5,Jn=function(){const e=[];for(let l=zn+1;l<=jn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Fl=[2,Math.E,3,4,5,6,7,8,9,10],Wn=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.167090535
Stack: ${al}
Trying to pop ${l.id}`;return al.pop(),Y(l,"color"),Y(l,"display"),Y(l,"name"),Dt(l,"name",l.id),Y(l,"minWidth"),Dt(l,"minWidth",600),Y(l,"minimizable"),Dt(l,"minimizable",!0),Y(l,"minimizedDisplay"),l})}function xi(e,t){if(console.info("Adding layer",e.id),Nt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Nt[e.id]);return}Dt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Nt[e.id]=e,lt.emit("addLayer",e,t.layers[e.id])}function Mo(e){return Nt[e]}function Bi(e){console.info("Removing layer",e.id),lt.emit("removeLayer",e),Nt[e.id]=void 0}function xo(e){Bi(e),xi(e,pe)}function Bo(e){const t=j(!1);return{openModal:()=>t.value=!0,modal:_(()=>n(_t,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}lt.on("update",function(t){Object.values(Nt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Nt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Nt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var No=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ua,UnregisterNodeInjectionKey:Ra,NodesInjectionKey:Oa,BoundsInjectionKey:La,layers:Nt,persistentRefs:$l,addingLayers:al,createLayer:Ht,addLayer:xi,getLayer:Mo,removeLayer:Bi,reloadLayer:xo,setupLayerModal:Bo},Symbol.toStringTag,{value:"Module"}));const qa=Symbol("PersistentState"),Sl=Symbol("DefaultValue"),fa=Symbol("StackTrace"),Ni=Symbol("Deleted"),ta=Symbol("NonPersistent"),Yl=Symbol("SaveDataPath");function Do(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function xe(e){const t=gt(e)?e:j(e);t[qa]=t,t[Sl]=gt(e)?e.value:e,t[fa]=Do(),t[Ni]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[Sl]=t[Sl],t[ta]=l,t[Yl]=void 0,al.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[fa]):$l[al[al.length-1]].add(t),t}function Io(e){return e&&typeof e=="object"&&qa in e}function O(e){return e[ta]}lt.on("addLayer",(e,t)=>{const l=[],i=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let m=o[c];if(m&&typeof m=="object")if(ft in m&&(m=m[ft]),Io(m)){if(d=!0,m[Ni]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+m[fa]);return}$l[e.id].delete(m);const p=[e.id,...r,c];m[Yl]!=null&&JSON.stringify(p)!==JSON.stringify(m[Yl])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${m[Yl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Yl]=p;const b=r.reduce((k,v)=>(v in k||(k[v]={}),k[v]),t),w=b[c];b[c]=m[qa],sn(b)?w!=null?b[c]=w:b[c]=m[Sl]:w!=null?b[c].value=w:b[c].value=m[Sl]}else!(m instanceof a)&&!gt(m)&&!l.includes(m)&&(typeof m.type=="symbol"&&l.push(m),i(m,[...r,c])&&(Ia(m)&&!Ia(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.",ft in o?o[ft]:o,c):d=!0))}),d};i(e[ft]),$l[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[fa])}),$l[e.id].clear()});const ft=Symbol("ProxyState"),Gl=Symbol("ProxyPath");function Vt(e,t={}){const l=t;let i=!1;function o(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(r,d){if(d===ft)return o();const c=o()[d];return c&&typeof c=="object"&&ta in c?c[ta]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===ft?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(r,d){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(r,d)}})}var bt=window.state=wa({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Di=ia({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},autoPause:!0});function Ii(e){return JSON.stringify(e,(t,l)=>u(l))}const Ti={get(e,t){var i;if(t===ft||t===Gl)return e[t];const l=e[ft][t];if(t!=="value"&&(mn(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[ft])){const o=[...e[Gl],t];e[t]=new Proxy({[ft]:l,[Gl]:o},Ti)}return e[t]}return l},set(e,t,l,i){if(!bt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[ft][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Di.autosave=!1,bt.hasNaN=!0,bt.NaNPath=[...e[Gl],t],bt.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Gl],t],e[ft]),"Attempted to set NaN value. See above for details"}return e[ft][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[ft])},has(e,t){return Reflect.has(e[ft],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ft],t)}};var pe=window.player=new Proxy({[ft]:Di,[Gl]:["player"]},Ti);function Pi(e={}){return Object.assign({id:`${Ve.id}-0`,name:"Default Save",tabs:Ve.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ve.id,modVersion:Ve.versionNumber,layers:{}},e)}function zt(e){const t=El.compressToUTF16(Ii(e!=null?e:pe[ft]));return localStorage.setItem((e!=null?e:pe[ft]).id,t),t}async function To(){Fo();try{let e=localStorage.getItem(ot.active);if(e==null){await Rl(Ql());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ve.id){await Rl(Ql());return}t.id=ot.active,await Rl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Rl(Ql())}}function Ql(){const e=da(),t=Pi({id:e});return zt(t),ot.saves.push(e),t}function da(){let e,t=0;do e=`${Ve.id}-${t++}`;while(localStorage.getItem(e));return e}const Ga=j(!1);async function Rl(e){console.info("Loading save",e),Ga.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await pa(()=>Promise.resolve().then(function(){return No}),void 0),{fixOldSave:o,getInitialLayers:r}=await pa(()=>Promise.resolve().then(function(){return Ir}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>i(d,e)),e=Pi(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,Ve.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ve.versionNumber&&(o(e.modVersion,e),e.modVersion=Ve.versionNumber),Object.assign(pe,e),ot.active=pe.id,lt.emit("onLoad")}setInterval(()=>{pe.autosave&&zt()},1e3);window.onbeforeunload=()=>{pe.autosave&&zt()};window.save=zt;const Po=window.hardReset=async()=>{await Rl(Ql())},la=ia({active:"",saves:[],showTPS:!0,theme:Fa.Nordic,unthrottled:!1,usingLog:!1,alignUnits:!1});Jt(la,e=>{const t=El.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ve.id,t)},{deep:!0});var ot=window.settings=la;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Fa.Nordic,usingLog:!1,alignUnits:!1};lt.emit("loadSettings",e),Object.assign(la,e),Po()};function Fo(){try{let e=localStorage.getItem(Ve.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(la,t)}lt.emit("loadSettings",la)}catch{}}const Fi=ia([]);function Uo(e){Fi.push(e)}const Ui=ia([]);function Ro(e){Ui.push(e)}const Oo=ia([]),Lo={class:"table"},$t=_e({__name:"Column",setup(e){const t=f(()=>Jl[ot.theme].mergeAdjacent);return(l,i)=>(A(),T("div",Lo,[y("div",{class:vt(["col",{mergeAdjacent:u(t)}])},[Yt(l.$slots,"default")],2)]))}}),qo={class:"table"},jl=_e({__name:"Row",setup(e){const t=f(()=>Jl[ot.theme].mergeAdjacent);return(l,i)=>(A(),T("div",qo,[y("div",{class:vt(["row",{mergeAdjacent:u(t)}])},[Yt(l.$slots,"default")],2)]))}});function $a(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!rn(e)}function He(e,t="span"){return typeof e=="function"?_e({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),_e({template:e})):_e({render:()=>({})}):e}function me(e){if(gl(e))return typeof e=="function"?e():He(e);const t=e[Dl];return n(t,e[Il](),null)}function nt(...e){let t;return n(jl,null,$a(t=e.map(me))?t:{default:()=>[t]})}function el(...e){let t;return n($t,null,$a(t=e.map(me))?t:{default:()=>[t]})}function Ml(...e){return n("div",{class:"table-grid"},[e.map(t=>n("div",{class:{["row-grid"]:!0,mergeAdjacent:Jl[ot.theme].mergeAdjacent}},[t.map(me)]))])}function ol(e){if(gl(e))return typeof e=="function"?e():typeof e=="string"?n(S,null,[e]):n(e,null,null);const t=e[Dl];return n(t,e[Il](),null)}function Go(...e){let t;return n($t,null,$a(t=e.map(ol))?t:{default:()=>[t]})}function gl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ea]===!0}function Ri(e,t,l){const i=j(null),o=j(void 0);function r(m){i.value||(i.value=setInterval(c,250)),o.value=m,l&&(l.value=!0)}function d(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return mi(d),{start:r,stop:d,handleHolding:c}}function $o(e,t){const l=f(()=>e.filter(i=>u(i.visibility)===Ct.Visible&&t(i)));return{firstFeature:f(()=>l.value[0]),collapsedContent:_(()=>el(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ga(e,t="div"){const l=Zt();return Qt(()=>{l.value=He(Mt(e),t)}),l}function yl(e,t="div"){const l=Zt(null);return Qt(()=>{const i=Mt(e);l.value=i==null?null:He(i,t)}),l}function Qo(e){return f(()=>Mt(e))}function Mt(e){return u(u(e))}fu
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${we(1e11)} ${q.coal.displayName}`}})),Se=L(()=>({resource:O(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:()=>h(ce.depthMilestones[4].earned.value)})),Ue=qe(()=>({resource:O(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:_(()=>n(S,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",Ce(Ue.amount.value),s(" ore per operation")]))},visibility:()=>h(a.gte(Ue.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),ge=qe(()=>({resource:O(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:_(()=>n(S,null,[s("Automatically smelts")," ",Ce(a.times(ge.amount.value,10)),s(" ore per second")]))},visibility:()=>h(a.gte(ge.amount.value,1)||a.gte(Ue.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),Oe=xe(!0),De=qe(()=>({resource:q.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:_(()=>n(S,null,[s("Gain "),Ce(a.times(Le.value,100)),s("% more metal per ore")]))},visibility:()=>h(a.gte(De.amount.value,1)||Ie.bought.value),style:{width:"200px"}})),Le=f(()=>a.times(De.amount.value,.25));lt.on("update",re=>{P.value=a.times(re,E.value).plus(P.value);const Qe=P.value.trunc();P.value=P.value.minus(Qe),o.value=a.add(o.value,a.times(Qe,J.value)),Oe.value&&D(a.min(v.value,a.times(p.value,re)),w.value)});const[ve,tt]=rl(()=>[{title:"Auto Smelt Speed",modifier:m,base:0,unit:"/s",visible(){return a.gt(ge.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return a.gt(w.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:N,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),te=j(!1),rt=_(()=>n(_t,{modelValue:te.value,"onUpdate:modelValue":re=>te.value=re},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ve})),{total:ze,trackerDisplay:Je}=hl({resource:l,goal:25e3,name:e,day:si,color:t,modal:{show:te,display:rt}});return{name:e,day:si,color:t,ore:o,bestOre:r,oreProgress:P,metal:l,bestMetal:i,totalMetal:ze,simplePickaxe:he,doublePickaxe:ae,crucible:se,coalDrill:Ne,industrialFurnace:Ie,efficientDrill:Se,oreDrill:Ue,industrialCrucible:ge,autoSmeltEnabled:Oe,hotterForge:De,generalTabCollapsed:tt,minWidth:700,display:_(()=>n(S,null,[me(Je),n(Ee,null,null),n(qt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(S,null,[Oe.value&&a.gte(ge.amount.value,1)?`+${ki([[p.value,"smelting speed"],[z.value,"ore gain"],[a.div(q.computedCoalGain.value,k),"coal gain"]],"/s",a.mul(c.value,w.value))}`:void 0]))},null),n(Ee,null,null),me(x),a.gte(ge.amount.value,1)?n("div",{style:{width:"150px"}},[n(nl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":re=>Oe.value=re},null)]):void 0,n(Ee,null,null),n(qt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(S,null,[Ci(Be.value)]))},null),n(Ee,null,null),n("div",null,[s("Currently mining "),we(J.value),s(" ore every")," ",we(a.recip(E.value)),s(" seconds")]),me(X),n(Ee,null,null),nt(he,ae,se,Ne,Ie,Se),nt(Ue,ge,De)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),we(l.value),s(" "),l.displayName]))}}),kr="elves",Kl=4,Re=Ht(kr,function(){const e="Elves",t="red",l="#911D21",o=tl(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>U.day.value===Kl?a.div(Ge.value,6).times(.8333333333333334).add(a.div(a.add(q.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:_(()=>U.day.value===Kl?a.lt(Ge.value,6)?n(S,null,[le(Ge.value),s("/6 elves")]):n(S,null,[le(q.coal.value),s("/"),le(1e9),s(" coal")
margin: 10px 0;"/>${Z}`:P,l.value=!0},onOpenLayer(){if(X.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(pe.tabs.includes(N!=null?N:"trees")){const $=pe.tabs.lastIndexOf(N!=null?N:"trees");pe.tabs.splice($,1)}else pe.tabs.push(N!=null?N:"trees"),U.minimized.value=!0;else pe.tabs.splice(1,1/0,N!=null?N:"trees")},onUnlockLayer(){N&&(M.value=!0,setTimeout(()=>{var $,z;i.value=-1,o.value=u((z=($=Nt[N!=null?N:"trees"])==null?void 0:$.name)!=null?z:""),r.value=P,pe.autoPause&&(pe.devSpeed=null),l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Gi,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!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:$i,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!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Qi,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!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Hi,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!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Vi,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!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:ji,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!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:zi,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:"Th
${P}
${E}`)}}return p[M]}Jt(l,M=>{M&&Object.keys(p).forEach(E=>delete p[E])});const w=f(()=>ot.saves.reduce((M,E)=>(M[E]=b(E),M),{}));function k(M){let E;switch(pe.id===M?E=Ii(pe[ft]):E=JSON.stringify(w.value[M]),Ve.exportEncoding){default:console.warn(`Unknown save encoding: ${Ve.exportEncoding}. Defaulting to lz`);case"lz":E=El.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const P=document.createElement("textarea");P.value=E,document.body.appendChild(P),P.select(),P.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(P)}function v(M){pe.id===M&&zt();const E={...w.value[M],id:da()};zt(E),ot.saves.push(E.id)}function x(M){ot.saves=ot.saves.filter(E=>E!==M),localStorage.removeItem(M),p[M]=void 0}function D(M){w.value[pe.id].time=pe.time,zt(),p[pe.id]=void 0,Rl(w.value[M]),p[M]=void 0}function N(M){if(d.value=M,Ol(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=El.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const E=JSON.parse(M);E.id=da(),zt(E),ot.saves.push(E.id),D(E.id)}function J(M,E){const P=w.value[M];P&&(P.name=E,pe.id===M?(pe.name=E,zt()):(zt(P),p[M]=void 0))}return(M,E)=>(A(),ye(_t,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=P=>l.value=P),ref_key:"modal",ref:i},{header:fe(()=>[id]),body:fe(({shown:P})=>[P?(A(),ye(u(gn),{key:0,list:u(ot).saves,handle:".handle",itemKey:Z=>Z},{item:fe(({element:Z})=>[n(ad,{save:u(w)[Z],onOpen:X=>D(Z),onExport:X=>k(Z),onEditName:X=>J(Z,X),onDuplicate:X=>v(Z),onDelete:X=>x(Z)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:fe(()=>[y("div",nd,[n(tn,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=P=>r.value=P),title:"Import Save",placeholder:"Paste your save here!",class:vt({importingFailed:o.value})},null,8,["modelValue","class"]),y("div",od,[sd,y("div",rd,[y("button",{class:"button",onClick:E[1]||(E[1]=P=>D(u(Ql)().id))},"New Game"),Object.keys(u(m)).length>0?(A(),ye(Va,{key:0,options:u(m),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=P=>N(P)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),y("div",ud,[dd,y("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=P=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ln=je(cd,[["__scopeId","data-v-3b9991aa"]]);const Wt=e=>(Bl("data-v-8495e562"),e=e(),Nl(),e),pd=["src","alt"],md={key:1,class:"title"},vd=Wt(()=>y("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),fd={class:"discord"},gd={class:"discord-links"},yd={key:0},hd=["href"],bd=Wt(()=>y("li",null,[y("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),wd=Wt(()=>y("li",null,[y("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Ad={href:"https://forums.moddingtree.com/",target:"_blank"},kd=Wt(()=>y("span",{class:"material-icons"},"forum",-1)),Cd=Wt(()=>y("span",{class:"material-icons"},"info",-1)),Ed=Wt(()=>y("span",{class:"material-icons"},"library_books",-1)),_d=Wt(()=>y("span",{class:"material-icons"},"settings",-1)),Sd=Wt(()=>y("span",{class:"material-icons"},"library_books",-1)),Md=Wt(()=>y("span",{class:"material-icons"},"settings",-1)),xd=Wt(()=>y("span",{class:"material-icons"},"info",-1)),Bd={href:"https://forums.moddingtree.com/",target:"_blank"},Nd=Wt(()=>y("span",{class:"material-icons"},"forum",-1)),Dd={class:"discord"},Id={class:"discord-links"},Td={key:0},Pd=["href"],Fd=Wt(()=>y("li",null,[y("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ud=Wt(()=>y("li",null,[y("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Rd=_e({__name:"Nav",setup(e){const t=j(null),l=j(null),i=j(null),o=j(null),{useHeader:r,banner:d,title:c,discordName:m,discordLink:p,versionNumber:b}=Ve;function w(){window.open(p,"mywindow")}return(k,v)=>(A(),T(S,null,[u(r)?(A(),T("div",Ll({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 To();const{globalBus:e}=await pa(()=>Promise.resolve().then(function(){return go}),void 0),{startGameLoop:t}=await pa(()=>import("./gameLoop.7864ee3d.js"),["assets/gameLoop.7864ee3d.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=pn(bc);e.emit("setupVue",l),l.mount("#app"),Ol(()=>{const i=gi(),{updateServiceWorker:o}=Ac({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,pa as _,bt as a,Ve as b,Ir as c,lt as g,Ga as l,pe as p,ot as s};