From b8714f902b5ed985510698965952e1f0c5feda03 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 26 Jul 2022 23:18:12 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20profectu?= =?UTF-8?q?s-engine/TMT-Demo@d323946c31ba228c0a2aff2954ee145b60836f48=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index.e149ed54.js => index.5e36a771.js} | 2 +- index.html | 2 +- sw.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index.e149ed54.js => index.5e36a771.js} (76%) diff --git a/assets/index.e149ed54.js b/assets/index.5e36a771.js similarity index 76% rename from assets/index.e149ed54.js rename to assets/index.5e36a771.js index 75310c5..e7767b9 100644 --- a/assets/index.e149ed54.js +++ b/assets/index.5e36a771.js @@ -11,7 +11,7 @@ Created at: Stack: ${Ee} Trying to pop ${n.id}`;return Ee.pop(),y(n,"color"),y(n,"display"),y(n,"name"),z(n,"name",n.id),y(n,"minWidth"),z(n,"minWidth",600),y(n,"minimizable"),z(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}z(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_e[e.id]=e,ge.emit("addLayer",e,t.layers[e.id])}function ha(e){return _e[e]}function pi(e){console.info("Removing layer",e.id),ge.emit("removeLayer",e),_e[e.id]=void 0}function ba(e){pi(e),fi(e,T)}function mi(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:L(()=>d(Je,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>d("h2",null,[l(e.name)]),body:l(e.display)}))}}ge.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 ya=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:gn,UnregisterNodeInjectionKey:vn,NodesInjectionKey:hn,BoundsInjectionKey:bn,layers:_e,persistentRefs:dt,addingLayers:Ee,createLayer:It,addLayer:fi,getLayer:ha,removeLayer:pi,reloadLayer:ba,setupLayerModal:mi},Symbol.toStringTag,{value:"Module"}));const _a=E({components:{Context:di},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:k(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:k(Number,String),required:!0},name:{type:k(String),required:!0},color:k(String),minimizable:k(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:i,minWidth:r,tab:a}=ne(e),o=ct(t),s=N(()=>J.allowGoBack&&n.value>0&&!i.value);function u(){T.tabs.splice(l(e.index),1/0)}Ve(()=>h(i.value,l(r.value))),Ie([i,aa(r)],([v,b])=>h(v,b));function c(v){e.nodes.value=v}function h(v,b){const w=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,S=a.value();S!=null&&(v?(S.style.flexGrow="0",S.style.flexShrink="0",S.style.width="60px",S.style.minWidth=S.style.flexBasis="",S.style.margin="0"):(S.style.flexGrow="",S.style.flexShrink="",S.style.width="",S.style.minWidth=S.style.flexBasis=w,S.style.margin=""))}return{component:o,showGoBack:s,updateNodes:c,unref:l,goBack:u}}});function ka(e,t,n,i,r,a){const o=ce("Context");return g(),x("div",{class:"layer-container",style:W({"--layer-color":e.unref(e.color)})},[e.showGoBack?(g(),x("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...s)=>e.goBack&&e.goBack(...s))},"\u2190")):P("",!0),e.minimized.value?(g(),x("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=s=>e.minimized.value=!1)},[p("div",null,U(e.unref(e.name)),1)])):(g(),x("div",{key:2,class:Q(["layer-tab",{showGoBack:e.showGoBack}])},[d(o,{onUpdateNodes:e.updateNodes},{default:V(()=>[(g(),A(ee(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(g(),x("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=s=>e.minimized.value=!0)}," \u25BC ")):P("",!0)],4)}var wa=q(_a,[["render",ka],["__scopeId","data-v-34c9d881"]]);const gi=e=>(qe("data-v-4b4bda40"),e=e(),Le(),e),xa=gi(()=>p("h2",null,"Changelog",-1)),Na=gi(()=>p("details",{open:""},[p("summary",null,[C("v0.0 Initial Commit - "),p("time",null,"2021-09-04")]),C(" This is the first release :D "),p("ul",null,[p("li",{class:"feature"},"Did everything"),p("li",{class:"fix"},"Had some fun"),p("li",{class:"breaking"},"Removed everything"),p("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Sa=E({__name:"Changelog",setup(e,{expose:t}){const n=O(!1);return t({open(){n.value=!0}}),(i,r)=>(g(),A(Je,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=a=>n.value=a)},{header:V(()=>[xa]),body:V(()=>[Na]),_:1},8,["modelValue"]))}});var Ca=q(Sa,[["__scopeId","data-v-4b4bda40"]]),$a=E({props:{element:Object,display:{type:k(Object,String,Function),required:!0},style:k(Object,String,Array),classes:k(Object),direction:k(String),xoffset:k(String),yoffset:k(String),pinned:Object},setup(e){const{element:t,display:n,pinned:i}=ne(e),r=O(!1),a=N(()=>(ae(i)||r.value)&&o.value),o=it(n),s=xe(D(L(()=>{const h=ae(t);return h==null?"":Re(h)})));function u(h){const v=i;h.shiftKey&&v&&(v.value=!v.value,h.stopPropagation(),h.preventDefault())}const c=N(()=>ae(i)&&ze[Z.theme].showPin);return{Direction:X,isHovered:r,isShown:a,comp:o,elementComp:s,unref:l,togglePinned:u,showPin:c}}});const Ma={key:0,class:"material-icons pinned"};function Ta(e,t,n,i,r,a){return g(),x("div",{class:Q(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[De(e.$slots,"default",{},void 0,!0),e.elementComp?(g(),A(ee(e.elementComp),{key:0})):P("",!0),d(Zt,{name:"fade"},{default:V(()=>{var o;return[e.isShown?(g(),x("div",{key:0,class:Q(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:W([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(g(),x("span",Ma,"push_pin")):P("",!0),e.comp?(g(),A(ee(e.comp),{key:1})):P("",!0)],6)):P("",!0)]}),_:1})],34)}var re=q($a,[["render",Ta],["__scopeId","data-v-6102fa3a"]]);const rt=e=>(qe("data-v-7dec2dec"),e=e(),Le(),e),Ia={class:"info-modal-header"},Pa=["src","alt"],Oa={class:"info-modal-title"},Aa={key:0},Ea={key:0},Va={key:0},Fa=rt(()=>p("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),Da=rt(()=>p("br",null,null,-1)),Ra=rt(()=>p("br",null,null,-1)),Ba=["href"],qa=rt(()=>p("span",{class:"material-icons info-modal-discord"},"discord",-1)),La=rt(()=>p("div",null,[p("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[p("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Paper Pilot Community ")])],-1)),ja=rt(()=>p("div",null,[p("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[p("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Modding Tree ")])],-1)),za=rt(()=>p("br",null,null,-1));var Ua=E({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:i,logo:r,author:a,discordName:o,discordLink:s,versionNumber:u,versionTitle:c}=J,h=ne(n),v=O(!1),b=N(()=>Jt(T.timePlayed)),w=N(()=>D(L(()=>d(K,null,[li.map(oe)]))));t({open(){v.value=!0}});function S(){var $;($=l(h.changelog))==null||$.open()}return($,R)=>(g(),A(Je,{modelValue:v.value,"onUpdate:modelValue":R[0]||(R[0]=ke=>v.value=ke)},{header:V(()=>[p("div",Ia,[l(r)?(g(),x("img",{key:0,class:"info-modal-logo",src:l(r),alt:l(i)},null,8,Pa)):P("",!0),p("div",Oa,[p("h2",null,U(l(i)),1),p("h4",null,[C(" v"+U(l(u)),1),l(c)?(g(),x("span",Aa,": "+U(l(c)),1)):P("",!0)])])])]),body:V(({shown:ke})=>[ke?(g(),x("div",Ea,[l(a)?(g(),x("div",Va,"By "+U(l(a)),1)):P("",!0),Fa,Da,p("div",{class:"link",onClick:S},"Changelog"),Ra,p("div",null,[l(s)?(g(),x("a",{key:0,href:l(s),class:"info-modal-discord-link"},[qa,C(" "+U(l(o)),1)],8,Ba)):P("",!0)]),La,ja,za,p("div",null,"Time Played: "+U(l(b)),1),(g(),A(ee(l(w))))])):P("",!0)]),_:1},8,["modelValue"]))}});var Ga=q(Ua,[["__scopeId","data-v-7dec2dec"]]);const Ha={class:"field"},Wa={key:0,class:"field-title"},yn=E({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,i=it(Ze(n,"title"),"span"),r=O((o=n.options.find(s=>s.value===n.modelValue))!=null?o:null);Ie(Ze(n,"modelValue"),s=>{var u;ae(r)!==s&&(r.value=(u=n.options.find(c=>c.value===s))!=null?u:null)});function a(s){t("update:modelValue",s.value)}return(s,u)=>(g(),x("div",Ha,[l(i)?(g(),x("span",Wa,[(g(),A(ee(l(i))))])):P("",!0),d(l(Wi),{options:e.options,modelValue:r.value,"onUpdate:modelValue":[u[0]||(u[0]=c=>r.value=c),a],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const Ya={class:"field"},Ka=E({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=N(()=>D(l(n.title)||"","span")),r=N({get(){return!!n.modelValue},set(a){t("update:modelValue",a)}});return(a,o)=>(g(),x("label",Ya,[Kt(p("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=s=>pe(r)?r.value=s:null)},null,512),[[Li,l(r)]]),(g(),A(ee(l(i))))]))}});var we=q(Ka,[["__scopeId","data-v-2b109500"]]);const vi=e=>(qe("data-v-bc13791c"),e=e(),Le(),e),Za=vi(()=>p("div",{class:"header"},[p("h2",null,"Options")],-1)),Ja=vi(()=>p("hr",null,null,-1));var Xa=E({__name:"Options",setup(e,{expose:t}){const n=O(!1);t({open(){n.value=!0}});const i=Object.keys(ze).map(S=>({label:ei(S),value:S})),r=N(()=>D(L(()=>d(K,null,[oi.map(oe)])))),{showTPS:a,theme:o,unthrottled:s}=ne(Z),{autosave:u,offlineProd:c}=ne(T),h=N({get(){return T.devSpeed===0},set(S){T.devSpeed=S?0:null}}),v=L(()=>d("span",null,[C("Offline Production"),d(re,{display:"Save-specific"},{default:()=>[C("*")]})])),b=L(()=>d("span",null,[C("Autosave"),d(re,{display:"Save-specific"},{default:()=>[C("*")]})])),w=L(()=>d("span",null,[C("Pause game"),d(re,{display:"Save-specific"},{default:()=>[C("*")]})]));return(S,$)=>(g(),A(Je,{modelValue:n.value,"onUpdate:modelValue":$[6]||($[6]=R=>n.value=R)},{header:V(()=>[Za]),body:V(()=>[d(yn,{title:"Theme",options:l(i),modelValue:l(o),"onUpdate:modelValue":$[0]||($[0]=R=>pe(o)?o.value=R:null)},null,8,["options","modelValue"]),(g(),A(ee(l(r)))),d(we,{title:"Show TPS",modelValue:l(a),"onUpdate:modelValue":$[1]||($[1]=R=>pe(a)?a.value=R:null)},null,8,["modelValue"]),Ja,d(we,{title:"Unthrottled",modelValue:l(s),"onUpdate:modelValue":$[2]||($[2]=R=>pe(s)?s.value=R:null)},null,8,["modelValue"]),d(we,{title:l(v),modelValue:l(c),"onUpdate:modelValue":$[3]||($[3]=R=>pe(c)?c.value=R:null)},null,8,["title","modelValue"]),d(we,{title:l(b),modelValue:l(u),"onUpdate:modelValue":$[4]||($[4]=R=>pe(u)?u.value=R:null)},null,8,["title","modelValue"]),l(J).enablePausing?(g(),A(we,{key:0,title:l(w),modelValue:l(h),"onUpdate:modelValue":$[5]||($[5]=R=>pe(h)?h.value=R:null)},null,8,["title","modelValue"])):P("",!0)]),_:1},8,["modelValue"]))}});var Qa=q(Xa,[["__scopeId","data-v-bc13791c"]]);const eo=["onSubmit"],to={class:"field"},no={key:0,class:"field-title"},io=["placeholder"],ro=E({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:t}){const i=ne(e),r=N(()=>{var u;return((u=i.title)==null?void 0:u.value)&&D(l(i.title.value),"span")}),a=O(null);Tt(()=>{var u;(u=a.value)==null||u.focus()});const o=N({get(){return l(i.modelValue)||""},set(u){t("update:modelValue",u)}});function s(){t("submit")}return(u,c)=>(g(),x("form",{onSubmit:_t(s,["prevent"])},[p("div",to,[l(r)?(g(),x("span",no,[(g(),A(ee(l(r))))])):P("",!0),e.textArea?(g(),A(l(Ki),{key:1,modelValue:l(o),"onUpdate:modelValue":c[0]||(c[0]=h=>pe(o)?o.value=h:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:s,ref_key:"field",ref:a},null,8,["modelValue","placeholder","maxHeight"])):Kt((g(),x("input",{key:2,type:"text","onUpdate:modelValue":c[1]||(c[1]=h=>pe(o)?o.value=h:null),placeholder:e.placeholder,class:Q({fullWidth:!e.title}),onBlur:s,ref_key:"field",ref:a},null,42,io)),[[Hn,l(o)]])])],40,eo))}});var _n=q(ro,[["__scopeId","data-v-d74adb0a"]]);const ao={key:0},oo=["onClick","disabled"],so={key:0},lo=["onClick"],uo=E({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=ne(e),r=O(!1);Ie(r,s=>{t("confirmingChanged",s)});function a(){if(l(i.skipConfirm)){t("click");return}r.value&&t("click"),r.value=!r.value}function o(){r.value=!1}return(s,u)=>(g(),x("span",{class:Q(["container",{confirming:r.value}])},[r.value?(g(),x("span",ao,"Are you sure?")):P("",!0),p("button",{onClick:_t(a,["stop"]),class:"button danger",disabled:e.disabled},[r.value?(g(),x("span",so,"Yes")):De(s.$slots,"default",{key:1},void 0,!0)],8,oo),r.value?(g(),x("button",{key:1,class:"button",onClick:_t(o,["stop"])},"No",8,lo)):P("",!0)],2))}});var co=q(uo,[["__scopeId","data-v-2f8ef34c"]]);const fo=["onClick"],po=E({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=O(!1),i=O(null);function r(){t("click"),i.value&&clearTimeout(i.value),n.value=!1,Ve(()=>{n.value=!0,i.value=setTimeout(()=>n.value=!1,500)})}return(a,o)=>(g(),x("button",{onClick:_t(r,["stop"]),class:Q(["feedback",{activated:n.value,left:e.left}])},[De(a.$slots,"default",{},void 0,!0)],10,fo))}});var mo=q(po,[["__scopeId","data-v-01a1b95c"]]);const Ue=e=>(qe("data-v-0136bef4"),e=e(),Le(),e),go=Ue(()=>p("div",{class:"handle material-icons"},"drag_handle",-1)),vo={key:0,class:"actions"},ho=Ue(()=>p("span",{class:"material-icons"},"content_paste",-1)),bo=Ue(()=>p("span",{class:"material-icons"},"content_copy",-1)),yo=Ue(()=>p("span",{class:"material-icons"},"edit",-1)),_o=Ue(()=>p("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),ko={key:1,class:"actions"},wo=Ue(()=>p("span",{class:"material-icons"},"check",-1)),xo=Ue(()=>p("span",{class:"material-icons"},"close",-1)),No={key:2,class:"details"},So={class:"save-version"},Co=Ue(()=>p("br",null,null,-1)),$o={key:0},Mo={key:3,class:"details"},To={key:4,class:"details error"},Io=Ue(()=>p("br",null,null,-1)),Po=E({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:i}=ne(n),r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=O(!1),o=O(!1),s=O("");Ie(a,()=>s.value=i.value.name||"");const u=N(()=>i.value&&i.value.id===T.id),c=N(()=>u.value?T.time:i.value&&i.value.time||0);function h(){t("editName",s.value),a.value=!1}return(v,b)=>(g(),x("div",{class:Q(["save",{active:l(u)}])},[go,a.value?(g(),x("div",ko,[p("button",{onClick:h,class:"button"},[d(re,{display:"Save",direction:l(X).Left,class:"info"},{default:V(()=>[wo]),_:1},8,["direction"])]),p("button",{onClick:b[5]||(b[5]=w=>a.value=!a.value),class:"button"},[d(re,{display:"Cancel",direction:l(X).Left,class:"info"},{default:V(()=>[xo]),_:1},8,["direction"])])])):(g(),x("div",vo,[l(i).error==null&&!o.value?(g(),A(mo,{key:0,onClick:b[0]||(b[0]=w=>t("export")),class:"button",left:""},{default:V(()=>[d(re,{display:"Export",direction:l(X).Left,class:"info"},{default:V(()=>[ho]),_:1},8,["direction"])]),_:1})):P("",!0),l(i).error==null&&!o.value?(g(),x("button",{key:1,onClick:b[1]||(b[1]=w=>t("duplicate")),class:"button"},[d(re,{display:"Duplicate",direction:l(X).Left,class:"info"},{default:V(()=>[bo]),_:1},8,["direction"])])):P("",!0),l(i).error==null&&!o.value?(g(),x("button",{key:2,onClick:b[2]||(b[2]=w=>a.value=!a.value),class:"button"},[d(re,{display:"Edit Name",direction:l(X).Left,class:"info"},{default:V(()=>[yo]),_:1},8,["direction"])])):P("",!0),d(co,{disabled:l(u),onClick:b[3]||(b[3]=w=>t("delete")),onConfirmingChanged:b[4]||(b[4]=w=>o.value=w)},{default:V(()=>[d(re,{display:"Delete",direction:l(X).Left,class:"info"},{default:V(()=>[_o]),_:1},8,["direction"])]),_:1},8,["disabled"])])),l(i).error==null&&!a.value?(g(),x("div",No,[p("button",{class:"button open",onClick:b[6]||(b[6]=w=>t("open"))},[p("h3",null,U(l(i).name),1)]),p("span",So,"v"+U(l(i).modVersion),1),Co,l(c)?(g(),x("div",$o,"Last played "+U(l(r).format(l(c))),1)):P("",!0)])):l(i).error==null&&a.value?(g(),x("div",Mo,[d(_n,{modelValue:s.value,"onUpdate:modelValue":b[7]||(b[7]=w=>s.value=w),class:"editname",onSubmit:h},null,8,["modelValue"])])):(g(),x("div",To,[C(" Error: Failed to load save with id "+U(l(i).id),1),Io,C(U(l(i).error),1)]))],2))}});var Oo=q(Po,[["__scopeId","data-v-0136bef4"]]);const kn=e=>(qe("data-v-3b9991aa"),e=e(),Le(),e),Ao=kn(()=>p("h2",null,"Saves Manager",-1)),Eo={class:"modal-footer"},Vo={class:"field"},Fo=kn(()=>p("span",{class:"field-title"},"Create Save",-1)),Do={class:"field-buttons"},Ro={class:"footer"},Bo=kn(()=>p("div",{style:{"flex-grow":"1"}},null,-1)),qo=E({__name:"SavesManager",setup(e,{expose:t}){const n=O(!1),i=O(null);t({open(){n.value=!0}});const r=O(!1),a=O(""),o=O(null);Ie(a,M=>{M?Ve(()=>{try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ye.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M),r.value=!0;return}const I=JSON.parse(M);if(typeof I!="object"){r.value=!0;return}const G=qt();I.id=G,Ae(I),a.value="",r.value=!1,Z.saves.push(G)}catch{r.value=!0}}):r.value=!1});let s={},u=O(Object.keys(s).reduce((M,I)=>(M.push({label:I.split("/").slice(-1)[0].slice(0,-4),value:s[I]}),M),[]));const c=Yt({});function h(M){if(c[M]==null){let I=localStorage.getItem(M);if(I==null)c[M]={error:"Save doesn't exist in localStorage",id:M};else if(I==="dW5kZWZpbmVk")c[M]={error:"Save is undefined",id:M};else try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Ye.decompressFromUTF16(I);else return console.warn("Unable to determine preset encoding",I),r.value=!0,c[M]={error:"Unable to determine preset encoding",id:M},c[M];c[M]={...JSON.parse(I),id:M}}catch(G){c[M]={error:G,id:M},console.warn(`SavesManager: Failed to load info about save with id ${M}: ${G} -${I}`)}}return c[M]}Ie(n,M=>{M&&Object.keys(c).forEach(I=>delete c[I])});const v=N(()=>Z.saves.reduce((M,I)=>(M[I]=h(I),M),{}));function b(M){let I;switch(T.id===M?I=ii(T[fe]):I=JSON.stringify(v.value[M]),J.exportEncoding){default:console.warn(`Unknown save encoding: ${J.exportEncoding}. Defaulting to lz`);case"lz":I=Ye.compressToUTF16(I);break;case"base64":I=btoa(unescape(encodeURIComponent(I)));break;case"plain":break}const G=document.createElement("textarea");G.value=I,document.body.appendChild(G),G.select(),G.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(G)}function w(M){T.id===M&&Ae();const I={...v.value[M],id:qt()};Ae(I),Z.saves.push(I.id)}function S(M){Z.saves=Z.saves.filter(I=>I!==M),localStorage.removeItem(M),c[M]=void 0}function $(M){v.value[T.id].time=T.time,Ae(),c[T.id]=void 0,nt(v.value[M]),c[M]=void 0}function R(M){if(o.value=M,Ve(()=>{o.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ye.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const I=JSON.parse(M);I.id=qt(),Ae(I),Z.saves.push(I.id),$(I.id)}function ke(M,I){const G=v.value[M];G&&(G.name=I,T.id===M?(T.name=I,Ae()):(Ae(G),c[M]=void 0))}return(M,I)=>(g(),A(Je,{modelValue:n.value,"onUpdate:modelValue":I[4]||(I[4]=G=>n.value=G),ref_key:"modal",ref:i},{header:V(()=>[Ao]),body:V(({shown:G})=>[G?(g(),A(l(Yi),{key:0,list:l(Z).saves,handle:".handle",itemKey:be=>be},{item:V(({element:be})=>[d(Oo,{save:l(v)[be],onOpen:te=>$(be),onExport:te=>b(be),onEditName:te=>ke(be,te),onDuplicate:te=>w(be),onDelete:te=>S(be)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:V(()=>[p("div",Eo,[d(_n,{modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=G=>a.value=G),title:"Import Save",placeholder:"Paste your save here!",class:Q({importingFailed:r.value})},null,8,["modelValue","class"]),p("div",Vo,[Fo,p("div",Do,[p("button",{class:"button",onClick:I[1]||(I[1]=G=>$(l(ut)().id))},"New Game"),Object.keys(l(u)).length>0?(g(),A(yn,{key:0,options:l(u),modelValue:o.value,"onUpdate:modelValue":I[2]||(I[2]=G=>R(G)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),p("div",Ro,[Bo,p("button",{class:"button modal-default-button",onClick:I[3]||(I[3]=G=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var hi=q(qo,[["__scopeId","data-v-3b9991aa"]]);const Se=e=>(qe("data-v-4a3f8425"),e=e(),Le(),e),Lo=["src","alt"],jo={key:1,class:"title"},zo=Se(()=>p("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Uo={class:"discord"},Go={class:"discord-links"},Ho={key:0},Wo=["href"],Yo=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ko=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Jo=Se(()=>p("span",{class:"material-icons"},"forum",-1)),Xo=Se(()=>p("span",{class:"material-icons"},"info",-1)),Qo=Se(()=>p("span",{class:"material-icons"},"library_books",-1)),es=Se(()=>p("span",{class:"material-icons"},"settings",-1)),ts=Se(()=>p("span",{class:"material-icons"},"library_books",-1)),ns=Se(()=>p("span",{class:"material-icons"},"settings",-1)),is=Se(()=>p("span",{class:"material-icons"},"info",-1)),rs={href:"https://forums.moddingtree.com/",target:"_blank"},as=Se(()=>p("span",{class:"material-icons"},"forum",-1)),os={class:"discord"},ss={class:"discord-links"},ls={key:0},us=["href"],ds=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),cs=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),fs=E({__name:"Nav",setup(e){const t=O(null),n=O(null),i=O(null),r=O(null),{useHeader:a,banner:o,title:s,discordName:u,discordLink:c,versionNumber:h}=J;function v(){window.open(c,"mywindow")}return(b,w)=>(g(),x(K,null,[l(a)?(g(),x("div",Be({key:0,class:"nav"},b.$attrs),[l(o)?(g(),x("img",{key:0,src:l(o),class:"banner",alt:l(s)},null,8,Lo)):(g(),x("div",jo,U(l(s)),1)),p("div",{onClick:w[0]||(w[0]=S=>{var $;return($=r.value)==null?void 0:$.open()}),class:"version-container"},[d(re,{display:"Changelog",direction:l(X).Down,class:"version"},{default:V(()=>[p("span",null,"v"+U(l(h)),1)]),_:1},8,["direction"])]),zo,p("div",Uo,[p("span",{onClick:v,class:"material-icons"},"discord"),p("ul",Go,[l(c)?(g(),x("li",Ho,[p("a",{href:l(c),target:"_blank"},U(l(u)),9,Wo)])):P("",!0),Yo,Ko])]),p("div",null,[p("a",Zo,[d(re,{display:"Forums",direction:l(X).Down,yoffset:"5px"},{default:V(()=>[Jo]),_:1},8,["direction"])])]),p("div",{onClick:w[1]||(w[1]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[d(re,{display:"Info",direction:l(X).Down,class:"info"},{default:V(()=>[Xo]),_:1},8,["direction"])]),p("div",{onClick:w[2]||(w[2]=S=>{var $;return($=n.value)==null?void 0:$.open()})},[d(re,{display:"Saves",direction:l(X).Down,xoffset:"-20px"},{default:V(()=>[Qo]),_:1},8,["direction"])]),p("div",{onClick:w[3]||(w[3]=S=>{var $;return($=i.value)==null?void 0:$.open()})},[d(re,{display:"Options",direction:l(X).Down,xoffset:"-66px"},{default:V(()=>[es]),_:1},8,["direction"])])],16)):(g(),x("div",Be({key:1,class:"overlay-nav"},b.$attrs),[p("div",{onClick:w[4]||(w[4]=S=>{var $;return($=r.value)==null?void 0:$.open()}),class:"version-container"},[d(re,{display:"Changelog",direction:l(X).Right,xoffset:"25%",class:"version"},{default:V(()=>[p("span",null,"v"+U(l(h)),1)]),_:1},8,["direction"])]),p("div",{onClick:w[5]||(w[5]=S=>{var $;return($=n.value)==null?void 0:$.open()})},[d(re,{display:"Saves",direction:l(X).Right},{default:V(()=>[ts]),_:1},8,["direction"])]),p("div",{onClick:w[6]||(w[6]=S=>{var $;return($=i.value)==null?void 0:$.open()})},[d(re,{display:"Options",direction:l(X).Right},{default:V(()=>[ns]),_:1},8,["direction"])]),p("div",{onClick:w[7]||(w[7]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[d(re,{display:"Info",direction:l(X).Right},{default:V(()=>[is]),_:1},8,["direction"])]),p("div",null,[p("a",rs,[d(re,{display:"Forums",direction:l(X).Right,xoffset:"7px"},{default:V(()=>[as]),_:1},8,["direction"])])]),p("div",os,[p("span",{onClick:v,class:"material-icons"},"discord"),p("ul",ss,[l(c)?(g(),x("li",ls,[p("a",{href:l(c),target:"_blank"},U(l(u)),9,us)])):P("",!0),ds,cs])])],16)),d(Ga,{ref_key:"info",ref:t,changelog:r.value},null,8,["changelog"]),d(hi,{ref_key:"savesManager",ref:n},null,512),d(Qa,{ref_key:"options",ref:i},null,512),d(Ca,{ref_key:"changelog",ref:r},null,512)],64))}});var bi=q(fs,[["__scopeId","data-v-4a3f8425"]]);const ps={class:"inner-tab"},ms=E({__name:"Game",setup(e){const t=Ze(T,"tabs"),n=N(()=>Object.keys(_e)),i=J.useHeader;function r(a){const{display:o,minimized:s,minWidth:u,name:c,color:h,minimizable:v,nodes:b}=a;return{display:o,minimized:s,minWidth:u,name:c,color:h,minimizable:v,nodes:b}}return(a,o)=>(g(),x("div",{class:Q(["tabs-container",{useHeader:l(i)}])},[(g(!0),x(K,null,kt(l(t),(s,u)=>{var c,h;return g(),x("div",{key:u,class:Q(["tab",l((c=l(_e)[s])==null?void 0:c.classes)]),ref_for:!0,ref:`tab-${u}`,style:W(l((h=l(_e)[s])==null?void 0:h.style))},[u===0&&!l(i)?(g(),A(bi,{key:0})):P("",!0),p("div",ps,[l(n).includes(s)?(g(),A(wa,Be({key:0},r(l(_e)[s]),{index:u,tab:()=>{var v;return(v=a.$refs[`tab-${u}`])==null?void 0:v[0]}}),null,16,["index","tab"])):(g(),A(ee(s),{key:1,index:u},null,8,["index"]))])],6)}),128))],2))}});var gs=q(ms,[["__scopeId","data-v-4cb9ce0f"]]);const vs={},hs=e=>(qe("data-v-89b4b00a"),e=e(),Le(),e),bs=hs(()=>p("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[p("g",{id:"P"},[p("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),p("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),p("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),p("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),p("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),p("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),p("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],-1));function ys(e,t){return g(),A(Zt,{appear:""},{default:V(()=>[bs]),_:1})}var _s=q(vs,[["render",ys],["__scopeId","data-v-89b4b00a"]]);const ye=E({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(g(),x("div",{style:W({width:e.width,height:e.height})},null,4))}});function Ct(e,t="points",n=0,i=void 0){const r=pe(e)?e:ue(e);return r.displayName=t,r.precision=n,r.small=i,r}function yi(e){const t=ue(e.value);return Ie(e,n=>{f.gt(n,t.value)&&(t.value=n)}),t}function ks(e){const t=ue(e.value);return Ie(e,(n,i)=>{f.gt(n,i)&&(t.value=f.add(t.value,f.sub(n,i)))}),t}const ws=new f("10^^8"),xs=new f("1e100");function Ns(e,t){const n=O(0),i=O(0),r=O(0);return ge.on("update",o=>{if(i.value=0,f.lte(e.value,xs)){r.value=e.value;return}let s=e.value,u=r.value;if(r.value=s,f.gt(s,u))if(f.gte(s,ws))s=f.slog(s,1e10),u=f.slog(u,1e10),n.value=s.sub(u).div(o),i.value=-1;else for(;f.div(s,u).log(10).div(o).gte("100")&&i.value<=5&&f.gt(u,0);)s=f.log10(s),u=f.log10(u),n.value=s.sub(u).div(o),i.value++}),N(()=>i.value===0?t?se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":se(n.value)+" OOM"+(i.value<0?"^OOM":"^"+i.value)+"s/sec")}function je(e,t){const n=t!=null?t:e.value;return f.eq(e.precision,0)?ve(n):se(n,e.precision,e.small)}const Ss=["x1","y1","x2","y2"],Cs=E({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=ne(e),i=N(()=>{const a=n.startNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetStart&&(s.x+=n.link.value.offsetStart.x,s.y+=n.link.value.offsetStart.y),s}),r=N(()=>{const a=n.endNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetEnd&&(s.x+=n.link.value.offsetEnd.x,s.y+=n.link.value.offsetEnd.y),s});return(a,o)=>(g(),x("line",Be({"stroke-width":"15px",stroke:"white"},e.link,{x1:l(i).x,y1:l(i).y,x2:l(r).x,y2:l(r).y}),null,16,Ss))}});const $s=E({__name:"Links",props:{links:null},setup(e){var u;const n=Ze(e,"links"),i=O(null),r=jt(hn,O({})),a=jt(bn,O(void 0)),o=O((u=i.value)==null?void 0:u.getBoundingClientRect());Ie(a,()=>{var c;return o.value=(c=i.value)==null?void 0:c.getBoundingClientRect()}),Tt(()=>{var c;return o.value=(c=i.value)==null?void 0:c.getBoundingClientRect()});const s=N(()=>{var h,v;const c=r.value;return(v=(h=n.value)==null?void 0:h.filter(b=>{var w,S;return((w=c[b.startNode.id])==null?void 0:w.rect)&&((S=c[b.startNode.id])==null?void 0:S.rect)}))!=null?v:[]});return(c,h)=>(g(),x(K,null,[l(s)?(g(),x("svg",ji(Be({key:0},c.$attrs)),[(g(!0),x(K,null,kt(l(s),(v,b)=>(g(),A(Cs,{key:b,link:v,boundingRect:o.value,startNode:l(r)[v.startNode.id],endNode:l(r)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):P("",!0),p("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var _i=q($s,[["__scopeId","data-v-c139d80e"]]),Ms=E({props:{nodes:{type:k(Array),required:!0},leftSideNodes:k(Array),rightSideNodes:k(Array),branches:k(Array)},components:{Links:_i},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:i}=ne(e),r=xe();Ne(()=>{const s=ae(t);r.value=D(L(()=>d(K,null,[s.map(u=>d("span",{class:"row tree-row",style:"margin: 50px auto;"},[u.map(Re)]))])))});const a=xe();Ne(()=>{const s=ae(n);a.value=s?D(L(()=>d("span",{class:"left-side-nodes small"},[s.map(Re)]))):""});const o=xe();return Ne(()=>{const s=ae(i);o.value=s?D(L(()=>d("span",{class:"side-nodes small"},[s.map(Re)]))):""}),{unref:l,nodesComp:r,leftNodesComp:a,rightNodesComp:o}}});function Ts(e,t,n,i,r,a){const o=ce("Links");return g(),x(K,null,[(g(),A(ee(e.nodesComp))),e.leftNodesComp?(g(),A(ee(e.leftNodesComp),{key:0})):P("",!0),e.rightNodesComp?(g(),A(ee(e.rightNodesComp),{key:1})):P("",!0),e.branches?(g(),A(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):P("",!0)],64)}var Is=q(Ms,[["render",Ts],["__scopeId","data-v-39ca96d0"]]);const Ps={key:0},Os={key:0,class:"mark star"},As=["src"],Es=E({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(g(),x("div",Ps,[e.mark===!0?(g(),x("div",Os)):(g(),x("img",{key:1,class:"mark",src:e.mark},null,8,As))])):P("",!0)}});var ft=q(Es,[["__scopeId","data-v-2207999f"]]);const Vs=E({__name:"Node",props:{id:null},setup(e){const n=ne(e),i=jt(gn,()=>{}),r=jt(vn,()=>{}),a=O(null),o=N(()=>a.value&&a.value.parentElement);return Ie([o,n.id],([s,u],[c,h])=>{c&&r(l(h)),s&&i(u,s)}),Gn(()=>r(l(n.id))),(s,u)=>(g(),x("div",{class:"node",ref_key:"node",ref:a},null,512))}});var Ge=q(Vs,[["__scopeId","data-v-2cb1bb79"]]);const Fs=E({props:{display:k(Object,String,Function),visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),onClick:Function,onHold:Function,color:k(String),glowColor:k(String),canClick:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{onClick:t,onHold:n,display:i}=ne(e),r=it(i),{start:a,stop:o}=mn(t,n);return{start:a,stop:o,comp:r,unref:l,Visibility:B,isCoercableComponent:Te}}});function Ds(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:Q({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c))},[p("div",{style:W([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(u=e.unref(e.style))!=null?u:[]])},[(g(),A(ee(e.unref(e.comp))))],4),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],38)):P("",!0)}var Rs=q(Fs,[["render",Ds],["__scopeId","data-v-1c0c107d"]]);const Bs=Symbol("TreeNode"),qs=Symbol("Tree");function yt(e){return le(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=he("treeNode-"),t.type=Bs,t[de]=Rs,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"canClick"),z(t,"canClick",!0),y(t,"color"),y(t,"display"),y(t,"glowColor"),y(t,"classes"),y(t,"style"),y(t,"mark"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(){l(t.canClick)&&i()}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){l(t.canClick)&&i()}}return t[me]=function(){const{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,color:c,glowColor:h,canClick:v,mark:b,id:w}=this;return{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,color:c,glowColor:h,canClick:v,mark:b,id:w}},t})}function ki(e){return le(()=>{const t=e();return t.id=he("tree-"),t.type=qs,t[de]=Is,t.isResetting=O(!1),t.resettingNode=xe(null),t.reset=function(n){var r,a;const i=t;i.isResetting.value=!0,i.resettingNode.value=n,(r=i.resetPropagation)==null||r.call(i,i,n),(a=i.onReset)==null||a.call(i,n),i.isResetting.value=!1,i.resettingNode.value=null},t.links=N(()=>{var i;return(i=l(t.branches))!=null?i:[]}),y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"nodes"),y(t,"leftSideNodes"),y(t,"rightSideNodes"),y(t,"branches"),t[me]=function(){const{nodes:n,leftSideNodes:i,rightSideNodes:r,branches:a}=this;return{nodes:n,leftSideNodes:i,rightSideNodes:r,branches:a}},t})}const Ls=function(e,t){const n=[t];let i=[t];if(e.branches!=null){const r=l(e.branches);for(;i.length>0;){const a=[];i.forEach(o=>{r.filter(s=>s.startNode===o||s.endNode===o).map(s=>s.startNode===o?s.endNode:s.startNode).filter(s=>!n.includes(s)).forEach(s=>{var u;a.includes(s)||(a.push(s),(u=s.reset)==null||u.reset())})}),i=a,n.push(...i)}}};function wi(e,t=null,n=0){const i=Me(n);return N(()=>t==null||f.gte(e.value,l(i))?je(e)+" "+e.displayName:`Reach ${f.eq(t.precision,0)?ve(l(i)):se(l(i),t.precision)} ${t.displayName} to unlock (You have ${f.eq(t.precision,0)?ve(t.value):se(t.value,t.precision)})`)}const js=E({props:{visibility:{type:k(Number),required:!0},display:k(Object,String,Function),earned:{type:k(Boolean),required:!0},image:k(String),style:k(String,Object,Array),classes:k(Object),mark:k(Boolean,String),id:{type:String,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t}=ne(e);return{component:it(t),unref:l,Visibility:B}}});function zs(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(u=e.unref(e.style))!=null?u:[]]),class:Q({feature:!0,achievement:!0,locked:!e.unref(e.earned),bought:e.unref(e.earned),...e.unref(e.classes)})},[e.component?(g(),A(ee(e.component),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var Us=q(js,[["render",zs],["__scopeId","data-v-58163dab"]]);ge.on("setupVue",e=>e.use(Zi));function wn(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}function Gs(){return wn("red","20px")}const Hs=fn(),Ws=Symbol("Achievement");function rn(e){const t=ue(!1);return le(()=>{var i;const n=(i=e==null?void 0:e())!=null?i:{};if(n.id=he("achievement-"),n.type=Ws,n[de]=Us,n.earned=t,n.complete=function(){t.value=!0},y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"display"),y(n,"mark"),y(n,"image"),y(n,"style"),y(n,"classes"),n[me]=function(){const{visibility:r,display:a,earned:o,image:s,style:u,classes:c,mark:h,id:v}=this;return{visibility:r,display:a,earned:o,image:s,style:l(u),classes:c,mark:h,id:v}},n.shouldEarn){const r=n;Ne(()=>{var a,o;if(Z.active===T.id&&!r.earned.value&&l(r.visibility)===B.Visible&&((a=r.shouldEarn)==null?void 0:a.call(r))&&(r.earned.value=!0,(o=r.onComplete)==null||o.call(r),r.display)){const s=D(l(r.display));Hs.info(d("div",null,[d("h3",null,[C("Achievement earned!")]),d("div",null,[d(s,null,null)])]))}})}return n})}const Ys=E({props:{visibility:{type:k(Number),required:!0},onClick:Function,onHold:Function,display:{type:k(Object,String,Function),required:!0},title:k(Object,String,Function),style:k(String,Object,Array),canClick:{type:k(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Ge},setup(e){const{onClick:t,onHold:n,title:i,display:r}=ne(e),{start:a,stop:o}=mn(t,n),s=it(i),u=ct(r);return{start:a,stop:o,titleComponent:s,component:u,Visibility:B,unref:l}}}),Ks={key:0};function Zs(e,t,n,i,r,a){var s;const o=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,class:Q({feature:!0,tile:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick)}),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),onClick:t[0]||(t[0]=(...u)=>e.onClick&&e.onClick(...u)),onMousedown:t[1]||(t[1]=(...u)=>e.start&&e.start(...u)),onMouseleave:t[2]||(t[2]=(...u)=>e.stop&&e.stop(...u)),onMouseup:t[3]||(t[3]=(...u)=>e.stop&&e.stop(...u)),onTouchstartPassive:t[4]||(t[4]=(...u)=>e.start&&e.start(...u)),onTouchendPassive:t[5]||(t[5]=(...u)=>e.stop&&e.stop(...u)),onTouchcancelPassive:t[6]||(t[6]=(...u)=>e.stop&&e.stop(...u))},[e.title?(g(),x("div",Ks,[(g(),A(ee(e.titleComponent)))])):P("",!0),(g(),A(ee(e.component),{style:{"white-space":"pre-line"}})),d(o,{id:e.id},null,8,["id"])],38)):P("",!0)}var Js=q(Ys,[["render",Zs],["__scopeId","data-v-26ac0e82"]]);const Xs=E({props:{visibility:{type:k(Number),required:!0},rows:{type:k(Number),required:!0},cols:{type:k(Number),required:!0},cells:{type:k(Object),required:!0}},components:{GridCell:Js},setup(){const e=N(()=>ze[Z.theme].mergeAdjacent);function t(n){const{visibility:i,onClick:r,onHold:a,display:o,title:s,style:u,canClick:c,id:h}=n;return{visibility:i,onClick:r,onHold:a,display:o,title:s,style:u,canClick:c,id:h}}return{unref:l,gatherCellProps:t,Visibility:B,mergeAdjacent:e}}});function Qs(e,t,n,i,r,a){const o=ce("GridCell");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[(g(!0),x(K,null,kt(e.unref(e.rows),s=>(g(),x("div",{class:Q(["row",{mergeAdjacent:e.mergeAdjacent}]),key:s},[(g(!0),x(K,null,kt(e.unref(e.cols),u=>(g(),A(o,Be({key:u},e.gatherCellProps(e.unref(e.cells)[s*100+u])),null,16))),128))],2))),128))],4)):P("",!0)}var el=q(Xs,[["render",Qs]]);function tl(e){return new Proxy({},nl(e))}function nl(e){const t=N(()=>{const n=[];for(let i=1;i<=l(e.rows);i++)for(let r=1;r<=l(e.cols);r++)n.push((i*100+r).toString());return n});return{get(n,i){if(i==="isProxy")return!0;if(typeof i=="symbol")return e[i];if(!!t.value.includes(i.toString()))return n[i]==null&&(n[i]=new Proxy(e,il(i.toString()))),n[i]},set(n,i,r){return console.warn("Cannot set grid cells",n,i,r),!1},ownKeys(){return t.value},has(n,i){return t.value.includes(i.toString())},getOwnPropertyDescriptor(n,i){if(t.value.includes(i.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function il(e){const t=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],n={};return{get(i,r,a){if(r==="isProxy")return!0;let o=i[r];return tt(o)?()=>o.call(a,e,i.getState(e)):o!=null||typeof r=="symbol"?o:(r=r.slice(0,1).toUpperCase()+r.slice(1),r==="startState"?o.call(a,e):(o=i[`get${r}`],tt(o)?(r in n||(n[r]=N(()=>o.call(a,e,i.getState(e)))),n[r].value):o!=null?l(o):(o=i[`on${r}`],tt(o)?()=>o.call(a,e,i.getState(e)):o!=null?o:i[r])))},set(i,r,a,o){return r=`set${r.slice(0,1).toUpperCase()+r.slice(1)}`,r in i&&tt(i[r])&&i[r].length<3?(i[r].call(o,e,a),!0):(console.warn(`No setter for "${r}".`,i),!1)},ownKeys(){return t},has(i,r){return t.includes(r.toString())},getOwnPropertyDescriptor(i,r){if(t.includes(r.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function rl(e){const t=ue({});return le(()=>{const n=e();if(n.id=he("grid-"),n[de]=el,n.cellState=t,n.getID=function(i){return n.id+"-"+i},n.getState=function(i){return this.cellState.value[i]!=null?t.value[i]:this.cells[i].startState},n.setState=function(i,r){t.value[i]=r},n.cells=tl(n),y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"rows"),y(n,"cols"),y(n,"getVisibility"),z(n,"getVisibility",B.Visible),y(n,"getCanClick"),z(n,"getCanClick",!0),y(n,"getStartState"),y(n,"getStyle"),y(n,"getClasses"),y(n,"getTitle"),y(n,"getDisplay"),n.onClick){const i=n.onClick.bind(n);n.onClick=function(r,a){l(n.cells[r].canClick)&&i(r,a)}}if(n.onHold){const i=n.onHold.bind(n);n.onHold=function(r,a){l(n.cells[r].canClick)&&i(r,a)}}return n[me]=function(){const{visibility:i,rows:r,cols:a,cells:o,id:s}=this;return{visibility:i,rows:r,cols:a,cells:o,id:s}},n})}var al=E({props:{display:{type:k(Object,String,Function),required:!0},visibility:{type:k(Number),required:!0},style:k(Object,String,Array),classes:k(Object),onClick:Function,onHold:Function,canClick:{type:k(Boolean),required:!0},small:Boolean,mark:k(Boolean,String),id:{type:String,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t,onClick:n,onHold:i}=ne(e),r=xe("");Ne(()=>{const s=ae(t);if(s==null){r.value="";return}if(Te(s)){r.value=D(s);return}const u=D(s.title||"","h3"),c=D(s.description,"div");r.value=D(L(()=>d("span",null,[s.title?d("div",null,[d(u,null,null)]):null,d(c,null,null)])))});const{start:a,stop:o}=mn(n,i);return{start:a,stop:o,comp:r,Visibility:B,unref:l}}});function ol(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[]]),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c)),class:Q({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(g(),A(ee(e.unref(e.comp)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],38)):P("",!0)}var xi=q(al,[["render",ol],["__scopeId","data-v-5e7c90cf"]]);const sl=Symbol("Clickable");function $t(e){return le(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=he("clickable-"),t.type=sl,t[de]=xi,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"canClick"),z(t,"canClick",!0),y(t,"classes"),y(t,"style"),y(t,"mark"),y(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(r){l(t.canClick)&&i(r)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){l(t.canClick)&&i()}}return t[me]=function(){const{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,canClick:c,small:h,mark:v,id:b}=this;return{display:i,visibility:r,style:l(a),classes:o,onClick:s,onHold:u,canClick:c,small:h,mark:v,id:b}},t})}function Ni(e){return $t(()=>{const t=e();y(t,"showNextAt"),z(t,"showNextAt",!0),z(t,"minimumGain",1),t.resetDescription==null?t.resetDescription=N(()=>f.lt(t.conversion.gainResource.value,1e3)?"Reset for ":""):y(t,"resetDescription"),t.display==null&&(t.display=L(()=>d("span",null,[l(t.resetDescription),d("b",null,[je(t.conversion.gainResource,f.max(l(t.conversion.actualGain),l(t.minimumGain)))])," ",t.conversion.gainResource.displayName,l(t.showNextAt)?d("div",null,[d("br",null,null),l(t.conversion.buyMax)?"Next:":"Req:"," ",je(t.conversion.baseResource,l(t.conversion.buyMax)||f.floor(l(t.conversion.actualGain)).neq(1)?l(t.conversion.nextAt):l(t.conversion.currentAt))," ",t.conversion.baseResource.displayName]):null]))),t.canClick==null&&(t.canClick=N(()=>f.gte(l(t.conversion.actualGain),l(t.minimumGain))));const n=t.onClick;return t.onClick=function(){!l(t.canClick)||(t.conversion.convert(),t.tree.reset(t.treeNode),t.resetTime&&(t.resetTime.value=t.resetTime[St]),n==null||n())},t})}function Si(e){return yt(()=>{const t=e();return y(t,"display"),z(t,"display",t.layerID),y(t,"append"),{...t,display:t.display,onClick:l(t.append)?function(){if(T.tabs.includes(t.layerID)){const n=T.tabs.lastIndexOf(t.layerID);T.tabs.splice(n,1)}else T.tabs.push(t.layerID)}:function(){T.tabs.splice(1,1,t.layerID)}}})}function Ci(e){return le(()=>{const t=e();return t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=f.floor(n).max(0),l(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=N(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=f.ceil(n)),n})),t.nextAt==null&&(t.nextAt=N(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=f.ceil(n)),n})),t.convert==null&&(t.convert=function(){var i;const n=l(t.currentGain);t.gainResource.value=f.add(t.gainResource.value,n),t.spend(n),(i=t.onConvert)==null||i.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),y(t,"currentGain"),y(t,"actualGain"),y(t,"currentAt"),y(t,"nextAt"),y(t,"buyMax"),z(t,"buyMax",!0),y(t,"roundUpCost"),z(t,"roundUpCost",!0),t})}function $i(e,t){const n=Me(e),i=Me(t);return{currentGain(r){let a=l(r.baseResource.value);if(r.costModifier&&(a=r.costModifier.apply(a)),f.lt(a,l(n)))return 0;const o=f.div(a,l(n)).pow(l(i));return o.isNan()?new f(0):o},currentAt(r){let a=l(r.currentGain);return r.gainModifier&&(a=r.gainModifier.revert(a)),a=f.max(0,a).root(l(i)).times(l(n)),r.costModifier&&(a=r.costModifier.revert(a)),a},nextAt(r){let a=f.add(l(r.currentGain),1).floor();return r.gainModifier&&(a=r.gainModifier.revert(a)),a=f.max(0,a).root(l(i)).times(l(n)).max(l(n)),r.costModifier&&(a=r.costModifier.revert(a)),a}}}function ll(e){return Ci(e)}function ul(e){return Ci(()=>{const t=e();return z(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=f.floor(n).max(t.gainResource.value),l(t.buyMax)||(n=n.min(f.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=N(()=>{let n=f.sub(f.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return l(t.buyMax)||(n=n.min(1)),n})),z(t,"convert",function(){var i;const n=l(t.actualGain);t.gainResource.value=t.gainModifier?t.gainModifier.apply(l(t.currentGain)):l(t.currentGain),t.spend(n),(i=t.onConvert)==null||i.call(t,n)}),t})}function dl(e,t,n=.5){return f.lte(e,t)?e:f.pow(e,n).times(f.pow(t,f.sub(1,n)))}function cl(e,t,n=.5){return{...e,currentGain:i=>dl(e.currentGain(i),l(t),l(n))}}const fl=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(Object,String,Function),required:!0},title:{type:k(Object,String,Function),required:!0},color:k(String),collapsed:{type:Object,required:!0},style:k(Object,String,Array),titleStyle:k(Object,String,Array),bodyStyle:k(Object,String,Array),classes:k(Object),id:{type:String,required:!0}},components:{Node:Ge,CollapseTransition:Hi},setup(e){const{title:t,display:n}=ne(e),i=ct(t),r=ct(n),a=N(()=>ze[Z.theme].mergeAdjacent);return{titleComponent:i,bodyComponent:r,stacked:a,unref:l,Visibility:B}}}),pl=e=>(qe("data-v-338c9154"),e=e(),Le(),e),ml=pl(()=>p("span",{class:"toggle"},"\u25BC",-1));function gl(e,t,n,i,r,a){var u;const o=ce("CollapseTransition"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,class:Q(["infobox",{collapsed:e.unref(e.collapsed),stacked:e.stacked,...e.unref(e.classes)}]),style:W([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}])},[p("button",{class:"title",style:W([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:t[0]||(t[0]=c=>e.collapsed.value=!e.unref(e.collapsed))},[ml,(g(),A(ee(e.titleComponent)))],4),d(o,null,{default:V(()=>[e.unref(e.collapsed)?P("",!0):(g(),x("div",{key:0,class:"body",style:W({backgroundColor:e.unref(e.color)})},[(g(),A(ee(e.bodyComponent),{style:W(e.unref(e.bodyStyle))},null,8,["style"]))],4))]),_:1}),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var vl=q(fl,[["render",gl],["__scopeId","data-v-338c9154"]]);const hl=Symbol("Infobox");function Mi(e){const t=ue(!1);return le(()=>{const n=e();return n.id=he("infobox-"),n.type=hl,n[de]=vl,n.collapsed=t,y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"color"),y(n,"style"),y(n,"titleStyle"),y(n,"bodyStyle"),y(n,"classes"),y(n,"title"),y(n,"display"),n[me]=function(){const{visibility:i,display:r,title:a,color:o,collapsed:s,style:u,titleStyle:c,bodyStyle:h,classes:v,id:b}=this;return{visibility:i,display:r,title:a,color:o,collapsed:s,style:l(u),titleStyle:c,bodyStyle:h,classes:v,id:b}},n})}var bl=E({props:{style:k(String,Object,Array),classes:k(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=O(null),n=new ResizeObserver(a),i=O(null);Tt(()=>{var s,u;const o=i.value;o!=null&&(n.observe(o),t.value=new Ji({resizeTo:o,backgroundAlpha:0}),(s=i.value)==null||s.appendChild(t.value.view),(u=e.onInit)==null||u.call(e,t.value)),a(),e.onHotReload&&Ve(e.onHotReload)}),zi(()=>{var o;(o=t.value)==null||o.destroy()});let r=!0;function a(){r&&(r=!1,Ve(()=>{var o;i.value!=null&&e.onContainerResized&&(e.onContainerResized(i.value.getBoundingClientRect()),(o=t.value)==null||o.resize()),r=!0}))}return document.fonts.ready.then(a),{unref:l,resizeListener:i}}});function yl(e,t,n,i,r,a){return g(),x("div",{ref:"resizeListener",class:Q(["resize-listener",e.unref(e.classes)]),style:W(e.unref(e.style))},null,6)}var _l=q(bl,[["render",yl],["__scopeId","data-v-8adf21fa"]]);const kl=Symbol("Particles");function wl(e){return le(()=>{var r,a;const t=(r=e==null?void 0:e())!=null?r:{};t.id=he("particles-"),t.type=kl,t[de]=_l,t.app=xe(null),t.addEmitter=o=>{const s=t;return s.app.value?Promise.resolve(new Vn(s.app.value.stage,o)):new Promise(u=>{n.push({resolve:u,config:o})})};let n=[];function i(o){t.app.value=o,n.forEach(({resolve:s,config:u})=>s(new Vn(o.stage,u))),n=[]}return t.onContainerResized=(a=t.onContainerResized)==null?void 0:a.bind(t),t[me]=function(){const{id:o,style:s,classes:u,onContainerResized:c,onHotReload:h}=this;return{id:o,style:l(s),classes:u,onContainerResized:c,onHotReload:h,onInit:i}},t})}window.upgradeConfig=Xi;const xl=Symbol("Reset");function Ti(e){return le(()=>{const t=e();return t.id=he("reset-"),t.type=xl,t.reset=function(){var i;const n=r=>{r&&typeof r=="object"&&(Nt in r?r[Nt].value=r[St]:!(r instanceof f)&&!pe(r)&&Object.values(r).forEach(a=>n(a)))};l(t.thingsToReset).forEach(n),ge.emit("reset",t),(i=t.onReset)==null||i.call(t)},y(t,"thingsToReset"),t})}const Dt={};ge.on("removeLayer",e=>{var t;(t=Dt[e.id])==null||t.call(Dt),Dt[e.id]=void 0});const Nl=E({__name:"Sticky",setup(e){const t=O("0"),n=new ResizeObserver(r),i=O(null);function r(){let a=i.value;if(a==null)return;let o=0;for(;a.previousSibling;){const s=a.previousSibling;s.dataset&&"vSticky"in s.dataset&&(o+=s.offsetHeight),a=s}t.value=o+"px"}return Ve(r),document.fonts.ready.then(r),Tt(()=>{var o;const a=(o=i.value)==null?void 0:o.parentElement;a&&n.observe(a)}),(a,o)=>(g(),x("div",{class:"sticky",style:W({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[De(a.$slots,"default",{},void 0,!0)],4))}});var Wt=q(Nl,[["__scopeId","data-v-21495571"]]);const Ii=E({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=N(()=>je(t.resource));return(i,r)=>(g(),x("h2",{style:W({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},U(l(n)),5))}});const Sl={class:"main-display"},Cl={key:0},$l={key:1},Ml=C(", "),Pi=E({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ne(e),i=O(null),r=it(n.effectDisplay),a=N(()=>f.lt(n.resource.value,"1e1000"));return(o,s)=>(g(),A(Wt,null,{default:V(()=>{var u,c;return[p("div",{class:"main-display-container",style:W({height:`${((c=(u=i.value)==null?void 0:u.$el.clientHeight)!=null?c:0)+50}px`})},[p("div",Sl,[l(a)?(g(),x("span",Cl,"You have ")):P("",!0),d(Ii,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),C(" "+U(e.resource.displayName),1),l(r)?(g(),x("span",$l,[Ml,(g(),A(ee(l(r)),{ref_key:"effectRef",ref:i},null,512))])):P("",!0)])],4)]}),_:1}))}});function un(e,t){return y(t,"display"),y(t,"classes"),y(t,"style"),y(t,"direction"),z(t,"direction",X.Up),y(t,"xoffset"),y(t,"yoffset"),t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1):e.pinned=t.pinned=ue(!1)),Ve(()=>{const n=e[de];e[de]=re;const i=e[me].bind(e);e[me]=function(){const{display:a,classes:o,style:s,direction:u,xoffset:c,yoffset:h,pinned:v}=this;return{element:{[de]:n,[me]:i},display:a,classes:o,style:l(s),direction:u,xoffset:c,yoffset:h,pinned:v}}.bind(t)}),t}function Tl(e){return le(()=>{const{addend:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.add(s,l(r)),revert:s=>f.sub(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[f.gte(l(r),0)?"+":"",se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Il(e){return le(()=>{const{multiplier:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.times(s,l(r)),revert:s=>f.div(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[C("x"),se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Pl(e){return le(()=>{const{exponent:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.pow(s,l(r)),revert:s=>f.root(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[C("^"),se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Ol(...e){return{apply:t=>e.filter(n=>l(n.enabled)!==!1).reduce((n,i)=>i.apply(n),t),revert:e.every(t=>t.revert!=null)?t=>e.filter(n=>l(n.enabled)!==!1).reduceRight((n,i)=>i.revert(n),t):void 0,enabled:N(()=>e.filter(t=>l(t.enabled)!==!1).length>0),description:L(()=>d(K,null,[e.filter(t=>l(t.enabled)!==!1).map(t=>l(t.description)).filter(t=>t).map(Re)]))}}function Al(e,t,n,i=1,r="",a="Base"){return d("div",null,[d("h3",null,[e,t?d("span",{class:"subtitle"},[C(" ("),t,C(")")]):null]),d("br",null,null),d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[se(i),r]),d("span",{class:"modifier-description"},[Re(a)])]),Re(l(n.description)),d("hr",null,null),C("Total: "),se(n.apply(i)),r])}const El={class:"field"},Vl={key:0,class:"field-title"},Fl=["min","max"],Dl=E({__name:"Slider",props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:t}){const i=ne(e),r=N({get(){return String(l(i.modelValue)||0)},set(a){t("update:modelValue",Number(a))}});return(a,o)=>(g(),x("div",El,[e.title?(g(),x("span",Vl,U(e.title),1)):P("",!0),d(re,{display:`${l(r)}`,class:Q({fullWidth:!e.title}),direction:l(X).Down},{default:V(()=>[Kt(p("input",{type:"range","onUpdate:modelValue":o[0]||(o[0]=s=>pe(r)?r.value=s:null),min:e.min,max:e.max},null,8,Fl),[[Hn,l(r)]])]),_:1},8,["display","class","direction"])]))}});var Rl=q(Dl,[["__scopeId","data-v-1b053b9f"]]);const Bl=E({__name:"VerticalRule",props:{height:null},setup(e){return(t,n)=>(g(),x("div",{class:"vr",style:W({height:e.height})},null,4))}});var ql=q(Bl,[["__scopeId","data-v-5e0a978a"]]);const Ll=E({props:{progress:{type:k(String,Object,Number),required:!0},width:{type:k(Number),required:!0},height:{type:k(Number),required:!0},direction:{type:k(String),required:!0},display:k(Object,String,Function),visibility:{type:k(Number),required:!0},style:k(Object,String,Array),classes:k(Object),borderStyle:k(Object,String,Array),textStyle:k(Object,String,Array),baseStyle:k(Object,String,Array),fillStyle:k(Object,String,Array),mark:k(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{progress:t,width:n,height:i,direction:r,display:a}=ne(e),o=N(()=>{let c=t.value instanceof f?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(c,0),1))*100}),s=N(()=>{const c={width:ae(n)+.5+"px",height:ae(i)+.5+"px"};switch(l(r)){case X.Up:c.clipPath=`inset(${o.value}% 0% 0% 0%)`,c.width=ae(n)+1+"px";break;case X.Down:c.clipPath=`inset(0% 0% ${o.value}% 0%)`,c.width=ae(n)+1+"px";break;case X.Right:c.clipPath=`inset(0% ${o.value}% 0% 0%)`;break;case X.Left:c.clipPath=`inset(0% 0% 0% ${o.value} + '%)`;break;case X.Default:c.clipPath="inset(0% 50% 0% 0%)";break}return c}),u=it(a);return{normalizedProgress:o,barStyle:s,component:u,unref:l,Visibility:B}}});function jl(e,t,n,i,r,a){var u,c,h,v,b,w,S;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),class:Q({bar:!0,...e.unref(e.classes)})},[p("div",{class:"overlayTextContainer border",style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(c=e.unref(e.borderStyle))!=null?c:{}])},[e.component?(g(),x("span",{key:0,class:"overlayText",style:W(e.unref(e.textStyle))},[(g(),A(ee(e.component)))],4)):P("",!0)],4),p("div",{class:"border",style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(h=e.unref(e.style))!=null?h:{},(v=e.unref(e.baseStyle))!=null?v:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[p("div",{class:"fill",style:W([e.barStyle,(w=e.unref(e.style))!=null?w:{},(S=e.unref(e.fillStyle))!=null?S:{}])},null,4)],4),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var zl=q(Ll,[["render",jl],["__scopeId","data-v-02d0d7b2"]]);const Ul=Symbol("Bar");function an(e){return le(()=>{const t=e();return t.id=he("bar-"),t.type=Ul,t[de]=zl,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"width"),y(t,"height"),y(t,"direction"),y(t,"style"),y(t,"classes"),y(t,"borderStyle"),y(t,"baseStyle"),y(t,"textStyle"),y(t,"fillStyle"),y(t,"progress"),y(t,"display"),y(t,"mark"),t[me]=function(){const{progress:n,width:i,height:r,direction:a,display:o,visibility:s,style:u,classes:c,borderStyle:h,textStyle:v,baseStyle:b,fillStyle:w,mark:S,id:$}=this;return{progress:n,width:i,height:r,direction:a,display:o,visibility:s,style:l(u),classes:c,borderStyle:h,textStyle:v,baseStyle:b,fillStyle:w,mark:S,id:$}},t})}const Gl=Symbol("Buyable");function Hl(e){const t=ue(0);return le(()=>{var a,o;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=he("buyable-"),n.type=Gl,n[de]=xi,n.amount=t,n.canAfford=N(()=>{const s=n,u=l(s.cost);return s.resource!=null&&u!=null&&f.gte(s.resource.value,u)}),n.canPurchase==null&&(n.canPurchase=N(()=>l(n.visibility)===B.Visible&&l(n.canAfford)&&f.lt(n.amount.value,l(n.purchaseLimit)))),n.maxed=N(()=>f.gte(n.amount.value,l(n.purchaseLimit))),y(n,"classes");const i=n.classes;n.classes=N(()=>{const s=l(i)||{};return n.maxed.value&&(s.bought=!0),s}),y(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(o=(a=n.onClick)!=null?a:n.purchase)!=null?o:function(){var c;const s=n;if(!l(s.canPurchase))return;const u=l(s.cost);s.cost!=null&&s.resource!=null&&(s.resource.value=f.sub(s.resource.value,u),s.amount.value=f.add(s.amount.value,1)),(c=s.onPurchase)==null||c.call(s,u)},y(n,"display");const r=n.display;return n.display=L(()=>{const s=l(r);if(Te(s)){const u=D(s);return d(u,null,null)}if(s!=null&&n.cost!=null&&n.resource!=null){const u=n,c=D(s.title||"","h3"),h=D(s.description||""),v=D(s.effectDisplay||"");return d("span",null,[s.title?d("div",null,[d(c,null,null)]):null,s.description?d(h,null,null):null,s.showAmount===!1?null:d("div",null,[d("br",null,null),l(u.purchaseLimit)===f.dInf?d(K,null,[C("Amount: "),ve(u.amount.value)]):d(K,null,[C("Amount: "),ve(u.amount.value),C(" /")," ",ve(l(u.purchaseLimit))])]),s.effectDisplay?d("div",null,[d("br",null,null),C("Currently: "),d(v,null,null)]):null,u.cost&&!u.maxed.value?d("div",null,[d("br",null,null),C("Cost: "),se(l(u.cost)||0)," ",n.resource.displayName]):null])}return""}),y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"cost"),y(n,"resource"),y(n,"purchaseLimit"),z(n,"purchaseLimit",f.dInf),y(n,"style"),y(n,"mark"),y(n,"small"),n[me]=function(){const{display:s,visibility:u,style:c,classes:h,onClick:v,canClick:b,small:w,mark:S,id:$}=this;return{display:s,visibility:u,style:l(c),classes:h,onClick:v,canClick:b,small:w,mark:S,id:$}},n})}var Wl=E({props:{active:{type:k(Boolean),required:!0},maxed:{type:k(Boolean),required:!0},canComplete:{type:k(Boolean),required:!0},display:k(String,Object,Function),visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),completed:{type:k(Boolean),required:!0},canStart:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{active:t,maxed:n,canComplete:i,display:r}=ne(e),a=N(()=>t.value?i.value?"Finish":"Exit Early":n.value?"Completed":"Start"),o=xe(""),s=N(()=>{const u=ae(t),c=ae(i);return u?c?Gs():wn():{}});return Ne(()=>{const u=ae(r);if(u==null){o.value="";return}if(Te(u)){o.value=D(u);return}const c=D(u.title||"","h3"),h=D(u.description,"div"),v=D(u.goal||""),b=D(u.reward||""),w=D(u.effectDisplay||"");o.value=D(L(()=>d("span",null,[u.title?d("div",null,[d(c,null,null)]):null,d(h,null,null),u.goal?d("div",null,[d("br",null,null),C("Goal: "),d(v,null,null)]):null,u.reward?d("div",null,[d("br",null,null),C("Reward: "),d(b,null,null)]):null,u.effectDisplay?d("div",null,[C("Currently: "),d(w,null,null)]):null])))}),{buttonText:a,notifyStyle:s,comp:o,Visibility:B,unref:l}}});const Yl=["disabled"];function Kl(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,(u=e.unref(e.style))!=null?u:{}]),class:Q({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&!e.unref(e.maxed),maxed:e.unref(e.maxed),...e.unref(e.classes)})},[p("button",{class:"toggleChallenge",onClick:t[0]||(t[0]=(...c)=>e.toggle&&e.toggle(...c)),disabled:!e.unref(e.canStart)||e.unref(e.maxed)},U(e.buttonText),9,Yl),e.unref(e.comp)?(g(),A(ee(e.unref(e.comp)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var Zl=q(Wl,[["render",Kl],["__scopeId","data-v-4d2947df"]]);const Jl=Symbol("ChallengeType");function Xl(e){const t=ue(0),n=ue(!1);return le(()=>{const i=e();if(i.canComplete==null&&(i.resource==null||i.goal==null))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",i),"Cannot create challenge without a canComplete property or a resource and goal property";i.id=he("challenge-"),i.type=Jl,i[de]=Zl,i.completions=t,i.active=n,i.completed=N(()=>f.gt(i.completions.value,0)),i.maxed=N(()=>f.gte(i.completions.value,l(i.completionLimit))),i.toggle=function(){var o,s,u,c,h;const a=i;if(a.active.value){if(l(a.canComplete)&&!a.maxed.value){let v=l(a.canComplete);typeof v=="boolean"&&(v=1),a.completions.value=f.min(f.add(a.completions.value,v),l(a.completionLimit)),(o=a.onComplete)==null||o.call(a)}a.active.value=!1,(s=a.onExit)==null||s.call(a),(u=a.reset)==null||u.reset()}else l(a.canStart)&&l(a.visibility)===B.Visible&&!a.maxed.value&&((c=a.reset)==null||c.reset(),a.active.value=!0,(h=a.onEnter)==null||h.call(a))},i.complete=function(a){var u,c,h;const o=i;let s=l(o.canComplete);o.active.value&&s!==!1&&(s===!0||f.neq(0,s))&&!o.maxed.value&&(typeof s=="boolean"&&(s=1),o.completions.value=f.min(f.add(o.completions.value,s),l(o.completionLimit)),(u=o.onComplete)==null||u.call(o),a!==!0&&(o.active.value=!1,(c=o.onExit)==null||c.call(o),(h=o.reset)==null||h.reset()))},y(i,"visibility"),z(i,"visibility",B.Visible);const r=i.visibility;return i.visibility=N(()=>Z.hideChallenges===!0&&l(i.maxed)?B.None:l(r)),i.canComplete==null&&(i.canComplete=N(()=>{const a=i;return!a.active.value||a.resource==null||a.goal==null?!1:f.gte(a.resource.value,l(a.goal))})),i.mark==null&&(i.mark=N(()=>f.gt(l(i.completionLimit),1)&&!!l(i.maxed))),y(i,"canStart"),z(i,"canStart",!0),y(i,"canComplete"),y(i,"completionLimit"),z(i,"completionLimit",1),y(i,"mark"),y(i,"goal"),y(i,"classes"),y(i,"style"),y(i,"display"),i.reset!=null&&ge.on("reset",a=>{a===i.reset&&i.active.value&&i.toggle()}),i[me]=function(){const{active:a,maxed:o,canComplete:s,display:u,visibility:c,style:h,classes:v,completed:b,canStart:w,mark:S,id:$,toggle:R}=this;return{active:a,maxed:o,canComplete:s,display:u,visibility:c,style:l(h),classes:v,completed:b,canStart:w,mark:S,id:$,toggle:R}},i})}ge.on("loadSettings",e=>{z(e,"hideChallenges",!1)});si(L(()=>d(we,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>Z.hideChallenges=e,modelValue:Z.hideChallenges},null)));const Xt=Yt({}),xn=Symbol("Hotkey");function Ln(e){return le(()=>{const t=e();return t.type=xn,y(t,"enabled"),z(t,"enabled",!0),y(t,"description"),t})}ge.on("addLayer",e=>{ti(e,xn).forEach(t=>{Xt[t.key]=t})});ge.on("removeLayer",e=>{ti(e,xn).forEach(t=>{Xt[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||Nn.value&&!T.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=Xt[t];n&&l(n.enabled)&&(e.preventDefault(),n.onPress())};ea(L(()=>{const e=Object.values(Xt).filter(t=>l(t==null?void 0:t.enabled));return e.length===0?"":d("div",null,[d("br",null,null),d("h4",null,[C("Hotkeys")]),e.map(t=>d("div",null,[t==null?void 0:t.key,C(": "),t==null?void 0:t.description]))])}));const Ql=Symbol("Links");function eu(e){return le(()=>{const t=e();return t.type=Ql,t[de]=_i,y(t,"links"),t[me]=function(){const{links:n}=this;return{links:n}},t})}var tu=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(String,Object,Function),required:!0},style:k(String,Object,Array),classes:k(Object),earned:{type:k(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Ge},setup(e){const{display:t}=ne(e),n=xe("");return Ne(()=>{const i=ae(t);if(i==null){n.value="";return}if(Te(i)){n.value=D(i);return}const r=D(i.requirement,"h3"),a=D(i.effectDisplay||"","b"),o=D(i.optionsDisplay||"","span");n.value=D(L(()=>d("span",null,[d(r,null,null),i.effectDisplay?d("div",null,[d(a,null,null)]):null,i.optionsDisplay?d("div",{class:"equal-spaced"},[d(o,null,null)]):null])))}),{comp:n,unref:l,Visibility:B}}});function nu(e,t,n,i,r,a){var s;const o=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),class:Q({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(g(),A(ee(e.unref(e.comp)))),d(o,{id:e.id},null,8,["id"])],6)):P("",!0)}var iu=q(tu,[["render",nu],["__scopeId","data-v-f4e8794e"]]);const ru=fn(),au=Symbol("Milestone");let Ke;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Ke||(Ke={}));function jn(e){const t=ue(!1);return le(()=>{var r;const n=(r=e==null?void 0:e())!=null?r:{};n.id=he("milestone-"),n.type=au,n[de]=iu,n.earned=t,n.complete=function(){t.value=!0},y(n,"visibility"),z(n,"visibility",B.Visible);const i=n.visibility;if(n.visibility=N(()=>{const a=l(n.display);switch(Z.msDisplay){default:case Ke.All:return l(i);case Ke.Configurable:return l(n.earned)&&!(a!=null&&typeof a=="object"&&"optionsDisplay"in a)?B.None:l(i);case Ke.Incomplete:return l(n.earned)?B.None:l(i);case Ke.None:return B.None}}),y(n,"style"),y(n,"classes"),y(n,"display"),n[me]=function(){const{visibility:a,display:o,style:s,classes:u,earned:c,id:h}=this;return{visibility:a,display:o,style:l(s),classes:u,earned:c,id:h}},n.shouldEarn){const a=n;Ne(()=>{var o,s;if(Z.active===T.id&&!a.earned.value&&l(a.visibility)===B.Visible&&((o=a.shouldEarn)==null?void 0:o.call(a))&&(a.earned.value=!0,(s=a.onComplete)==null||s.call(a),a.display)){const u=l(a.display),c=D(Te(u)?u:u.requirement);ru(d(K,null,[d("h3",null,[C("Milestone earned!")]),d("div",null,[d(c,null,null)])]))}})}return n})}ge.on("loadSettings",e=>{z(e,"msDisplay",Ke.All)});const ou=Object.values(Ke).map(e=>({label:ei(e),value:e}));si(L(()=>d(yn,{title:"Show Milestones",options:ou,"onUpdate:modelValue":e=>Z.msDisplay=e,modelValue:Z.msDisplay},null)));const su=E({__name:"Tab",props:{display:null},setup(e){const t=e,{display:n}=ne(t),i=ct(n);return(r,a)=>(g(),A(ee(l(i))))}}),lu=Symbol("Tab");function Rt(e){return le(()=>{const t=e();return t.id=he("tab-"),t.type=lu,t[de]=su,t[me]=function(){const{display:n}=this;return{display:n}},t})}const uu=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(Object,String,Function),required:!0},style:k(String,Object,Array),classes:k(Object),glowColor:k(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:i,floating:r}=ne(e),a=ct(n),o=N(()=>{const u=ae(i);return u?l(r)?wn(u):{boxShadow:`0px 9px 5px -6px ${u}`}:{}});function s(){t("selectTab")}return{selectTab:s,component:a,glowColorStyle:o,unref:l,Visibility:B}}});function du(e,t,n,i,r,a){var o;return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,onClick:t[0]||(t[0]=(...s)=>e.selectTab&&e.selectTab(...s)),class:Q(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(o=e.unref(e.style))!=null?o:{}])},[(g(),A(ee(e.component)))],6)):P("",!0)}var Oi=q(uu,[["render",du],["__scopeId","data-v-610a2549"]]);const cu=E({props:{visibility:{type:k(Number),required:!0},activeTab:{type:k(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:k(Object),required:!0},style:k(String,Object,Array),classes:k(Object),buttonContainerStyle:k(String,Object,Array),buttonContainerClasses:k(Object)},components:{Sticky:Wt,TabButton:Oi},setup(e){const{activeTab:t}=ne(e),n=N(()=>ze[Z.theme].floatingTabs),i=xe("");Ne(()=>{const s=ae(t);if(s==null){i.value="";return}if(Te(s)){i.value=D(s);return}i.value=D(l(s.display))});const r=N(()=>{const s=ae(t);return Te(s)||!s?void 0:l(s.classes)}),a=N(()=>{const s=ae(t);return Te(s)||!s?void 0:l(s.style)});function o(s){const{display:u,style:c,classes:h,glowColor:v,visibility:b}=s;return{display:u,style:l(c),classes:h,glowColor:v,visibility:b}}return{floating:n,tabClasses:r,tabStyle:a,Visibility:B,component:i,gatherButtonProps:o,unref:l}}});function fu(e,t,n,i,r,a){var u,c;const o=ce("TabButton"),s=ce("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,class:Q(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[],(c=e.tabStyle)!=null?c:[]])},[d(s,{class:Q(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:W(e.unref(e.buttonContainerStyle))},{default:V(()=>[p("div",{class:Q(["tab-buttons",{floating:e.floating}])},[(g(!0),x(K,null,kt(e.unref(e.tabs),(h,v)=>(g(),A(o,Be({onSelectTab:b=>e.selected.value=v,floating:e.floating,key:v,active:e.unref(h.tab)===e.unref(e.activeTab)},e.gatherButtonProps(h)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(g(),A(ee(e.unref(e.component)),{key:0})):P("",!0)],6)):P("",!0)}var pu=q(cu,[["render",fu],["__scopeId","data-v-11575f45"]]);const mu=Symbol("TabButton"),gu=Symbol("TabFamily");function zn(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const n=ue(Object.keys(e)[0]);return le(()=>{var a;const i=(a=t==null?void 0:t())!=null?a:{};i.id=he("tabFamily-"),i.type=gu,i[de]=pu,i.tabs=Object.keys(e).reduce((o,s)=>{const u=e[s]();return u.type=mu,u[de]=Oi,y(u,"visibility"),z(u,"visibility",B.Visible),y(u,"tab"),y(u,"display"),y(u,"classes"),y(u,"style"),y(u,"glowColor"),o[s]=u,o},{}),i.selected=n,i.activeTab=N(()=>{const o=l(r.tabs);if(n.value in o&&l(o[n.value].visibility)===B.Visible)return l(o[n.value].tab);const s=Object.values(o).find(u=>l(u.visibility)===B.Visible);return s?l(s.tab):null}),y(i,"visibility"),z(i,"visibility",B.Visible),y(i,"classes"),y(i,"style"),y(i,"buttonContainerClasses"),y(i,"buttonContainerStyle"),i[me]=function(){const{visibility:o,activeTab:s,selected:u,tabs:c,style:h,classes:v,buttonContainerClasses:b,buttonContainerStyle:w}=this;return{visibility:o,activeTab:s,selected:u,tabs:c,style:l(h),classes:v,buttonContainerClasses:b,buttonContainerStyle:w}};const r=i;return r})}var vu=E({props:{display:{type:k(String,Object,Function),required:!0},visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),resource:Object,cost:k(String,Object,Number),canPurchase:{type:k(Boolean),required:!0},bought:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t,cost:n}=ne(e),i=xe("");return Ne(()=>{const r=ae(t);if(r==null){i.value="";return}if(Te(r)){i.value=D(r);return}const a=ae(n),o=D(r.title||"","h3"),s=D(r.description,"div"),u=D(r.effectDisplay||"");i.value=D(L(()=>{var c;return d("span",null,[r.title?d("div",null,[d(o,null,null)]):null,d(s,null,null),r.effectDisplay?d("div",null,[C("Currently: "),d(u,null,null)]):null,e.resource!=null?d(K,null,[d("br",null,null),C("Cost: "),e.resource&&je(e.resource,a)," ",(c=e.resource)==null?void 0:c.displayName]):null])}))}),{component:i,unref:l,Visibility:B}}});const hu=["disabled"];function bu(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),onClick:t[0]||(t[0]=(...c)=>e.purchase&&e.purchase(...c)),class:Q({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(g(),A(ee(e.unref(e.component)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],14,hu)):P("",!0)}var yu=q(vu,[["render",bu],["__scopeId","data-v-7742f590"]]);const _u=Symbol("Upgrade");function Bt(e){const t=ue(!1);return le(()=>{const n=e();return n.id=he("upgrade-"),n.type=_u,n[de]=yu,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=N(()=>{const i=n;return i.resource!=null&&i.cost!=null&&f.gte(i.resource.value,l(i.cost))}):y(n,"canAfford"),n.canPurchase=N(()=>l(n.visibility)===B.Visible&&l(n.canAfford)&&!l(n.bought)),n.purchase=function(){var r;const i=n;!l(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=f.sub(i.resource.value,l(i.cost))),t.value=!0,(r=i.onPurchase)==null||r.call(i))},y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"classes"),y(n,"style"),y(n,"display"),y(n,"mark"),y(n,"cost"),y(n,"resource"),n[me]=function(){const{display:i,visibility:r,style:a,classes:o,resource:s,cost:u,canPurchase:c,bought:h,mark:v,id:b,purchase:w}=this;return{display:i,visibility:r,style:l(a),classes:o,resource:s,cost:u,canPurchase:c,bought:h,mark:v,id:b,purchase:w}},n})}function ku(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!cn(e)}const on="c",Oe=It(on,()=>{const e="#4BDC13",t="Candies",n=Ct(0,"lollipops"),i=yi(n),r=ue(!1),a=ue("pointy"),o=ue(10),s=ue(new f(10)),u=N(()=>f.pow(n.value,.2)),c=N(()=>f.times(n.value,10)),h=Mi(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"})),v=jn(()=>({shouldEarn(){return f.gte(i.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}})),b=jn(()=>({visibility(){return gt(v.earned.value)},shouldEarn(){return f.gte(i.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:L(()=>d(K,null,[d(we,{title:"beep","onUpdate:modelValue":H=>r.value=H,modelValue:r.value},null),d(we,{title:"boop","onUpdate:modelValue":H=>Fe.boop.value=H,modelValue:Fe.boop.value},null)]))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}})),w=[v,b],S=Xl(()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder
${ve(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:se($.value)+"x"}},visibility(){return gt(f.gt(i.value,0))},goal:20,resource:Y.points,onComplete(){console.log("hiii")},onEnter(){Y.points.value=0,Y.best.value=Y.points.value,Y.total.value=Y.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}})),$=N(()=>f.add(n.value,1).tetrate(.02)),R=Bt(()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:n})),ke=Bt(()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${se(M.value)}x`}),cost:1,resource:n,visibility:()=>gt(R.bought.value)})),M=N(()=>{let H=f.add(n.value,1).pow(.5);return H.gte("1e20000000")&&(H=H.sqrt().times("1e10000000")),H}),I=Bt(()=>({visibility(){return gt(ke.bought.value)},canAfford(){return f.lt(Y.points.value,7)},onPurchase(){Y.points.value=f.add(Y.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:this.canAfford?{}:{backgroundColor:"#dd1111"}}})),G=Bt(()=>({resource:Ct(te.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}})),be=[R,ke,I],te=Hl(()=>({resource:n,cost(){let H=new f(this.amount.value);return H.gte(25)&&(H=H.pow(2).div(25)),f.pow(2,H.pow(1.5)).floor()},display(){return{title:"Exhancers",description:`Adds ${se(He.value)} things and multiplies stuff by ${se(en.value)}.`}},onPurchase(H){s.value=f.add(s.value,H!=null?H:0)},style:{height:"222px"},purchaseLimit:4})),He=N(()=>f.gte(te.amount.value,0)?f.pow(25,f.pow(te.amount.value,1.1)):f.pow(1/25,f.times(te.amount.value,-1).pow(1.1))),en=N(()=>f.gte(te.amount.value,0)?f.pow(25,f.pow(te.amount.value,1.1)):f.pow(1/25,f.times(te.amount.value,-1).pow(1.1))),at=ue(!1),ot=O(!1),Ot=$t(()=>({small:!0,display:"Respec Thingies",onClick(){if(at.value&&!ot.value){ot.value=!0;return}n.value=f.add(n.value,s.value),te.amount.value=0,Y.tree.reset(Xe)}})),Sn=$t(()=>({small:!0,display:"Sell One",onClick(){f.lte(te.amount.value,0)||(te.amount.value=f.sub(te.amount.value,1),n.value=f.add(n.value,te.cost.value),s.value=f.sub(s.value,te.cost.value))}})),Ei=L(()=>d(Lt,null,{default:()=>[d(bt,null,{default:()=>[d(we,{title:"Confirm","onUpdate:modelValue":H=>at.value=H,modelValue:at.value},null),Pe(Ot)]}),Pe(te),Pe(Sn),d(Je,{modelValue:ot.value,"onUpdate:modelValue":H=>ot.value=H},{header:()=>d("h2",null,[C("Confirm Respec")]),body:()=>d(K,null,[C("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>d("div",{class:"modal-default-footer"},[d("div",{class:"modal-default-flex-grow"},null),d("button",{class:"button modal-default-button",onClick:()=>ot.value=!1},[C("Cancel")]),d("button",{class:"button modal-default-button danger",onClick:()=>{Ot.onClick(),ot.value=!1}},[C("Respec")])])})]})),Cn=an(()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:X.Right,width:300,height:30,progress(){return f.add(Y.points.value,1).log(10).div(10).toNumber()},display(){return se(Y.points.value)+" / 1e10 points"}})),$n=an(()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:X.Up,width:50,height:200,progress(){return f.div(Y.points.value,100)},display(){return ve(f.div(Y.points.value,1).min(100))+"%"}})),At=an(()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:X.Up,width:100,height:30,progress(){return f.div(n.value,50)}})),pt=ll(()=>({scaling:cl($i(10,.5),1e100,.5),baseResource:Y.points,gainResource:n,roundUpCost:!0,gainModifier:Ol(Pl(()=>({exponent:2,description:"Because I felt like it"})),Tl(()=>({addend:1,description:"Nice modifier"})))})),Mn=Ti(()=>({thingsToReset:()=>[Oe]})),Vi=[Ln(()=>({key:"c",description:"reset for lollipops or whatever",onPress(){mt.canClick.value&&mt.onClick()}})),Ln(()=>({key:"ctrl+c",description:"respec things",onPress(){Ot.onClick()}}))],Xe=Si(()=>({layerID:on,color:e,reset:Mn,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let H=je(n);return f.gt(te.amount.value,0)&&(H+=`



${ve(te.amount.value)} Exhancers
`),H},style:{color:"#3325CC",textDecoration:"underline"}}));un(Xe,{display:wi(n),pinnable:!0});const mt=Ni(()=>({conversion:pt,tree:Y.tree,treeNode:Xe,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}));un(mt,{display:L(()=>Al("Modifiers","",pt.gainModifier,pt.scaling.currentGain(pt))),pinnable:!0,direction:X.Down,style:"width: 400px; text-align: left"});const Et=yt(()=>({display:"TH",color:"#6d3678",canClick(){return f.gte(Y.points.value,10)},tooltip:"Thanos your points",onClick(){Y.points.value=f.div(Y.points.value,2),console.log("Thanos'd")},glowColor(){return f.eq(te.amount.value,1)?"orange":""}})),Vt=yt(()=>({display:"h",color(){return ze[Z.theme].variables["--locked"]},tooltip:{display:N(()=>`Restore your points to ${se(o.value)}`),right:!0},canClick(){return f.lt(Y.points.value,o.value)},onClick(){Y.points.value=o.value}})),Tn=yt(()=>({visibility:B.Hidden})),In=ki(()=>({nodes(){return[[Fe.treeNode,Xe],[Et,Tn,Vt]]},branches(){return[{startNode:Fe.treeNode,endNode:Xe,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:Xe,endNode:Et},{startNode:Et,endNode:Vt}]}})),Fi=eu(()=>({links:[{startNode:Vt,endNode:At,"stroke-width":"5px",stroke:"red",offsetEnd:{x:-50+100*At.progress.value.toNumber(),y:0}}]})),Di=zn({first:()=>({tab:L(()=>d(K,null,[Pe(...be),Pe(G),d("div",null,[C("confirmed")])])),display:"first"}),second:()=>({tab:Fe.display,display:"second"})},()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}})),Pn=zn({mainTab:()=>({tab:Rt(()=>({display:L(()=>{let H;return d(K,null,[d(Pi,{resource:n,color:e,effectDisplay:`which are boosting waffles by ${se(u.value)} and increasing the Ice Cream cap by ${se(c.value)}`},null),d(Wt,null,ku(H=oe(mt))?H:{default:()=>[H]}),d(Ii,{resource:n,color:e},null),d(ye,{height:"5px"},null),d("button",{onClick:()=>console.log("yeet")},[C("'HI'")]),d("div",null,[C("Name your points!")]),d(_n,{modelValue:a.value,"onUpdate:modelValue":On=>a.value=On},null),d(Wt,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[C("I have "),je(Y.points),C(" "),a.value,C(" points!")]}),d("hr",null,null),ra(...w),d(ye,null,null),Pe(...be),Pe(G),Pe(S)])})})),display:"main tab",glowColor(){return R.canPurchase.value||ke.canPurchase.value||I.canPurchase.value||S.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:Rt(()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:L(()=>d(K,null,[oe(Ei),d(ye,null,null),d(bt,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[d(we,{"onUpdate:modelValue":H=>r.value=H,modelValue:r.value},null),d(ye,{width:"30px",height:"10px"},null),d("div",null,[d("span",null,[C("Beep")])]),d(ye,null,null),d(ql,{height:"200px"},null)]}),d(ye,null,null),d("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)]))})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:Rt(()=>({display:L(()=>d(K,null,[oe(h),oe(Cn),d(ye,null,null),d(bt,null,{default:()=>[d(Lt,{style:"background-color: #555555; padding: 15px"},{default:()=>[d("div",{style:"color: teal"},[C("Sugar level:")]),d(ye,null,null),oe($n)]}),d(ye,null,null),d(Lt,null,{default:()=>[d("div",null,[C("idk")]),d(ye,{width:"0",height:"50px"},null),oe(At)]})]}),d(ye,null,null),d("div",null,[C(`It's jail because "bars"! So funny! Ha ha!`)]),oe(In)]))})),display:"jail"}),illuminati:()=>({tab:Rt(()=>({display:L(()=>d("div",null,[d("h1",null,[C(" C O N F I R M E D ")]),d(ye,null,null),oe(Di),d("div",null,[C("Adjust how many points H gives you!")]),d(Rl,{"onUpdate:modelValue":H=>o.value=H,modelValue:o.value,min:1,max:30},null)])),style:{backgroundColor:"#3325CC"}})),visibility(){return gt(I.bought.value)},display:"illuminati"})});return{id:on,color:e,name:t,points:n,best:i,beep:r,thingy:a,otherThingy:o,spentOnBuyables:s,waffleBoost:u,icecreamCap:c,coolInfo:h,lollipopMilestones:w,funChallenge:S,funEffect:$,generatorUpgrade:R,lollipopMultiplierUpgrade:ke,lollipopMultiplierEffect:M,unlockIlluminatiUpgrade:I,quasiUpgrade:G,exhancers:te,respecBuyables:Ot,sellExhancer:Sn,bars:{tallBoi:$n,longBoi:Cn,flatBoi:At},tree:In,g:Et,h:Vt,spook:Tn,conversion:pt,reset:Mn,hotkeys:Vi,treeNode:Xe,resetButton:mt,confirmRespec:at,minWidth:800,tabs:Pn,display:L(()=>d(K,null,[oe(Pn),oe(Fi)]))}}),wu={min:.5,max:1},xu=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],Nu=.001,Su=.1,Cu=100,$u=!0,Mu={x:0,y:0},Tu=!1,Iu=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:300},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:1},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#ffdfa0"},{time:1,value:"#100f0c"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"rect",data:{x:0,y:0,w:0,h:0}}}];var Pu={lifetime:wu,ease:xu,frequency:Nu,emitterLifetime:Su,maxParticles:Cu,addAtBack:$u,pos:Mu,emit:Tu,behaviors:Iu};const sn="f",Fe=It(sn,()=>{const e="#FE0102",t="Farms",n=Ct(0,"farm points"),i=ue(!1),r=Mi(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}})),a=ue("Start"),o=$t(()=>({display(){return{title:"Clicky clicky!",description:"Current state:
"+a.value}},initialState:"Start",canClick(){return a.value!=="Borkened..."},onClick(S){var $,R,ke,M,I,G,be,te;switch(a.value){case"Start":a.value="A new state!";break;case"A new state!":a.value="Keep going!";break;case"Keep going!":a.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const He=S==null?void 0:"touches"in S?S.touches[0]:S,en=Object.assign({},Pu,{pos:{x:(($=He==null?void 0:He.clientX)!=null?$:0)-((M=(ke=(R=b.boundingRect)==null?void 0:R.value)==null?void 0:ke.left)!=null?M:0),y:((I=He==null?void 0:He.clientY)!=null?I:0)-((te=(be=(G=b.boundingRect)==null?void 0:G.value)==null?void 0:be.top)!=null?te:0)}});b.addEmitter(en).then(at=>at.playOnceAndDestroy()),a.value="Borkened...";break;default:a.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(a.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}})),s=$t(()=>({onClick(){a.value=="Borkened..."&&(a.value="Start")},display(){return a.value=="Borkened..."?"Fix the clickable!":"Does nothing"},small:!0})),u=Ti(()=>({thingsToReset:()=>[Fe]})),c=ul(()=>({scaling:$i(10,.5),baseResource:Y.points,gainResource:n,modifyGainAmount:Il(()=>({multiplier:Oe.otherThingy}))})),h=Si(()=>({layerID:sn,color:e,reset:u,tooltip(){return h.canClick.value?`${je(n)} ${n.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${je(Y.points)}`},canClick(){return f.gte(Y.points.value,10)}}));un(h,{display:wi(n),pinnable:!0});const v=Ni(()=>({conversion:c,tree:Y.tree,treeNode:h,display:L(()=>v.conversion.buyMax?d("span",null,[C("Hi! I'm a "),d("u",null,[C("weird dinosaur")]),C(" and I'll give you")," ",d("b",null,[ve(v.conversion.currentGain.value)]),C(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",ve(v.conversion.nextAt.value),C(" points)")]):d("span",null,[C("Hi! I'm a "),d("u",null,[C("weird dinosaur")]),C(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",ve(v.conversion.nextAt.value),C(" points)")]))})),b=wl(()=>({boundingRect:O(null),onContainerResized(S){this.boundingRect.value=S},style:"z-index: 2"})),w=L(()=>d(K,null,[oe(r),d(Pi,{resource:n,color:e},null),oe(v),d("div",null,[C("You have "),ve(c.baseResource.value),C(" points")]),d("div",null,[d("br",null,null),d("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),d("div",null,[C("Bork Bork!")])]),d(ye,null,null),Pe(s),Pe(o),oe(b)]));return{id:sn,color:e,name:t,points:n,boop:i,coolInfo:r,clickable:o,clickableState:a,reset:u,conversion:c,treeNode:h,resetButton:v,minWidth:650,display:w}});function ln(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!cn(e)}const Un="a",dn=It(Un,()=>{const e="yellow",t="Achievements",n=Ct(0,"achievement power"),i=yt(()=>({display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick(){Y.showAchievements()}})),r=rn(()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:N(()=>r.earned.value?"You did it!":"How did this happen?"),shouldEarn:()=>!0})),a=rn(()=>({display:"Impossible!",tooltip:N(()=>a.earned.value?"HOW????":"Mwahahaha!"),style:{color:"#04e050"}})),o=rn(()=>({display:"EIEIO",tooltip:`Get a farm point. +${I}`)}}return c[M]}Ie(n,M=>{M&&Object.keys(c).forEach(I=>delete c[I])});const v=N(()=>Z.saves.reduce((M,I)=>(M[I]=h(I),M),{}));function b(M){let I;switch(T.id===M?I=ii(T[fe]):I=JSON.stringify(v.value[M]),J.exportEncoding){default:console.warn(`Unknown save encoding: ${J.exportEncoding}. Defaulting to lz`);case"lz":I=Ye.compressToUTF16(I);break;case"base64":I=btoa(unescape(encodeURIComponent(I)));break;case"plain":break}const G=document.createElement("textarea");G.value=I,document.body.appendChild(G),G.select(),G.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(G)}function w(M){T.id===M&&Ae();const I={...v.value[M],id:qt()};Ae(I),Z.saves.push(I.id)}function S(M){Z.saves=Z.saves.filter(I=>I!==M),localStorage.removeItem(M),c[M]=void 0}function $(M){v.value[T.id].time=T.time,Ae(),c[T.id]=void 0,nt(v.value[M]),c[M]=void 0}function R(M){if(o.value=M,Ve(()=>{o.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ye.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const I=JSON.parse(M);I.id=qt(),Ae(I),Z.saves.push(I.id),$(I.id)}function ke(M,I){const G=v.value[M];G&&(G.name=I,T.id===M?(T.name=I,Ae()):(Ae(G),c[M]=void 0))}return(M,I)=>(g(),A(Je,{modelValue:n.value,"onUpdate:modelValue":I[4]||(I[4]=G=>n.value=G),ref_key:"modal",ref:i},{header:V(()=>[Ao]),body:V(({shown:G})=>[G?(g(),A(l(Yi),{key:0,list:l(Z).saves,handle:".handle",itemKey:be=>be},{item:V(({element:be})=>[d(Oo,{save:l(v)[be],onOpen:te=>$(be),onExport:te=>b(be),onEditName:te=>ke(be,te),onDuplicate:te=>w(be),onDelete:te=>S(be)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:V(()=>[p("div",Eo,[d(_n,{modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=G=>a.value=G),title:"Import Save",placeholder:"Paste your save here!",class:Q({importingFailed:r.value})},null,8,["modelValue","class"]),p("div",Vo,[Fo,p("div",Do,[p("button",{class:"button",onClick:I[1]||(I[1]=G=>$(l(ut)().id))},"New Game"),Object.keys(l(u)).length>0?(g(),A(yn,{key:0,options:l(u),modelValue:o.value,"onUpdate:modelValue":I[2]||(I[2]=G=>R(G)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),p("div",Ro,[Bo,p("button",{class:"button modal-default-button",onClick:I[3]||(I[3]=G=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var hi=q(qo,[["__scopeId","data-v-3b9991aa"]]);const Se=e=>(qe("data-v-4a3f8425"),e=e(),Le(),e),Lo=["src","alt"],jo={key:1,class:"title"},zo=Se(()=>p("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Uo={class:"discord"},Go={class:"discord-links"},Ho={key:0},Wo=["href"],Yo=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ko=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Jo=Se(()=>p("span",{class:"material-icons"},"forum",-1)),Xo=Se(()=>p("span",{class:"material-icons"},"info",-1)),Qo=Se(()=>p("span",{class:"material-icons"},"library_books",-1)),es=Se(()=>p("span",{class:"material-icons"},"settings",-1)),ts=Se(()=>p("span",{class:"material-icons"},"library_books",-1)),ns=Se(()=>p("span",{class:"material-icons"},"settings",-1)),is=Se(()=>p("span",{class:"material-icons"},"info",-1)),rs={href:"https://forums.moddingtree.com/",target:"_blank"},as=Se(()=>p("span",{class:"material-icons"},"forum",-1)),os={class:"discord"},ss={class:"discord-links"},ls={key:0},us=["href"],ds=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),cs=Se(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),fs=E({__name:"Nav",setup(e){const t=O(null),n=O(null),i=O(null),r=O(null),{useHeader:a,banner:o,title:s,discordName:u,discordLink:c,versionNumber:h}=J;function v(){window.open(c,"mywindow")}return(b,w)=>(g(),x(K,null,[l(a)?(g(),x("div",Be({key:0,class:"nav"},b.$attrs),[l(o)?(g(),x("img",{key:0,src:l(o),class:"banner",alt:l(s)},null,8,Lo)):(g(),x("div",jo,U(l(s)),1)),p("div",{onClick:w[0]||(w[0]=S=>{var $;return($=r.value)==null?void 0:$.open()}),class:"version-container"},[d(re,{display:"Changelog",direction:l(X).Down,class:"version"},{default:V(()=>[p("span",null,"v"+U(l(h)),1)]),_:1},8,["direction"])]),zo,p("div",Uo,[p("span",{onClick:v,class:"material-icons"},"discord"),p("ul",Go,[l(c)?(g(),x("li",Ho,[p("a",{href:l(c),target:"_blank"},U(l(u)),9,Wo)])):P("",!0),Yo,Ko])]),p("div",null,[p("a",Zo,[d(re,{display:"Forums",direction:l(X).Down,yoffset:"5px"},{default:V(()=>[Jo]),_:1},8,["direction"])])]),p("div",{onClick:w[1]||(w[1]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[d(re,{display:"Info",direction:l(X).Down,class:"info"},{default:V(()=>[Xo]),_:1},8,["direction"])]),p("div",{onClick:w[2]||(w[2]=S=>{var $;return($=n.value)==null?void 0:$.open()})},[d(re,{display:"Saves",direction:l(X).Down,xoffset:"-20px"},{default:V(()=>[Qo]),_:1},8,["direction"])]),p("div",{onClick:w[3]||(w[3]=S=>{var $;return($=i.value)==null?void 0:$.open()})},[d(re,{display:"Options",direction:l(X).Down,xoffset:"-66px"},{default:V(()=>[es]),_:1},8,["direction"])])],16)):(g(),x("div",Be({key:1,class:"overlay-nav"},b.$attrs),[p("div",{onClick:w[4]||(w[4]=S=>{var $;return($=r.value)==null?void 0:$.open()}),class:"version-container"},[d(re,{display:"Changelog",direction:l(X).Right,xoffset:"25%",class:"version"},{default:V(()=>[p("span",null,"v"+U(l(h)),1)]),_:1},8,["direction"])]),p("div",{onClick:w[5]||(w[5]=S=>{var $;return($=n.value)==null?void 0:$.open()})},[d(re,{display:"Saves",direction:l(X).Right},{default:V(()=>[ts]),_:1},8,["direction"])]),p("div",{onClick:w[6]||(w[6]=S=>{var $;return($=i.value)==null?void 0:$.open()})},[d(re,{display:"Options",direction:l(X).Right},{default:V(()=>[ns]),_:1},8,["direction"])]),p("div",{onClick:w[7]||(w[7]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[d(re,{display:"Info",direction:l(X).Right},{default:V(()=>[is]),_:1},8,["direction"])]),p("div",null,[p("a",rs,[d(re,{display:"Forums",direction:l(X).Right,xoffset:"7px"},{default:V(()=>[as]),_:1},8,["direction"])])]),p("div",os,[p("span",{onClick:v,class:"material-icons"},"discord"),p("ul",ss,[l(c)?(g(),x("li",ls,[p("a",{href:l(c),target:"_blank"},U(l(u)),9,us)])):P("",!0),ds,cs])])],16)),d(Ga,{ref_key:"info",ref:t,changelog:r.value},null,8,["changelog"]),d(hi,{ref_key:"savesManager",ref:n},null,512),d(Qa,{ref_key:"options",ref:i},null,512),d(Ca,{ref_key:"changelog",ref:r},null,512)],64))}});var bi=q(fs,[["__scopeId","data-v-4a3f8425"]]);const ps={class:"inner-tab"},ms=E({__name:"Game",setup(e){const t=Ze(T,"tabs"),n=N(()=>Object.keys(_e)),i=J.useHeader;function r(a){const{display:o,minimized:s,minWidth:u,name:c,color:h,minimizable:v,nodes:b}=a;return{display:o,minimized:s,minWidth:u,name:c,color:h,minimizable:v,nodes:b}}return(a,o)=>(g(),x("div",{class:Q(["tabs-container",{useHeader:l(i)}])},[(g(!0),x(K,null,kt(l(t),(s,u)=>{var c,h;return g(),x("div",{key:u,class:Q(["tab",l((c=l(_e)[s])==null?void 0:c.classes)]),ref_for:!0,ref:`tab-${u}`,style:W(l((h=l(_e)[s])==null?void 0:h.style))},[u===0&&!l(i)?(g(),A(bi,{key:0})):P("",!0),p("div",ps,[l(n).includes(s)?(g(),A(wa,Be({key:0},r(l(_e)[s]),{index:u,tab:()=>{var v;return(v=a.$refs[`tab-${u}`])==null?void 0:v[0]}}),null,16,["index","tab"])):(g(),A(ee(s),{key:1,index:u},null,8,["index"]))])],6)}),128))],2))}});var gs=q(ms,[["__scopeId","data-v-4cb9ce0f"]]);const vs={},hs=e=>(qe("data-v-89b4b00a"),e=e(),Le(),e),bs=hs(()=>p("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[p("g",{id:"P"},[p("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),p("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),p("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),p("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),p("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),p("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),p("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],-1));function ys(e,t){return g(),A(Zt,{appear:""},{default:V(()=>[bs]),_:1})}var _s=q(vs,[["render",ys],["__scopeId","data-v-89b4b00a"]]);const ye=E({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(g(),x("div",{style:W({width:e.width,height:e.height})},null,4))}});function Ct(e,t="points",n=0,i=void 0){const r=pe(e)?e:ue(e);return r.displayName=t,r.precision=n,r.small=i,r}function yi(e){const t=ue(e.value);return Ie(e,n=>{f.gt(n,t.value)&&(t.value=n)}),t}function ks(e){const t=ue(e.value);return Ie(e,(n,i)=>{f.gt(n,i)&&(t.value=f.add(t.value,f.sub(n,i)))}),t}const ws=new f("10^^8"),xs=new f("1e100");function Ns(e,t){const n=O(0),i=O(0),r=O(0);return ge.on("update",o=>{if(i.value=0,f.lte(e.value,xs)){r.value=e.value;return}let s=e.value,u=r.value;if(r.value=s,f.gt(s,u))if(f.gte(s,ws))s=f.slog(s,1e10),u=f.slog(u,1e10),n.value=s.sub(u).div(o),i.value=-1;else for(;f.div(s,u).log(10).div(o).gte("100")&&i.value<=5&&f.gt(u,0);)s=f.log10(s),u=f.log10(u),n.value=s.sub(u).div(o),i.value++}),N(()=>i.value===0?t?se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":se(n.value)+" OOM"+(i.value<0?"^OOM":"^"+i.value)+"s/sec")}function je(e,t){const n=t!=null?t:e.value;return f.eq(e.precision,0)?ve(n):se(n,e.precision,e.small)}const Ss=["x1","y1","x2","y2"],Cs=E({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=ne(e),i=N(()=>{const a=n.startNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetStart&&(s.x+=n.link.value.offsetStart.x,s.y+=n.link.value.offsetStart.y),s}),r=N(()=>{const a=n.endNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetEnd&&(s.x+=n.link.value.offsetEnd.x,s.y+=n.link.value.offsetEnd.y),s});return(a,o)=>(g(),x("line",Be({"stroke-width":"15px",stroke:"white"},e.link,{x1:l(i).x,y1:l(i).y,x2:l(r).x,y2:l(r).y}),null,16,Ss))}});const $s=E({__name:"Links",props:{links:null},setup(e){var u;const n=Ze(e,"links"),i=O(null),r=jt(hn,O({})),a=jt(bn,O(void 0)),o=O((u=i.value)==null?void 0:u.getBoundingClientRect());Ie(a,()=>{var c;return o.value=(c=i.value)==null?void 0:c.getBoundingClientRect()}),Tt(()=>{var c;return o.value=(c=i.value)==null?void 0:c.getBoundingClientRect()});const s=N(()=>{var h,v;const c=r.value;return(v=(h=n.value)==null?void 0:h.filter(b=>{var w,S;return((w=c[b.startNode.id])==null?void 0:w.rect)&&((S=c[b.startNode.id])==null?void 0:S.rect)}))!=null?v:[]});return(c,h)=>(g(),x(K,null,[l(s)?(g(),x("svg",ji(Be({key:0},c.$attrs)),[(g(!0),x(K,null,kt(l(s),(v,b)=>(g(),A(Cs,{key:b,link:v,boundingRect:o.value,startNode:l(r)[v.startNode.id],endNode:l(r)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):P("",!0),p("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var _i=q($s,[["__scopeId","data-v-c139d80e"]]),Ms=E({props:{nodes:{type:k(Array),required:!0},leftSideNodes:k(Array),rightSideNodes:k(Array),branches:k(Array)},components:{Links:_i},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:i}=ne(e),r=xe();Ne(()=>{const s=ae(t);r.value=D(L(()=>d(K,null,[s.map(u=>d("span",{class:"row tree-row",style:"margin: 50px auto;"},[u.map(Re)]))])))});const a=xe();Ne(()=>{const s=ae(n);a.value=s?D(L(()=>d("span",{class:"left-side-nodes small"},[s.map(Re)]))):""});const o=xe();return Ne(()=>{const s=ae(i);o.value=s?D(L(()=>d("span",{class:"side-nodes small"},[s.map(Re)]))):""}),{unref:l,nodesComp:r,leftNodesComp:a,rightNodesComp:o}}});function Ts(e,t,n,i,r,a){const o=ce("Links");return g(),x(K,null,[(g(),A(ee(e.nodesComp))),e.leftNodesComp?(g(),A(ee(e.leftNodesComp),{key:0})):P("",!0),e.rightNodesComp?(g(),A(ee(e.rightNodesComp),{key:1})):P("",!0),e.branches?(g(),A(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):P("",!0)],64)}var Is=q(Ms,[["render",Ts],["__scopeId","data-v-39ca96d0"]]);const Ps={key:0},Os={key:0,class:"mark star"},As=["src"],Es=E({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(g(),x("div",Ps,[e.mark===!0?(g(),x("div",Os)):(g(),x("img",{key:1,class:"mark",src:e.mark},null,8,As))])):P("",!0)}});var ft=q(Es,[["__scopeId","data-v-2207999f"]]);const Vs=E({__name:"Node",props:{id:null},setup(e){const n=ne(e),i=jt(gn,()=>{}),r=jt(vn,()=>{}),a=O(null),o=N(()=>a.value&&a.value.parentElement);return Ie([o,n.id],([s,u],[c,h])=>{c&&r(l(h)),s&&i(u,s)}),Gn(()=>r(l(n.id))),(s,u)=>(g(),x("div",{class:"node",ref_key:"node",ref:a},null,512))}});var Ge=q(Vs,[["__scopeId","data-v-2cb1bb79"]]);const Fs=E({props:{display:k(Object,String,Function),visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),onClick:Function,onHold:Function,color:k(String),glowColor:k(String),canClick:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{onClick:t,onHold:n,display:i}=ne(e),r=it(i),{start:a,stop:o}=mn(t,n);return{start:a,stop:o,comp:r,unref:l,Visibility:B,isCoercableComponent:Te}}});function Ds(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:Q({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c))},[p("div",{style:W([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(u=e.unref(e.style))!=null?u:[]])},[(g(),A(ee(e.unref(e.comp))))],4),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],38)):P("",!0)}var Rs=q(Fs,[["render",Ds],["__scopeId","data-v-1c0c107d"]]);const Bs=Symbol("TreeNode"),qs=Symbol("Tree");function yt(e){return le(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=he("treeNode-"),t.type=Bs,t[de]=Rs,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"canClick"),z(t,"canClick",!0),y(t,"color"),y(t,"display"),y(t,"glowColor"),y(t,"classes"),y(t,"style"),y(t,"mark"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(){l(t.canClick)&&i()}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){l(t.canClick)&&i()}}return t[me]=function(){const{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,color:c,glowColor:h,canClick:v,mark:b,id:w}=this;return{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,color:c,glowColor:h,canClick:v,mark:b,id:w}},t})}function ki(e){return le(()=>{const t=e();return t.id=he("tree-"),t.type=qs,t[de]=Is,t.isResetting=O(!1),t.resettingNode=xe(null),t.reset=function(n){var r,a;const i=t;i.isResetting.value=!0,i.resettingNode.value=n,(r=i.resetPropagation)==null||r.call(i,i,n),(a=i.onReset)==null||a.call(i,n),i.isResetting.value=!1,i.resettingNode.value=null},t.links=N(()=>{var i;return(i=l(t.branches))!=null?i:[]}),y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"nodes"),y(t,"leftSideNodes"),y(t,"rightSideNodes"),y(t,"branches"),t[me]=function(){const{nodes:n,leftSideNodes:i,rightSideNodes:r,branches:a}=this;return{nodes:n,leftSideNodes:i,rightSideNodes:r,branches:a}},t})}const Ls=function(e,t){const n=[t];let i=[t];if(e.branches!=null){const r=l(e.branches);for(;i.length>0;){const a=[];i.forEach(o=>{r.filter(s=>s.startNode===o||s.endNode===o).map(s=>s.startNode===o?s.endNode:s.startNode).filter(s=>!n.includes(s)).forEach(s=>{var u;a.includes(s)||(a.push(s),(u=s.reset)==null||u.reset())})}),i=a,n.push(...i)}}};function wi(e,t=null,n=0){const i=Me(n);return N(()=>t==null||f.gte(e.value,l(i))?je(e)+" "+e.displayName:`Reach ${f.eq(t.precision,0)?ve(l(i)):se(l(i),t.precision)} ${t.displayName} to unlock (You have ${f.eq(t.precision,0)?ve(t.value):se(t.value,t.precision)})`)}const js=E({props:{visibility:{type:k(Number),required:!0},display:k(Object,String,Function),earned:{type:k(Boolean),required:!0},image:k(String),style:k(String,Object,Array),classes:k(Object),mark:k(Boolean,String),id:{type:String,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t}=ne(e);return{component:it(t),unref:l,Visibility:B}}});function zs(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(u=e.unref(e.style))!=null?u:[]]),class:Q({feature:!0,achievement:!0,locked:!e.unref(e.earned),bought:e.unref(e.earned),...e.unref(e.classes)})},[e.component?(g(),A(ee(e.component),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var Us=q(js,[["render",zs],["__scopeId","data-v-58163dab"]]);ge.on("setupVue",e=>e.use(Zi));function wn(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}function Gs(){return wn("red","20px")}const Hs=fn(),Ws=Symbol("Achievement");function rn(e){const t=ue(!1);return le(()=>{var i;const n=(i=e==null?void 0:e())!=null?i:{};if(n.id=he("achievement-"),n.type=Ws,n[de]=Us,n.earned=t,n.complete=function(){t.value=!0},y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"display"),y(n,"mark"),y(n,"image"),y(n,"style"),y(n,"classes"),n[me]=function(){const{visibility:r,display:a,earned:o,image:s,style:u,classes:c,mark:h,id:v}=this;return{visibility:r,display:a,earned:o,image:s,style:l(u),classes:c,mark:h,id:v}},n.shouldEarn){const r=n;Ne(()=>{var a,o;if(Z.active===T.id&&!r.earned.value&&l(r.visibility)===B.Visible&&((a=r.shouldEarn)==null?void 0:a.call(r))&&(r.earned.value=!0,(o=r.onComplete)==null||o.call(r),r.display)){const s=D(l(r.display));Hs.info(d("div",null,[d("h3",null,[C("Achievement earned!")]),d("div",null,[d(s,null,null)])]))}})}return n})}const Ys=E({props:{visibility:{type:k(Number),required:!0},onClick:Function,onHold:Function,display:{type:k(Object,String,Function),required:!0},title:k(Object,String,Function),style:k(String,Object,Array),canClick:{type:k(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Ge},setup(e){const{onClick:t,onHold:n,title:i,display:r}=ne(e),{start:a,stop:o}=mn(t,n),s=it(i),u=ct(r);return{start:a,stop:o,titleComponent:s,component:u,Visibility:B,unref:l}}}),Ks={key:0};function Zs(e,t,n,i,r,a){var s;const o=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,class:Q({feature:!0,tile:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick)}),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),onClick:t[0]||(t[0]=(...u)=>e.onClick&&e.onClick(...u)),onMousedown:t[1]||(t[1]=(...u)=>e.start&&e.start(...u)),onMouseleave:t[2]||(t[2]=(...u)=>e.stop&&e.stop(...u)),onMouseup:t[3]||(t[3]=(...u)=>e.stop&&e.stop(...u)),onTouchstartPassive:t[4]||(t[4]=(...u)=>e.start&&e.start(...u)),onTouchendPassive:t[5]||(t[5]=(...u)=>e.stop&&e.stop(...u)),onTouchcancelPassive:t[6]||(t[6]=(...u)=>e.stop&&e.stop(...u))},[e.title?(g(),x("div",Ks,[(g(),A(ee(e.titleComponent)))])):P("",!0),(g(),A(ee(e.component),{style:{"white-space":"pre-line"}})),d(o,{id:e.id},null,8,["id"])],38)):P("",!0)}var Js=q(Ys,[["render",Zs],["__scopeId","data-v-26ac0e82"]]);const Xs=E({props:{visibility:{type:k(Number),required:!0},rows:{type:k(Number),required:!0},cols:{type:k(Number),required:!0},cells:{type:k(Object),required:!0}},components:{GridCell:Js},setup(){const e=N(()=>ze[Z.theme].mergeAdjacent);function t(n){const{visibility:i,onClick:r,onHold:a,display:o,title:s,style:u,canClick:c,id:h}=n;return{visibility:i,onClick:r,onHold:a,display:o,title:s,style:u,canClick:c,id:h}}return{unref:l,gatherCellProps:t,Visibility:B,mergeAdjacent:e}}});function Qs(e,t,n,i,r,a){const o=ce("GridCell");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[(g(!0),x(K,null,kt(e.unref(e.rows),s=>(g(),x("div",{class:Q(["row",{mergeAdjacent:e.mergeAdjacent}]),key:s},[(g(!0),x(K,null,kt(e.unref(e.cols),u=>(g(),A(o,Be({key:u},e.gatherCellProps(e.unref(e.cells)[s*100+u])),null,16))),128))],2))),128))],4)):P("",!0)}var el=q(Xs,[["render",Qs]]);function tl(e){return new Proxy({},nl(e))}function nl(e){const t=N(()=>{const n=[];for(let i=1;i<=l(e.rows);i++)for(let r=1;r<=l(e.cols);r++)n.push((i*100+r).toString());return n});return{get(n,i){if(i==="isProxy")return!0;if(typeof i=="symbol")return e[i];if(!!t.value.includes(i.toString()))return n[i]==null&&(n[i]=new Proxy(e,il(i.toString()))),n[i]},set(n,i,r){return console.warn("Cannot set grid cells",n,i,r),!1},ownKeys(){return t.value},has(n,i){return t.value.includes(i.toString())},getOwnPropertyDescriptor(n,i){if(t.value.includes(i.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function il(e){const t=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],n={};return{get(i,r,a){if(r==="isProxy")return!0;let o=i[r];return tt(o)?()=>o.call(a,e,i.getState(e)):o!=null||typeof r=="symbol"?o:(r=r.slice(0,1).toUpperCase()+r.slice(1),r==="startState"?o.call(a,e):(o=i[`get${r}`],tt(o)?(r in n||(n[r]=N(()=>o.call(a,e,i.getState(e)))),n[r].value):o!=null?l(o):(o=i[`on${r}`],tt(o)?()=>o.call(a,e,i.getState(e)):o!=null?o:i[r])))},set(i,r,a,o){return r=`set${r.slice(0,1).toUpperCase()+r.slice(1)}`,r in i&&tt(i[r])&&i[r].length<3?(i[r].call(o,e,a),!0):(console.warn(`No setter for "${r}".`,i),!1)},ownKeys(){return t},has(i,r){return t.includes(r.toString())},getOwnPropertyDescriptor(i,r){if(t.includes(r.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function rl(e){const t=ue({});return le(()=>{const n=e();if(n.id=he("grid-"),n[de]=el,n.cellState=t,n.getID=function(i){return n.id+"-"+i},n.getState=function(i){return this.cellState.value[i]!=null?t.value[i]:this.cells[i].startState},n.setState=function(i,r){t.value[i]=r},n.cells=tl(n),y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"rows"),y(n,"cols"),y(n,"getVisibility"),z(n,"getVisibility",B.Visible),y(n,"getCanClick"),z(n,"getCanClick",!0),y(n,"getStartState"),y(n,"getStyle"),y(n,"getClasses"),y(n,"getTitle"),y(n,"getDisplay"),n.onClick){const i=n.onClick.bind(n);n.onClick=function(r,a){l(n.cells[r].canClick)&&i(r,a)}}if(n.onHold){const i=n.onHold.bind(n);n.onHold=function(r,a){l(n.cells[r].canClick)&&i(r,a)}}return n[me]=function(){const{visibility:i,rows:r,cols:a,cells:o,id:s}=this;return{visibility:i,rows:r,cols:a,cells:o,id:s}},n})}var al=E({props:{display:{type:k(Object,String,Function),required:!0},visibility:{type:k(Number),required:!0},style:k(Object,String,Array),classes:k(Object),onClick:Function,onHold:Function,canClick:{type:k(Boolean),required:!0},small:Boolean,mark:k(Boolean,String),id:{type:String,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t,onClick:n,onHold:i}=ne(e),r=xe("");Ne(()=>{const s=ae(t);if(s==null){r.value="";return}if(Te(s)){r.value=D(s);return}const u=D(s.title||"","h3"),c=D(s.description,"div");r.value=D(L(()=>d("span",null,[s.title?d("div",null,[d(u,null,null)]):null,d(c,null,null)])))});const{start:a,stop:o}=mn(n,i);return{start:a,stop:o,comp:r,Visibility:B,unref:l}}});function ol(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[]]),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c)),class:Q({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(g(),A(ee(e.unref(e.comp)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],38)):P("",!0)}var xi=q(al,[["render",ol],["__scopeId","data-v-5e7c90cf"]]);const sl=Symbol("Clickable");function $t(e){return le(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=he("clickable-"),t.type=sl,t[de]=xi,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"canClick"),z(t,"canClick",!0),y(t,"classes"),y(t,"style"),y(t,"mark"),y(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(r){l(t.canClick)&&i(r)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){l(t.canClick)&&i()}}return t[me]=function(){const{display:i,visibility:r,style:a,classes:o,onClick:s,onHold:u,canClick:c,small:h,mark:v,id:b}=this;return{display:i,visibility:r,style:l(a),classes:o,onClick:s,onHold:u,canClick:c,small:h,mark:v,id:b}},t})}function Ni(e){return $t(()=>{const t=e();y(t,"showNextAt"),z(t,"showNextAt",!0),z(t,"minimumGain",1),t.resetDescription==null?t.resetDescription=N(()=>f.lt(t.conversion.gainResource.value,1e3)?"Reset for ":""):y(t,"resetDescription"),t.display==null&&(t.display=L(()=>d("span",null,[l(t.resetDescription),d("b",null,[je(t.conversion.gainResource,f.max(l(t.conversion.actualGain),l(t.minimumGain)))])," ",t.conversion.gainResource.displayName,l(t.showNextAt)?d("div",null,[d("br",null,null),l(t.conversion.buyMax)?"Next:":"Req:"," ",je(t.conversion.baseResource,l(t.conversion.buyMax)||f.floor(l(t.conversion.actualGain)).neq(1)?l(t.conversion.nextAt):l(t.conversion.currentAt))," ",t.conversion.baseResource.displayName]):null]))),t.canClick==null&&(t.canClick=N(()=>f.gte(l(t.conversion.actualGain),l(t.minimumGain))));const n=t.onClick;return t.onClick=function(){!l(t.canClick)||(t.conversion.convert(),t.tree.reset(t.treeNode),t.resetTime&&(t.resetTime.value=t.resetTime[St]),n==null||n())},t})}function Si(e){return yt(()=>{const t=e();return y(t,"display"),z(t,"display",t.layerID),y(t,"append"),{...t,display:t.display,onClick:l(t.append)?function(){if(T.tabs.includes(t.layerID)){const n=T.tabs.lastIndexOf(t.layerID);T.tabs.splice(n,1)}else T.tabs.push(t.layerID)}:function(){T.tabs.splice(1,1,t.layerID)}}})}function Ci(e){return le(()=>{const t=e();return t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=f.floor(n).max(0),l(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=N(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=f.ceil(n)),n})),t.nextAt==null&&(t.nextAt=N(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=f.ceil(n)),n})),t.convert==null&&(t.convert=function(){var i;const n=l(t.currentGain);t.gainResource.value=f.add(t.gainResource.value,n),t.spend(n),(i=t.onConvert)==null||i.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),y(t,"currentGain"),y(t,"actualGain"),y(t,"currentAt"),y(t,"nextAt"),y(t,"buyMax"),z(t,"buyMax",!0),y(t,"roundUpCost"),z(t,"roundUpCost",!0),t})}function $i(e,t){const n=Me(e),i=Me(t);return{currentGain(r){let a=l(r.baseResource.value);if(r.costModifier&&(a=r.costModifier.apply(a)),f.lt(a,l(n)))return 0;const o=f.div(a,l(n)).pow(l(i));return o.isNan()?new f(0):o},currentAt(r){let a=l(r.currentGain);return r.gainModifier&&(a=r.gainModifier.revert(a)),a=f.max(0,a).root(l(i)).times(l(n)),r.costModifier&&(a=r.costModifier.revert(a)),a},nextAt(r){let a=f.add(l(r.currentGain),1).floor();return r.gainModifier&&(a=r.gainModifier.revert(a)),a=f.max(0,a).root(l(i)).times(l(n)).max(l(n)),r.costModifier&&(a=r.costModifier.revert(a)),a}}}function ll(e){return Ci(e)}function ul(e){return Ci(()=>{const t=e();return z(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=f.floor(n).max(t.gainResource.value),l(t.buyMax)||(n=n.min(f.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=N(()=>{let n=f.sub(f.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return l(t.buyMax)||(n=n.min(1)),n})),z(t,"convert",function(){var i;const n=l(t.actualGain);t.gainResource.value=t.gainModifier?t.gainModifier.apply(l(t.currentGain)):l(t.currentGain),t.spend(n),(i=t.onConvert)==null||i.call(t,n)}),t})}function dl(e,t,n=.5){return f.lte(e,t)?e:f.pow(e,n).times(f.pow(t,f.sub(1,n)))}function cl(e,t,n=.5){return{...e,currentGain:i=>dl(e.currentGain(i),l(t),l(n))}}const fl=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(Object,String,Function),required:!0},title:{type:k(Object,String,Function),required:!0},color:k(String),collapsed:{type:Object,required:!0},style:k(Object,String,Array),titleStyle:k(Object,String,Array),bodyStyle:k(Object,String,Array),classes:k(Object),id:{type:String,required:!0}},components:{Node:Ge,CollapseTransition:Hi},setup(e){const{title:t,display:n}=ne(e),i=ct(t),r=ct(n),a=N(()=>ze[Z.theme].mergeAdjacent);return{titleComponent:i,bodyComponent:r,stacked:a,unref:l,Visibility:B}}}),pl=e=>(qe("data-v-338c9154"),e=e(),Le(),e),ml=pl(()=>p("span",{class:"toggle"},"\u25BC",-1));function gl(e,t,n,i,r,a){var u;const o=ce("CollapseTransition"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,class:Q(["infobox",{collapsed:e.unref(e.collapsed),stacked:e.stacked,...e.unref(e.classes)}]),style:W([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}])},[p("button",{class:"title",style:W([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:t[0]||(t[0]=c=>e.collapsed.value=!e.unref(e.collapsed))},[ml,(g(),A(ee(e.titleComponent)))],4),d(o,null,{default:V(()=>[e.unref(e.collapsed)?P("",!0):(g(),x("div",{key:0,class:"body",style:W({backgroundColor:e.unref(e.color)})},[(g(),A(ee(e.bodyComponent),{style:W(e.unref(e.bodyStyle))},null,8,["style"]))],4))]),_:1}),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var vl=q(fl,[["render",gl],["__scopeId","data-v-338c9154"]]);const hl=Symbol("Infobox");function Mi(e){const t=ue(!1);return le(()=>{const n=e();return n.id=he("infobox-"),n.type=hl,n[de]=vl,n.collapsed=t,y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"color"),y(n,"style"),y(n,"titleStyle"),y(n,"bodyStyle"),y(n,"classes"),y(n,"title"),y(n,"display"),n[me]=function(){const{visibility:i,display:r,title:a,color:o,collapsed:s,style:u,titleStyle:c,bodyStyle:h,classes:v,id:b}=this;return{visibility:i,display:r,title:a,color:o,collapsed:s,style:l(u),titleStyle:c,bodyStyle:h,classes:v,id:b}},n})}var bl=E({props:{style:k(String,Object,Array),classes:k(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=O(null),n=new ResizeObserver(a),i=O(null);Tt(()=>{var s,u;const o=i.value;o!=null&&(n.observe(o),t.value=new Ji({resizeTo:o,backgroundAlpha:0}),(s=i.value)==null||s.appendChild(t.value.view),(u=e.onInit)==null||u.call(e,t.value)),a(),e.onHotReload&&Ve(e.onHotReload)}),zi(()=>{var o;(o=t.value)==null||o.destroy()});let r=!0;function a(){r&&(r=!1,Ve(()=>{var o;i.value!=null&&e.onContainerResized&&(e.onContainerResized(i.value.getBoundingClientRect()),(o=t.value)==null||o.resize()),r=!0}))}return document.fonts.ready.then(a),{unref:l,resizeListener:i}}});function yl(e,t,n,i,r,a){return g(),x("div",{ref:"resizeListener",class:Q(["resize-listener",e.unref(e.classes)]),style:W(e.unref(e.style))},null,6)}var _l=q(bl,[["render",yl],["__scopeId","data-v-8adf21fa"]]);const kl=Symbol("Particles");function wl(e){return le(()=>{var r,a;const t=(r=e==null?void 0:e())!=null?r:{};t.id=he("particles-"),t.type=kl,t[de]=_l,t.app=xe(null),t.addEmitter=o=>{const s=t;return s.app.value?Promise.resolve(new Vn(s.app.value.stage,o)):new Promise(u=>{n.push({resolve:u,config:o})})};let n=[];function i(o){t.app.value=o,n.forEach(({resolve:s,config:u})=>s(new Vn(o.stage,u))),n=[]}return t.onContainerResized=(a=t.onContainerResized)==null?void 0:a.bind(t),t[me]=function(){const{id:o,style:s,classes:u,onContainerResized:c,onHotReload:h}=this;return{id:o,style:l(s),classes:u,onContainerResized:c,onHotReload:h,onInit:i}},t})}window.upgradeConfig=Xi;const xl=Symbol("Reset");function Ti(e){return le(()=>{const t=e();return t.id=he("reset-"),t.type=xl,t.reset=function(){var i;const n=r=>{r&&typeof r=="object"&&(Nt in r?r[Nt].value=r[St]:!(r instanceof f)&&!pe(r)&&Object.values(r).forEach(a=>n(a)))};l(t.thingsToReset).forEach(n),ge.emit("reset",t),(i=t.onReset)==null||i.call(t)},y(t,"thingsToReset"),t})}const Dt={};ge.on("removeLayer",e=>{var t;(t=Dt[e.id])==null||t.call(Dt),Dt[e.id]=void 0});const Nl=E({__name:"Sticky",setup(e){const t=O("0"),n=new ResizeObserver(r),i=O(null);function r(){let a=i.value;if(a==null)return;let o=0;for(;a.previousSibling;){const s=a.previousSibling;s.dataset&&"vSticky"in s.dataset&&(o+=s.offsetHeight),a=s}t.value=o+"px"}return Ve(r),document.fonts.ready.then(r),Tt(()=>{var o;const a=(o=i.value)==null?void 0:o.parentElement;a&&n.observe(a)}),(a,o)=>(g(),x("div",{class:"sticky",style:W({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[De(a.$slots,"default",{},void 0,!0)],4))}});var Wt=q(Nl,[["__scopeId","data-v-21495571"]]);const Ii=E({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=N(()=>je(t.resource));return(i,r)=>(g(),x("h2",{style:W({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},U(l(n)),5))}});const Sl={class:"main-display"},Cl={key:0},$l={key:1},Ml=C(", "),Pi=E({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ne(e),i=O(null),r=it(n.effectDisplay),a=N(()=>f.lt(n.resource.value,"1e1000"));return(o,s)=>(g(),A(Wt,null,{default:V(()=>{var u,c;return[p("div",{class:"main-display-container",style:W({height:`${((c=(u=i.value)==null?void 0:u.$el.clientHeight)!=null?c:0)+50}px`})},[p("div",Sl,[l(a)?(g(),x("span",Cl,"You have ")):P("",!0),d(Ii,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),C(" "+U(e.resource.displayName),1),l(r)?(g(),x("span",$l,[Ml,(g(),A(ee(l(r)),{ref_key:"effectRef",ref:i},null,512))])):P("",!0)])],4)]}),_:1}))}});function un(e,t){return y(t,"display"),y(t,"classes"),y(t,"style"),y(t,"direction"),z(t,"direction",X.Up),y(t,"xoffset"),y(t,"yoffset"),t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1):e.pinned=t.pinned=ue(!1)),Ve(()=>{const n=e[de];e[de]=re;const i=e[me].bind(e);e[me]=function(){const{display:a,classes:o,style:s,direction:u,xoffset:c,yoffset:h,pinned:v}=this;return{element:{[de]:n,[me]:i},display:a,classes:o,style:l(s),direction:u,xoffset:c,yoffset:h,pinned:v}}.bind(t)}),t}function Tl(e){return le(()=>{const{addend:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.add(s,l(r)),revert:s=>f.sub(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[f.gte(l(r),0)?"+":"",se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Il(e){return le(()=>{const{multiplier:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.times(s,l(r)),revert:s=>f.div(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[C("x"),se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Pl(e){return le(()=>{const{exponent:t,description:n,enabled:i}=e(),r=Me(t),a=Me(n),o=i==null?void 0:Me(i);return{apply:s=>f.pow(s,l(r)),revert:s=>f.root(s,l(r)),enabled:o,description:n==null?void 0:L(()=>d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[C("^"),se(l(r))]),l(a)?d("span",{class:"modifier-description"},[Re(l(a))]):null]))}})}function Ol(e){return le(()=>{const t=e();return{apply:n=>t.filter(i=>l(i.enabled)!==!1).reduce((i,r)=>r.apply(i),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(i=>l(i.enabled)!==!1).reduceRight((i,r)=>r.revert(i),n):void 0,enabled:N(()=>t.filter(n=>l(n.enabled)!==!1).length>0),description:L(()=>d(K,null,[t.filter(n=>l(n.enabled)!==!1).map(n=>l(n.description)).filter(n=>n).map(Re)]))}})}function Al(e,t,n,i=1,r="",a="Base"){return d("div",null,[d("h3",null,[e,t?d("span",{class:"subtitle"},[C(" ("),t,C(")")]):null]),d("br",null,null),d("div",{class:"modifier-container"},[d("span",{class:"modifier-amount"},[se(i),r]),d("span",{class:"modifier-description"},[Re(a)])]),Re(l(n.description)),d("hr",null,null),C("Total: "),se(n.apply(i)),r])}const El={class:"field"},Vl={key:0,class:"field-title"},Fl=["min","max"],Dl=E({__name:"Slider",props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:t}){const i=ne(e),r=N({get(){return String(l(i.modelValue)||0)},set(a){t("update:modelValue",Number(a))}});return(a,o)=>(g(),x("div",El,[e.title?(g(),x("span",Vl,U(e.title),1)):P("",!0),d(re,{display:`${l(r)}`,class:Q({fullWidth:!e.title}),direction:l(X).Down},{default:V(()=>[Kt(p("input",{type:"range","onUpdate:modelValue":o[0]||(o[0]=s=>pe(r)?r.value=s:null),min:e.min,max:e.max},null,8,Fl),[[Hn,l(r)]])]),_:1},8,["display","class","direction"])]))}});var Rl=q(Dl,[["__scopeId","data-v-1b053b9f"]]);const Bl=E({__name:"VerticalRule",props:{height:null},setup(e){return(t,n)=>(g(),x("div",{class:"vr",style:W({height:e.height})},null,4))}});var ql=q(Bl,[["__scopeId","data-v-5e0a978a"]]);const Ll=E({props:{progress:{type:k(String,Object,Number),required:!0},width:{type:k(Number),required:!0},height:{type:k(Number),required:!0},direction:{type:k(String),required:!0},display:k(Object,String,Function),visibility:{type:k(Number),required:!0},style:k(Object,String,Array),classes:k(Object),borderStyle:k(Object,String,Array),textStyle:k(Object,String,Array),baseStyle:k(Object,String,Array),fillStyle:k(Object,String,Array),mark:k(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{progress:t,width:n,height:i,direction:r,display:a}=ne(e),o=N(()=>{let c=t.value instanceof f?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(c,0),1))*100}),s=N(()=>{const c={width:ae(n)+.5+"px",height:ae(i)+.5+"px"};switch(l(r)){case X.Up:c.clipPath=`inset(${o.value}% 0% 0% 0%)`,c.width=ae(n)+1+"px";break;case X.Down:c.clipPath=`inset(0% 0% ${o.value}% 0%)`,c.width=ae(n)+1+"px";break;case X.Right:c.clipPath=`inset(0% ${o.value}% 0% 0%)`;break;case X.Left:c.clipPath=`inset(0% 0% 0% ${o.value} + '%)`;break;case X.Default:c.clipPath="inset(0% 50% 0% 0%)";break}return c}),u=it(a);return{normalizedProgress:o,barStyle:s,component:u,unref:l,Visibility:B}}});function jl(e,t,n,i,r,a){var u,c,h,v,b,w,S;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),class:Q({bar:!0,...e.unref(e.classes)})},[p("div",{class:"overlayTextContainer border",style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(c=e.unref(e.borderStyle))!=null?c:{}])},[e.component?(g(),x("span",{key:0,class:"overlayText",style:W(e.unref(e.textStyle))},[(g(),A(ee(e.component)))],4)):P("",!0)],4),p("div",{class:"border",style:W([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(h=e.unref(e.style))!=null?h:{},(v=e.unref(e.baseStyle))!=null?v:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[p("div",{class:"fill",style:W([e.barStyle,(w=e.unref(e.style))!=null?w:{},(S=e.unref(e.fillStyle))!=null?S:{}])},null,4)],4),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var zl=q(Ll,[["render",jl],["__scopeId","data-v-02d0d7b2"]]);const Ul=Symbol("Bar");function an(e){return le(()=>{const t=e();return t.id=he("bar-"),t.type=Ul,t[de]=zl,y(t,"visibility"),z(t,"visibility",B.Visible),y(t,"width"),y(t,"height"),y(t,"direction"),y(t,"style"),y(t,"classes"),y(t,"borderStyle"),y(t,"baseStyle"),y(t,"textStyle"),y(t,"fillStyle"),y(t,"progress"),y(t,"display"),y(t,"mark"),t[me]=function(){const{progress:n,width:i,height:r,direction:a,display:o,visibility:s,style:u,classes:c,borderStyle:h,textStyle:v,baseStyle:b,fillStyle:w,mark:S,id:$}=this;return{progress:n,width:i,height:r,direction:a,display:o,visibility:s,style:l(u),classes:c,borderStyle:h,textStyle:v,baseStyle:b,fillStyle:w,mark:S,id:$}},t})}const Gl=Symbol("Buyable");function Hl(e){const t=ue(0);return le(()=>{var a,o;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=he("buyable-"),n.type=Gl,n[de]=xi,n.amount=t,n.canAfford=N(()=>{const s=n,u=l(s.cost);return s.resource!=null&&u!=null&&f.gte(s.resource.value,u)}),n.canPurchase==null&&(n.canPurchase=N(()=>l(n.visibility)===B.Visible&&l(n.canAfford)&&f.lt(n.amount.value,l(n.purchaseLimit)))),n.maxed=N(()=>f.gte(n.amount.value,l(n.purchaseLimit))),y(n,"classes");const i=n.classes;n.classes=N(()=>{const s=l(i)||{};return n.maxed.value&&(s.bought=!0),s}),y(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(o=(a=n.onClick)!=null?a:n.purchase)!=null?o:function(){var c;const s=n;if(!l(s.canPurchase))return;const u=l(s.cost);s.cost!=null&&s.resource!=null&&(s.resource.value=f.sub(s.resource.value,u),s.amount.value=f.add(s.amount.value,1)),(c=s.onPurchase)==null||c.call(s,u)},y(n,"display");const r=n.display;return n.display=L(()=>{const s=l(r);if(Te(s)){const u=D(s);return d(u,null,null)}if(s!=null&&n.cost!=null&&n.resource!=null){const u=n,c=D(s.title||"","h3"),h=D(s.description||""),v=D(s.effectDisplay||"");return d("span",null,[s.title?d("div",null,[d(c,null,null)]):null,s.description?d(h,null,null):null,s.showAmount===!1?null:d("div",null,[d("br",null,null),l(u.purchaseLimit)===f.dInf?d(K,null,[C("Amount: "),ve(u.amount.value)]):d(K,null,[C("Amount: "),ve(u.amount.value),C(" /")," ",ve(l(u.purchaseLimit))])]),s.effectDisplay?d("div",null,[d("br",null,null),C("Currently: "),d(v,null,null)]):null,u.cost&&!u.maxed.value?d("div",null,[d("br",null,null),C("Cost: "),se(l(u.cost)||0)," ",n.resource.displayName]):null])}return""}),y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"cost"),y(n,"resource"),y(n,"purchaseLimit"),z(n,"purchaseLimit",f.dInf),y(n,"style"),y(n,"mark"),y(n,"small"),n[me]=function(){const{display:s,visibility:u,style:c,classes:h,onClick:v,canClick:b,small:w,mark:S,id:$}=this;return{display:s,visibility:u,style:l(c),classes:h,onClick:v,canClick:b,small:w,mark:S,id:$}},n})}var Wl=E({props:{active:{type:k(Boolean),required:!0},maxed:{type:k(Boolean),required:!0},canComplete:{type:k(Boolean),required:!0},display:k(String,Object,Function),visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),completed:{type:k(Boolean),required:!0},canStart:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:ft,Node:Ge},setup(e){const{active:t,maxed:n,canComplete:i,display:r}=ne(e),a=N(()=>t.value?i.value?"Finish":"Exit Early":n.value?"Completed":"Start"),o=xe(""),s=N(()=>{const u=ae(t),c=ae(i);return u?c?Gs():wn():{}});return Ne(()=>{const u=ae(r);if(u==null){o.value="";return}if(Te(u)){o.value=D(u);return}const c=D(u.title||"","h3"),h=D(u.description,"div"),v=D(u.goal||""),b=D(u.reward||""),w=D(u.effectDisplay||"");o.value=D(L(()=>d("span",null,[u.title?d("div",null,[d(c,null,null)]):null,d(h,null,null),u.goal?d("div",null,[d("br",null,null),C("Goal: "),d(v,null,null)]):null,u.reward?d("div",null,[d("br",null,null),C("Reward: "),d(b,null,null)]):null,u.effectDisplay?d("div",null,[C("Currently: "),d(w,null,null)]):null])))}),{buttonText:a,notifyStyle:s,comp:o,Visibility:B,unref:l}}});const Yl=["disabled"];function Kl(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,(u=e.unref(e.style))!=null?u:{}]),class:Q({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&!e.unref(e.maxed),maxed:e.unref(e.maxed),...e.unref(e.classes)})},[p("button",{class:"toggleChallenge",onClick:t[0]||(t[0]=(...c)=>e.toggle&&e.toggle(...c)),disabled:!e.unref(e.canStart)||e.unref(e.maxed)},U(e.buttonText),9,Yl),e.unref(e.comp)?(g(),A(ee(e.unref(e.comp)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],6)):P("",!0)}var Zl=q(Wl,[["render",Kl],["__scopeId","data-v-4d2947df"]]);const Jl=Symbol("ChallengeType");function Xl(e){const t=ue(0),n=ue(!1);return le(()=>{const i=e();if(i.canComplete==null&&(i.resource==null||i.goal==null))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",i),"Cannot create challenge without a canComplete property or a resource and goal property";i.id=he("challenge-"),i.type=Jl,i[de]=Zl,i.completions=t,i.active=n,i.completed=N(()=>f.gt(i.completions.value,0)),i.maxed=N(()=>f.gte(i.completions.value,l(i.completionLimit))),i.toggle=function(){var o,s,u,c,h;const a=i;if(a.active.value){if(l(a.canComplete)&&!a.maxed.value){let v=l(a.canComplete);typeof v=="boolean"&&(v=1),a.completions.value=f.min(f.add(a.completions.value,v),l(a.completionLimit)),(o=a.onComplete)==null||o.call(a)}a.active.value=!1,(s=a.onExit)==null||s.call(a),(u=a.reset)==null||u.reset()}else l(a.canStart)&&l(a.visibility)===B.Visible&&!a.maxed.value&&((c=a.reset)==null||c.reset(),a.active.value=!0,(h=a.onEnter)==null||h.call(a))},i.complete=function(a){var u,c,h;const o=i;let s=l(o.canComplete);o.active.value&&s!==!1&&(s===!0||f.neq(0,s))&&!o.maxed.value&&(typeof s=="boolean"&&(s=1),o.completions.value=f.min(f.add(o.completions.value,s),l(o.completionLimit)),(u=o.onComplete)==null||u.call(o),a!==!0&&(o.active.value=!1,(c=o.onExit)==null||c.call(o),(h=o.reset)==null||h.reset()))},y(i,"visibility"),z(i,"visibility",B.Visible);const r=i.visibility;return i.visibility=N(()=>Z.hideChallenges===!0&&l(i.maxed)?B.None:l(r)),i.canComplete==null&&(i.canComplete=N(()=>{const a=i;return!a.active.value||a.resource==null||a.goal==null?!1:f.gte(a.resource.value,l(a.goal))})),i.mark==null&&(i.mark=N(()=>f.gt(l(i.completionLimit),1)&&!!l(i.maxed))),y(i,"canStart"),z(i,"canStart",!0),y(i,"canComplete"),y(i,"completionLimit"),z(i,"completionLimit",1),y(i,"mark"),y(i,"goal"),y(i,"classes"),y(i,"style"),y(i,"display"),i.reset!=null&&ge.on("reset",a=>{a===i.reset&&i.active.value&&i.toggle()}),i[me]=function(){const{active:a,maxed:o,canComplete:s,display:u,visibility:c,style:h,classes:v,completed:b,canStart:w,mark:S,id:$,toggle:R}=this;return{active:a,maxed:o,canComplete:s,display:u,visibility:c,style:l(h),classes:v,completed:b,canStart:w,mark:S,id:$,toggle:R}},i})}ge.on("loadSettings",e=>{z(e,"hideChallenges",!1)});si(L(()=>d(we,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>Z.hideChallenges=e,modelValue:Z.hideChallenges},null)));const Xt=Yt({}),xn=Symbol("Hotkey");function Ln(e){return le(()=>{const t=e();return t.type=xn,y(t,"enabled"),z(t,"enabled",!0),y(t,"description"),t})}ge.on("addLayer",e=>{ti(e,xn).forEach(t=>{Xt[t.key]=t})});ge.on("removeLayer",e=>{ti(e,xn).forEach(t=>{Xt[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||Nn.value&&!T.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=Xt[t];n&&l(n.enabled)&&(e.preventDefault(),n.onPress())};ea(L(()=>{const e=Object.values(Xt).filter(t=>l(t==null?void 0:t.enabled));return e.length===0?"":d("div",null,[d("br",null,null),d("h4",null,[C("Hotkeys")]),e.map(t=>d("div",null,[t==null?void 0:t.key,C(": "),t==null?void 0:t.description]))])}));const Ql=Symbol("Links");function eu(e){return le(()=>{const t=e();return t.type=Ql,t[de]=_i,y(t,"links"),t[me]=function(){const{links:n}=this;return{links:n}},t})}var tu=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(String,Object,Function),required:!0},style:k(String,Object,Array),classes:k(Object),earned:{type:k(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Ge},setup(e){const{display:t}=ne(e),n=xe("");return Ne(()=>{const i=ae(t);if(i==null){n.value="";return}if(Te(i)){n.value=D(i);return}const r=D(i.requirement,"h3"),a=D(i.effectDisplay||"","b"),o=D(i.optionsDisplay||"","span");n.value=D(L(()=>d("span",null,[d(r,null,null),i.effectDisplay?d("div",null,[d(a,null,null)]):null,i.optionsDisplay?d("div",{class:"equal-spaced"},[d(o,null,null)]):null])))}),{comp:n,unref:l,Visibility:B}}});function nu(e,t,n,i,r,a){var s;const o=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),class:Q({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(g(),A(ee(e.unref(e.comp)))),d(o,{id:e.id},null,8,["id"])],6)):P("",!0)}var iu=q(tu,[["render",nu],["__scopeId","data-v-f4e8794e"]]);const ru=fn(),au=Symbol("Milestone");let Ke;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Ke||(Ke={}));function jn(e){const t=ue(!1);return le(()=>{var r;const n=(r=e==null?void 0:e())!=null?r:{};n.id=he("milestone-"),n.type=au,n[de]=iu,n.earned=t,n.complete=function(){t.value=!0},y(n,"visibility"),z(n,"visibility",B.Visible);const i=n.visibility;if(n.visibility=N(()=>{const a=l(n.display);switch(Z.msDisplay){default:case Ke.All:return l(i);case Ke.Configurable:return l(n.earned)&&!(a!=null&&typeof a=="object"&&"optionsDisplay"in a)?B.None:l(i);case Ke.Incomplete:return l(n.earned)?B.None:l(i);case Ke.None:return B.None}}),y(n,"style"),y(n,"classes"),y(n,"display"),n[me]=function(){const{visibility:a,display:o,style:s,classes:u,earned:c,id:h}=this;return{visibility:a,display:o,style:l(s),classes:u,earned:c,id:h}},n.shouldEarn){const a=n;Ne(()=>{var o,s;if(Z.active===T.id&&!a.earned.value&&l(a.visibility)===B.Visible&&((o=a.shouldEarn)==null?void 0:o.call(a))&&(a.earned.value=!0,(s=a.onComplete)==null||s.call(a),a.display)){const u=l(a.display),c=D(Te(u)?u:u.requirement);ru(d(K,null,[d("h3",null,[C("Milestone earned!")]),d("div",null,[d(c,null,null)])]))}})}return n})}ge.on("loadSettings",e=>{z(e,"msDisplay",Ke.All)});const ou=Object.values(Ke).map(e=>({label:ei(e),value:e}));si(L(()=>d(yn,{title:"Show Milestones",options:ou,"onUpdate:modelValue":e=>Z.msDisplay=e,modelValue:Z.msDisplay},null)));const su=E({__name:"Tab",props:{display:null},setup(e){const t=e,{display:n}=ne(t),i=ct(n);return(r,a)=>(g(),A(ee(l(i))))}}),lu=Symbol("Tab");function Rt(e){return le(()=>{const t=e();return t.id=he("tab-"),t.type=lu,t[de]=su,t[me]=function(){const{display:n}=this;return{display:n}},t})}const uu=E({props:{visibility:{type:k(Number),required:!0},display:{type:k(Object,String,Function),required:!0},style:k(String,Object,Array),classes:k(Object),glowColor:k(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:i,floating:r}=ne(e),a=ct(n),o=N(()=>{const u=ae(i);return u?l(r)?wn(u):{boxShadow:`0px 9px 5px -6px ${u}`}:{}});function s(){t("selectTab")}return{selectTab:s,component:a,glowColorStyle:o,unref:l,Visibility:B}}});function du(e,t,n,i,r,a){var o;return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,onClick:t[0]||(t[0]=(...s)=>e.selectTab&&e.selectTab(...s)),class:Q(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(o=e.unref(e.style))!=null?o:{}])},[(g(),A(ee(e.component)))],6)):P("",!0)}var Oi=q(uu,[["render",du],["__scopeId","data-v-610a2549"]]);const cu=E({props:{visibility:{type:k(Number),required:!0},activeTab:{type:k(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:k(Object),required:!0},style:k(String,Object,Array),classes:k(Object),buttonContainerStyle:k(String,Object,Array),buttonContainerClasses:k(Object)},components:{Sticky:Wt,TabButton:Oi},setup(e){const{activeTab:t}=ne(e),n=N(()=>ze[Z.theme].floatingTabs),i=xe("");Ne(()=>{const s=ae(t);if(s==null){i.value="";return}if(Te(s)){i.value=D(s);return}i.value=D(l(s.display))});const r=N(()=>{const s=ae(t);return Te(s)||!s?void 0:l(s.classes)}),a=N(()=>{const s=ae(t);return Te(s)||!s?void 0:l(s.style)});function o(s){const{display:u,style:c,classes:h,glowColor:v,visibility:b}=s;return{display:u,style:l(c),classes:h,glowColor:v,visibility:b}}return{floating:n,tabClasses:r,tabStyle:a,Visibility:B,component:i,gatherButtonProps:o,unref:l}}});function fu(e,t,n,i,r,a){var u,c;const o=ce("TabButton"),s=ce("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("div",{key:0,class:Q(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[],(c=e.tabStyle)!=null?c:[]])},[d(s,{class:Q(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:W(e.unref(e.buttonContainerStyle))},{default:V(()=>[p("div",{class:Q(["tab-buttons",{floating:e.floating}])},[(g(!0),x(K,null,kt(e.unref(e.tabs),(h,v)=>(g(),A(o,Be({onSelectTab:b=>e.selected.value=v,floating:e.floating,key:v,active:e.unref(h.tab)===e.unref(e.activeTab)},e.gatherButtonProps(h)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(g(),A(ee(e.unref(e.component)),{key:0})):P("",!0)],6)):P("",!0)}var pu=q(cu,[["render",fu],["__scopeId","data-v-11575f45"]]);const mu=Symbol("TabButton"),gu=Symbol("TabFamily");function zn(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const n=ue(Object.keys(e)[0]);return le(()=>{var a;const i=(a=t==null?void 0:t())!=null?a:{};i.id=he("tabFamily-"),i.type=gu,i[de]=pu,i.tabs=Object.keys(e).reduce((o,s)=>{const u=e[s]();return u.type=mu,u[de]=Oi,y(u,"visibility"),z(u,"visibility",B.Visible),y(u,"tab"),y(u,"display"),y(u,"classes"),y(u,"style"),y(u,"glowColor"),o[s]=u,o},{}),i.selected=n,i.activeTab=N(()=>{const o=l(r.tabs);if(n.value in o&&l(o[n.value].visibility)===B.Visible)return l(o[n.value].tab);const s=Object.values(o).find(u=>l(u.visibility)===B.Visible);return s?l(s.tab):null}),y(i,"visibility"),z(i,"visibility",B.Visible),y(i,"classes"),y(i,"style"),y(i,"buttonContainerClasses"),y(i,"buttonContainerStyle"),i[me]=function(){const{visibility:o,activeTab:s,selected:u,tabs:c,style:h,classes:v,buttonContainerClasses:b,buttonContainerStyle:w}=this;return{visibility:o,activeTab:s,selected:u,tabs:c,style:l(h),classes:v,buttonContainerClasses:b,buttonContainerStyle:w}};const r=i;return r})}var vu=E({props:{display:{type:k(String,Object,Function),required:!0},visibility:{type:k(Number),required:!0},style:k(String,Object,Array),classes:k(Object),resource:Object,cost:k(String,Object,Number),canPurchase:{type:k(Boolean),required:!0},bought:{type:k(Boolean),required:!0},mark:k(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Ge,MarkNode:ft},setup(e){const{display:t,cost:n}=ne(e),i=xe("");return Ne(()=>{const r=ae(t);if(r==null){i.value="";return}if(Te(r)){i.value=D(r);return}const a=ae(n),o=D(r.title||"","h3"),s=D(r.description,"div"),u=D(r.effectDisplay||"");i.value=D(L(()=>{var c;return d("span",null,[r.title?d("div",null,[d(o,null,null)]):null,d(s,null,null),r.effectDisplay?d("div",null,[C("Currently: "),d(u,null,null)]):null,e.resource!=null?d(K,null,[d("br",null,null),C("Cost: "),e.resource&&je(e.resource,a)," ",(c=e.resource)==null?void 0:c.displayName]):null])}))}),{component:i,unref:l,Visibility:B}}});const hu=["disabled"];function bu(e,t,n,i,r,a){var u;const o=ce("MarkNode"),s=ce("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),x("button",{key:0,style:W([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),onClick:t[0]||(t[0]=(...c)=>e.purchase&&e.purchase(...c)),class:Q({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(g(),A(ee(e.unref(e.component)),{key:0})):P("",!0),d(o,{mark:e.unref(e.mark)},null,8,["mark"]),d(s,{id:e.id},null,8,["id"])],14,hu)):P("",!0)}var yu=q(vu,[["render",bu],["__scopeId","data-v-7742f590"]]);const _u=Symbol("Upgrade");function Bt(e){const t=ue(!1);return le(()=>{const n=e();return n.id=he("upgrade-"),n.type=_u,n[de]=yu,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=N(()=>{const i=n;return i.resource!=null&&i.cost!=null&&f.gte(i.resource.value,l(i.cost))}):y(n,"canAfford"),n.canPurchase=N(()=>l(n.visibility)===B.Visible&&l(n.canAfford)&&!l(n.bought)),n.purchase=function(){var r;const i=n;!l(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=f.sub(i.resource.value,l(i.cost))),t.value=!0,(r=i.onPurchase)==null||r.call(i))},y(n,"visibility"),z(n,"visibility",B.Visible),y(n,"classes"),y(n,"style"),y(n,"display"),y(n,"mark"),y(n,"cost"),y(n,"resource"),n[me]=function(){const{display:i,visibility:r,style:a,classes:o,resource:s,cost:u,canPurchase:c,bought:h,mark:v,id:b,purchase:w}=this;return{display:i,visibility:r,style:l(a),classes:o,resource:s,cost:u,canPurchase:c,bought:h,mark:v,id:b,purchase:w}},n})}function ku(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!cn(e)}const on="c",Oe=It(on,()=>{const e="#4BDC13",t="Candies",n=Ct(0,"lollipops"),i=yi(n),r=ue(!1),a=ue("pointy"),o=ue(10),s=ue(new f(10)),u=N(()=>f.pow(n.value,.2)),c=N(()=>f.times(n.value,10)),h=Mi(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"})),v=jn(()=>({shouldEarn(){return f.gte(i.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}})),b=jn(()=>({visibility(){return gt(v.earned.value)},shouldEarn(){return f.gte(i.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:L(()=>d(K,null,[d(we,{title:"beep","onUpdate:modelValue":H=>r.value=H,modelValue:r.value},null),d(we,{title:"boop","onUpdate:modelValue":H=>Fe.boop.value=H,modelValue:Fe.boop.value},null)]))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}})),w=[v,b],S=Xl(()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder
${ve(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:se($.value)+"x"}},visibility(){return gt(f.gt(i.value,0))},goal:20,resource:Y.points,onComplete(){console.log("hiii")},onEnter(){Y.points.value=0,Y.best.value=Y.points.value,Y.total.value=Y.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}})),$=N(()=>f.add(n.value,1).tetrate(.02)),R=Bt(()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:n})),ke=Bt(()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${se(M.value)}x`}),cost:1,resource:n,visibility:()=>gt(R.bought.value)})),M=N(()=>{let H=f.add(n.value,1).pow(.5);return H.gte("1e20000000")&&(H=H.sqrt().times("1e10000000")),H}),I=Bt(()=>({visibility(){return gt(ke.bought.value)},canAfford(){return f.lt(Y.points.value,7)},onPurchase(){Y.points.value=f.add(Y.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:this.canAfford?{}:{backgroundColor:"#dd1111"}}})),G=Bt(()=>({resource:Ct(te.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}})),be=[R,ke,I],te=Hl(()=>({resource:n,cost(){let H=new f(this.amount.value);return H.gte(25)&&(H=H.pow(2).div(25)),f.pow(2,H.pow(1.5)).floor()},display(){return{title:"Exhancers",description:`Adds ${se(He.value)} things and multiplies stuff by ${se(en.value)}.`}},onPurchase(H){s.value=f.add(s.value,H!=null?H:0)},style:{height:"222px"},purchaseLimit:4})),He=N(()=>f.gte(te.amount.value,0)?f.pow(25,f.pow(te.amount.value,1.1)):f.pow(1/25,f.times(te.amount.value,-1).pow(1.1))),en=N(()=>f.gte(te.amount.value,0)?f.pow(25,f.pow(te.amount.value,1.1)):f.pow(1/25,f.times(te.amount.value,-1).pow(1.1))),at=ue(!1),ot=O(!1),Ot=$t(()=>({small:!0,display:"Respec Thingies",onClick(){if(at.value&&!ot.value){ot.value=!0;return}n.value=f.add(n.value,s.value),te.amount.value=0,Y.tree.reset(Xe)}})),Sn=$t(()=>({small:!0,display:"Sell One",onClick(){f.lte(te.amount.value,0)||(te.amount.value=f.sub(te.amount.value,1),n.value=f.add(n.value,te.cost.value),s.value=f.sub(s.value,te.cost.value))}})),Ei=L(()=>d(Lt,null,{default:()=>[d(bt,null,{default:()=>[d(we,{title:"Confirm","onUpdate:modelValue":H=>at.value=H,modelValue:at.value},null),Pe(Ot)]}),Pe(te),Pe(Sn),d(Je,{modelValue:ot.value,"onUpdate:modelValue":H=>ot.value=H},{header:()=>d("h2",null,[C("Confirm Respec")]),body:()=>d(K,null,[C("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>d("div",{class:"modal-default-footer"},[d("div",{class:"modal-default-flex-grow"},null),d("button",{class:"button modal-default-button",onClick:()=>ot.value=!1},[C("Cancel")]),d("button",{class:"button modal-default-button danger",onClick:()=>{Ot.onClick(),ot.value=!1}},[C("Respec")])])})]})),Cn=an(()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:X.Right,width:300,height:30,progress(){return f.add(Y.points.value,1).log(10).div(10).toNumber()},display(){return se(Y.points.value)+" / 1e10 points"}})),$n=an(()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:X.Up,width:50,height:200,progress(){return f.div(Y.points.value,100)},display(){return ve(f.div(Y.points.value,1).min(100))+"%"}})),At=an(()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:X.Up,width:100,height:30,progress(){return f.div(n.value,50)}})),pt=ll(()=>({scaling:cl($i(10,.5),1e100,.5),baseResource:Y.points,gainResource:n,roundUpCost:!0,gainModifier:Ol(()=>[Pl(()=>({exponent:2,description:"Because I felt like it"})),Tl(()=>({addend:1,description:"Nice modifier"}))])})),Mn=Ti(()=>({thingsToReset:()=>[Oe]})),Vi=[Ln(()=>({key:"c",description:"reset for lollipops or whatever",onPress(){mt.canClick.value&&mt.onClick()}})),Ln(()=>({key:"ctrl+c",description:"respec things",onPress(){Ot.onClick()}}))],Xe=Si(()=>({layerID:on,color:e,reset:Mn,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let H=je(n);return f.gt(te.amount.value,0)&&(H+=`



${ve(te.amount.value)} Exhancers
`),H},style:{color:"#3325CC",textDecoration:"underline"}}));un(Xe,{display:wi(n),pinnable:!0});const mt=Ni(()=>({conversion:pt,tree:Y.tree,treeNode:Xe,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}));un(mt,{display:L(()=>Al("Modifiers","",pt.gainModifier,pt.scaling.currentGain(pt))),pinnable:!0,direction:X.Down,style:"width: 400px; text-align: left"});const Et=yt(()=>({display:"TH",color:"#6d3678",canClick(){return f.gte(Y.points.value,10)},tooltip:"Thanos your points",onClick(){Y.points.value=f.div(Y.points.value,2),console.log("Thanos'd")},glowColor(){return f.eq(te.amount.value,1)?"orange":""}})),Vt=yt(()=>({display:"h",color(){return ze[Z.theme].variables["--locked"]},tooltip:{display:N(()=>`Restore your points to ${se(o.value)}`),right:!0},canClick(){return f.lt(Y.points.value,o.value)},onClick(){Y.points.value=o.value}})),Tn=yt(()=>({visibility:B.Hidden})),In=ki(()=>({nodes(){return[[Fe.treeNode,Xe],[Et,Tn,Vt]]},branches(){return[{startNode:Fe.treeNode,endNode:Xe,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:Xe,endNode:Et},{startNode:Et,endNode:Vt}]}})),Fi=eu(()=>({links:[{startNode:Vt,endNode:At,"stroke-width":"5px",stroke:"red",offsetEnd:{x:-50+100*At.progress.value.toNumber(),y:0}}]})),Di=zn({first:()=>({tab:L(()=>d(K,null,[Pe(...be),Pe(G),d("div",null,[C("confirmed")])])),display:"first"}),second:()=>({tab:Fe.display,display:"second"})},()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}})),Pn=zn({mainTab:()=>({tab:Rt(()=>({display:L(()=>{let H;return d(K,null,[d(Pi,{resource:n,color:e,effectDisplay:`which are boosting waffles by ${se(u.value)} and increasing the Ice Cream cap by ${se(c.value)}`},null),d(Wt,null,ku(H=oe(mt))?H:{default:()=>[H]}),d(Ii,{resource:n,color:e},null),d(ye,{height:"5px"},null),d("button",{onClick:()=>console.log("yeet")},[C("'HI'")]),d("div",null,[C("Name your points!")]),d(_n,{modelValue:a.value,"onUpdate:modelValue":On=>a.value=On},null),d(Wt,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[C("I have "),je(Y.points),C(" "),a.value,C(" points!")]}),d("hr",null,null),ra(...w),d(ye,null,null),Pe(...be),Pe(G),Pe(S)])})})),display:"main tab",glowColor(){return R.canPurchase.value||ke.canPurchase.value||I.canPurchase.value||S.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:Rt(()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:L(()=>d(K,null,[oe(Ei),d(ye,null,null),d(bt,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[d(we,{"onUpdate:modelValue":H=>r.value=H,modelValue:r.value},null),d(ye,{width:"30px",height:"10px"},null),d("div",null,[d("span",null,[C("Beep")])]),d(ye,null,null),d(ql,{height:"200px"},null)]}),d(ye,null,null),d("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)]))})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:Rt(()=>({display:L(()=>d(K,null,[oe(h),oe(Cn),d(ye,null,null),d(bt,null,{default:()=>[d(Lt,{style:"background-color: #555555; padding: 15px"},{default:()=>[d("div",{style:"color: teal"},[C("Sugar level:")]),d(ye,null,null),oe($n)]}),d(ye,null,null),d(Lt,null,{default:()=>[d("div",null,[C("idk")]),d(ye,{width:"0",height:"50px"},null),oe(At)]})]}),d(ye,null,null),d("div",null,[C(`It's jail because "bars"! So funny! Ha ha!`)]),oe(In)]))})),display:"jail"}),illuminati:()=>({tab:Rt(()=>({display:L(()=>d("div",null,[d("h1",null,[C(" C O N F I R M E D ")]),d(ye,null,null),oe(Di),d("div",null,[C("Adjust how many points H gives you!")]),d(Rl,{"onUpdate:modelValue":H=>o.value=H,modelValue:o.value,min:1,max:30},null)])),style:{backgroundColor:"#3325CC"}})),visibility(){return gt(I.bought.value)},display:"illuminati"})});return{id:on,color:e,name:t,points:n,best:i,beep:r,thingy:a,otherThingy:o,spentOnBuyables:s,waffleBoost:u,icecreamCap:c,coolInfo:h,lollipopMilestones:w,funChallenge:S,funEffect:$,generatorUpgrade:R,lollipopMultiplierUpgrade:ke,lollipopMultiplierEffect:M,unlockIlluminatiUpgrade:I,quasiUpgrade:G,exhancers:te,respecBuyables:Ot,sellExhancer:Sn,bars:{tallBoi:$n,longBoi:Cn,flatBoi:At},tree:In,g:Et,h:Vt,spook:Tn,conversion:pt,reset:Mn,hotkeys:Vi,treeNode:Xe,resetButton:mt,confirmRespec:at,minWidth:800,tabs:Pn,display:L(()=>d(K,null,[oe(Pn),oe(Fi)]))}}),wu={min:.5,max:1},xu=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],Nu=.001,Su=.1,Cu=100,$u=!0,Mu={x:0,y:0},Tu=!1,Iu=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:300},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:1},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#ffdfa0"},{time:1,value:"#100f0c"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"rect",data:{x:0,y:0,w:0,h:0}}}];var Pu={lifetime:wu,ease:xu,frequency:Nu,emitterLifetime:Su,maxParticles:Cu,addAtBack:$u,pos:Mu,emit:Tu,behaviors:Iu};const sn="f",Fe=It(sn,()=>{const e="#FE0102",t="Farms",n=Ct(0,"farm points"),i=ue(!1),r=Mi(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}})),a=ue("Start"),o=$t(()=>({display(){return{title:"Clicky clicky!",description:"Current state:
"+a.value}},initialState:"Start",canClick(){return a.value!=="Borkened..."},onClick(S){var $,R,ke,M,I,G,be,te;switch(a.value){case"Start":a.value="A new state!";break;case"A new state!":a.value="Keep going!";break;case"Keep going!":a.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const He=S==null?void 0:"touches"in S?S.touches[0]:S,en=Object.assign({},Pu,{pos:{x:(($=He==null?void 0:He.clientX)!=null?$:0)-((M=(ke=(R=b.boundingRect)==null?void 0:R.value)==null?void 0:ke.left)!=null?M:0),y:((I=He==null?void 0:He.clientY)!=null?I:0)-((te=(be=(G=b.boundingRect)==null?void 0:G.value)==null?void 0:be.top)!=null?te:0)}});b.addEmitter(en).then(at=>at.playOnceAndDestroy()),a.value="Borkened...";break;default:a.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(a.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}})),s=$t(()=>({onClick(){a.value=="Borkened..."&&(a.value="Start")},display(){return a.value=="Borkened..."?"Fix the clickable!":"Does nothing"},small:!0})),u=Ti(()=>({thingsToReset:()=>[Fe]})),c=ul(()=>({scaling:$i(10,.5),baseResource:Y.points,gainResource:n,modifyGainAmount:Il(()=>({multiplier:Oe.otherThingy}))})),h=Si(()=>({layerID:sn,color:e,reset:u,tooltip(){return h.canClick.value?`${je(n)} ${n.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${je(Y.points)}`},canClick(){return f.gte(Y.points.value,10)}}));un(h,{display:wi(n),pinnable:!0});const v=Ni(()=>({conversion:c,tree:Y.tree,treeNode:h,display:L(()=>v.conversion.buyMax?d("span",null,[C("Hi! I'm a "),d("u",null,[C("weird dinosaur")]),C(" and I'll give you")," ",d("b",null,[ve(v.conversion.currentGain.value)]),C(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",ve(v.conversion.nextAt.value),C(" points)")]):d("span",null,[C("Hi! I'm a "),d("u",null,[C("weird dinosaur")]),C(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",ve(v.conversion.nextAt.value),C(" points)")]))})),b=wl(()=>({boundingRect:O(null),onContainerResized(S){this.boundingRect.value=S},style:"z-index: 2"})),w=L(()=>d(K,null,[oe(r),d(Pi,{resource:n,color:e},null),oe(v),d("div",null,[C("You have "),ve(c.baseResource.value),C(" points")]),d("div",null,[d("br",null,null),d("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),d("div",null,[C("Bork Bork!")])]),d(ye,null,null),Pe(s),Pe(o),oe(b)]));return{id:sn,color:e,name:t,points:n,boop:i,coolInfo:r,clickable:o,clickableState:a,reset:u,conversion:c,treeNode:h,resetButton:v,minWidth:650,display:w}});function ln(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!cn(e)}const Un="a",dn=It(Un,()=>{const e="yellow",t="Achievements",n=Ct(0,"achievement power"),i=yt(()=>({display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick(){Y.showAchievements()}})),r=rn(()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:N(()=>r.earned.value?"You did it!":"How did this happen?"),shouldEarn:()=>!0})),a=rn(()=>({display:"Impossible!",tooltip:N(()=>a.earned.value?"HOW????":"Mwahahaha!"),style:{color:"#04e050"}})),o=rn(()=>({display:"EIEIO",tooltip:`Get a farm point. Reward: The dinosaur is now your friend (you can max Farm Points).`,shouldEarn:function(){return f.gte(Fe.points.value,1)},onComplete(){console.log("Bork bork bork!")}})),s=[r,a,o],u=rl(()=>({rows:2,cols:2,getStartState(h){return h},getStyle(h,v){return{backgroundColor:`#${Number(v)*1234%999999}`}},getTitle(h){let v="";return h==="101"?v="top":h==="102"?v="bottom":h==="201"?v="left":h==="202"&&(v="right"),L(()=>d(re,Be({display:JSON.stringify(this.cells[h].style)},{[v]:!0}),{default:()=>[d("h3",null,[C("Gridable #"),h])]}))},getDisplay(h,v){return String(v)},getCanClick(){return f.eq(Y.points.value,10)},onClick(h,v){this.cells[h].state=Number(v)+1}})),c=L(()=>{let h,v,b;return d(K,null,[d(bt,null,{default:()=>[d(re,{display:r.tooltip,bottom:!0},ln(h=oe(r))?h:{default:()=>[h]}),d(re,{display:a.tooltip,bottom:!0},ln(v=oe(a))?v:{default:()=>[v]}),d(re,{display:o.tooltip,bottom:!0},ln(b=oe(o))?b:{default:()=>[b]})]}),Pe(u)])});return{id:Un,color:e,name:t,points:n,achievements:s,grid:u,treeNode:i,display:c}}),Y=It("main",function(){const e=Ct(10),t=yi(e),n=ks(e),i=N(()=>{if(!Oe.generatorUpgrade.bought.value)return new f(0);let u=new f(3.19);return Oe.lollipopMultiplierUpgrade.bought.value&&(u=u.times(Oe.lollipopMultiplierEffect.value)),u});ge.on("update",u=>{e.value=f.add(e.value,f.times(i.value,u))});const r=Ns(e,i),{openModal:a,modal:o}=mi(dn),s=ki(()=>({nodes:[[Oe.treeNode],[Fe.treeNode,Oe.spook]],leftSideNodes:[dn.treeNode,Oe.h],branches:[{startNode:Fe.treeNode,endNode:Oe.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=En(this.resettingNode.value)===En(Oe.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:Ls}));return{name:"Tree",display:L(()=>d(K,null,[T.devSpeed===0?d("div",null,[C("Game Paused")]):null,T.devSpeed&&T.devSpeed!==1?d("div",null,[C("Dev Speed: "),se(T.devSpeed),C("x")]):null,T.offlineTime?d("div",null,[C("Offline Time: "),Jt(T.offlineTime)]):null,d("div",null,[f.lt(e.value,"1e1000")?d("span",null,[C("You have ")]):null,d("h2",null,[se(e.value)]),f.lt(e.value,"1e1e6")?d("span",null,[C(" points")]):null]),f.gt(i.value,0)?d("div",null,[C("("),r.value,C(")")]):null,d(ye,null,null),d("button",{onClick:a},[C("open achievements")]),oe(o),oe(s),d(_s,{height:"200px",style:"margin: 10px auto; display: block"},null)])),points:e,best:t,total:n,oomps:r,tree:s,showAchievements:a}}),Ou=e=>[Y,Fe,Oe,dn],Nn=N(()=>f.gt(Y.points.value,25));function Au(e,t){}var Ai=Object.freeze(Object.defineProperty({__proto__:null,main:Y,getInitialLayers:Ou,hasWon:Nn,fixOldSave:Au},Symbol.toStringTag,{value:"Module"}));const Pt=e=>(qe("data-v-4a50ce42"),e=e(),Le(),e),Eu={class:"game-over-modal-header"},Vu=["src","alt"],Fu={class:"game-over-modal-title"},Du=Pt(()=>p("h2",null,"Congratulations!",-1)),Ru={key:0},Bu=Pt(()=>p("br",null,null,-1)),qu=Pt(()=>p("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Lu=Pt(()=>p("br",null,null,-1)),ju=["href"],zu=Pt(()=>p("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Uu=E({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:i,discordLink:r,versionNumber:a,versionTitle:o}=J,s=N(()=>Jt(T.timePlayed)),u=N(()=>Nn.value&&!T.keepGoing),c=Ze(T,"autosave");function h(){T.keepGoing=!0}function v(){nt(ut())}return(b,w)=>(g(),A(Je,{"model-value":l(u)},{header:V(()=>[p("div",Eu,[l(n)?(g(),x("img",{key:0,class:"game-over-modal-logo",src:l(n),alt:l(t)},null,8,Vu)):P("",!0),p("div",Fu,[Du,p("h4",null,"You've beaten "+U(l(t))+" v"+U(l(a))+": "+U(l(o)),1)])])]),body:V(({shown:S})=>[S?(g(),x("div",Ru,[p("div",null,"It took you "+U(l(s))+" to beat the game.",1),Bu,qu,Lu,p("div",null,[p("a",{href:l(r),class:"game-over-modal-discord-link"},[zu,C(" "+U(l(i)),1)],8,ju)]),d(we,{title:"Autosave",modelValue:l(c),"onUpdate:modelValue":w[0]||(w[0]=$=>pe(c)?c.value=$:null)},null,8,["modelValue"])])):P("",!0)]),footer:V(()=>[p("div",{class:"game-over-footer"},[p("button",{onClick:h,class:"button"},"Keep Going"),p("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Gu=q(Uu,[["__scopeId","data-v-4a50ce42"]]);const Qt=e=>(qe("data-v-3de07c06"),e=e(),Le(),e),Hu=Qt(()=>p("div",{class:"nan-modal-header"},[p("h2",null,"NaN value detected!")],-1)),Wu={key:0},Yu=Qt(()=>p("br",null,null,-1)),Ku=["href"],Zu=Qt(()=>p("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Ju=Qt(()=>p("br",null,null,-1)),Xu={class:"nan-footer"},Qu=E({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=J,i=Ze(T,"autosave"),r=Ze(ie,"hasNaN"),a=O(null),o=N(()=>{var w;return(w=ie.NaNPath)==null?void 0:w.join(".")}),s=N(()=>{var w;return(w=ie.NaNPath)==null?void 0:w.slice(-1)[0]}),u=N(()=>ie.NaNReceiver&&s.value?ie.NaNReceiver[s.value]:null),c=N({get(){return T.devSpeed===0},set(w){T.devSpeed=w?null:0}});function h(){ie.NaNReceiver&&s.value&&(ie.NaNReceiver[s.value]=new f(0),ie.hasNaN=!1)}function v(){ie.NaNReceiver&&s.value&&(ie.NaNReceiver[s.value]=new f(1),ie.hasNaN=!1)}function b(){ie.NaNReceiver&&s.value&&(ie.NaNReceiver[s.value]=new f(NaN),ie.hasNaN=!1)}return(w,S)=>(g(),x(K,null,[d(Je,Be({modelValue:l(r),"onUpdate:modelValue":S[4]||(S[4]=$=>pe(r)?r.value=$:null)},w.$attrs),{header:V(()=>[Hu]),body:V(()=>[p("div",null,[C(' Attempted to assign "'+U(l(o))+'" to NaN',1),l(u)?(g(),x("span",Wu,U(" ")+"(previously "+U(l(se)(l(u)))+")",1)):P("",!0),C(". Auto-saving has been "+U(l(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Yu,p("div",null,[p("a",{href:l(n),class:"nan-modal-discord-link"},[Zu,C(" "+U(l(t)),1)],8,Ku)]),Ju,d(we,{title:"Autosave",modelValue:l(i),"onUpdate:modelValue":S[0]||(S[0]=$=>pe(i)?i.value=$:null)},null,8,["modelValue"]),l(J).enablePausing?(g(),A(we,{key:0,title:"Pause game",modelValue:l(c),"onUpdate:modelValue":S[1]||(S[1]=$=>pe(c)?c.value=$:null)},null,8,["modelValue"])):P("",!0)]),footer:V(()=>[p("div",Xu,[p("button",{onClick:S[2]||(S[2]=$=>{var R;return(R=a.value)==null?void 0:R.open()}),class:"button"},"Open Saves Manager"),p("button",{onClick:h,class:"button"},"Set to 0"),p("button",{onClick:v,class:"button"},"Set to 1"),l(u)&&l(f).neq(l(u),0)&&l(f).neq(l(u),1)?(g(),x("button",{key:0,onClick:S[3]||(S[3]=$=>r.value=!1),class:"button"}," Set to previous ")):P("",!0),p("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),d(hi,{ref_key:"savesManager",ref:a},null,512)],64))}});var ed=q(Qu,[["__scopeId","data-v-3de07c06"]]);const td={key:0,class:"tpsDisplay"},nd={key:0,class:"low"},id=E({__name:"TPS",setup(e){const t=N(()=>f.div(ie.lastTenTicks.length,ie.lastTenTicks.reduce((a,o)=>a+o,0))),n=O([]);Ne(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const i=N(()=>n.value.reduce((a,o)=>f.max(a,o),0)),r=N(()=>f.sub(t.value,i.value).gt(1));return(a,o)=>l(t).isNan()?P("",!0):(g(),x("div",td,[C(" TPS: "+U(l(ve)(l(t)))+" ",1),d(Zt,{name:"fade"},{default:V(()=>[l(r)?(g(),x("span",nd,U(l(ve)(l(i))),1)):P("",!0)]),_:1})]))}});var rd=q(id,[["__scopeId","data-v-46a3ed5b"]]);var ad=E({__name:"App",setup(e){const t=J.useHeader,n=N(()=>ze[Z.theme].variables),i=Ze(Z,"showTPS"),r=N(()=>D(L(()=>d(K,null,[ta.map(oe)]))));return(a,o)=>(g(),x(K,null,[p("div",{id:"modal-root",style:W(l(n))},null,4),p("div",{class:Q(["app",{useHeader:l(t)}]),style:W(l(n))},[l(t)?(g(),A(bi,{key:0})):P("",!0),d(gs),l(l(i))?(g(),A(rd,{key:1})):P("",!0),d(Gu),d(ed),(g(),A(ee(l(r))))],6)],64))}});var od=q(ad,[["__scopeId","data-v-9417972e"]]);function sd(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisterError:a}=e;let o,s;const u=async(c=!0)=>{c&&(o==null||o.addEventListener("controlling",h=>{h.isUpdate&&window.location.reload()})),s&&s.waiting&&await er(s.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){o=new Qi("./sw.js",{scope:"./",type:"classic"}),o.addEventListener("activated",c=>{c.isUpdate||i==null||i()});{const c=()=>{n==null||n()};o.addEventListener("waiting",c),o.addEventListener("externalwaiting",c)}o.register({immediate:t}).then(c=>{s=c,r==null||r(c)}).catch(c=>{a==null||a(c)})}return u}function ld(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisterError:a}=e,o=O(!1),s=O(!1);return{updateServiceWorker:sd({immediate:t,onNeedRefresh(){o.value=!0,n==null||n()},onOfflineReady(){s.value=!0,i==null||i()},onRegistered:r,onRegisterError:a}),offlineReady:s,needRefresh:o}}document.title=J.title;window.projInfo=J;if(J.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c 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 Jr();const{globalBus:e,startGameLoop:t}=await zt(()=>Promise.resolve().then(function(){return Zr}),void 0),n=window.vue=Ui(od);e.emit("setupVue",n),n.mount("#app"),Ve(()=>{const i=fn(),{updateServiceWorker:r}=ld({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(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(a.update,60*60*1e3)}})}),t()}); diff --git a/index.html b/index.html index f3d4cee..8936515 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ Profectus - + diff --git a/sw.js b/sw.js index aec2fb3..769f73f 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const i=(i,l)=>(i=new URL(i+".js",l).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(l,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let t={};const u=s=>i(s,r),o={module:{uri:r},exports:t,require:u};e[r]=Promise.all(l.map((s=>o[s]||u(s)))).then((s=>(n(...s),t)))}}define(["./workbox-b3e22772"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/@ivanv.350aa563.js",revision:null},{url:"assets/@pixi.c5050cb0.js",revision:null},{url:"assets/@vue.7184beb0.js",revision:null},{url:"assets/earcut.17d42416.js",revision:null},{url:"assets/eventemitter3.dc5195d7.js",revision:null},{url:"assets/index.4d68ca01.css",revision:null},{url:"assets/index.e149ed54.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/ismobilejs.5c6954b9.js",revision:null},{url:"assets/lz-string.f2f3b7cf.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/querystring.776b9ab3.js",revision:null},{url:"assets/sortablejs.bd686609.js",revision:null},{url:"assets/url.b1bd21f4.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.e991724e.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.80a5fcd9.js",revision:null},{url:"assets/vue.37fee242.js",revision:null},{url:"assets/vuedraggable.d1ae43bb.js",revision:null},{url:"assets/workbox-window.60401ce8.js",revision:null},{url:"index.html",revision:"8f2aba9cfe9b2895db011fea50ada669"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"324df043058f919e7a1495348320e1ed"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const i=(i,l)=>(i=new URL(i+".js",l).href,e[i]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=i,s.onload=e,document.head.appendChild(s)}else s=i,importScripts(i),e()})).then((()=>{let s=e[i];if(!s)throw new Error(`Module ${i} didn’t register its module`);return s})));self.define=(l,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let t={};const u=s=>i(s,r),o={module:{uri:r},exports:t,require:u};e[r]=Promise.all(l.map((s=>o[s]||u(s)))).then((s=>(n(...s),t)))}}define(["./workbox-b3e22772"],(function(s){"use strict";self.addEventListener("message",(s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()})),s.precacheAndRoute([{url:"assets/@ivanv.350aa563.js",revision:null},{url:"assets/@pixi.c5050cb0.js",revision:null},{url:"assets/@vue.7184beb0.js",revision:null},{url:"assets/earcut.17d42416.js",revision:null},{url:"assets/eventemitter3.dc5195d7.js",revision:null},{url:"assets/index.4d68ca01.css",revision:null},{url:"assets/index.5e36a771.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/ismobilejs.5c6954b9.js",revision:null},{url:"assets/lz-string.f2f3b7cf.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/querystring.776b9ab3.js",revision:null},{url:"assets/sortablejs.bd686609.js",revision:null},{url:"assets/url.b1bd21f4.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.e991724e.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.80a5fcd9.js",revision:null},{url:"assets/vue.37fee242.js",revision:null},{url:"assets/vuedraggable.d1ae43bb.js",revision:null},{url:"assets/workbox-window.60401ce8.js",revision:null},{url:"index.html",revision:"b7ee356db1a04b83560cd7341c0b6242"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"324df043058f919e7a1495348320e1ed"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));