Advent-Incremental/assets/index.51edb8ac.js

17 lines
152 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as I,l as Ne,u as Nn,q as rn,C as r,b1 as Je,aa as L,aE as b,a0 as M,a1 as m,aK as nt,G as ye,t as x,aC as di,w as ze,b2 as xe,a8 as o,O as D,ao as ts,I as be,ay as Cn,ar as Pt,aG as pn,A as Se,_ as U,b6 as q,b8 as Vn,bs as ns,aq as $t,bu as tn,bb as Sn,T as is,a7 as g,j as ss,bv as ii,J as z,$ as P,aH as rt,aF as ot,al as yn,aL as yt,aN as Me,z as lt,H as as,aJ as fi,bn as ls,br as rs,be as os}from"./@vue.4ce677c2.js";import{i as us}from"./is-plain-object.906d88e8.js";import{c as mi}from"./nanoevents.1080beb7.js";import{L as gt}from"./lz-string.731cedc5.js";import{Y as cs}from"./vue-next-select.a2bfab1d.js";import{s as ds,u as pi}from"./vue-toastification.6f567382.js";import{D as fs}from"./vuedraggable.7949458c.js";import{p as ms}from"./vue-textarea-autosize.35804eaf.js";import{v as ps,n as hs}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const gs=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}};gs();const vs="modulepreload",si={},ys="./",bn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ys}${i}`,i in si)return;si[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":vs,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},bs="./projInfo-schema.json",_s="Advent Incremental",ws="An incremental game you play a day at a time, leading up to Christmas!",ks="advent-incremental",Ns="thepaperpilot",Cs="",Ss="",Ms="0.3",Is="Initial Commit",As=!0,Ps=!1,$s=2,Es=!0,Ts=null,xs="",Bs=["main"],Fs=3600,Ds=0,Os=!0,Rs="base64";var K={$schema:bs,title:_s,description:ws,id:ks,author:Ns,discordName:Cs,discordLink:Ss,versionNumber:Ms,versionTitle:Is,allowGoBack:As,defaultShowSmall:Ps,defaultDecimalsShown:$s,useHeader:Es,banner:Ts,logo:xs,initialTabs:Bs,maxTickLength:Fs,offlineLimit:Ds,enablePausing:Os,exportEncoding:Rs};const Dn=17,qs=9e15,Vs=Math.log10(9e15),Ls=1/9e15,Gs=308,Hs=-324,ai=5,Us=function(){const e=[];for(let n=Hs+1;n<=Gs;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),St=[2,Math.E,3,4,5,6,7,8,9,10],js=[[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.3632807
`,e),await It(Rt())}}function Rt(){const e=gn(),t=Mi({id:e});return Qe(t),re.saves.push(e),t}function gn(){let e,t=0;do e=`${K.id}-${t++}`;while(localStorage.getItem(e));return e}async function It(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:i}=await bn(()=>Promise.resolve().then(function(){return Da}),void 0),{fixOldSave:s,getInitialLayers:l}=await bn(()=>Promise.resolve().then(function(){return zi}),void 0);for(const u in t){const c=t[u];c&&n(c)}l(e).forEach(u=>i(u,e)),e=Mi(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,K.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==K.versionNumber&&s(e.modVersion,e),Object.assign(A,e),re.active=A.id,oe.emit("onLoad")}setInterval(()=>{A.autosave&&Qe()},1e3);window.onbeforeunload=()=>{A.autosave&&Qe()};window.save=Qe;const pa=window.hardReset=async()=>{await It(Rt())},sn=rn({active:"",saves:[],showTPS:!0,theme:Ln.Nordic,unthrottled:!1});Je(sn,e=>{const t=gt.compressToUTF16(JSON.stringify(e));localStorage.setItem(K.id,t)},{deep:!0});var re=window.settings=sn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Ln.Nordic};oe.emit("loadSettings",e),Object.assign(sn,e),pa()};function ha(){try{let e=localStorage.getItem(K.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=gt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(sn,t)}oe.emit("loadSettings",sn)}catch{}}const Ii=rn([]);function ga(e){Ii.push(e)}const Ai=rn([]);function va(e){Ai.push(e)}const ya=rn([]),ba={class:"table"},vn=L({__name:"Column",setup(e){const t=I(()=>on[re.theme].mergeAdjacent);return(n,i)=>(b(),M("div",ba,[m("div",{class:ye(["col",{mergeAdjacent:r(t)}])},[nt(n.$slots,"default")],2)]))}}),_a={class:"table"},Pi=L({__name:"Row",setup(e){const t=I(()=>on[re.theme].mergeAdjacent);return(n,i)=>(b(),M("div",_a,[m("div",{class:ye(["row",{mergeAdjacent:r(t)}])},[nt(n.$slots,"default")],2)]))}});function $i(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ts(e)}function X(e,t="span"){return typeof e=="function"?L({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),L({template:e})):L({render:()=>({})}):e}function me(e){if(wt(e))return typeof e=="function"?e():X(e);const t=e[bt];return o(t,e[_t](),null)}function Ge(...e){let t;return o(Pi,null,$i(t=e.map(me))?t:{default:()=>[t]})}function Gn(...e){let t;return o(vn,null,$i(t=e.map(me))?t:{default:()=>[t]})}function it(e){if(wt(e))return typeof e=="function"?e():typeof e=="string"?o(D,null,[e]):o(e,null,null);const t=e[bt];return o(t,e[_t](),null)}function wt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[nn]===!0}function Ei(e,t,n){const i=x(null),s=x(void 0);function l(f){i.value||(i.value=setInterval(c,250)),s.value=f,n&&(n.value=!0)}function u(){i.value&&(clearInterval(i.value),i.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(s.value)}return di(u),{start:l,stop:u,handleHolding:c}}function Ti(e,t="div"){const n=ze();return xe(()=>{n.value=X(_e(e),t)}),n}function Et(e,t="div"){const n=ze(null);return xe(()=>{const i=_e(e);n.value=i==null?null:X(i,t)}),n}function wa(e){return I(()=>_e(e))}function _e(e){return r(r(e))}function E(...e){return e.includes(Object)||e.push(Object),e}const Pe=L({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(b(),M("div",{style:be({width:e.width,height:e.height})},null,4))}});var Y=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};const ka=L({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var _;const n=x({}),i=new ResizeObserver(c),s=x(null);Cn(()=>{const y=s.value;y!=null&&i.observe(y)});let l=!0,u=x((_=s.value)==null?void 0:_.getBoundingClientRect());function c(){l&&(l=!1,Pt(()=>{va
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Fe(e){const t=Ne(e)?e:x(e);return t[an]=t,t[ln]=Ne(e)?e.value:e,t[kn]=Ta(),t[Bi]=!1,Ke.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[kn]):qt[Ke[Ke.length-1]].add(t),t}oe.on("addLayer",(e,t)=>{const n=[],i=(s,l=[])=>{let u=!1;return Object.keys(s).forEach(c=>{const f=s[c];if(f&&typeof f=="object")if(an in f){if(u=!0,f[Bi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",f,`
Created at:
`+f[kn]);return}qt[e.id].delete(de in f?f[de]:f);const d=l.reduce((y,v)=>(v in y||(y[v]={}),y[v]),t),_=d[c];d[c]=f[an],ss(d)?_!=null?d[c]=_:d[c]=f[ln]:_!=null?d[c].value=_:d[c].value=f[ln]}else!(f instanceof a)&&!Ne(f)&&!n.includes(f)&&(typeof f.type=="symbol"&&n.push(f),i(f,[...l,c])&&(ii(f)&&!ii(s)?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.",de in s?s[de]:s,c):u=!0))}),u};i(e),qt[e.id].forEach(s=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,s,`
Created at:
`+s[kn])}),qt[e.id].clear()});const Hn=Symbol("RegisterNode"),Un=Symbol("UnregisterNode"),jn=Symbol("Nodes"),zn=Symbol("Bounds"),$e=Nn({});window.layers=$e;const qt={},Ke=[];function Tt(e,t){return Le(()=>{const n={},i=n.emitter=mi();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=x({}),n.id=e,Ke.push(e),qt[e]=new Set,n.minimized=Fe(!1),Object.assign(n,t.call(n)),Ke[Ke.length-1]==null||Ke[Ke.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${Ke}
Trying to pop ${n.id}`;return Ke.pop(),$(n,"color"),$(n,"display"),$(n,"name"),Ce(n,"name",n.id),$(n,"minWidth"),Ce(n,"minWidth",600),$(n,"minimizable"),Ce(n,"minimizable",!0),n})}function Fi(e,t){if(console.info("Adding layer",e.id),$e[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,$e[e.id]);return}Ce(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),$e[e.id]=e,oe.emit("addLayer",e,t.layers[e.id])}function xa(e){return $e[e]}function Di(e){console.info("Removing layer",e.id),oe.emit("removeLayer",e),$e[e.id]=void 0}function Ba(e){Di(e),Fi(e,A)}function Fa(e){const t=x(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(Xe,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>o("h2",null,[r(e.name)]),body:r(e.display)}))}}oe.on("update",function(t){Object.values($e).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values($e).forEach(n=>{n==null||n.emit("update",t)}),Object.values($e).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Da=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Hn,UnregisterNodeInjectionKey:Un,NodesInjectionKey:jn,BoundsInjectionKey:zn,layers:$e,persistentRefs:qt,addingLayers:Ke,createLayer:Tt,addLayer:Fi,getLayer:xa,removeLayer:Di,reloadLayer:Ba,setupLayerModal:Fa},Symbol.toStringTag,{value:"Module"}));const Oa={},Ra={class:"notif"};function qa(e,t){return b(),M("div",Ra,"!")}var ui=Y(Oa,[["render",qa],["__scopeId","data-v-66323fd4"]]);const In=e=>(rt("data-v-949cc93c"),e=e(),ot(),e),Va={key:0,class:"day feature dontMerge opened"},La={class:"date"},Ga=g("Dec"),Ha=In(()=>m("br",null,null,-1)),Ua={class:"date"},ja=g("Dec"),za=In(()=>m("br",null,null,-1)),Wa=In(()=>m("div",{class:"doors"},null,-1)),Qa={class:"date"},Ka=g("Dec"),Ja=In(()=>m("br",null,null,-1)),Xa={key:0,class:"material-icons lock"},Za=L({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,i=I(()=>a.gte(G.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function s(){i.value&&t("unlockLayer")}return(l,u)=>e.opened.value?(b(),M("div",Va,[o(Sn,{appear:"",name:"door"},{default:q(()=>[m("div",{class:"doors",onClick:u[0]||(u[0]=c=>t("openLayer"))},[m("div",La,[Ga,Ha,g(z(e.day),1)]),m("div",Ua,[ja,za,g(z(e.day),1)])])]),_:1}),m("div",{class:"icon",style:be({backgroundImage:`url(${e.symbol})`})},null,4),m("div",{class:"lore",onClick:u[1]||(u[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(b(),U(ui,{key:0})):P("",!0)])):(b(),M("div",{key:1,class:ye(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:s},[Wa,m("div",Qa,[Ka,Ja,g(z(e.day),1)]),r(i)?P("",!0):(b(),M("div",Xa,"lock")),r(i)?(b(),U(ui,{key:1})):P("",!0)],2))}});var Ya=Y(Za,[["__scopeId","data-v-949cc93c"]]);const el={key:0},tl={key:0,class:"mark star"},nl=["src"],il=L({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(b(),M("div",el,[e.mark===!0?(b(),M("div",tl)):(b(),M("img",{key:1,class:"mark",src:e.mark},null,8,nl))])):P("",!0)}});var An=Y(il,[["__scopeId","data-v-2207999f"]]);const sl=L({__name:"Node",props:{id:null},setup(e){const n=Se(e),i=yn(Hn,()=>{}),s=yn(Un,()=>{}),l=ze(null),u=I(()=>l.value&&l.value.parentElement);return Je([u,n.id],([c,f],[d,_])=>{d&&s(r(_)),c&&i(f,c)}),di(()=>s(r(n.id))),(c,f)=>(b(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var un=Y(sl,[["__scopeId","data-v-a48cb382"]]),al=L({props:{display:{type:E(Object,String,Function),required:!0},visibility:{type:E(Number),required:!0},style:E(Object,String,Array),classes:E(Object),onClick:Function,onHold:Function,canClick:{type:E(Boolean),required:!0},small:Boolean,mark:E(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:un,MarkNode:An},setup(e){const{display:t,onClick:n,onHold:i}=Se(e),s=ze("");xe(()=>{const c=_e(t);if(c==null){s.value="";return}if(wt(c)){s.value=X(c);return}const f=X(c.title||"","h3"),d=X(c.description,"div");s.value=X(B(()=>o("span",null,[c.title?o("div",null,[o(f,null,null)]):null,o(d,null,null)])
margin: 10px 0;"/>${C}`:ae,t.value=!0},onOpenLayer(){if(window.matchMedia("(min-width: 1468px)").matches)if(A.tabs.includes(p!=null?p:"trees")){const N=A.tabs.lastIndexOf(p!=null?p:"trees");A.tabs.splice(N,1)}else A.tabs.push(p!=null?p:"trees"),G.minimized.value=!0;else A.tabs.splice(1,1/0,p!=null?p:"trees")},onUnlockLayer(){S.value=!0,setTimeout(()=>{var N,O;n.value=-1,i.value=r((O=(N=$e[p!=null?p:"trees"])==null?void 0:N.name)!=null?O:""),s.value=ae,A.devSpeed=null,t.value=!0},1e3)}}}}})}const u=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Li,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!"})),l(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Gi,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!"})),l(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Hi,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!"})),l(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ui,story:"Alright, it seems you finally have enough things setup to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they're out of practice by 11 months!",completedStory:"The workshop now hums with the bustling elves working everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),l(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:ji,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 to 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!"})),l(()=>({day:6,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:17,shouldNotify
${O}
${N}`)}}return d[C]}Je(n,C=>{C&&Object.keys(d).forEach(N=>delete d[N])});const y=I(()=>re.saves.reduce((C,N)=>(C[N]=_(N),C),{}));function v(C){let N;switch(A.id===C?N=Ci(A[de]):N=JSON.stringify(y.value[C]),K.exportEncoding){default:console.warn(`Unknown save encoding: ${K.exportEncoding}. Defaulting to lz`);case"lz":N=gt.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const O=document.createElement("textarea");O.value=N,document.body.appendChild(O),O.select(),O.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(O)}function p(C){A.id===C&&Qe();const N={...y.value[C],id:gn()};Qe(N),re.saves.push(N.id)}function w(C){re.saves=re.saves.filter(N=>N!==C),localStorage.removeItem(C),d[C]=void 0}function S(C){y.value[A.id].time=A.time,Qe(),d[A.id]=void 0,It(y.value[C]),d[C]=void 0}function H(C){if(u.value=C,Pt(()=>{u.value=null}),C[0]!=="{")if(C[0]==="e")C=decodeURIComponent(escape(atob(C)));else if(C[0]==="\u1BE1")C=gt.decompressFromUTF16(C);else{console.warn("Unable to determine preset encoding",C);return}const N=JSON.parse(C);N.id=gn(),Qe(N),re.saves.push(N.id),S(N.id)}function ae(C,N){const O=y.value[C];O&&(O.name=N,A.id===C?(A.name=N,Qe()):(Qe(O),d[C]=void 0))}return(C,N)=>(b(),U(Xe,{modelValue:n.value,"onUpdate:modelValue":N[4]||(N[4]=O=>n.value=O),ref_key:"modal",ref:i},{header:q(()=>[po]),body:q(({shown:O})=>[O?(b(),U(r(fs),{key:0,list:r(re).saves,handle:".handle",itemKey:ue=>ue},{item:q(({element:ue})=>[o(mo,{save:r(y)[ue],onOpen:we=>S(ue),onExport:we=>v(ue),onEditName:we=>ae(ue,we),onDuplicate:we=>p(ue),onDelete:we=>w(ue)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:q(()=>[m("div",ho,[o(Ki,{modelValue:l.value,"onUpdate:modelValue":N[0]||(N[0]=O=>l.value=O),title:"Import Save",placeholder:"Paste your save here!",class:ye({importingFailed:s.value})},null,8,["modelValue","class"]),m("div",go,[vo,m("div",yo,[m("button",{class:"button",onClick:N[1]||(N[1]=O=>S(r(Rt)().id))},"New Game"),Object.keys(r(f)).length>0?(b(),U(Jn,{key:0,options:r(f),modelValue:u.value,"onUpdate:modelValue":N[2]||(N[2]=O=>H(O)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),m("div",bo,[_o,m("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=O=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ji=Y(wo,[["__scopeId","data-v-3b9991aa"]]);const He=e=>(rt("data-v-4a3f8425"),e=e(),ot(),e),ko=["src","alt"],No={key:1,class:"title"},Co=He(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),So={class:"discord"},Mo={class:"discord-links"},Io={key:0},Ao=["href"],Po=He(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),$o=He(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Eo={href:"https://forums.moddingtree.com/",target:"_blank"},To=He(()=>m("span",{class:"material-icons"},"forum",-1)),xo=He(()=>m("span",{class:"material-icons"},"info",-1)),Bo=He(()=>m("span",{class:"material-icons"},"library_books",-1)),Fo=He(()=>m("span",{class:"material-icons"},"settings",-1)),Do=He(()=>m("span",{class:"material-icons"},"library_books",-1)),Oo=He(()=>m("span",{class:"material-icons"},"settings",-1)),Ro=He(()=>m("span",{class:"material-icons"},"info",-1)),qo={href:"https://forums.moddingtree.com/",target:"_blank"},Vo=He(()=>m("span",{class:"material-icons"},"forum",-1)),Lo={class:"discord"},Go={class:"discord-links"},Ho={key:0},Uo=["href"],jo=He(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),zo=He(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Wo=L({__name:"Nav",setup(e){const t=x(null),n=x(null),i=x(null),s=x(null),{useHeader:l,banner:u,title:c,discordName:f,discordLink:d,versionNumber:_}=K;function y(){window.open(d,"mywindow")}return(v,p)=>(b(),M(D,null,[r(l)?(b(),M("div",$t({key:0,class:"na
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 ma();const{globalBus:e,startGameLoop:t}=await bn(()=>Promise.resolve().then(function(){return fa}),void 0),n=window.vue=os(Pu);e.emit("setupVue",n),n.mount("#app"),Pt(()=>{const i=pi(),{updateServiceWorker:s}=Eu({onNeedRefresh(){i.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(){s()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(l){l&&setInterval(l.update,60*60*1e3)}})}),t()});