From 0992004fc06823374f94b188d33157e370039e56 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 31 Dec 2024 13:05:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20pages=20from=20@=20profectus/P?= =?UTF-8?q?rofectus@67ca253f5c4704e76e1d3900dfe2ea17963d2f3b=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-BuYvdT6z.js | 18 ------------------ .../{index-MSbJGb5U.css => index-Dn8XcuKS.css} | 2 +- assets/index-DxM-pCoC.js | 18 ++++++++++++++++++ index.html | 4 ++-- sw.js | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 assets/index-BuYvdT6z.js rename assets/{index-MSbJGb5U.css => index-Dn8XcuKS.css} (80%) create mode 100644 assets/index-DxM-pCoC.js diff --git a/assets/index-BuYvdT6z.js b/assets/index-BuYvdT6z.js deleted file mode 100644 index b9af297..0000000 --- a/assets/index-BuYvdT6z.js +++ /dev/null @@ -1,18 +0,0 @@ -var kn=Object.defineProperty;var Cn=(n,e,t)=>e in n?kn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var x=(n,e,t)=>Cn(n,typeof e!="symbol"?e+"":e,t);/* empty css */import"./vue-GVBARt8q.js";import{aX as He,bo as d,X as z,aZ as V,aR as b,A as C,b0 as xe,bS as Xe,aA as K,az as Be,w as L,aJ as rt,G as m,bf as _,F as j,a$ as Ie,z as E,aC as fe,P as F,Q as v,bN as O,b9 as bt,aT as at,y as J,bP as Tt,bF as Sn,ay as Ce,l as Ht,T as In,ap as Mn,ar as se,am as ct,bb as it,bI as ae,bj as pe,aO as Wt,bl as jt,aB as xn,bJ as Jt,au as Tn,bi as _t,bE as $n,bA as Pn,aI as En,bk as Lt,b3 as Fn,x as Vn}from"./@vue-CCfogNd1.js";import{L as Pe}from"./lz-string-BZNGtwso.js";import{c as Zt}from"./nanoevents-BxCKNB1V.js";import{i as On}from"./unofficial-galaxy-sdk-C_siawBx.js";import{D as _n}from"./vuedraggable-BgvaSe-I.js";import{Y as Ln}from"./vue-next-select-CgtHQcl0.js";import{p as An}from"./vue-textarea-autosize-DLc4kbjP.js";import{s as Dn,u as Rn}from"./vue-toastification-CjoTmBGg.js";import"./sortablejs-BZuNQ3iR.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();const qn="./projInfo-schema.json",Un="Profectus",Bn="A project made in Profectus",zn="",Gn="",Hn="",Wn="",jn="0.0",Jn="Initial Commit",Zn=!0,Yn=!1,Kn=2,Xn=!0,Qn=null,er="",tr=["main"],nr=3600,rr=1,ir=!0,sr="base64",ar=!1,B={$schema:qn,title:Un,description:Bn,id:zn,author:Gn,discordName:Hn,discordLink:Wn,versionNumber:jn,versionTitle:Jn,allowGoBack:Zn,defaultShowSmall:Yn,defaultDecimalsShown:Kn,useHeader:Xn,banner:Qn,logo:er,initialTabs:tr,maxTickLength:nr,offlineLimit:rr,enablePausing:ir,exportEncoding:sr,disableHealthWarning:ar},or=He({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}}),M=window.player=or;function ze(n){return JSON.stringify(n,(e,t)=>d(t)??null)}const lr=z({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=e,r=V(!1),i=V(null);function s(){t("click"),i.value!=null&&clearTimeout(i.value),r.value=!1,Be(()=>{r.value=!0,i.value=setTimeout(()=>r.value=!1,500)})}return(o,a)=>(b(),C("button",{onClick:Xe(s,["stop"]),class:K(["feedback",{activated:r.value,left:o.left}])},[xe(o.$slots,"default",{},void 0,!0)],2))}}),Z=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},$t=Z(lr,[["__scopeId","data-v-f82eae5d"]]),ur={class:"error"},cr={class:"error-title"},dr={class:"error-details",style:{"margin-top":"-10px"}},fr={key:0},gr={class:"instructions"},mr=["href"],pr={key:0,style:{"margin-top":"20px"}},hr={class:"error-details"},vr={key:0,style:{"margin-top":"10px"}},br={key:1,style:{"margin-top":"10px"}},yr=z({__name:"Error",props:{errors:{}},setup(n){const e=n,t=L(()=>e.errors[0]),r=L(()=>e.errors.map(o=>o.stack==null?[]:o.stack.split(` -`))),i=L(()=>e.errors.map(o=>o.cause==null?[]:(typeof o.cause=="string"?o.cause:JSON.stringify(o.cause)).split(` -`)));function s(){let o=ze(M);switch(B.exportEncoding){default:console.warn(`Unknown save encoding: ${B.exportEncoding}. Defaulting to lz`);case"lz":o=Pe.compressToUTF16(o);break;case"base64":o=btoa(unescape(encodeURIComponent(o)));break;case"plain":break}console.log(o);const a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(a)}return rt(()=>{M.autosave=!1,M.devSpeed=0}),(o,a)=>(b(),C("div",ur,[m("h1",cr,_(t.value.name)+": "+_(t.value.message),1),m("div",dr,[t.value.cause?(b(),C("div",fr,[(b(!0),C(j,null,Ie(i.value[0],c=>(b(),C("div",{key:c},_(c),1))),128))])):E("",!0),t.value.stack?(b(),C("div",{key:1,style:fe(t.value.cause?"margin-top: 10px":"")},[(b(!0),C(j,null,Ie(r.value[0],c=>(b(),C("div",{key:c},_(c),1))),128))],4)):E("",!0)]),m("div",gr,[a[2]||(a[2]=F(" Check the console for more details, and consider sharing it with the developers on ")),m("a",{href:d(B).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,mr),a[3]||(a[3]=F("! ")),v($t,{onClick:s,class:"button",style:{display:"inline-flex"}},{default:O(()=>a[0]||(a[0]=[m("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1),m("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)])),_:1}),a[4]||(a[4]=m("br",null,null,-1)),o.errors.length>1?(b(),C("div",pr,a[1]||(a[1]=[m("h3",null,"Other errors",-1)]))):E("",!0),(b(!0),C(j,null,Ie(o.errors.slice(1),(c,f)=>(b(),C("div",{key:f,style:{"margin-top":"20px"}},[m("details",hr,[m("summary",null,_(c.name)+": "+_(c.message),1),c.cause?(b(),C("div",vr,[(b(!0),C(j,null,Ie(i.value[f+1],y=>(b(),C("div",{key:y},_(y),1))),128))])):E("",!0),c.stack?(b(),C("div",br,[(b(!0),C(j,null,Ie(r.value[f+1],y=>(b(),C("div",{key:y},_(y),1))),128))])):E("",!0)])]))),128))])]))}}),Yt=Z(yr,[["__scopeId","data-v-2524e23e"]]),Ve={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Pt=(n=>(n.Classic="classic",n.Paper="paper",n.Nordic="nordic",n.Aqua="aqua",n))(Pt||{});const Et={classic:Ve,paper:{...Ve,variables:{...Ve.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Ve,variables:{...Ve.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Ve,variables:{...Ve.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}},G=window.state=bt({lastTenTicks:[],mouseActivity:[!1],hasNaN:!1,NaNPath:[],errors:He([])}),ne=Zt();"fonts"in document&&(document.fonts.onloadingdone=()=>ne.emit("fontsLoaded"));document.onmousemove=function(){G.mouseActivity[G.mouseActivity.length-1]=!0};const wr=z({__name:"Context",emits:["updateNodes"],setup(n,{emit:e}){var N;const t=e,r=V({}),i=new ResizeObserver(c),s=V(null);rt(()=>{const w=s.value;w!=null&&i.observe(w)});let o=!0,a=V((N=s.value)==null?void 0:N.getBoundingClientRect());function c(){o&&(o=!1,Be(()=>{var w;a.value=(w=s.value)==null?void 0:w.getBoundingClientRect(),Object.values(r.value).filter(p=>p).forEach(p=>p.rect=p.element.getBoundingClientRect()),t("updateNodes",r.value),o=!0}))}ne.on("fontsLoaded",c);const f={attributes:!1,childList:!0,subtree:!1};at(on,(w,p)=>{const k=new MutationObserver(()=>y(w));k.observe(p,f),r.value[w]={element:p,observer:k,rect:p.getBoundingClientRect()},c()}),at(ln,w=>{var p;(p=r.value[w])==null||p.observer.disconnect(),r.value[w]=void 0,c()}),at(un,r),at(cn,a);function y(w){const p=r.value[w];p!=null&&(p.rect=p.element.getBoundingClientRect(),t("updateNodes",r.value))}return(w,p)=>(b(),C(j,null,[xe(w.$slots,"default",{},void 0,!0),m("div",{ref_key:"resizeListener",ref:s,class:"resize-listener"},null,512)],64))}}),Kt=Z(wr,[["__scopeId","data-v-4fc505f1"]]),Nr={class:"modal-wrapper"},kr=["width"],Cr={class:"modal-header"},Sr={class:"modal-body"},Ir={class:"modal-footer"},Ee=z({__name:"Modal",props:{modelValue:{type:Boolean},preventClosing:{type:Boolean},width:{}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const r=n,i=t,s=L(()=>r.modelValue||a.value);function o(){r.preventClosing!==!0&&i("update:modelValue",!1)}const a=V(!1),c=V(null),f=L(()=>{var y;return((y=c.value)==null?void 0:y.nodes)??null});return e({isOpen:s,nodes:f}),(y,N)=>(b(),J(In,{to:"#modal-root"},[v(Ht,{name:"modal",onBeforeEnter:N[0]||(N[0]=w=>a.value=!0),onAfterLeave:N[1]||(N[1]=w=>a.value=!1),appear:""},{default:O(()=>[Tt(m("div",Ce({class:"modal-mask",onPointerdown:Xe(o,["self"])},y.$attrs),[m("div",Nr,[m("div",{class:"modal-container",width:y.width},[m("div",Cr,[xe(y.$slots,"header",{shown:s.value},()=>[N[2]||(N[2]=F(" default header "))])]),m("div",Sr,[v(Kt,{ref_key:"contextRef",ref:c},{default:O(()=>[xe(y.$slots,"body",{shown:s.value},()=>[N[3]||(N[3]=F(" default body "))])]),_:3},512)]),m("div",Ir,[xe(y.$slots,"footer",{shown:s.value},()=>[m("div",{class:"modal-default-footer"},[N[4]||(N[4]=m("div",{class:"modal-default-flex-grow"},null,-1)),m("button",{class:"button modal-default-button",onClick:o}," Close ")])])])],8,kr)])],16),[[Sn,y.modelValue]])]),_:3})]))}});class Mr{constructor(e){x(this,"map",new Map);x(this,"first");x(this,"last");x(this,"maxSize");this.maxSize=e}get size(){return this.map.size}get(e){const t=this.map.get(e);if(t!==void 0)return t!==this.first&&(t===this.last?(this.last=t.prev,this.last.next=void 0):(t.prev.next=t.next,t.next.prev=t.prev),t.next=this.first,this.first.prev=t,this.first=t),t.value}set(e,t){if(this.maxSize<1)return;if(this.map.has(e))throw new Error("Cannot update existing keys in the cache");const r=new xr(e,t);for(this.first===void 0?(this.first=r,this.last=r):(r.next=this.first,this.first.prev=r,this.first=r),this.map.set(e,r);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class xr{constructor(e,t){x(this,"key");x(this,"value");x(this,"next");x(this,"prev");this.key=e,this.value=t}}const St=17,Tr=9e15,$r=Math.log10(9e15),Pr=1/9e15,Er=308,Fr=-324,At=5,Vr=1023,Or=function(){const n=[];for(let t=Fr+1;t<=Er;t++)n.push(+("1e"+t));const e=323;return function(t){return n[t+e]}}(),Oe=[2,Math.E,3,4,5,6,7,8,9,10],_r=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Lr=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let h=function(e){return u.fromValue_noAlloc(e)},D=function(n,e,t){return u.fromComponents(n,e,t)},U=function(e,t,r){return u.fromComponents_noNormalize(e,t,r)};const Se=function(e,t){const r=t+1,i=Math.ceil(Math.log10(Math.abs(e))),s=Math.round(e*Math.pow(10,r-i))*Math.pow(10,i-r);return parseFloat(s.toFixed(Math.max(r-i,0)))},It=function(n){return Math.sign(n)*Math.log10(Math.abs(n))},Ar=function(n){if(!isFinite(n))return n;if(n<-50)return n===Math.trunc(n)?Number.NEGATIVE_INFINITY:0;let e=1;for(;n<10;)e=e*n,++n;n-=1;let t=.9189385332046727;t=t+(n+.5)*Math.log(n),t=t-n;const r=n*n;let i=n;return t=t+1/(12*i),i=i*r,t=t+1/(360*i),i=i*r,t=t+1/(1260*i),i=i*r,t=t+1/(1680*i),i=i*r,t=t+1/(1188*i),i=i*r,t=t+691/(360360*i),i=i*r,t=t+7/(1092*i),i=i*r,t=t+3617/(122400*i),Math.exp(t)/e},Xt=.5671432904097838,Dt=function(n,e=1e-10){let t,r;if(!Number.isFinite(n)||n===0)return n;if(n===1)return Xt;n<10?t=0:t=Math.log(n)-Math.log(Math.log(n));for(let i=0;i<100;++i){if(r=(n*Math.exp(-t)+t*t)/(t+1),Math.abs(r-t).5?1:-1;if(Math.random()*20<1)return U(t,0,1);const r=Math.floor(Math.random()*(e+1));let i=r===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(i=Math.trunc(i));let s=Math.pow(10,i);return Math.random()>.9&&(s=Math.trunc(s)),D(t,r,s)}static affordGeometricSeries_core(e,t,r,i){const s=t.mul(r.pow(i));return g.floor(e.div(s).mul(r.sub(1)).add(1).log10().div(r.log10()))}static sumGeometricSeries_core(e,t,r,i){return t.mul(r.pow(i)).mul(g.sub(1,r.pow(e))).div(g.sub(1,r))}static affordArithmeticSeries_core(e,t,r,i){const o=t.add(i.mul(r)).sub(r.div(2)),a=o.pow(2);return o.neg().add(a.add(r.mul(e).mul(2)).sqrt()).div(r).floor()}static sumArithmeticSeries_core(e,t,r,i){const s=t.add(i.mul(r));return e.div(2).mul(s.mul(2).plus(e.sub(1).mul(r)))}static efficiencyOfPurchase_core(e,t,r){return e.div(t).add(e.div(r))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Tr)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<$r&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,r){return this.sign=e,this.layer=t,this.mag=r,this.normalize(),this}fromComponents_noNormalize(e,t,r){return this.sign=e,this.layer=t,this.mag=r,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,r=g.fromStringCache.get(t);if(r!==void 0)return this.fromDecimal(r);e=e.replace(",","");const i=e.split("^^^");if(i.length===2){const S=parseFloat(i[0]),$=parseFloat(i[1]),T=i[1].split(";");let P=1;if(T.length===2&&(P=parseFloat(T[1]),isFinite(P)||(P=1)),isFinite(S)&&isFinite($)){const q=g.pentate(S,$,P);return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}const s=e.split("^^");if(s.length===2){const S=parseFloat(s[0]),$=parseFloat(s[1]),T=s[1].split(";");let P=1;if(T.length===2&&(P=parseFloat(T[1]),isFinite(P)||(P=1)),isFinite(S)&&isFinite($)){const q=g.tetrate(S,$,P);return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}const o=e.split("^");if(o.length===2){const S=parseFloat(o[0]),$=parseFloat(o[1]);if(isFinite(S)&&isFinite($)){const T=g.pow(S,$);return this.sign=T.sign,this.layer=T.layer,this.mag=T.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}e=e.trim().toLowerCase();let a,c,f=e.split("pt");if(f.length===2){a=10,c=parseFloat(f[0]),f[1]=f[1].replace("(",""),f[1]=f[1].replace(")","");let S=parseFloat(f[1]);if(isFinite(S)||(S=1),isFinite(a)&&isFinite(c)){const $=g.tetrate(a,c,S);return this.sign=$.sign,this.layer=$.layer,this.mag=$.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}if(f=e.split("p"),f.length===2){a=10,c=parseFloat(f[0]),f[1]=f[1].replace("(",""),f[1]=f[1].replace(")","");let S=parseFloat(f[1]);if(isFinite(S)||(S=1),isFinite(a)&&isFinite(c)){const $=g.tetrate(a,c,S);return this.sign=$.sign,this.layer=$.layer,this.mag=$.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}const y=e.split("e"),N=y.length-1;if(N===0){const S=parseFloat(e);if(isFinite(S))return this.fromNumber(S),g.fromStringCache.size>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}else if(N===1){const S=parseFloat(e);if(isFinite(S)&&S!==0)return this.fromNumber(S),g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}const w=e.split("e^");if(w.length===2){this.sign=1,w[0].charAt(0)=="-"&&(this.sign=-1);let S="";for(let $=0;$=43&&T<=57||T===101)S+=w[1].charAt($);else return this.layer=parseFloat(S),this.mag=parseFloat(w[1].substr($+1)),this.normalize(),g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}}if(N<1)return this.sign=0,this.layer=0,this.mag=0,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this;const p=parseFloat(y[0]);if(p===0)return this.sign=0,this.layer=0,this.mag=0,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this;let k=parseFloat(y[y.length-1]);if(N>=2){const S=parseFloat(y[y.length-2]);isFinite(S)&&(k*=Math.sign(S),k+=It(S))}if(!isFinite(p))this.sign=y[0]==="-"?-1:1,this.layer=N,this.mag=k;else if(N===1)this.sign=Math.sign(p),this.layer=1,this.mag=k+Math.log10(Math.abs(p));else if(this.sign=Math.sign(p),this.layer=N,N===2){const S=g.mul(D(1,2,k),h(p));return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}else this.mag=k;return this.normalize(),g.fromStringCache.maxSize>=1&&g.fromStringCache.set(t,g.fromDecimal(this)),this}fromValue(e){return e instanceof g?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Se(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Se(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=At?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Se(this.m,e)+"e"+Se(this.e,e):this.layer===1?Se(this.m,e)+"e"+Se(this.e,e):this.layer<=At?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Se(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Se(this.mag,e)}abs(){return U(this.sign===0?0:1,this.layer,this.mag)}neg(){return U(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?g.dZero:this.layer===0?D(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?g.dZero:this.layer===0?D(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?g.dZero:this.layer===0?D(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?g.dZero:this.layer===0?D(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return U(0,0,0);let r,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(g.cmpabs(this,t)>0?(r=this,i=t):(r=t,i=this),r.layer===0&&i.layer===0)return g.fromNumber(r.sign*r.mag+i.sign*i.mag);const s=r.layer*Math.sign(r.mag),o=i.layer*Math.sign(i.mag);if(s-o>=2)return r;if(s===0&&o===-1){if(Math.abs(i.mag-Math.log10(r.mag))>St)return r;{const a=Math.pow(10,Math.log10(r.mag)-i.mag),c=i.sign+r.sign*a;return D(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}if(s===1&&o===0){if(Math.abs(r.mag-Math.log10(i.mag))>St)return r;{const a=Math.pow(10,r.mag-Math.log10(i.mag)),c=i.sign+r.sign*a;return D(Math.sign(c),1,Math.log10(i.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(r.mag-i.mag)>St)return r;{const a=Math.pow(10,r.mag-i.mag),c=i.sign+r.sign*a;return D(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(h(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return U(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return U(this.sign*t.sign,0,1);let r,i;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(r=this,i=t):(r=t,i=this),r.layer===0&&i.layer===0)return g.fromNumber(r.sign*i.sign*r.mag*i.mag);if(r.layer>=3||r.layer-i.layer>=2)return D(r.sign*i.sign,r.layer,r.mag);if(r.layer===1&&i.layer===0)return D(r.sign*i.sign,1,r.mag+Math.log10(i.mag));if(r.layer===1&&i.layer===1)return D(r.sign*i.sign,1,r.mag+i.mag);if(r.layer===2&&i.layer===1){const s=D(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)).add(D(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return D(r.sign*i.sign,s.layer+1,s.sign*s.mag)}if(r.layer===2&&i.layer===2){const s=D(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)).add(D(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return D(r.sign*i.sign,s.layer+1,s.sign*s.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=h(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?g.dNaN:this.layer===0?D(this.sign,0,1/this.mag):D(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=h(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return r>i?1:rt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const r=h(e);return this.eq_tolerance(r,t)?0:this.cmp(r)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const r=h(e);if(t==null&&(t=1e-7),this.sign!==r.sign||Math.abs(this.layer-r.layer)>1)return!1;let i=this.mag,s=r.mag;return this.layer>r.layer&&(s=It(s)),this.layer0?D(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):D(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?g.dNaN:this.layer>0?D(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):D(this.sign,0,Math.log10(this.mag))}log(e){return e=h(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?g.dNaN:this.layer===0&&e.layer===0?D(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):g.div(this.log10(),e.log10())}log2(){return this.sign<=0?g.dNaN:this.layer===0?D(this.sign,0,Math.log2(this.mag)):this.layer===1?D(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?D(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):D(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?g.dNaN:this.layer===0?D(this.sign,0,Math.log(this.mag)):this.layer===1?D(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?D(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):D(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=h(e),r=this,i=t;if(r.sign===0)return i.eq(0)?U(1,0,1):r;if(r.sign===1&&r.layer===0&&r.mag===1)return r;if(i.sign===0)return U(1,0,1);if(i.sign===1&&i.layer===0&&i.mag===1)return r;const s=r.absLog10().mul(i).pow10();return this.sign===-1?Math.abs(i.toNumber()%2)%2===1?s.neg():Math.abs(i.toNumber()%2)%2===0?s:g.dNaN:s}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return g.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return D(1,0,t);if(e.sign===0)return g.dOne;e=U(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?D(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?D(-e.sign,e.layer+1,-e.mag):g.dOne}pow_base(e){return h(e).pow(this)}root(e){const t=h(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?g.exp(g.mul(this,g.ln(this).sub(1))):g.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(U(1,0,24)))return g.fromNumber(Ar(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const r=e*e;let i=e,s=12*i,o=1/s,a=t+o;if(a===t||(t=a,i=i*r,s=360*i,o=1/s,a=t-o,a===t))return g.exp(t);t=a,i=i*r,s=1260*i;let c=1/s;return t=t+c,i=i*r,s=1680*i,c=1/s,t=t-c,g.exp(t)}else return this.layer===1?g.exp(g.mul(this,g.ln(this).sub(1))):g.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?g.dOne:this.layer===0&&this.mag<=709.7?g.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?D(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?D(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):D(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return g.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return D(1,2,Math.log10(this.mag)-.3010299956639812);{const e=g.div(U(this.sign,this.layer-1,this.mag),U(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=U(1,0,1)){if(e===1)return g.pow(this,t);if(e===0)return new g(t);if(this.eq(g.dOne))return g.dOne;if(this.eq(-1))return g.pow(this,t);if(e===Number.POSITIVE_INFINITY){const s=this.toNumber();if(s<=1.444667861009766&&s>=.06598803584531254){if(s>1.444667861009099)return g.fromNumber(Math.E);const o=g.ln(this).neg();return o.lambertw().div(o)}else return s>1.444667861009766?g.fromNumber(Number.POSITIVE_INFINITY):g.dNaN}if(this.eq(g.dZero)){let s=Math.abs((e+1)%2);return s>1&&(s=2-s),g.fromNumber(s)}if(e<0)return g.iteratedlog(t,this,-e);t=h(t);const r=e;e=Math.trunc(e);const i=r-e;if(this.gt(g.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let s=0;s3)return U(t.sign,t.layer+(e-s-1),t.mag);if(s>1e4)return t}return t}iteratedexp(e=2,t=U(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return g.tetrate(e,-t,this);e=h(e);let r=g.fromDecimal(this);const i=t;t=Math.trunc(t);const s=i-t;if(r.layer-e.layer>3){const o=Math.min(t,r.layer-e.layer-3);t-=o,r.layer-=o}for(let o=0;o1e4)return r}return s>0&&s<1&&(e.eq(10)?r=r.layeradd10(-s):r=r.layeradd(-s,e)),r}slog(e=10,t=100){let r=.001,i=!1,s=!1,o=this.slog_internal(e).toNumber();for(let a=1;a1&&s!=f&&(i=!0),s=f,i?r/=2:r*=2,r=Math.abs(r)*(f?-1:1),o+=r,r===0)break}return g.fromNumber(o)}slog_internal(e=10){if(e=h(e),e.lte(g.dZero)||e.eq(g.dOne))return g.dNaN;if(e.lt(g.dOne))return this.eq(g.dOne)?g.dZero:this.eq(g.dZero)?g.dNegOne:g.dNaN;if(this.mag<0||this.eq(g.dZero))return g.dNegOne;let t=0,r=g.fromDecimal(this);if(r.layer-e.layer>3){const i=r.layer-e.layer-3;t+=i,r.layer-=i}for(let i=0;i<100;++i)if(r.lt(g.dZero))r=g.pow(e,r),t-=1;else{if(r.lte(g.dOne))return g.fromNumber(t+g.slog_critical(e.toNumber(),r.toNumber()));t+=1,r=g.log(r,e)}return g.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:g.critical_section(e,t,Lr)}static tetrate_critical(e,t){return g.critical_section(e,t,_r)}static critical_section(e,t,r){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let i=0,s=0;for(let a=0;ae){const c=(e-Oe[a])/(Oe[a+1]-Oe[a]);i=r[a][Math.floor(t)]*(1-c)+r[a+1][Math.floor(t)]*c,s=r[a][Math.ceil(t)]*(1-c)+r[a+1][Math.ceil(t)]*c;break}const o=t-Math.floor(t);return i<=0||s<=0?i*(1-o)+s*o:Math.pow(e,Math.log(i)/Math.log(e)*(1-o)+Math.log(s)/Math.log(e)*o)}layeradd10(e){e=g.fromValue_noAlloc(e).toNumber();const t=g.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const r=Math.trunc(e);e-=r,t.layer+=r}if(e<=-1){const r=Math.trunc(e);if(e-=r,t.layer+=r,t.layer<0)for(let i=0;i<100;++i){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const i=this.slog(t).toNumber()+e;return i>=0?g.tetrate(t,i):Number.isFinite(i)?i>=-1?g.log(g.tetrate(t,i+1),t):g.log(g.log(g.tetrate(t,i+2),t),t):g.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return g.fromNumber(Dt(this.toNumber()));if(this.layer===0)return g.fromNumber(Dt(this.sign*this.mag));if(this.layer===1)return Rt(this);if(this.layer===2)return Rt(this);if(this.layer>=3)return U(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return U(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=U(1,0,1)){t=h(t);const r=e;e=Math.trunc(e);const i=r-e;i!==0&&(t.eq(g.dOne)?(++e,t=g.fromNumber(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let s=0;s10)return t}return t}sin(){return this.mag<0?this:this.layer===0?g.fromNumber(Math.sin(this.sign*this.mag)):U(0,0,0)}cos(){return this.mag<0?g.dOne:this.layer===0?g.fromNumber(Math.cos(this.sign*this.mag)):U(0,0,0)}tan(){return this.mag<0?this:this.layer===0?g.fromNumber(Math.tan(this.sign*this.mag)):U(0,0,0)}asin(){return this.mag<0?this:this.layer===0?g.fromNumber(Math.asin(this.sign*this.mag)):U(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?g.fromNumber(Math.acos(this.toNumber())):this.layer===0?g.fromNumber(Math.acos(this.sign*this.mag)):U(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?g.fromNumber(Math.atan(this.sign*this.mag)):g.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return g.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return g.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?U(Number.NaN,Number.NaN,Number.NaN):g.ln(this.add(1).div(g.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(g.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};x(g,"dZero"),x(g,"dOne"),x(g,"dNegOne"),x(g,"dTwo"),x(g,"dTen"),x(g,"dNaN"),x(g,"dInf"),x(g,"dNegInf"),x(g,"dNumberMax"),x(g,"dNumberMin"),x(g,"fromStringCache",new Mr(Vr));let u=g;u.dZero=U(0,0,0);u.dOne=U(1,0,1);u.dNegOne=U(-1,0,1);u.dTwo=U(1,0,2);u.dTen=U(1,0,10);u.dNaN=U(Number.NaN,Number.NaN,Number.NaN);u.dInf=U(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);u.dNegInf=U(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);u.dNumberMax=D(1,0,Number.MAX_VALUE);u.dNumberMin=D(1,0,Number.MIN_VALUE);h=u.fromValue_noAlloc;D=u.fromComponents;U=u.fromComponents_noNormalize;u.fromMantissaExponent;u.fromMantissaExponent_noNormalize;const Dr=new u(1);function Ze(n,e,t=!0){let r=u.log10(n).floor(),i=u.div(n,u.pow(10,r));i.toStringWithDecimalPlaces(e)==="10"&&(i=Dr,r=r.add(1));const s=r.gte(1e9)?ge(r,Math.max(Math.max(e,3),B.defaultDecimalsShown)):r.gte(1e4)?dt(r,0):r.toStringWithDecimalPlaces(0);return t?i.toStringWithDecimalPlaces(e)+"e"+s:"e"+s}function dt(n,e){if(n==null)return"NaN";if(n=new u(n),n.mag<.001)return 0 .toFixed(e);const r=n.toStringWithDecimalPlaces(e).split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),r.length===1?r[0]:r[0]+"."+r[1]}function Qt(n,e){return n==null?"NaN":(n=new u(n),n.mag<1e-4?0 .toFixed(e):(n.mag<.1&&e!==0&&(e=Math.max(Math.max(e,n.log10().negate().ceil().toNumber()),B.defaultDecimalsShown)),n.toStringWithDecimalPlaces(e)))}const Rr=new u("eeee1000"),qr=new u("e100000"),qt=new u("e1000"),en=new u(1e9),Ur=new u(1e6),Br=new u(1e3),zr=new u(.98),Gr=new u(.001),tn=new u(0);function ge(n,e,t){if(e==null&&(e=B.defaultDecimalsShown),t=t??B.defaultShowSmall,n=new u(n),isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag))return"NaN";if(n.sign<0)return"-"+ge(n.neg(),e);if(n.mag===Number.POSITIVE_INFINITY)return"Infinity";if(n.gte(Rr)){const r=n.slog();return r.gte(Ur)?"F"+ge(r.floor()):u.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+dt(r.floor(),0)}else{if(n.gte(qr))return Ze(n,0,!1);if(n.gte(qt))return Ze(n,0);if(n.gte(en))return Ze(n,e);if(n.gte(Br))return dt(n,0);if(n.gte(Gr)||!t)return Qt(n,e);if(n.eq(tn))return 0 .toFixed(e)}return n=rn(n),n.lt(qt)?Ze(n,e).replace(/([^(?:e|F)]*)$/,"-$1"):ge(n,e)+"⁻¹"}function de(n){return n=new u(n),n.sign<0?"-"+de(n.neg()):n.gte(en)||n.lte(zr)&&!n.eq(tn)?ge(n):ge(n,0)}function nn(n){return u.lt(n,0)?"-"+nn(u.neg(n)):u.gt(n,2**51)?ge(u.div(n,31536e3))+"y":(n=new u(n).toNumber(),n<60?ge(n)+"s":n<3600?de(Math.floor(n/60))+"m "+ge(n%60)+"s":n<86400?de(Math.floor(n/3600))+"h "+de(Math.floor(n/60)%60)+"m "+de(n%60)+"s":n<31536e3?de(Math.floor(n/84600)%365)+"d "+de(Math.floor(n/3600)%24)+"h "+de(Math.floor(n/60)%60)+"m":de(Math.floor(n/31536e3))+"y "+de(Math.floor(n/84600)%365)+"d "+de(Math.floor(n/3600)%24)+"h")}function Hr(n,e,t){n=new u(n);let r=n.toStringWithDecimalPlaces(e);return new u(r).gte(t)&&(r=u.sub(t,Math.pow(.1,e)).toStringWithDecimalPlaces(e)),r}function Wr(n,e){return ge(n,e,!0)}function rn(n){let e=u.log10(n).ceil();const t=u.div(n,u.pow(10,e));return e=e.neg(),n=new u(10).pow(e).times(t),n}const jr=Object.freeze(Object.defineProperty({__proto__:null,commaFormat:dt,default:u,exponentialFormat:Ze,format:ge,formatSmall:Wr,formatTime:nn,formatWhole:de,invertOOM:rn,regularFormat:Qt,toPlaces:Hr},Symbol.toStringTag,{value:"Module"})),{exponentialFormat:Jr,commaFormat:Zr,regularFormat:Yr,format:he,formatWhole:Qe,formatTime:yt,toPlaces:Kr,formatSmall:Xr,invertOOM:Qr}=jr;window.Decimal=u;window.exponentialFormat=Jr;window.commaFormat=Zr;window.regularFormat=Yr;window.format=he;window.formatWhole=Qe;window.formatTime=yt;window.toPlaces=Kr;window.formatSmall=Xr;window.invertOOM=Qr;const Me=Symbol("ProxyState"),ft=Symbol("AfterEvaluation");function Fe(n,e={}){const t=e;let r=!1,i=!1;const s=[];function o(){if(!r){if(i)throw new Error("Cyclical dependency detected. Cannot evaluate lazy proxy.");i=!0,Object.assign(t,n.call(t,t)),r=!0,s.forEach(c=>c(t))}return t}function a(c){r?c(t):s.push(c)}return new Proxy(t,{get(c,f){if(f===Me)return o();if(f===ft)return a;const y=o()[f];return y!=null&&typeof y=="object"&&we in y?y[we]:y},set(c,f,y){return o()[f]=y,!0},has(c,f){return f===Me||f===ft?!0:Reflect.has(o(),f)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(c,f){return r||(Object.assign(t,n.call(t,t)),r=!0),Object.getOwnPropertyDescriptor(c,f)}})}function ei(n,e){ft in n?n[ft](e):e(n)}function ti(n){let e=n.replace(/([A-Z])/g," $1");return e=e.charAt(0).toUpperCase()+e.slice(1),e}function ni(n){return(n[0]+n.slice(1).replace(/[A-Z]/g,e=>`-${e}`)).toLowerCase()}function ri(n){return typeof n=="function"}var Y=(n=>(n.Up="Up",n.Down="Down",n.Left="Left",n.Right="Right",n.Default="Up",n))(Y||{});function R(n){return ri(n)&&n.length===0?L(n):n}const sn=u.ln(10);function ut(n){return n}function je(n,...e){const t=e.find(r=>I(r));return t==null?(console.error("Could not invert due to no input being a variable"),0):t.invert(n)}function ii(n,e){return I(e)?e.invert(u.neg(n)):(console.error("Could not invert due to no input being a variable"),0)}function si(n,e){return I(e)?e.isIntegrable()?l.neg(e.getIntegralFormula(n)):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function ai(n){return l.neg(n)}function oi(n,e,t){return I(e)?e.invert(u.sub(n,X(t))):I(t)?t.invert(u.sub(n,X(e))):(console.error("Could not invert due to no input being a variable"),0)}function li(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.times(t,e.innermostVariable??0).add(r)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.times(e,t.innermostVariable??0).add(r)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ui(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.add(r,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.add(r,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ci(n,e,t){return I(e)?e.invert(u.add(n,X(t))):I(t)?t.invert(u.sub(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function di(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.sub(r,l.times(t,e.innermostVariable??0))}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.times(e,t.innermostVariable??0).sub(r)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function fi(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.sub(r,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.sub(r,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function gi(n,e,t){return I(e)?e.invert(u.div(n,X(t))):I(t)?t.invert(u.div(n,X(e))):(console.error("Could not invert due to no input being a variable"),0)}function mi(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.times(r,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.times(r,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function pi(n,e,t){return I(e)?l.div(n,t):I(t)?l.div(n,e):(console.error("Could not apply substitution due to no input being a variable"),l.constant(0))}function hi(n,e,t){return I(e)?e.invert(u.mul(n,X(t))):I(t)?t.invert(u.div(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function vi(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.div(r,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.div(e,r)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function bi(n,e,t){return I(e)?l.mul(n,t):I(t)?l.mul(n,e):(console.error("Could not apply substitution due to no input being a variable"),l.constant(0))}function yi(n,e){return I(e)?e.invert(u.recip(n)):(console.error("Could not invert due to no input being a variable"),0)}function wi(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.ln(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ni(n,e){return I(e)?e.invert(u.pow10(n)):(console.error("Could not invert due to no input being a variable"),0)}function ki(n){return u.ln(n).sub(1).times(n).div(sn)}function Ci(n,e){if(I(e)){const t=sn.times(n);return e.invert(t.div(t.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Si(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:ki,invert:Ci}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Ii(n,e,t){return I(e)?e.invert(u.pow(X(t),n)):I(t)?t.invert(u.root(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function Mi(n,e){return u.ln(n).sub(1).times(n).div(u.ln(e))}function xi(n,e,t){if(I(e)){const r=u.ln(X(t)).times(n);return e.invert(r.div(r.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Ti(n,e,t){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n),t],evaluate:Mi,invert:xi}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function $i(n,e){return I(e)?e.invert(u.pow(2,n)):(console.error("Could not invert due to no input being a variable"),0)}function Pi(n){return u.ln(n).sub(1).times(n).div(u.ln(2))}function Ei(n,e){if(I(e)){const t=u.ln(2).times(n);return e.invert(t.div(t.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Fi(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:Pi,invert:Ei}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Vi(n,e){return I(e)?e.invert(u.exp(n)):(console.error("Could not invert due to no input being a variable"),0)}function Oi(n){return u.ln(n).sub(1).times(n)}function _i(n,e){return I(e)?e.invert(u.div(n,u.div(n,Math.E).lambertw())):(console.error("Could not invert due to no input being a variable"),0)}function Li(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:Oi,invert:_i}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Ai(n,e,t){return I(e)?e.invert(u.root(n,X(t))):I(t)?t.invert(u.ln(n).div(u.ln(X(e)))):(console.error("Could not invert due to no input being a variable"),0)}function Di(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n),i=l.add(t,1);return l.pow(r,i).div(i)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n);return l.pow(e,r).div(l.ln(e))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ri(n,e){return I(e)?e.invert(u.root(n,10)):(console.error("Could not invert due to no input being a variable"),0)}function qi(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.pow10(t).div(l.ln(10))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ui(n,e,t){return I(e)?e.invert(u.ln(n).div(u.ln(X(t)))):I(t)?t.invert(u.root(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function Bi(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.pow(t,r).div(l.ln(t))}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=t.getIntegralFormula(n),i=l.add(e,1);return l.pow(r,i).div(i)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function zi(n,e,t){return I(e)?e.invert(u.root(n,u.recip(X(t)))):I(t)?t.invert(u.ln(X(e)).div(u.ln(n))):(console.error("Could not invert due to no input being a variable"),0)}function Gi(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const r=e.getIntegralFormula(n);return l.pow(r,l.recip(t).add(1)).times(t).div(l.add(t,1))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Hi(n,e){return I(e)?e.invert(u.ln(n)):(console.error("Could not invert due to no input being a variable"),0)}function Wi(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.exp(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ji(n,e=2,t=u.fromComponents_noNormalize(1,0,1)){const r=u.minabs(e,1e308).toNumber();return u.tetrate(n,r,t)}function Ji(n,e,t,r){return I(e)?e.invert(u.ssqrt(n)):(console.error("Could not invert due to no input being a variable"),0)}function Zi(n,e=2,t=u.fromComponents_noNormalize(1,0,1)){const r=u.minabs(e,1e308).toNumber();return u.iteratedexp(n,r,new u(t))}function Yi(n,e,t,r){return I(e)?e.invert(u.iteratedlog(n,Math.E,u.minabs(1e308,X(t)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Ki(n,e=10,t=2){const r=u.minabs(t,1e308).toNumber();return u.iteratedlog(n,e,r)}function Xi(n,e=10){const t=u.minabs(e,1e308).toNumber();return u.slog(n,t)}function Qi(n,e,t){return I(e)?e.invert(u.tetrate(n,u.minabs(1e308,X(t)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function es(n,e,t){const r=u.minabs(e,1e308).toNumber();return u.layeradd(n,r,t)}function ts(n,e,t,r){return I(e)?e.invert(u.layeradd(n,u.minabs(1e308,X(t)).negate().toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function ns(n,e){return I(e)?e.invert(u.pow(Math.E,n).times(n)):(console.error("Could not invert due to no input being a variable"),0)}function rs(n,e){return I(e)?e.invert(u.tetrate(n,2)):(console.error("Could not invert due to no input being a variable"),0)}function is(n,e,t){const r=u.minabs(e,1e308).toNumber();return u.pentate(n,r,t)}function ss(n,e){return I(e)?e.invert(u.asin(n)):(console.error("Could not invert due to no input being a variable"),0)}function as(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cos(t).neg()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function os(n,e){return I(e)?e.invert(u.acos(n)):(console.error("Could not invert due to no input being a variable"),0)}function ls(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.sin(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function us(n,e){return I(e)?e.invert(u.atan(n)):(console.error("Could not invert due to no input being a variable"),0)}function cs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cos(t).ln().neg()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ds(n,e){return I(e)?e.invert(u.sin(n)):(console.error("Could not invert due to no input being a variable"),0)}function fs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.asin(t).times(t).add(l.sqrt(l.sub(1,l.pow(t,2))))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function gs(n,e){return I(e)?e.invert(u.cos(n)):(console.error("Could not invert due to no input being a variable"),0)}function ms(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.acos(t).times(t).sub(l.sqrt(l.sub(1,l.pow(t,2))))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ps(n,e){return I(e)?e.invert(u.tan(n)):(console.error("Could not invert due to no input being a variable"),0)}function hs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.atan(t).times(t).sub(l.ln(l.pow(t,2).add(1)).div(2))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function vs(n,e){return I(e)?e.invert(u.asinh(n)):(console.error("Could not invert due to no input being a variable"),0)}function bs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cosh(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ys(n,e){return I(e)?e.invert(u.acosh(n)):(console.error("Could not invert due to no input being a variable"),0)}function ws(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.sinh(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ns(n,e){return I(e)?e.invert(u.atanh(n)):(console.error("Could not invert due to no input being a variable"),0)}function ks(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cosh(t).ln()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Cs(n,e){return I(e)?e.invert(u.sinh(n)):(console.error("Could not invert due to no input being a variable"),0)}function Ss(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.asinh(t).times(t).sub(l.pow(t,2).add(1).sqrt())}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Is(n,e){return I(e)?e.invert(u.cosh(n)):(console.error("Could not invert due to no input being a variable"),0)}function Ms(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.acosh(t).times(t).sub(l.add(t,1).sqrt().times(l.sub(t,1).sqrt()))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function xs(n,e){return I(e)?e.invert(u.tanh(n)):(console.error("Could not invert due to no input being a variable"),0)}function Ts(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.atanh(t).times(t).add(l.sub(1,l.pow(t,2)).ln().div(2))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ae(n){return(e,t)=>new l({inputs:[e,t],evaluate:n,invert:ut})}function I(n){return n instanceof et&&n.hasVariable()}function X(n,e){return n instanceof et?n.evaluate(e):d(n)}function $s(){return l.pow(this,2).div(2)}function Ps(){return this}const A=class A{constructor(e){x(this,"inputs");x(this,"internalEvaluate");x(this,"internalInvert");x(this,"internalIntegrate");x(this,"internalIntegrateInner");x(this,"applySubstitution");x(this,"description");x(this,"internalVariables");x(this,"innermostVariable");x(this,"negate",this.neg);x(this,"negated",this.neg);x(this,"sgn",this.sign);x(this,"plus",this.add);x(this,"subtract",this.sub);x(this,"minus",this.sub);x(this,"multiply",this.mul);x(this,"times",this.mul);x(this,"divide",this.div);x(this,"divideBy",this.div);x(this,"dividedBy",this.div);x(this,"reciprocal",this.recip);x(this,"reciprocate",this.recip);x(this,"logarithm",this.log);let t;"inputs"in e&&(e.inputs=e.inputs.map(r=>typeof r=="object"&&we in r?r[we]:r)),"variable"in e?(typeof e.variable=="object"&&we in e.variable&&(e.variable=e.variable[we]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution,this.description=e.description}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:$s,internalIntegrateInner:Ps,applySubstitution:ut}}setupConstant({inputs:e}){return e.length!==1&&console.error("Evaluate function is required if inputs is not length 1"),{inputs:e,internalVariables:0}}setupFormula(e){const{inputs:t,evaluate:r,invert:i,integrate:s,integrateInner:o,applySubstitution:a}=e,c=t.reduce((p,k)=>p+(k instanceof A?k.internalVariables:0),0),f=t.find(p=>p instanceof A&&p.hasVariable()),y=c===1?f==null?void 0:f.innermostVariable:void 0,N=(f==null?void 0:f.isInvertible())??!1,w=(f==null?void 0:f.isIntegrable())??!1;return{inputs:t,internalEvaluate:r,internalInvert:N?i:void 0,internalIntegrate:w?s:void 0,internalIntegrateInner:o,applySubstitution:a,innermostVariable:y,internalVariables:c}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t;return((t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(r=>X(r,e))))??(this.hasVariable()?e:null)??X(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,r)=>t instanceof A&&e.inputs[r]instanceof A?t.equals(e.inputs[r]):!(t instanceof A)&&!(e.inputs[r]instanceof A)&&u.eq(d(t),d(e.inputs[r])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new l({inputs:[e]})}static variable(e){return new l({variable:e})}static stringify(e){return e instanceof A?e.description!=null?e.description:e.internalEvaluate==null?e.hasVariable()?"x":he(e.inputs[0]??0):`${e.internalEvaluate.name}(${e.inputs.map(l.stringify).join(", ")})`:he(d(e))}static step(e,t,r){const i=r(l.variable(0)),s=R(t);function o(c){return u.lt(c,d(s))?c:u.add(i.evaluate(u.sub(c,d(s))),d(s))}function a(c,f){return I(f)&&i.isInvertible()?(u.gt(c,d(s))&&(c=u.add(i.invert(u.sub(c,d(s))),d(s))),f.invert(c)):(console.error("Could not invert due to no input being a variable"),0)}return new l({inputs:[e],evaluate:o,invert:i.isInvertible()&&i.hasVariable()?a:void 0,description:"indeterminate"})}static if(e,t,r,i){const s=V(0),o=l.variable(s),a=r(o),c=i==null?void 0:i(o),f=R(t);function y(w){return d(f)?(s.value=w,a.evaluate()):c?(s.value=w,c.evaluate()):w}function N(w,p){return!I(p)||!a.isInvertible()||c!=null&&!c.isInvertible()?(console.error("Could not invert due to no input being a variable"),0):d(f)?p.invert(a.invert(w)):c?p.invert(c.invert(w)):p.invert(w)}return new l({inputs:[e],evaluate:y,invert:a.isInvertible()&&a.hasVariable()?N:void 0,description:"indeterminate"})}static conditional(e,t,r,i){return l.if(e,t,r,i)}static abs(e){return new l({inputs:[e],evaluate:u.abs})}static neg(e){return new l({inputs:[e],evaluate:u.neg,invert:ii,applySubstitution:ai,integrate:si})}static sign(e){return new l({inputs:[e],evaluate:u.sign})}static round(e){return new l({inputs:[e],evaluate:u.round,invert:je})}static floor(e){return new l({inputs:[e],evaluate:u.floor,invert:je})}static ceil(e){return new l({inputs:[e],evaluate:u.ceil,invert:je})}static trunc(e){return new l({inputs:[e],evaluate:u.trunc,invert:je})}static add(e,t){return new l({inputs:[e,t],evaluate:u.add,invert:oi,integrate:li,integrateInner:ui,applySubstitution:ut})}static sub(e,t){return new l({inputs:[e,t],evaluate:u.sub,invert:ci,integrate:di,integrateInner:fi,applySubstitution:ut})}static mul(e,t){return new l({inputs:[e,t],evaluate:u.mul,invert:gi,integrate:mi,applySubstitution:pi})}static div(e,t){return new l({inputs:[e,t],evaluate:u.div,invert:hi,integrate:vi,applySubstitution:bi})}static recip(e){return new l({inputs:[e],evaluate:u.recip,invert:yi,integrate:wi})}static clamp(e,t,r){return new l({inputs:[e,t,r],evaluate:u.clamp,invert:je})}static pLog10(e){return new l({inputs:[e],evaluate:u.pLog10})}static absLog10(e){return new l({inputs:[e],evaluate:u.absLog10})}static log10(e){return new l({inputs:[e],evaluate:u.log10,invert:Ni,integrate:Si})}static log(e,t){return new l({inputs:[e,t],evaluate:u.log,invert:Ii,integrate:Ti})}static log2(e){return new l({inputs:[e],evaluate:u.log2,invert:$i,integrate:Fi})}static ln(e){return new l({inputs:[e],evaluate:u.ln,invert:Vi,integrate:Li})}static pow(e,t){return new l({inputs:[e,t],evaluate:u.pow,invert:Ai,integrate:Di})}static pow10(e){return new l({inputs:[e],evaluate:u.pow10,invert:Ri,integrate:qi})}static pow_base(e,t){return new l({inputs:[e,t],evaluate:u.pow_base,invert:Ui,integrate:Bi})}static root(e,t){return new l({inputs:[e,t],evaluate:u.root,invert:zi,integrate:Gi})}static factorial(e){return new l({inputs:[e],evaluate:u.factorial})}static gamma(e){return new l({inputs:[e],evaluate:u.gamma})}static lngamma(e){return new l({inputs:[e],evaluate:u.lngamma})}static exp(e){return new l({inputs:[e],evaluate:u.exp,invert:Hi,integrate:Wi})}static sqr(e){return l.pow(e,2)}static sqrt(e){return l.root(e,2)}static cube(e){return l.pow(e,3)}static cbrt(e){return l.root(e,3)}static tetrate(e,t=2,r=u.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,r],evaluate:ji,invert:Ji})}static iteratedexp(e,t=2,r=u.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,r],evaluate:Zi,invert:Yi})}static iteratedlog(e,t=10,r=1){return new l({inputs:[e,t,r],evaluate:Ki})}static slog(e,t=10){return new l({inputs:[e,t],evaluate:Xi,invert:Qi})}static layeradd10(e,t){return new l({inputs:[e,t],evaluate:u.layeradd10})}static layeradd(e,t,r=10){return new l({inputs:[e,t,r],evaluate:es,invert:ts})}static lambertw(e){return new l({inputs:[e],evaluate:u.lambertw,invert:ns})}static ssqrt(e){return new l({inputs:[e],evaluate:u.ssqrt,invert:rs})}static pentate(e,t=2,r=u.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,r],evaluate:is})}static sin(e){return new l({inputs:[e],evaluate:u.sin,invert:ds,integrate:as})}static cos(e){return new l({inputs:[e],evaluate:u.cos,invert:gs,integrate:ls})}static tan(e){return new l({inputs:[e],evaluate:u.tan,invert:ps,integrate:cs})}static asin(e){return new l({inputs:[e],evaluate:u.asin,invert:ss,integrate:fs})}static acos(e){return new l({inputs:[e],evaluate:u.acos,invert:os,integrate:ms})}static atan(e){return new l({inputs:[e],evaluate:u.atan,invert:us,integrate:hs})}static sinh(e){return new l({inputs:[e],evaluate:u.sinh,invert:Cs,integrate:bs})}static cosh(e){return new l({inputs:[e],evaluate:u.cosh,invert:Is,integrate:ws})}static tanh(e){return new l({inputs:[e],evaluate:u.tanh,invert:xs,integrate:ks})}static asinh(e){return new l({inputs:[e],evaluate:u.asinh,invert:vs,integrate:Ss})}static acosh(e){return new l({inputs:[e],evaluate:u.acosh,invert:ys,integrate:Ms})}static atanh(e){return new l({inputs:[e],evaluate:u.atanh,invert:Ns,integrate:Ts})}stringify(){return l.stringify(this)}step(e,t){return l.step(this,e,t)}if(e,t){return l.if(this,e,t)}conditional(e,t){return l.if(this,e,t)}abs(){return l.abs(this)}neg(){return l.neg(this)}sign(){return l.sign(this)}round(){return l.round(this)}floor(){return l.floor(this)}ceil(){return l.ceil(this)}trunc(){return l.trunc(this)}add(e){return l.add(this,e)}sub(e){return l.sub(this,e)}mul(e){return l.mul(this,e)}div(e){return l.div(this,e)}recip(){return l.recip(this)}max(e){return l.max(this,e)}min(e){return l.min(this,e)}maxabs(e){return l.maxabs(this,e)}minabs(e){return l.minabs(this,e)}clamp(e,t){return l.clamp(this,e,t)}clampMin(e){return l.clampMin(this,e)}clampMax(e){return l.clampMax(this,e)}pLog10(){return l.pLog10(this)}absLog10(){return l.absLog10(this)}log10(){return l.log10(this)}log(e){return l.log(this,e)}log2(){return l.log2(this)}ln(){return l.ln(this)}pow(e){return l.pow(this,e)}pow10(){return l.pow10(this)}pow_base(e){return l.pow_base(this,e)}root(e){return l.root(this,e)}factorial(){return l.factorial(this)}gamma(){return l.gamma(this)}lngamma(){return l.lngamma(this)}exp(){return l.exp(this)}sqr(){return l.pow(this,2)}sqrt(){return l.root(this,2)}cube(){return l.pow(this,3)}cbrt(){return l.root(this,3)}tetrate(e=2,t=u.fromComponents_noNormalize(1,0,1)){return l.tetrate(this,e,t)}iteratedexp(e=2,t=u.fromComponents_noNormalize(1,0,1)){return l.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return l.iteratedlog(this,e,t)}slog(e=10){return l.slog(this,e)}layeradd10(e){return l.layeradd10(this,e)}layeradd(e,t){return l.layeradd(this,e,t)}lambertw(){return l.lambertw(this)}ssqrt(){return l.ssqrt(this)}pentate(e=2,t=u.fromComponents_noNormalize(1,0,1)){return l.pentate(this,e,t)}sin(){return l.sin(this)}cos(){return l.cos(this)}tan(){return l.tan(this)}asin(){return l.asin(this)}acos(){return l.acos(this)}atan(){return l.atan(this)}sinh(){return l.sinh(this)}cosh(){return l.cosh(this)}tanh(){return l.tanh(this)}asinh(){return l.asinh(this)}acosh(){return l.acosh(this)}atanh(){return l.atanh(this)}};x(A,"negate",A.neg),x(A,"negated",A.neg),x(A,"sgn",A.sign),x(A,"plus",A.add),x(A,"subtract",A.sub),x(A,"minus",A.sub),x(A,"multiply",A.mul),x(A,"times",A.mul),x(A,"divide",A.div),x(A,"divideBy",A.div),x(A,"dividedBy",A.div),x(A,"reciprocal",A.recip),x(A,"reciprocate",A.recip),x(A,"max",Ae(u.max)),x(A,"min",Ae(u.min)),x(A,"minabs",Ae(u.minabs)),x(A,"maxabs",Ae(u.maxabs)),x(A,"clampMin",Ae(u.clampMin)),x(A,"clampMax",Ae(u.clampMax)),x(A,"logarithm",A.log);let et=A;class l extends et{constructor(){super(...arguments);x(this,"integralFormula")}invert(t){return this.internalInvert&&this.hasVariable()?this.internalInvert.call(this,t,...this.inputs):this.inputs.length===1&&this.hasVariable()?t:(console.error("Cannot invert non-invertible formula"),0)}evaluateIntegral(t){return this.isIntegrable()?this.getIntegralFormula().evaluate(t):(console.error("Cannot evaluate integral of formula without integral"),0)}invertIntegral(t){return!this.isIntegrable()||!this.getIntegralFormula().isInvertible()?(console.error("Cannot invert integral of formula without invertible integral"),0):this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),r=u.add(this.evaluate(0),this.evaluate(1)).div(2);return u.sub(r,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)return console.error("Cannot integrate formula with non-integrable operation"),l.constant(0);let r=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(i=>r=i(r)),this.integralFormula=r}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else return console.error("Cannot integrate formula without variable"),l.constant(0);return this.integralFormula}else return this.applySubstitution==null?(console.error("Cannot have two complex operations in an integrable formula"),l.constant(0)):(t.push(r=>this.applySubstitution.call(this,r,...this.inputs)),this.internalIntegrateInner?this.internalIntegrateInner.call(this,t,...this.inputs):this.internalIntegrate?this.internalIntegrate.call(this,t,...this.inputs):this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable()?this:(console.error("Cannot integrate formula without variable"),l.constant(0)))}}const Te=Symbol("PersistentState"),Le=Symbol("DefaultValue"),gt=Symbol("StackTrace"),mt=Symbol("Deleted"),we=Symbol("NonPersistent"),_e=Symbol("SaveDataPath"),Ge=Symbol("SkipPersistence");function Es(){var n;return((n=new Error().stack)==null?void 0:n.split(` -`).slice(3,5).map(e=>e.trim()).join(` -`))??""}function Ut(n,e){var t;u.isNaN(e)&&(G.hasNaN||(M.autosave=!1,G.hasNaN=!0,G.NaNPath=n[_e],G.NaNPersistent=n),console.error(`Attempted to save NaN value to ${(t=n[_e])==null?void 0:t.join(".")}`)),n[Te].value=e}function st(n,e=!0){const t=se(n)?n:V(n);se(n)&&(n=n.value);const r=L({get(){return t.value},set(s){e?Ut(i,s):i[Te].value=s}});r[Le]=n;const i={get value(){return t.value},set value(s){e?Ut(i,s):i[Te].value=s},__v_isRef:!0,[Te]:t,[Le]:n,[gt]:Es(),[mt]:!1,[we]:r,[_e]:void 0};return le.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,` -Created at: -`+i[gt]):Re[le[le.length-1]].add(i),i}function Fs(n){return n!=null&&typeof n=="object"&&Te in n}function an(n){return!(Me in n)&&we in n?n[we]:new Proxy(n,{get(e,t){if(t!==Te)return t===Ge?!0:e[t]},set(e,t,r){return e[t]=r,!0},has(e,t){return t===Te?!1:t===Ge?!0:Reflect.has(e,t)}})}function Vs(n){le.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",n):Re[le[le.length-1]].delete(n),n[mt]=!0}ne.on("addLayer",(n,e)=>{const t=[],r=(i,s=[])=>{let o=!1;return Object.keys(i).forEach(a=>{let c=i[a];if(c!=null&&typeof c=="object"){if(Ge in c&&c[Ge]===!0)return;if(Me in c&&(c=c[Me]),Fs(c)){if(o=!0,c[mt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,` -Created at: -`+c[gt]);return}Re[n.id].delete(c);const f=[n.id,...s,a];c[_e]!=null&&JSON.stringify(f)!==JSON.stringify(c[_e])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${c[_e].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),c[_e]=f;const y=s.reduce((w,p)=>(p in w||(w[p]={}),w[p]),e),N=y[a];y[a]=c[Te],Mn(y)?N!=null?y[a]=N:y[a]=c[Le]:N!=null?y[a].value=N:y[a].value=c[Le]}else!(c instanceof u)&&!(c instanceof l)&&!se(c)&&!t.includes(c)&&(typeof c.type=="symbol"&&t.push(c),r(c,[...s,a])&&(Array.isArray(c)&&!Array.isArray(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Me in i?i[Me]:i,a):o=!0))}}),o};r(n[Me]),Re[n.id].forEach(i=>{i[mt]||console.error(`Created persistent ref in "${n.id}" without registering it to the layer!`,`Make sure to include everything persistent in the returned object. - -Created at: -`+i[gt])}),Re[n.id].clear()});const on=Symbol("RegisterNode"),ln=Symbol("UnregisterNode"),un=Symbol("Nodes"),cn=Symbol("Bounds"),ie=bt({});window.layers=ie;const Re={},le=[];function dn(n,e){return Fe(()=>{const t=Zt();le.push(n),Re[n]=new Set;const r={id:n,emitter:t,...t,nodes:V({}),minimized:st(!1,!1)},i=e(r),{color:s,display:o,classes:a,style:c,name:f,forceHideGoBack:y,minWidth:N,minimizable:w,minimizedDisplay:p,...k}=i;if(le[le.length-1]==null||le[le.length-1]!==n)throw new Error(`Adding layers stack in invalid state. This should not happen -Stack: ${le} -Trying to pop ${n}`);le.pop();const S=R(c),$={...r,...k,color:R(s),display:o,classes:R(a),style:L(()=>{let T=d($.minWidth);return(typeof T=="number"||!Number.isNaN(parseInt(T)))&&(T=T+"px"),{...d(S),...r.minimized.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:T,flexBasis:T,margin:""}}}),name:R(f)??n,forceHideGoBack:R(y),minWidth:R(N)??600,minimizable:R(w)??!0,minimizedDisplay:p};return $})}function Os(n,e){if(console.info("Adding layer",n.id),ie[n.id]!=null){console.error("Attempted to add layer with same ID as existing layer",n.id,ie[n.id]);return}e.layers??(e.layers={}),e.layers[n.id]==null&&(e.layers[n.id]={}),ie[n.id]=n,ne.emit("addLayer",n,e.layers[n.id])}function _s(n){console.info("Removing layer",n.id),ne.emit("removeLayer",n),delete ie[n.id]}ne.on("update",function(e){Object.values(ie).forEach(t=>{t==null||t.emit("preUpdate",e)}),Object.values(ie).forEach(t=>{t==null||t.emit("update",e)}),Object.values(ie).forEach(t=>{t==null||t.emit("postUpdate",e)})});const Ls=z({__name:"Node",props:{id:{}},setup(n){const e=n,t=ct(on,()=>{}),r=ct(ln,()=>{}),i=it(null),s=L(()=>i.value&&i.value.parentElement);return ae([s,pe(e,"id")],([o,a],[c,f])=>{c&&r(d(f)),o&&t(a,o)}),Wt(()=>r(e.id)),(o,a)=>(b(),C("div",{class:"node",ref_key:"node",ref:i},null,512))}}),Ye=Z(Ls,[["__scopeId","data-v-4673aca5"]]),As=z({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(n){return(e,t)=>(b(),C("div",{style:fe({width:e.width,height:e.height})},null,4))}});function fn(n,e="points",t=0,r=void 0){const i=se(n)?n:st(n);if(i.displayName=e,i.precision=t,i.small=r,!se(n)){const s=i[we];s.displayName=e,s.precision=t,s.small=r}return i}function Ds(n){const e=st(n.value);return ae(n,t=>{Nt.value||u.gt(t,e.value)&&(e.value=t)}),e}function Rs(n){const e=st(n.value);return ae(n,(t,r)=>{Nt.value||u.gt(t,r)&&(e.value=u.add(e.value,u.sub(t,r)))}),e}const qs=new u("10^^8"),Us=new u("1e100");function Bs(n,e){const t=V(0),r=V(0),i=V(0);return ne.on("update",o=>{if(r.value=0,u.lte(n.value,Us)){i.value=n.value;return}let a=n.value,c=i.value;if(i.value=a,u.gt(a,c))if(u.gte(a,qs))a=u.slog(a,1e10),c=u.slog(c,1e10),t.value=a.sub(c).div(o),r.value=-1;else for(;u.div(a,c).log(10).div(o).gte("100")&&r.value<=5&&u.gt(c,0);)a=u.log10(a),c=u.log10(c),t.value=a.sub(c).div(o),r.value++}),L(()=>r.value===0?e?he(e.value,n.precision,n.small)+" "+n.displayName+"/s":"":he(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function pt(n,e){const t=e??n.value;return u.eq(n.precision,0)?Qe(n.small?t:u.floor(t)):he(t,n.precision,n.small)}let zs=0;function Gs(n="feature-"){return n+zs++}function gn(n){const e=d(n);return e!==2&&e!==!1}function Hs(n){return d(n)===1}function mn(n,...e){const t=[],r=i=>{Object.keys(i).forEach(s=>{const o=i[s];o!=null&&typeof o=="object"&&o.__v_isVNode!==!0&&(e.includes(o.type)?t.push(o):!(o instanceof u)&&!se(o)&&r(o))})};return r(n),t}const Ws=z({__name:"VueFeature",props:{id:{},components:{},wrappers:{},visibility:{default:!0},style:{default:()=>({})},classes:{default:()=>({})}},setup(n){const e=n,t=()=>e.wrappers.reduce((r,i)=>()=>i(r),()=>v(j,null,[e.components.map(r=>te(r))]))();return(r,i)=>d(gn)(d(r.visibility))?(b(),C("div",{key:0,style:fe([{visibility:d(Hs)(d(r.visibility))?"hidden":void 0},d(r.style)]),class:K({feature:!0,...d(r.classes)})},[v(t),v(Ye,{id:r.id},null,8,["id"])],6)):E("",!0)}}),pn=Symbol("VueFeature");function wt(n,e,t){return{id:Gs(n),visibility:R(e.visibility),classes:R(e.classes),style:R(e.style),components:t==null?[]:[t],wrappers:[],[pn]:!0}}function te(n,e){if(typeof n=="object"&&pn in n){const{id:t,visibility:r,style:i,classes:s,components:o,wrappers:a}=n;return v(Ws,{id:t,visibility:r,style:i,classes:s,components:o,wrappers:a},null)}return n=jt(n),(e==null?void 0:e(n))??n}function js(n){return n!=null&&typeof n=="object"&&"type"in n&&"children"in n}function hn(n,e){const t=V(null),r=V(void 0);function i(a){t.value==null&&(t.value=setInterval(o,250)),r.value=a}function s(){t.value!=null&&(clearInterval(t.value),t.value=null)}function o(){e&&e.value?e.value():n&&n.value&&n.value(r.value)}return Wt(s),{start:i,stop:s,handleHolding:o}}function Js(n){return Object.keys(n).reduce((e,t)=>(e[ni(t)]=n[t],e),{})}const Zs=["x1","y1","x2","y2"],Ys=z({__name:"Link",props:{link:{},startNode:{},endNode:{},boundingRect:{}},setup(n){const e=n,t=L(()=>{const s=e.startNode.rect,o=e.boundingRect,a=o?{x:s.x+s.width/2-o.x,y:s.y+s.height/2-o.y}:{x:0,y:0};return e.link.offsetStart&&(a.x+=e.link.offsetStart.x,a.y+=e.link.offsetStart.y),a}),r=L(()=>{const s=e.endNode.rect,o=e.boundingRect,a=o?{x:s.x+s.width/2-o.x,y:s.y+s.height/2-o.y}:{x:0,y:0};return e.link.offsetEnd&&(a.x+=e.link.offsetEnd.x,a.y+=e.link.offsetEnd.y),a}),i=L(()=>Js(e.link));return(s,o)=>(b(),C("line",Ce({"stroke-width":"15px",stroke:"white"},i.value,{x1:t.value.x,y1:t.value.y,x2:r.value.x,y2:r.value.y}),null,16,Zs))}}),Ks=z({__name:"Links",props:{links:{}},setup(n){var f;const e=n;function t(){var y;a.value=(y=i.value)==null?void 0:y.getBoundingClientRect()}const r=new ResizeObserver(t),i=it(null),s=ct(un,V({})),o=ct(cn,V(void 0)),a=V((f=i.value)==null?void 0:f.getBoundingClientRect());ae(o,t),rt(()=>{const y=i.value;y!=null&&r.observe(y),t()});const c=L(()=>{var N;const y=s.value;return((N=d(e.links))==null?void 0:N.filter(w=>{var p,k;return((p=y[w.startNode.id])==null?void 0:p.rect)&&((k=y[w.endNode.id])==null?void 0:k.rect)}))??[]});return(y,N)=>(b(),C(j,null,[c.value?(b(),C("svg",xn(Ce({key:0},y.$attrs)),[(b(!0),C(j,null,Ie(c.value,(w,p)=>(b(),J(Ys,{key:p,link:w,boundingRect:a.value,startNode:d(s)[w.startNode.id],endNode:d(s)[w.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):E("",!0),m("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}}),Xs=Z(Ks,[["__scopeId","data-v-e0f93f6c"]]),Qs=z({__name:"Tree",props:{nodes:{},leftSideNodes:{},rightSideNodes:{},branches:{}},setup(n){const e=n,t=()=>d(e.nodes).map(s=>v("span",{class:"row tree-row",style:"margin: 50px auto;"},[s.map(o=>te(o))])),r=()=>e.leftSideNodes==null?v(j,null,null):v("span",{class:"left-side-nodes small"},[d(e.leftSideNodes).map(s=>te(s))]),i=()=>e.rightSideNodes==null?v(j,null,null):v("span",{class:"side-nodes small"},[d(e.rightSideNodes).map(s=>te(s))]);return(s,o)=>(b(),C(j,null,[v(t),s.leftSideNodes?(b(),J(r,{key:0})):E("",!0),s.rightSideNodes?(b(),J(i,{key:1})):E("",!0),s.branches?(b(),J(Xs,{key:2,links:d(s.branches)},null,8,["links"])):E("",!0)],64))}}),ea=Z(Qs,[["__scopeId","data-v-5267d3ea"]]),ta=z({__name:"TreeNode",props:{canClick:{},display:{},onClick:{},onHold:{},color:{},glowColor:{}},setup(n){const e=n,t=()=>e.display==null?v(j,null,null):te(e.display,s=>v("div",null,[s])),{start:r,stop:i}=hn(pe(e,"onClick"),pe(e,"onHold"));return(s,o)=>(b(),C("button",{style:fe({backgroundColor:d(s.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${d(s.glowColor)}`}),class:K({treeNode:!0,can:d(s.canClick)}),onClick:o[0]||(o[0]=(...a)=>s.onClick&&s.onClick(...a)),onMousedown:o[1]||(o[1]=(...a)=>d(r)&&d(r)(...a)),onMouseleave:o[2]||(o[2]=(...a)=>d(i)&&d(i)(...a)),onMouseup:o[3]||(o[3]=(...a)=>d(i)&&d(i)(...a)),onTouchstartPassive:o[4]||(o[4]=(...a)=>d(r)&&d(r)(...a)),onTouchendPassive:o[5]||(o[5]=(...a)=>d(i)&&d(i)(...a)),onTouchcancelPassive:o[6]||(o[6]=(...a)=>d(i)&&d(i)(...a))},[v(t)],38))}}),na=Z(ta,[["__scopeId","data-v-87cf0f3f"]]),ra=Symbol("TreeNode"),ia=Symbol("Tree");function sa(n){return Fe(()=>{const e=(n==null?void 0:n())??{},{canClick:t,color:r,display:i,glowColor:s,onClick:o,onHold:a,...c}=e,f={type:ra,...c,...wt("treeNode",e,()=>v(na,{canClick:f.canClick,display:f.display,onClick:f.onClick,onHold:f.onHold,color:f.color,glowColor:f.glowColor},null)),canClick:R(t)??!0,color:R(r),display:i,glowColor:R(s),onClick:o==null?void 0:function(y){d(f.canClick)!==!1&&o.call(f,y)},onHold:a==null?void 0:function(){d(f.canClick)!==!1&&a.call(f)}};return f})}function aa(n){return Fe(()=>{const e=n(),{branches:t,nodes:r,leftSideNodes:i,rightSideNodes:s,resetPropagation:o,onReset:a,style:c,...f}=e,y=R(c);e.style=()=>({position:"static",...d(y)??{}});const N=t==null?void 0:R(t),w={type:ia,...f,...wt("tree",e,()=>v(ea,{nodes:w.nodes,leftSideNodes:w.leftSideNodes,rightSideNodes:w.rightSideNodes,branches:w.branches},null)),branches:N,isResetting:V(!1),resettingNode:it(null),nodes:R(r),leftSideNodes:R(i),rightSideNodes:R(s),links:N==null?[]:an(N),resetPropagation:o,onReset:a,reset:function(p){var k,S;w.isResetting.value=!0,w.resettingNode.value=p,(k=w.resetPropagation)==null||k.call(w,w,p),(S=w.onReset)==null||S.call(w,p),w.isResetting.value=!1,w.resettingNode.value=null}};return w})}const oa=function(n,e){var s;const t=d(n.branches);if(t==null)return;const r=[];let i=[e];for(;i.length!==0;){const o=[];for(const a of i)for(const c of t.filter(f=>f.startNode===a))[...r,...i].includes(c.endNode)||(o.push(c.endNode),(s=c.endNode.reset)==null||s.reset());r.push(...i),i=o}};function la(n,e=null,t=0){const r=R(t);return()=>e==null||u.gte(n.value,d(r))?pt(n)+" "+n.displayName:`Reach ${u.eq(e.precision,0)?Qe(d(r)):he(d(r),e.precision)} ${e.displayName} to unlock (You have ${u.eq(e.precision,0)?Qe(e.value):he(e.value,e.precision)})`}const ua=Symbol("Conversion");function ca(n){return Fe(()=>{const e=n(),{baseResource:t,gainResource:r,formula:i,currentGain:s,actualGain:o,currentAt:a,nextAt:c,convert:f,spend:y,buyMax:N,onConvert:w,...p}=e,k=s==null?L(()=>{let $=u.floor(S.formula.evaluate(t.value)).max(0);return d(S.buyMax)===!1&&($=$.min(1)),$}):R(s),S={type:ua,...p,baseResource:t,gainResource:r,formula:i(l.variable(t)),currentGain:k,actualGain:o==null?k:R(o),currentAt:a==null?L(()=>S.formula.invert(u.floor(d(S.currentGain)))):R(a),nextAt:c==null?L(()=>S.formula.invert(u.floor(d(S.currentGain)).add(1))):R(c),convert:f??function(){const $=d(S.currentGain);r.value=u.add(r.value,$),S.spend($),w==null||w($)},spend:y??(()=>t.value=0),buyMax:R(N)??!0,onConvert:w};return S})}function da(n){return ca(n)}const fa={class:"key"},ga=z({__name:"Hotkey",props:{hotkey:{}},setup(n){const e=n;let t="",r=!1,i=!1,s=!1;return Jt(()=>{t=e.hotkey.key,r=t.startsWith("ctrl+"),r&&(t=t.slice(5)),i=t.startsWith("shift+"),i&&(t=t.slice(6)),s=t.length==1&&t.toLowerCase()!=t.toUpperCase(),s&&(t=t.toUpperCase())}),(o,a)=>(b(),C(j,null,[d(r)?(b(),C(j,{key:0},[a[0]||(a[0]=m("div",{class:"key"},"Ctrl",-1)),a[1]||(a[1]=F("+"))],64)):E("",!0),d(i)?(b(),C(j,{key:1},[a[2]||(a[2]=m("div",{class:"key"},"Shift",-1)),a[3]||(a[3]=F("+"))],64)):E("",!0),m("div",fa,_(d(t)),1)],64))}}),ma=Z(ga,[["__scopeId","data-v-7bcb4952"]]),tt=bt({}),Ft=Symbol("Hotkey"),Je=[")","!","@","#","$","%","^","&","*","("];function pa(n){return Fe(()=>{const e=n(),{enabled:t,description:r,key:i,onPress:s,...o}=e;return{type:Ft,...o,enabled:R(t)??!0,description:R(r),key:i,onPress:s}})}ne.on("addLayer",n=>{mn(n,Ft).forEach(e=>{tt[e.key]=e})});ne.on("removeLayer",n=>{mn(n,Ft).forEach(e=>{tt[e.key]=void 0})});document.onkeydown=function(n){var r;if(((r=n.target)==null?void 0:r.tagName)==="INPUT"||qe.value&&!M.keepGoing)return;const e=[n.key];n.shiftKey&&n.ctrlKey?(e.splice(0,1),e.push("ctrl+shift+"+n.key.toUpperCase()),e.push("shift+ctrl+"+n.key.toUpperCase()),Je.includes(n.key)?(e.push("ctrl+shift+"+Je.indexOf(n.key)),e.push("shift+ctrl+"+Je.indexOf(n.key))):(e.push("ctrl+shift+"+n.key.toLowerCase()),e.push("shift+ctrl+"+n.key.toLowerCase()))):Je.includes(n.key)?(e.push("shift+"+n.key),e.push("shift+"+Je.indexOf(n.key))):n.shiftKey?(e.push("shift+"+n.key.toUpperCase()),e.push("shift+"+n.key.toLowerCase())):n.ctrlKey&&(e.splice(0,1),e.push("ctrl+"+n.key));const t=tt[e.find(i=>i in tt)??""];t!=null&&d(t.enabled)!==!1&&(n.preventDefault(),t.onPress())};ne.on("setupVue",()=>Ba(()=>{const n=Object.values(tt).filter(e=>d(e==null?void 0:e.enabled));return n.length===0?"":v("div",null,[v("br",null,null),v("h4",null,[F("Hotkeys")]),v("div",{style:"column-count: 2"},[n.map(e=>v("div",null,[v(ma,{hotkey:e},null),F(" "),d(e==null?void 0:e.description)]))])])}));const ha=Symbol("Reset");function va(n){return Fe(()=>{const e=n(),{thingsToReset:t,onReset:r,...i}=e,s={type:ha,...i,onReset:r,thingsToReset:R(t),reset:function(){const o=a=>{if(a!=null&&typeof a=="object"&&!(a instanceof u)&&!(a instanceof l)){if(Ge in a&&a[Ge]===!0)return;if(Le in a){const c=a;c.value=c[Le]}else!(a instanceof u)&&!se(a)&&Object.values(a).forEach(c=>o(c))}};d(s.thingsToReset).forEach(o),ne.emit("reset",s),r==null||r()}};return s})}const ot={};ne.on("removeLayer",n=>{var e;(e=ot[n.id])==null||e.call(ot),ot[n.id]=void 0});const ba=z({__name:"Sticky",setup(n){const e=V("0"),t=new ResizeObserver(i),r=it(null);function i(){let s=r.value;if(s==null)return;let o=0;for(;s.previousSibling;){const a=s.previousSibling;a.dataset&&"vSticky"in a.dataset&&(o+=a.offsetHeight),s=a}e.value=o+"px"}return Be(i),document.fonts.ready.then(i),rt(()=>{var o;const s=(o=r.value)==null?void 0:o.parentElement;s&&t.observe(s)}),(s,o)=>(b(),C("div",{class:"sticky",style:fe({top:e.value}),ref_key:"element",ref:r,"data-v-sticky":""},[xe(s.$slots,"default",{},void 0,!0)],4))}}),ya=Z(ba,[["__scopeId","data-v-10a04be9"]]),wa=z({__name:"Resource",props:{resource:{},color:{}},setup(n){const e=n,t=L(()=>pt(e.resource));return(r,i)=>(b(),C("h2",{style:fe({color:r.color,"text-shadow":"0px 0px 10px "+r.color})},_(t.value),5))}}),Na={key:0},ka={key:1},Ca=z({__name:"MainDisplay",props:{resource:{},color:{},classes:{},style:{type:[Boolean,null,String,Object,Array]},effectDisplay:{}},setup(n){const e=n,t=V(null),r=()=>jt(e.effectDisplay),i=L(()=>u.lt(e.resource.value,"1e1000"));return(s,o)=>(b(),J(ya,null,{default:O(()=>{var a;return[m("div",{class:K(["main-display-container",s.classes??{}]),style:fe([{height:`${(((a=t.value)==null?void 0:a.clientHeight)??0)+20}px`},s.style??{}])},[m("div",{class:"main-display",ref_key:"displayRef",ref:t},[i.value?(b(),C("span",Na,"You have ")):E("",!0),v(wa,{resource:s.resource,color:s.color||"white"},null,8,["resource","color"]),F(" "+_(s.resource.displayName)+" ",1),s.effectDisplay?(b(),C("span",ka,[o[0]||(o[0]=F(", ")),v(r)])):E("",!0)],512)],6)]}),_:1}))}}),Sa={key:0,class:"material-icons pinned"},Ia=z({__name:"Tooltip",props:{pinned:{},display:{},style:{},classes:{},direction:{},xoffset:{},yoffset:{}},setup(n){const e=n,t=V(!1),r=L(()=>{var a;return((a=e.pinned)==null?void 0:a.value)===!0||t.value}),i=()=>te(e.display);function s(a){const c=e.pinned;a.shiftKey&&c!=null&&(c.value=!c.value,a.stopPropagation(),a.preventDefault())}const o=L(()=>{var a;return((a=e.pinned)==null?void 0:a.value)===!0&&Et[H.theme].showPin});return(a,c)=>(b(),C("div",{class:K(["tooltip-container",{shown:r.value}]),onMouseenter:c[0]||(c[0]=f=>t.value=!0),onMouseleave:c[1]||(c[1]=f=>t.value=!1),onClickCapture:s},[xe(a.$slots,"default",{},void 0,!0),v(Ht,{name:"fade"},{default:O(()=>[r.value?(b(),C("div",{key:0,class:K(["tooltip",{top:d(a.direction)===d(Y).Up,left:d(a.direction)===d(Y).Left,right:d(a.direction)===d(Y).Right,bottom:d(a.direction)===d(Y).Down,...d(a.classes)}]),style:fe([{"--xoffset":d(a.xoffset)||"0px","--yoffset":d(a.yoffset)||"0px"},d(a.style)??{}])},[o.value?(b(),C("span",Sa,"push_pin")):E("",!0),v(i)],6)):E("",!0)]),_:1})],34))}}),Q=Z(Ia,[["__scopeId","data-v-242b1351"]]);function Ma(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Tn(n)}function xa(n,e){const t=st(!1,!1),r=Fe(()=>{const i=e(),{pinnable:s,display:o,direction:a,xoffset:c,yoffset:f,...y}=i;return s===!1&&Vs(t),{...y,...wt("tooltip",i),pinnable:s??!0,pinned:s===!1?void 0:t,display:o,direction:R(a??Y.Up),xoffset:R(c),yoffset:R(f)}});ei(n,i=>{r.id,i.tooltip=r,i.wrappers.push(s=>gn(r.visibility??!0)?v(Q,{pinned:r.pinned,display:r.display,classes:r.classes,style:r.style,direction:r.direction,xoffset:r.xoffset,yoffset:r.yoffset},Ma(s)?s:{default:()=>[s]}):v(j,null,[s]))})}const Ta=["disabled"],$a=z({__name:"Clickable",props:{canClick:{},onClick:{},onHold:{},display:{}},setup(n){const e=n,t=()=>e.display==null?v(j,null,null):te(e.display),{start:r,stop:i}=hn(pe(e,"onClick"),pe(e,"onHold"));return(s,o)=>(b(),C("button",{onClick:o[0]||(o[0]=(...a)=>s.onClick&&s.onClick(...a)),onMousedown:o[1]||(o[1]=(...a)=>d(r)&&d(r)(...a)),onMouseleave:o[2]||(o[2]=(...a)=>d(i)&&d(i)(...a)),onMouseup:o[3]||(o[3]=(...a)=>d(i)&&d(i)(...a)),onTouchstartPassive:o[4]||(o[4]=(...a)=>d(r)&&d(r)(...a)),onTouchendPassive:o[5]||(o[5]=(...a)=>d(i)&&d(i)(...a)),onTouchcancelPassive:o[6]||(o[6]=(...a)=>d(i)&&d(i)(...a)),class:K({clickable:!0,can:d(s.canClick),locked:!d(s.canClick)}),disabled:!d(s.canClick)},[v(t)],42,Ta))}}),Pa=Z($a,[["__scopeId","data-v-1f365c4c"]]),Ea=Symbol("Clickable");function Fa(n){return Fe(()=>{const e=(n==null?void 0:n())??{},{canClick:t,display:r,onClick:i,onHold:s,...o}=e;let a;typeof r=="object"&&!js(r)?a=()=>v("span",null,[r.title!=null?v("div",null,[te(r.title,f=>v("h3",null,[f]))]):null,te(r.description,f=>v("div",null,[f]))]):r!=null&&(a=r);const c={type:Ea,...o,...wt("clickable",e,()=>v(Pa,{canClick:c.canClick,onClick:c.onClick,display:c.display},null)),canClick:R(t)??!0,display:a,onClick:i==null?void 0:function(f){d(c.canClick)!==!1&&i.call(c,f)},onHold:s==null?void 0:function(){d(c.canClick)!==!1&&s.call(c)}};return c})}function Va(n){const e=Fa(()=>{const t=n(),{conversion:r,tree:i,treeNode:s,resetTime:o,resetDescription:a,showNextAt:c,minimumGain:f,display:y,canClick:N,onClick:w,...p}=t;return{...p,conversion:r,tree:i,treeNode:s,resetTime:o,resetDescription:R(a)??L(()=>u.lt(r.gainResource.value,1e3)?"Reset for ":""),showNextAt:R(c)??!0,minimumGain:R(f)??1,canClick:R(N)??L(()=>u.gte(d(r.actualGain),d(e.minimumGain))),display:y??(()=>v("span",null,[d(e.resetDescription),v("b",null,[pt(r.gainResource,u.max(d(r.actualGain),d(e.minimumGain)))])," ",r.gainResource.displayName,d(e.showNextAt)!=null?v("div",null,[v("br",null,null),d(r.buyMax)?"Next:":"Req:"," ",pt(r.baseResource,!d(r.buyMax)&&u.gte(d(r.actualGain),1)?d(r.currentAt):d(r.nextAt))," ",r.baseResource.displayName]):null])),onClick:function(k){d(e.canClick)!==!1&&(r.convert(),i.reset(s),o&&(o.value=o[Le]),w==null||w.call(e,k))}}});return e}function Oa(n){const e=sa(()=>{const t=n(),{display:r,append:i,layerID:s,...o}=t;return{...o,layerID:s,display:r??s,append:R(i)??!0,onClick(){if(d(e.append))if(M.tabs.includes(s)){const a=M.tabs.lastIndexOf(s);M.tabs.splice(a,1)}else M.tabs.push(s);else M.tabs.splice(1,1,s)}}});return e}const Bt="p",ht=dn(Bt,()=>{const n="Prestige",e="#4BDC13",t=fn(0,"prestige points"),r=da(()=>({formula:f=>f.div(10).sqrt(),baseResource:Mt.points,gainResource:t})),i=va(()=>({thingsToReset:()=>[ht]})),s=Oa(()=>({layerID:Bt,color:e,reset:i})),o=xa(s,()=>({display:la(t),pinnable:!0})),a=Va(()=>({conversion:r,tree:Mt.tree,treeNode:s})),c=pa(()=>({description:"Reset for prestige points",key:"p",onPress:a.onClick}));return{name:n,color:e,points:t,tooltip:o,display:()=>v(j,null,[v(Ca,{resource:t,color:e},null),te(a)]),treeNode:s,hotkey:c}}),Mt=dn("main",n=>{const e=fn(10),t=Ds(e),r=Rs(e),i=L(()=>new u(1));n.on("update",a=>{e.value=u.add(e.value,u.times(i.value,a))});const s=Bs(e,i),o=aa(()=>({nodes:an([[ht.treeNode]]),branches:[],onReset(){e.value=_t(o.resettingNode.value)===_t(ht.treeNode)?0:10,t.value=e.value,r.value=e.value},resetPropagation:oa}));return{name:"Tree",links:o.links,display:()=>v(j,null,[M.devSpeed===0?v("div",null,[F("Game Paused"),v(Ye,{id:"paused"},null)]):null,M.devSpeed!=null&&M.devSpeed!==0&&M.devSpeed!==1?v("div",null,[F("Dev Speed: "),he(M.devSpeed),F("x"),v(Ye,{id:"devspeed"},null)]):null,M.offlineTime!=null&&M.offlineTime!==0?v("div",null,[F("Offline Time: "),yt(M.offlineTime),v(Ye,{id:"offline"},null)]):null,v("div",null,[u.lt(e.value,"1e1000")?v("span",null,[F("You have ")]):null,v("h2",null,[he(e.value)]),u.lt(e.value,"1e1e6")?v("span",null,[F(" points")]):null]),u.gt(i.value,0)?v("div",null,[F("("),s.value,F(")"),v(Ye,{id:"oomps"},null)]):null,v(As,null,null),te(o)]),points:e,best:t,total:r,oomps:s,tree:o}}),_a=n=>[Mt,ht],qe=L(()=>!1);function Ne(n={}){return Object.assign({id:`${B.id}-0`,name:"Default Save",tabs:B.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:B.id,modVersion:B.versionNumber,layers:{}},n)}function re(n){const e=Pe.compressToUTF16(ze(n??M));return localStorage.setItem((n??M).id,e),e}async function La(){qa();try{let n=localStorage.getItem(H.active);if(n==null){await ke(Ue());return}if(n=$e(n),n==null)throw"Unable to determine save encoding";const e=JSON.parse(n);if(e.modID!==B.id){await ke(Ue());return}e.id=H.active,await ke(e)}catch(n){console.error(`Failed to load save. Falling back to new save. -`,n),await ke(Ue())}}function $e(n){if(n[0]!=="{")if(n[0]==="e")n=decodeURIComponent(escape(atob(n)));else if(n[0]==="ᯡ")n=Pe.decompressFromUTF16(n);else return console.warn("Unable to determine preset encoding",n),null;return n}function Ue(){const n=Ke(),e=Ne({id:n});return re(e),H.saves.push(n),e}function Ke(){let n,e=0;do n=`${B.id}-${e++}`;while(localStorage.getItem(n)!=null);return n}const Nt=V(!1);async function ke(n){console.info("Loading save",n),Nt.value=!0;for(const e in ie){const t=ie[e];t!=null&&_s(t)}_a().forEach(e=>Os(e,n)),n=Ne(n),n.offlineProd&&n.time!=null&&n.time&&n.devSpeed!==0&&(n.offlineTime==null&&(n.offlineTime=0),n.offlineTime+=Math.min(n.offlineTime+(Date.now()-n.time)/1e3,B.offlineLimit*3600)),n.time=Date.now(),n.modVersion!==B.versionNumber&&(n.modVersion,n.modVersion=B.versionNumber),Object.assign(M,n),H.active=M.id,ne.emit("onLoad")}const me=bt({});function Aa(n){if(me[n]==null){let e=localStorage.getItem(n);if(e==null)me[n]={error:"Save doesn't exist in localStorage",id:n};else if(e==="dW5kZWZpbmVk")me[n]={error:"Save is undefined",id:n};else try{if(e=$e(e),e==null)return console.warn("Unable to determine preset encoding",e),me[n]={error:"Unable to determine preset encoding",id:n},me[n];me[n]={...JSON.parse(e),id:n}}catch(t){me[n]={error:t,id:n},console.warn(`Failed to load info about save with id ${n}: -${t} -${e}`)}}return me[n]}function Da(){Object.keys(me).forEach(n=>delete me[n])}function lt(n){me[n]=void 0}setInterval(()=>{M.autosave&&re()},1e3);window.onbeforeunload=()=>{M.autosave&&re()};window.save=re;const Ra=window.hardReset=async()=>{await ke(Ue())};window.deleteLowerSaves=()=>{const n=Object.values(H.saves).indexOf(M.id)+1;Object.values(H.saves).slice(n).forEach(e=>localStorage.removeItem(e)),H.saves=H.saves.slice(0,n)};const nt=He({active:"",saves:[],showTPS:!0,theme:Pt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0});ae(nt,n=>{const e=Pe.compressToUTF16(JSON.stringify(n));localStorage.setItem(B.id,e)},{deep:!0});const H=window.settings=nt;window.hardResetSettings=()=>{const n={active:"",saves:[],showTPS:!0,theme:Pt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0};ne.emit("loadSettings",n),Object.assign(nt,n),Ra()};function qa(){try{let n=localStorage.getItem(B.id);if(n!=null&&n!==""){if(n=$e(n),n==null){console.warn("Unable to determine settings encoding",n);return}const e=JSON.parse(n);typeof e=="object"&&Object.assign(nt,e)}ne.emit("loadSettings",nt)}catch{}}const Ua=He([]),vn=He([]);function Ba(n){vn.push(n)}const za=He([]),ue=V(),be=V([]),We=V([]);function Ga(){var n;((n=ue.value)==null?void 0:n.loggedIn)===!0&&(be.value.length>0||ue.value.getSaveList().then(bn).then(e=>{We.value=e.map(t=>t.content.id)}).catch(console.error))}On({supportsSaving:!0,supportsSaveManager:!0,onLoggedInChanged:zt}).then(n=>{ue.value=n,zt(n)}).catch(console.error);function zt(n){n.loggedIn===!0&&(be.value.length>0||(n.getSaveList().then(e=>{const t=bn(e);if(We.value=t.map(r=>r.content.id),M.timePlayed<120*1e3&&t.length>0){const r=t.reduce((i,s)=>i.content.times)),r=Object.keys(n).map(i=>{const{label:s,content:o}=n[parseInt(i)];try{return{slot:parseInt(i),label:s,content:JSON.parse($e(o)??"")}}catch{return null}}).filter(i=>i!=null&&typeof i.content.id=="string"&&typeof i.content.time=="number"&&typeof i.content.timePlayed=="number").filter(i=>{var o;i.label!=null&&(i.content.name=i.label),t.delete(i.slot);const s=H.saves.find(a=>a===i.content.id);if(s==null)H.saves.push(i.content.id),re(Ne(i.content));else{e.delete(s);try{const a=JSON.parse($e(localStorage.getItem(s)??"")??"");if(a==null)return!1;a.id=s,a.time=a.time??0,a.timePlayed=a.timePlayed??0;const c=Math.abs(a.timePlayed-i.content.timePlayed),f=Math.abs(a.time-i.content.time);c<120*1e3&&f<120*1e3?a.time{var s;try{if(t.size>0){const o=localStorage.getItem(i)??"",a=JSON.parse($e(o)??""),c=t.values().next().value;if(c==null)return;(s=ue.value)==null||s.save(c,o,a.name).then(()=>We.value.push(a.id)).catch(console.error),t.delete(c)}}catch{}}),r}const Ha={class:"field"},Wa={key:0,class:"field-title"},yn=z({__name:"Select",props:{title:{},modelValue:{},options:{},placeholder:{},closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=()=>t.title?te(t.title,a=>v("span",null,[a])):v(j,null,null),s=V(t.options.find(a=>a.value===t.modelValue)??null);ae(pe(t,"modelValue"),a=>{d(s)!==a&&(s.value=t.options.find(c=>c.value===a)??null)});function o(a){r("update:modelValue",a.value)}return(a,c)=>(b(),C("div",Ha,[a.title?(b(),C("span",Wa,[v(i)])):E("",!0),v(d(Ln),{options:a.options,modelValue:s.value,"onUpdate:modelValue":[c[0]||(c[0]=f=>s.value=f),o],min:1,placeholder:a.placeholder,"close-on-select":a.closeOnSelect,"label-by":"label"},null,8,["options","modelValue","placeholder","close-on-select"])]))}}),ja={class:"field"},Ja={key:0,class:"field-title"},Za=["placeholder"],Ya=z({__name:"Text",props:{title:{},modelValue:{},textArea:{type:Boolean},placeholder:{},maxHeight:{},submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(n,{emit:e}){const t=n,r=e,i=()=>t.title==null?v(j,null,null):te(t.title,f=>v("span",null,[f])),s=it(null);rt(()=>{var f;(f=s.value)==null||f.focus()});const o=L({get(){return d(t.modelValue)??""},set(f){r("update:modelValue",f)}});function a(){r("submit")}function c(){t.submitOnBlur!==!1?r("submit"):r("cancel")}return(f,y)=>(b(),C("form",{onSubmit:Xe(a,["prevent"])},[m("div",ja,[f.title?(b(),C("span",Ja,[v(i)])):E("",!0),f.textArea?(b(),J(d(An),{key:1,modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=N=>o.value=N),placeholder:f.placeholder,maxHeight:f.maxHeight,onBlur:c,ref_key:"field",ref:s},null,8,["modelValue","placeholder","maxHeight"])):Tt((b(),C("input",{key:2,type:"text","onUpdate:modelValue":y[1]||(y[1]=N=>o.value=N),placeholder:f.placeholder,class:K({fullWidth:!f.title}),onBlur:c,ref_key:"field",ref:s},null,42,Za)),[[$n,o.value]])])],32))}}),wn=Z(Ya,[["__scopeId","data-v-495d5085"]]),Ka={key:0},Xa=["disabled"],Qa={key:0},eo=z({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(n,{emit:e}){const t=n,r=e,i=V(!1);ae(i,a=>{r("confirmingChanged",a)});function s(){if(t.skipConfirm){r("click");return}i.value&&r("click"),i.value=!i.value}function o(){i.value=!1}return(a,c)=>(b(),C("span",{class:K(["container",{confirming:i.value}])},[i.value?(b(),C("span",Ka,"Are you sure?")):E("",!0),m("button",{onClick:Xe(s,["stop"]),class:"button danger",disabled:a.disabled},[i.value?(b(),C("span",Qa,"Yes")):xe(a.$slots,"default",{key:1},void 0,!0)],8,Xa),i.value?(b(),C("button",{key:1,class:"button",onClick:Xe(o,["stop"])},"No")):E("",!0)],2))}}),to=Z(eo,[["__scopeId","data-v-b3b9693a"]]),no={key:0,class:"handle material-icons"},ro={key:1,class:"actions"},io={key:2,class:"actions"},so={key:3,class:"details"},ao=["disabled"],oo={class:"save-version"},lo={key:1,class:"time"},uo={key:4,class:"details"},co={key:5,class:"details error"},fo=z({__name:"Save",props:{save:{},readonly:{type:Boolean}},emits:["export","open","duplicate","delete","editName"],setup(n,{emit:e}){const t=n,r=e,i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=V(!1),o=V(!1),a=V("");ae(s,()=>a.value=t.save.name??"");const c=L(()=>t.save!=null&&t.save.id===M.id&&!t.readonly),f=L(()=>c.value?M.time:(t.save!=null&&t.save.time)??0),y=L(()=>{var w;return!t.readonly&&((w=ue.value)==null?void 0:w.loggedIn)===!0&&We.value.includes(t.save.id)});function N(){r("editName",a.value),s.value=!1}return(w,p)=>(b(),C("div",{class:K(["save",{active:c.value,readonly:w.readonly}])},[w.readonly!==!0?(b(),C("div",no,"drag_handle")):E("",!0),!s.value&&w.readonly!==!0?(b(),C("div",ro,[w.save.error==null&&!o.value?(b(),J($t,{key:0,onClick:p[0]||(p[0]=k=>r("export")),class:"button",left:""},{default:O(()=>[v(Q,{display:"Export",direction:d(Y).Left,class:"info"},{default:O(()=>p[8]||(p[8]=[m("span",{class:"material-icons"},"content_paste",-1)])),_:1},8,["direction"])]),_:1})):E("",!0),w.save.error==null&&!o.value?(b(),C("button",{key:1,onClick:p[1]||(p[1]=k=>r("duplicate")),class:"button"},[v(Q,{display:"Duplicate",direction:d(Y).Left,class:"info"},{default:O(()=>p[9]||(p[9]=[m("span",{class:"material-icons"},"content_copy",-1)])),_:1},8,["direction"])])):E("",!0),w.save.error==null&&!o.value?(b(),C("button",{key:2,onClick:p[2]||(p[2]=k=>s.value=!s.value),class:"button"},[v(Q,{display:"Edit Name",direction:d(Y).Left,class:"info"},{default:O(()=>p[10]||(p[10]=[m("span",{class:"material-icons"},"edit",-1)])),_:1},8,["direction"])])):E("",!0),v(to,{disabled:c.value,onClick:p[3]||(p[3]=k=>r("delete")),onConfirmingChanged:p[4]||(p[4]=k=>o.value=k)},{default:O(()=>[v(Q,{display:"Delete",direction:d(Y).Left,class:"info"},{default:O(()=>p[11]||(p[11]=[m("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)])),_:1},8,["direction"])]),_:1},8,["disabled"])])):w.readonly!==!0?(b(),C("div",io,[m("button",{onClick:N,class:"button"},[v(Q,{display:"Save",direction:d(Y).Left,class:"info"},{default:O(()=>p[12]||(p[12]=[m("span",{class:"material-icons"},"check",-1)])),_:1},8,["direction"])]),m("button",{onClick:p[5]||(p[5]=k=>s.value=!s.value),class:"button"},[v(Q,{display:"Cancel",direction:d(Y).Left,class:"info"},{default:O(()=>p[13]||(p[13]=[m("span",{class:"material-icons"},"close",-1)])),_:1},8,["direction"])])])):E("",!0),w.save.error==null&&!s.value?(b(),C("div",so,[y.value?(b(),J(Q,{key:0,display:"Synced!",direction:d(Y).Right},{default:O(()=>p[14]||(p[14]=[m("span",{class:"material-icons synced"},"cloud",-1)])),_:1},8,["direction"])):E("",!0),m("button",{class:"button open",onClick:p[6]||(p[6]=k=>r("open")),disabled:w.readonly},[m("h3",null,_(w.save.name),1)],8,ao),m("span",oo,"v"+_(w.save.modVersion),1),p[15]||(p[15]=m("br",null,null,-1)),f.value?(b(),C("div",lo," Last played "+_(d(i).format(f.value)),1)):E("",!0)])):w.save.error==null&&s.value?(b(),C("div",uo,[v(wn,{modelValue:a.value,"onUpdate:modelValue":p[7]||(p[7]=k=>a.value=k),class:"editname",onSubmit:N},null,8,["modelValue"])])):(b(),C("div",co,[F(" Error: Failed to load save with id "+_(w.save.id),1),p[16]||(p[16]=m("br",null,null,-1)),F(_(w.save.error),1)]))],2))}}),xt=Z(fo,[["__scopeId","data-v-ddcad8b8"]]),go={key:0,style:{color:"var(--danger)"}},mo={class:"modal-footer"},po={class:"field"},ho={class:"field-buttons"},vo={class:"footer"},bo=z({__name:"SavesManager",setup(n,{expose:e}){const t=V(!1),r=V(null);e({open(){t.value=!0}});const i=V(!1),s=V(""),o=V(null);ae(s,T=>{T?Be(()=>{try{if(T=$e(T)??"",T===""){console.warn("Unable to determine preset encoding",T),i.value=!0;return}const P=JSON.parse(T);if(typeof P!="object"){i.value=!0;return}const q=Ke();P.id=q,re(P),s.value="",i.value=!1,H.saves.push(q)}catch{i.value=!0}}):i.value=!1});let a=Object.assign({}),c=V(Object.keys(a).reduce((T,P)=>(T.push({label:P.split("/").slice(-1)[0].slice(0,-4),value:a[P]}),T),[]));ae(t,T=>{T&&Da()});const f=L(()=>H.saves.reduce((T,P)=>(T[P]=Aa(P),T),{})),y=L(()=>{var T;return((T=ue.value)==null?void 0:T.loggedIn)===!0&&H.saves.length{var ve;const oe=Object.keys(q).find(kt=>{const Ct=q[parseInt(kt)].content;try{if(JSON.parse(Ct).id===T)return!0}catch{return!1}});oe!=null&&((ve=ue.value)==null||ve.save(parseInt(oe),"","").catch(console.error))}),H.saves=H.saves.filter(q=>q!==T),localStorage.removeItem(T),lt(T)}function k(T){f.value[M.id].time=M.time,re(),lt(M.id),ke(f.value[T]),lt(T)}function S(T){if(o.value=T,Be(()=>{o.value=null}),T=$e(T)??"",T===""){console.warn("Unable to determine preset encoding",T);return}const P=JSON.parse(T);P.id=Ke(),re(P),H.saves.push(P.id),k(P.id)}function $(T,P){const q=f.value[T];q!=null&&(q.name=P,M.id===T?(M.name=P,re()):(re(q),lt(T)))}return(T,P)=>(b(),J(Ee,{modelValue:t.value,"onUpdate:modelValue":P[4]||(P[4]=q=>t.value=q),ref_key:"modal",ref:r},{header:O(()=>P[5]||(P[5]=[m("h2",null,"Saves Manager",-1)])),body:O(({shown:q})=>[y.value?(b(),C("div",go," Not all saves are synced! You may need to delete stale saves. ")):E("",!0),q?(b(),J(d(_n),{key:1,list:d(H).saves,handle:".handle",itemKey:oe=>oe},{item:O(({element:oe})=>[v(xt,{save:f.value[oe],onOpen:ve=>k(oe),onExport:ve=>N(oe),onEditName:ve=>$(oe,ve),onDuplicate:ve=>w(oe),onDelete:ve=>p(oe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):E("",!0)]),footer:O(()=>[m("div",mo,[v(wn,{modelValue:s.value,"onUpdate:modelValue":P[0]||(P[0]=q=>s.value=q),title:"Import Save",placeholder:"Paste your save here!",class:K({importingFailed:i.value})},null,8,["modelValue","class"]),m("div",po,[P[6]||(P[6]=m("span",{class:"field-title"},"Create Save",-1)),m("div",ho,[m("button",{class:"button",onClick:P[1]||(P[1]=q=>k(d(Ue)().id))},"New Game"),Object.keys(d(c)).length>0?(b(),J(yn,{key:0,options:d(c),modelValue:o.value,"onUpdate:modelValue":P[2]||(P[2]=q=>S(q)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):E("",!0)])]),m("div",vo,[P[7]||(P[7]=m("div",{style:{"flex-grow":"1"}},null,-1)),m("button",{class:"button modal-default-button",onClick:P[3]||(P[3]=q=>t.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}}),Vt=Z(bo,[["__scopeId","data-v-552b39a8"]]),yo={class:"vga-footer"},wo=z({__name:"AddictionWarning",setup(n){const e=V(!1);Jt(()=>{B.disableHealthWarning===!1&&H.showHealthWarning&&G.mouseActivity.filter(r=>r).length>6&&(e.value=!0)});function t(){H.showHealthWarning=!1,e.value=!1}return(r,i)=>(b(),C(j,null,[v(Ee,Ce({modelValue:e.value,"onUpdate:modelValue":i[1]||(i[1]=s=>e.value=s)},r.$attrs),{header:O(()=>i[2]||(i[2]=[m("div",{class:"vga-modal-header"},[m("h2",null,"Kindly consider taking a break.")],-1)])),body:O(()=>i[3]||(i[3]=[m("p",null," You've been actively enjoying this game for awhile recently - and it's great that you've been having a good time! That said, there are dangers to games like these that you should be aware of: ",-1),m("p",null," While incremental games can be fun and even healthy in certain contexts, they can exacerbate video game addiction even more than other genres. If you feel like playing incremental games is taking priority over other things in your life, or manipulating your sleep schedule, it may be prudent to seek help. ",-1),m("h4",null,"Resources:",-1),m("p",null,[m("span",null,[m("a",{style:{display:"inline"},href:"https://www.samhsa.gov/",target:"_blank"}," SAMHSA "),F(" ("),m("a",{style:{display:"inline"},href:"tel:1-800-662-4357"},"1-800-662-HELP"),F(") ")]),m("br"),m("a",{href:"https://www.reddit.com/r/StopGaming/"},"r/StopGaming")],-1)])),footer:O(()=>[m("div",yo,[m("button",{onClick:t,class:"button"},"Never show this again"),m("button",{onClick:i[0]||(i[0]=s=>e.value=!1),class:"button"},"Close")])]),_:1},16,["modelValue"]),v(Vt,{ref:"savesManager"},null,512)],64))}}),No=Z(wo,[["__scopeId","data-v-84eac81b"]]),ko={class:"cloud-saves-modal-header"},Co=["onClick"],So={key:0,class:"note"},Io={key:1,class:"note"},Mo=["onClick"],xo={key:0,class:"note"},To={key:1,class:"note"},$o=["onClick"],Po=z({__name:"CloudSaveResolver",setup(n){const e=V(!1),t=V([]),r=L(()=>be.value.length>1?"saves":"save"),i=V(null);ae(()=>be.value.length>0,f=>{f&&(t.value=be.value.map(({local:y,cloud:N})=>(y.time??0)<(N.time??0)?"cloud":"local"),e.value=!0)},{immediate:!0}),ae(()=>{var f;return(f=i.value)==null?void 0:f.isOpen},f=>{f===!1&&(be.value=[])});function s(f){t.value[f]="local"}function o(f){t.value[f]="cloud"}function a(f){t.value[f]="both"}function c(){var f,y;for(let N=0;N(b(),J(Ee,{modelValue:e.value,"onUpdate:modelValue":y[0]||(y[0]=N=>e.value=N),width:"960px",ref_key:"modal",ref:i,"prevent-closing":!0},{header:O(()=>[m("div",ko,[m("h2",null,"Cloud "+_(r.value)+" loaded!",1)])]),body:O(()=>[m("div",null," Upon loading, your cloud "+_(r.value)+" "+_(d(be).length>1?"appear":"appears")+" to be out of sync with your local "+_(r.value)+". Which "+_(r.value)+" do you want to keep? ",1),y[4]||(y[4]=m("br",null,null,-1)),(b(!0),C(j,null,Ie(d(d(be)),(N,w)=>(b(),C("div",{key:N.id,class:"conflict-container"},[m("div",{onClick:p=>o(w),class:K({selected:t.value[w]==="cloud"})},[m("h2",null,[y[1]||(y[1]=F(" Cloud ")),(N.cloud.time??0)>(N.local.time??0)?(b(),C("span",So,"(more recent)")):E("",!0),(N.cloud.timePlayed??0)>(N.local.timePlayed??0)?(b(),C("span",Io,"(more playtime)")):E("",!0)]),v(xt,{save:N.cloud,readonly:!0},null,8,["save"])],10,Co),m("div",{onClick:p=>s(w),class:K({selected:t.value[w]==="local"})},[m("h2",null,[y[2]||(y[2]=F(" Local ")),(N.cloud.time??0)<=(N.local.time??0)?(b(),C("span",xo,"(more recent)")):E("",!0),(N.cloud.timePlayed??0)<=(N.local.timePlayed??0)?(b(),C("span",To,"(more playtime)")):E("",!0)]),v(xt,{save:N.local,readonly:!0},null,8,["save"])],10,Mo),m("div",{onClick:p=>a(w),class:K({selected:t.value[w]==="both"}),style:{"flex-basis":"30%"}},y[3]||(y[3]=[m("h2",null,"Both",-1),m("div",{class:"save"},"Keep Both",-1)]),10,$o)]))),128))]),footer:O(()=>[m("div",{class:"cloud-saves-footer"},[m("button",{onClick:c,class:"button"},"Confirm")])]),_:1},8,["modelValue"]))}}),Eo=Z(Po,[["__scopeId","data-v-c79a1b2e"]]),Fo={class:"field"},Vo=z({__name:"Toggle",props:{title:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=()=>te(t.title??"",o=>v("span",null,[o])),s=L({get(){return!!t.modelValue},set(o){r("update:modelValue",o)}});return(o,a)=>(b(),C("label",Fo,[Tt(m("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":a[0]||(a[0]=c=>s.value=c)},null,512),[[Pn,s.value]]),v(i)]))}}),ye=Z(Vo,[["__scopeId","data-v-faad62a6"]]),Oo={class:"game-over-modal-header"},_o=["src","alt"],Lo={class:"game-over-modal-title"},Ao={key:0},Do={key:0},Ro=["href"],qo={key:1},Uo=z({__name:"GameOverScreen",setup(n){const{title:e,logo:t,discordName:r,discordLink:i,versionNumber:s,versionTitle:o}=B,a=L(()=>yt(M.timePlayed)),c=L(()=>qe.value&&!M.keepGoing),f=pe(M,"autosave");function y(){M.keepGoing=!0}function N(){ke(Ue())}return(w,p)=>(b(),J(Ee,{"model-value":c.value},{header:O(()=>[m("div",Oo,[d(t)?(b(),C("img",{key:0,class:"game-over-modal-logo",src:d(t),alt:d(e)},null,8,_o)):E("",!0),m("div",Lo,[p[1]||(p[1]=m("h2",null,"Congratulations!",-1)),m("h4",null,"You've beaten "+_(d(e))+" v"+_(d(s))+": "+_(d(o)),1)])])]),body:O(({shown:k})=>[k?(b(),C("div",Ao,[m("div",null,"It took you "+_(a.value)+" to beat the game.",1),p[4]||(p[4]=m("br",null,null,-1)),p[5]||(p[5]=m("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),p[6]||(p[6]=m("br",null,null,-1)),d(i)&&d(r)?(b(),C("div",Do,[m("a",{href:d(i),class:"game-over-modal-discord-link"},[p[2]||(p[2]=m("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),F(" "+_(d(r)),1)],8,Ro)])):(b(),C("div",qo,p[3]||(p[3]=[m("a",{href:"https://discord.gg/yJ4fjnjU54",class:"game-over-modal-discord-link"},[m("span",{class:"material-icons game-over-modal-discord"},"discord"),F(" Profectus & Friends ")],-1)]))),v(ye,{title:"Autosave",modelValue:f.value,"onUpdate:modelValue":p[0]||(p[0]=S=>f.value=S)},null,8,["modelValue"])])):E("",!0)]),footer:O(()=>[m("div",{class:"game-over-footer"},[m("button",{onClick:y,class:"button"},"Keep Going"),m("button",{onClick:N,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}}),Bo=Z(Uo,[["__scopeId","data-v-c9c5bad4"]]),zo={key:0},Go=["href"],Ho={class:"nan-footer"},Wo=z({__name:"NaNScreen",setup(n){const{discordName:e,discordLink:t}=B,r=V(!0),i=V(!0),s=pe(G,"hasNaN"),o=V(null);ae(s,w=>{w?(r.value=M.autosave,i.value=M.devSpeed===0):(M.autosave=r.value,M.devSpeed=i.value?0:null)});const a=L(()=>{var w;return(w=G.NaNPath)==null?void 0:w.join(".")}),c=L(()=>G.NaNPersistent!=null?G.NaNPersistent.value:null);function f(){G.NaNPersistent!=null&&(G.NaNPersistent.value=new u(0),G.hasNaN=!1)}function y(){G.NaNPersistent&&(G.NaNPersistent.value=new u(1),G.hasNaN=!1)}function N(){G.NaNPersistent&&(G.NaNPersistent.value=new u(NaN),G.hasNaN=!1)}return(w,p)=>(b(),C(j,null,[v(Ee,Ce({modelValue:s.value,"onUpdate:modelValue":p[4]||(p[4]=k=>s.value=k)},w.$attrs),{header:O(()=>p[5]||(p[5]=[m("div",{class:"nan-modal-header"},[m("h2",null,"NaN value detected!")],-1)])),body:O(()=>[m("div",null,[F(' Attempted to assign "'+_(a.value)+'" to NaN',1),c.value?(b(),C("span",zo,_(" ")+"(previously "+_(d(he)(c.value))+")",1)):E("",!0),F(". Auto-saving has been "+_(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),p[7]||(p[7]=m("br",null,null,-1)),m("div",null,[m("a",{href:d(t)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[p[6]||(p[6]=m("span",{class:"material-icons nan-modal-discord"},"discord",-1)),F(" "+_(d(e)||"Profectus & Friends"),1)],8,Go)]),p[8]||(p[8]=m("br",null,null,-1)),v(ye,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=k=>r.value=k)},null,8,["modelValue"]),d(B).enablePausing?(b(),J(ye,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":p[1]||(p[1]=k=>i.value=k)},null,8,["modelValue"])):E("",!0)]),footer:O(()=>[m("div",Ho,[m("button",{onClick:p[2]||(p[2]=k=>{var S;return(S=o.value)==null?void 0:S.open()}),class:"button"},"Open Saves Manager"),m("button",{onClick:f,class:"button"},"Set to 0"),m("button",{onClick:y,class:"button"},"Set to 1"),c.value&&d(u).neq(c.value,0)&&d(u).neq(c.value,1)?(b(),C("button",{key:0,onClick:p[3]||(p[3]=k=>s.value=!1),class:"button"}," Set to previous ")):E("",!0),m("button",{onClick:N,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),v(Vt,{ref_key:"savesManager",ref:o},null,512)],64))}}),jo=Z(Wo,[["__scopeId","data-v-cab8d401"]]),Jo={key:1},Zo=z({__name:"Layer",props:{display:{},minimizedDisplay:{},minimized:{},name:{},color:{},minimizable:{},nodes:{},forceHideGoBack:{},index:{}},setup(n){const e=n,t=()=>te(e.display),r=()=>e.minimizedDisplay==null?void 0:te(e.minimizedDisplay),i=L(()=>B.allowGoBack&&!d(e.forceHideGoBack)&&e.index>0&&!d(e.minimized));function s(){M.tabs.splice(d(e.index),1/0)}function o(c){e.nodes.value=c}const a=V([]);return En((c,f,y)=>(console.warn(`Error caught in "${e.name}" layer`,c,f,y),a.value.push(c instanceof Error?c:new Error(JSON.stringify(c))),!1)),(c,f)=>a.value.length>0?(b(),J(Yt,{key:0,errors:a.value},null,8,["errors"])):(b(),C("div",Ce({key:1,class:"layer-container",style:{"--layer-color":d(c.color)}},c.$attrs),[i.value?(b(),C("button",{key:0,class:"goBack",onClick:s},"❌")):E("",!0),d(c.minimized)?(b(),C("button",{key:1,class:"layer-tab minimized",onClick:f[0]||(f[0]=y=>c.$emit("setMinimized",!1))},[c.minimizedDisplay?(b(),J(r,{key:0})):(b(),C("div",Jo,_(d(c.name)),1))])):(b(),C("div",{key:2,class:K(["layer-tab",{showGoBack:i.value}])},[v(Kt,{onUpdateNodes:o},{default:O(()=>[v(t)]),_:1})],2)),d(c.minimizable)?(b(),C("button",{key:3,class:"minimize",onClick:f[1]||(f[1]=y=>c.$emit("setMinimized",!0))}," ▼ ")):E("",!0)],16))}}),Yo=Z(Zo,[["__scopeId","data-v-0e9ef3e1"]]),Ko=z({__name:"Changelog",setup(n,{expose:e}){const t=V(!1);return e({open(){t.value=!0}}),(r,i)=>(b(),J(Ee,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s)},{header:O(()=>i[1]||(i[1]=[m("h2",null,"Changelog",-1)])),body:O(()=>i[2]||(i[2]=[m("details",{open:""},[m("summary",null,[F("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),F(" This is the first release :D "),m("ul",null,[m("li",{class:"feature"},"Did everything"),m("li",{class:"fix"},"Had some fun"),m("li",{class:"breaking"},"Removed everything"),m("li",{class:"balancing"},"Created some bugs to fix later")])],-1)])),_:1},8,["modelValue"]))}}),Xo=Z(Ko,[["__scopeId","data-v-0fdea059"]]),Qo={class:"info-modal-header"},el=["src","alt"],tl={class:"info-modal-title"},nl={key:0},rl={key:0},il={key:0},sl=["href"],al=z({__name:"Info",props:{changelog:{}},setup(n,{expose:e}){const{title:t,logo:r,author:i,discordName:s,discordLink:o,versionNumber:a,versionTitle:c}=B,f=n,y=V(!1),N=L(()=>yt(M.timePlayed)),w=()=>vn.map(k=>te(k));e({open(){y.value=!0}});function p(){var k;(k=f.changelog)==null||k.open()}return(k,S)=>(b(),J(Ee,{modelValue:y.value,"onUpdate:modelValue":S[0]||(S[0]=$=>y.value=$)},{header:O(()=>[m("div",Qo,[d(r)?(b(),C("img",{key:0,class:"info-modal-logo",src:d(r),alt:d(t)},null,8,el)):E("",!0),m("div",tl,[m("h2",null,_(d(t)),1),m("h4",null,[F(" v"+_(d(a)),1),d(c)?(b(),C("span",nl,": "+_(d(c)),1)):E("",!0)])])])]),body:O(({shown:$})=>[$?(b(),C("div",rl,[d(i)?(b(),C("div",il,"By "+_(d(i)),1)):E("",!0),S[2]||(S[2]=m("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),S[3]||(S[3]=m("br",null,null,-1)),m("div",{class:"link",onClick:p},"Changelog"),S[4]||(S[4]=m("br",null,null,-1)),m("div",null,[d(o)?(b(),C("a",{key:0,href:d(o),class:"info-modal-discord-link",target:"_blank"},[S[1]||(S[1]=m("span",{class:"material-icons info-modal-discord"},"discord",-1)),F(" "+_(d(s)),1)],8,sl)):E("",!0)]),S[5]||(S[5]=m("div",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),F(" Profectus & Friends ")])],-1)),S[6]||(S[6]=m("div",null,[m("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),F(" The Modding Tree ")])],-1)),S[7]||(S[7]=m("br",null,null,-1)),m("div",null,"Time Played: "+_(N.value),1),v(w)])):E("",!0)]),_:1},8,["modelValue"]))}}),ol=Z(al,[["__scopeId","data-v-4d9ac4e0"]]),ll={class:"header"},ul={class:"option-tabs"},cl={key:0},dl={key:1},fl=z({__name:"Options",setup(n,{expose:e}){const t=V(!1),r=V("behaviour");function i(ce){return ce==r.value}function s(ce){r.value=ce}e({isTab:i,setTab:s,save:re,open(){t.value=!0}});const o=Object.keys(Et).map(ce=>({label:ti(ce),value:ce})),a=()=>Ua.map(ce=>te(ce)),{showTPS:c,theme:f,unthrottled:y,alignUnits:N,showHealthWarning:w}=Lt(H),{autosave:p,offlineProd:k}=Lt(M),S=L({get(){return M.devSpeed===0},set(ce){M.devSpeed=ce?0:null}}),$=v("span",{class:"option-title"},[F("Unthrottled"),v("desc",null,[F("Allow the game to run as fast as possible. Not battery friendly.")])]),T=v("span",{class:"option-title"},[F("Offline production"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[F("*")]}),v("desc",null,[F("Simulate production that occurs while the game is closed.")])]),P=v("span",{class:"option-title"},[F("Show videogame addiction warning"),v("desc",null,[F("Show a helpful warning after playing for a long time about video game addiction and encouraging you to take a break.")])]),q=v("span",{class:"option-title"},[F("Autosave"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[F("*")]}),v("desc",null,[F("Automatically save the game every second or when the game is closed.")])]),oe=v("span",{class:"option-title"},[F("Pause game"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[F("*")]}),v("desc",null,[F("Stop everything from moving.")])]),ve=v("span",{class:"option-title"},[F("Theme"),v("desc",null,[F("How the game looks.")])]),kt=v("span",{class:"option-title"},[F("Show TPS"),v("desc",null,[F("Show TPS meter at the bottom-left corner of the page.")])]),Ct=v("span",{class:"option-title"},[F("Align modifier units"),v("desc",null,[F("Align numbers to the beginning of the unit in modifier view.")])]);return(ce,W)=>(b(),J(Ee,{modelValue:t.value,"onUpdate:modelValue":W[11]||(W[11]=ee=>t.value=ee)},{header:O(()=>[m("div",ll,[W[12]||(W[12]=m("h2",null,"Settings",-1)),m("div",ul,[m("button",{class:K({selected:i("behaviour")}),onClick:W[0]||(W[0]=ee=>s("behaviour"))},"Behaviour",2),m("button",{class:K({selected:i("appearance")}),onClick:W[1]||(W[1]=ee=>s("appearance"))},"Appearance",2)])])]),body:O(()=>[i("behaviour")?(b(),C("div",cl,[v(ye,{title:d($),modelValue:d(y),"onUpdate:modelValue":W[2]||(W[2]=ee=>se(y)?y.value=ee:null)},null,8,["title","modelValue"]),d(B).enablePausing?(b(),J(ye,{key:0,title:d(oe),modelValue:S.value,"onUpdate:modelValue":W[3]||(W[3]=ee=>S.value=ee)},null,8,["title","modelValue"])):E("",!0),v(ye,{title:d(T),modelValue:d(k),"onUpdate:modelValue":W[4]||(W[4]=ee=>se(k)?k.value=ee:null)},null,8,["title","modelValue"]),d(B).disableHealthWarning?E("",!0):(b(),J(ye,{key:1,title:d(P),modelValue:d(w),"onUpdate:modelValue":W[5]||(W[5]=ee=>se(w)?w.value=ee:null)},null,8,["title","modelValue"])),v(ye,{title:d(q),modelValue:d(p),"onUpdate:modelValue":W[6]||(W[6]=ee=>se(p)?p.value=ee:null)},null,8,["title","modelValue"]),d(p)?E("",!0):(b(),J($t,{key:2,class:"button save-button",onClick:W[7]||(W[7]=ee=>d(re)())},{default:O(()=>W[13]||(W[13]=[F("Manually save")])),_:1}))])):E("",!0),i("appearance")?(b(),C("div",dl,[v(yn,{title:d(ve),options:d(o),modelValue:d(f),"onUpdate:modelValue":W[8]||(W[8]=ee=>se(f)?f.value=ee:null)},null,8,["title","options","modelValue"]),v(a),v(ye,{title:d(kt),modelValue:d(c),"onUpdate:modelValue":W[9]||(W[9]=ee=>se(c)?c.value=ee:null)},null,8,["title","modelValue"]),v(ye,{title:d(Ct),modelValue:d(N),"onUpdate:modelValue":W[10]||(W[10]=ee=>se(N)?N.value=ee:null)},null,8,["title","modelValue"])])):E("",!0)]),_:1},8,["modelValue"]))}}),gl=["src","alt"],ml={key:1,class:"title"},pl={class:"discord"},hl={class:"discord-links"},vl={key:0},bl=["href"],yl={href:"https://forums.moddingtree.com/",target:"_blank"},wl={href:"https://forums.moddingtree.com/",target:"_blank"},Nl={class:"discord"},kl={class:"discord-links"},Cl={key:0},Sl=["href"],Il=z({__name:"Nav",setup(n){const e=V(null),t=V(null),r=V(null),i=V(null),{useHeader:s,banner:o,title:a,discordName:c,discordLink:f,versionNumber:y}=B;function N(){window.open(f,"mywindow")}const w=L(()=>{var p;return((p=ue.value)==null?void 0:p.loggedIn)===!0&&!We.value.includes(H.active)});return(p,k)=>(b(),C(j,null,[d(s)?(b(),C("div",Ce({key:0,class:"nav"},p.$attrs),[d(o)?(b(),C("img",{key:0,src:d(o),class:"banner",alt:d(a)},null,8,gl)):(b(),C("div",ml,_(d(a)),1)),m("div",{onClick:k[0]||(k[0]=S=>{var $;return($=i.value)==null?void 0:$.open()}),class:"version-container"},[v(Q,{display:"Changelog",direction:d(Y).Down,class:"version"},{default:O(()=>[m("span",null,"v"+_(d(y)),1)]),_:1},8,["direction"])]),k[13]||(k[13]=m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),m("div",pl,[m("span",{onClick:N,class:"material-icons"},"discord"),m("ul",hl,[d(f)?(b(),C("li",vl,[m("a",{href:d(f),target:"_blank"},_(d(c)),9,bl)])):E("",!0),k[8]||(k[8]=m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),k[9]||(k[9]=m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1))])]),m("div",null,[m("a",yl,[v(Q,{display:"Forums",direction:d(Y).Down,yoffset:"5px"},{default:O(()=>k[10]||(k[10]=[m("span",{class:"material-icons"},"forum",-1)])),_:1},8,["direction"])])]),m("div",{onClick:k[1]||(k[1]=S=>{var $;return($=e.value)==null?void 0:$.open()})},[v(Q,{display:"Info",direction:d(Y).Down,class:"info"},{default:O(()=>k[11]||(k[11]=[m("span",{class:"material-icons"},"info",-1)])),_:1},8,["direction"])]),m("div",{onClick:k[2]||(k[2]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[v(Q,{display:"Saves",direction:d(Y).Down,xoffset:"-20px"},{default:O(()=>[m("span",{class:K(["material-icons",{needsSync:w.value}])},"library_books",2)]),_:1},8,["direction"])]),m("div",{onClick:k[3]||(k[3]=S=>{var $;return($=r.value)==null?void 0:$.open()})},[v(Q,{display:"Settings",direction:d(Y).Down,xoffset:"-66px"},{default:O(()=>k[12]||(k[12]=[m("span",{class:"material-icons"},"settings",-1)])),_:1},8,["direction"])])],16)):(b(),C("div",Ce({key:1,class:"overlay-nav"},p.$attrs),[m("div",{onClick:k[4]||(k[4]=S=>{var $;return($=i.value)==null?void 0:$.open()}),class:"version-container"},[v(Q,{display:"Changelog",direction:d(Y).Right,xoffset:"25%",class:"version"},{default:O(()=>[m("span",null,"v"+_(d(y)),1)]),_:1},8,["direction"])]),m("div",{onClick:k[5]||(k[5]=S=>{var $;return($=t.value)==null?void 0:$.open()})},[v(Q,{display:"Saves",direction:d(Y).Right},{default:O(()=>[m("span",{class:K(["material-icons",{needsSync:w.value}])},"library_books",2)]),_:1},8,["direction"])]),m("div",{onClick:k[6]||(k[6]=S=>{var $;return($=r.value)==null?void 0:$.open()})},[v(Q,{display:"Settings",direction:d(Y).Right},{default:O(()=>k[14]||(k[14]=[m("span",{class:"material-icons"},"settings",-1)])),_:1},8,["direction"])]),m("div",{onClick:k[7]||(k[7]=S=>{var $;return($=e.value)==null?void 0:$.open()})},[v(Q,{display:"Info",direction:d(Y).Right},{default:O(()=>k[15]||(k[15]=[m("span",{class:"material-icons"},"info",-1)])),_:1},8,["direction"])]),m("div",null,[m("a",wl,[v(Q,{display:"Forums",direction:d(Y).Right,xoffset:"7px"},{default:O(()=>k[16]||(k[16]=[m("span",{class:"material-icons"},"forum",-1)])),_:1},8,["direction"])])]),m("div",Nl,[m("span",{onClick:N,class:"material-icons"},"discord"),m("ul",kl,[d(f)?(b(),C("li",Cl,[m("a",{href:d(f),target:"_blank"},_(d(c)),9,Sl)])):E("",!0),k[17]||(k[17]=m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),k[18]||(k[18]=m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1))])])],16)),v(ol,{ref_key:"info",ref:e,changelog:i.value},null,8,["changelog"]),v(Vt,{ref_key:"savesManager",ref:t},null,512),v(fl,{ref_key:"options",ref:r},null,512),v(Xo,{ref_key:"changelog",ref:i},null,512)],64))}}),Nn=Z(Il,[["__scopeId","data-v-1806f117"]]),Ml={class:"inner-tab"},xl=z({__name:"Game",setup(n){const e=pe(M,"tabs"),t=L(()=>Object.keys(ie)),r=B.useHeader;function i(s){const{display:o,name:a,color:c,minimizable:f,minimizedDisplay:y,minimized:N,nodes:w,forceHideGoBack:p}=s;return{display:o,name:a,color:c,minimizable:f,minimizedDisplay:y,minimized:N,nodes:w,forceHideGoBack:p}}return(s,o)=>(b(),C("div",{class:K(["tabs-container",{useHeader:d(r)}])},[(b(!0),C(j,null,Ie(e.value,(a,c)=>{var f,y;return b(),C("div",{key:c,class:K(["tab",d((f=d(ie)[a])==null?void 0:f.classes)]),style:fe(d((y=d(ie)[a])==null?void 0:y.style))},[c===0&&!d(r)?(b(),J(Nn,{key:0})):E("",!0),m("div",Ml,[t.value.includes(a)?(b(),J(Yo,Ce({key:0,ref_for:!0},i(d(ie)[a]),{index:c,onSetMinimized:N=>d(ie)[a].minimized.value=N}),null,16,["index","onSetMinimized"])):(b(),J(Fn(a),{key:1,index:c},null,8,["index"]))])],6)}),128))],2))}}),Tl=Z(xl,[["__scopeId","data-v-d0a3afce"]]),$l={key:0,class:"tpsDisplay"},Pl=z({__name:"TPS",setup(n){const e=L(()=>u.div(G.lastTenTicks.length,G.lastTenTicks.reduce((t,r)=>t+r,0)));return(t,r)=>e.value.isNan()?E("",!0):(b(),C("div",$l,"TPS: "+_(d(Qe)(e.value)),1))}}),El=Z(Pl,[["__scopeId","data-v-7df31503"]]),Fl=z({__name:"App",setup(n){const e=B.useHeader,t=L(()=>Et[H.theme].variables),r=pe(H,"showTPS"),i=pe(G,"errors"),s=()=>za.map(o=>te(o));return(o,a)=>i.value.length>0?(b(),C("div",{key:0,class:"error-container",style:fe(t.value)},[v(Yt,{errors:i.value},null,8,["errors"])],4)):(b(),C(j,{key:1},[m("div",{id:"modal-root",style:fe(t.value)},null,4),m("div",{class:K(["app",{useHeader:d(e)}]),style:fe(t.value)},[d(e)?(b(),J(Nn,{key:0})):E("",!0),v(Tl),d(r.value)?(b(),J(El,{key:1})):E("",!0),v(No),v(Bo),v(jo),v(Eo),v(s)],6)],64))}}),Vl=Z(Fl,[["__scopeId","data-v-b45f2ee2"]]);ne.on("setupVue",n=>n.use(Dn));const Ol="modulepreload",_l=function(n,e){return new URL(n,e).href},Gt={},Ll=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(t.map(f=>{if(f=_l(f,r),f in Gt)return;Gt[f]=!0;const y=f.endsWith(".css"),N=y?'[rel="stylesheet"]':"";if(!!r)for(let k=o.length-1;k>=0;k--){const S=o[k];if(S.href===f&&(!y||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${N}`))return;const p=document.createElement("link");if(p.rel=y?"stylesheet":Ol,y||(p.as="script"),p.crossOrigin="",p.href=f,c&&p.setAttribute("nonce",c),document.head.appendChild(p),y)return new Promise((k,S)=>{p.addEventListener("load",k),p.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function Al(n={}){const{immediate:e=!1,onNeedRefresh:t,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=n;let a,c;const f=async(N=!0)=>{await c};async function y(){if("serviceWorker"in navigator){if(a=await Ll(async()=>{const{Workbox:N}=await import("./workbox-window-D5gOYdM7.js");return{Workbox:N}},[],import.meta.url).then(({Workbox:N})=>new N("./sw.js",{scope:"./",type:"classic"})).catch(N=>{o==null||o(N)}),!a)return;a.addEventListener("activated",N=>{(N.isUpdate||N.isExternal)&&window.location.reload()}),a.addEventListener("installed",N=>{N.isUpdate||r==null||r()}),a.register({immediate:e}).then(N=>{s?s("./sw.js",N):i==null||i(N)}).catch(N=>{o==null||o(N)})}}return c=y(),f}function Dl(n={}){const{immediate:e=!0,onNeedRefresh:t,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=n,a=V(!1),c=V(!1);return{updateServiceWorker:Al({immediate:e,onNeedRefresh(){a.value=!0,t==null||t()},onOfflineReady(){c.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:s,onRegisterError:o}),offlineReady:c,needRefresh:a}}let De=null;function vt(){const n=Date.now();let e=(n-M.time)/1e3;M.time=n;const t=e;if(G.lastTenTicks.push(t),G.lastTenTicks.length>10&&(G.lastTenTicks=G.lastTenTicks.slice(1)),!(qe!=null&&qe.value&&!M.keepGoing)&&!G.hasNaN&&(e=Math.max(e,0),M.devSpeed!==0)){if(Nt.value=!1,M.offlineTime!=null){if(u.gt(M.offlineTime,B.offlineLimit*3600)&&(M.offlineTime=B.offlineLimit*3600),u.gt(M.offlineTime,0)&&M.devSpeed!==0){const r=Math.max(M.offlineTime/10,e);M.offlineTime=M.offlineTime-r,e+=r}else M.devSpeed===0&&(M.offlineTime+=e);(!M.offlineProd||u.lt(M.offlineTime,0))&&(M.offlineTime=null)}e=Math.min(e,B.maxTickLength),M.devSpeed!=null&&(e*=M.devSpeed),Number.isFinite(e)||(e=1e308),!u.eq(e,0)&&(M.timePlayed+=e,Number.isFinite(M.timePlayed)||(M.timePlayed=1e308),ne.emit("update",e,t),H.unthrottled?(requestAnimationFrame(vt),De!=null&&(clearInterval(De),De=null)):De==null&&(De=setInterval(vt,50)))}}async function Rl(){H.unthrottled?requestAnimationFrame(vt):De=setInterval(vt,50)}ae(qe,n=>{n&&ne.emit("gameWon")});setInterval(()=>{G.mouseActivity=[...G.mouseActivity.slice(-7),!1]},1e3*60*60);const Ot=console.error;console.error=function(...n){Ot(...n)};window.onerror=function(n,e,t,r,i){return G.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),Ot(i),!0};window.onunhandledrejection=function(n){G.errors.push(n.reason instanceof Error?n.reason:new Error(JSON.stringify(n.reason))),Ot(n.reason)};document.title=B.title;window.projInfo=B;B.id===""&&console.error("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 La();const n=window.vue=Vn(Vl);n.config.errorHandler=function(e,t,r){console.error(e,r,t)},ne.emit("setupVue",n),n.mount("#app"),Be(()=>{const e=Rn();Dl({immediate:!0,onOfflineReady(){e.info("App ready to work offline")},onRegisterError:console.warn,onRegistered:console.info})}),Rl()}); diff --git a/assets/index-MSbJGb5U.css b/assets/index-Dn8XcuKS.css similarity index 80% rename from assets/index-MSbJGb5U.css rename to assets/index-Dn8XcuKS.css index 26122aa..c3ae543 100644 --- a/assets/index-MSbJGb5U.css +++ b/assets/index-Dn8XcuKS.css @@ -1 +1 @@ -.feedback[data-v-f82eae5d]{position:relative}.feedback[data-v-f82eae5d]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"✔";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-f82eae5d]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-f82eae5d]:after{animation:feedback-f82eae5d .5s ease-out forwards}@keyframes feedback-f82eae5d{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.error[data-v-2524e23e]{border:solid 10px var(--danger);position:absolute;top:0;left:0;right:0;min-height:calc(100% - 20px);text-align:left;color:var(--foreground)}.error-title[data-v-2524e23e]{background:var(--danger);color:var(--feature-foreground);display:block;margin:-10px 0 10px;position:sticky;top:0}.error-details[data-v-2524e23e]{white-space:nowrap;overflow:auto;padding:10px;background-color:var(--raised-background)}.instructions[data-v-2524e23e]{padding:10px}.discord-link[data-v-2524e23e]{display:inline}summary[data-v-2524e23e]{cursor:pointer;-webkit-user-select:none;user-select:none}.resize-listener[data-v-4fc505f1]{position:absolute;top:0;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.node[data-v-4673aca5]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent *,.row.mergeAdjacent button.feature,.row.mergeAdjacent .feature button{margin-left:0;margin-right:0}.row.mergeAdjacent button.feature,.row.mergeAdjacent .feature button{border-radius:0}.row.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>:last-child .feature button{border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>button.feature:first-child:last-child,.row.mergeAdjacent>.feature:first-child:last-child button,.row.mergeAdjacent>:first-child:last-child button.feature,.row.mergeAdjacent>:first-child:last-child .feature button{border-radius:var(--border-radius)}.col.mergeAdjacent *,.col.mergeAdjacent button.feature,.col.mergeAdjacent .feature button{margin-top:0;margin-bottom:0}.col.mergeAdjacent button.feature,.col.mergeAdjacent .feature button{border-radius:0}.col.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>:last-child .feature button{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent>button.feature:first-child:last-child,.col.mergeAdjacent>.feature:first-child:last-child button,.col.mergeAdjacent>:first-child:last-child button.feature,.col.mergeAdjacent>:first-child:last-child .feature button{border-radius:var(--border-radius)}.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>button.feature:not(:first-child):not(:last-child),.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>.feature:not(:first-child):not(:last-child) button,.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>:not(:first-child):not(:last-child) button.feature,.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>:not(:first-child):not(:last-child) .feature button,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>button.feature:not(:first-child):not(:last-child),.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>.feature:not(:first-child):not(:last-child) button,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>:not(:first-child):not(:last-child) button.feature,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>:not(:first-child):not(:last-child) .feature button .col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>button.feature,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>.feature button,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>* button.feature,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>* .feature button .row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>button.feature:not(:first-child):not(:last-child),.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>.feature:not(:first-child):not(:last-child) button,.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>:not(:first-child):not(:last-child) button.feature,.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>:not(:first-child):not(:last-child) .feature button,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>button.feature:not(:first-child):not(:last-child),.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>.feature:not(:first-child):not(:last-child) button,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>:not(:first-child):not(:last-child) button.feature,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>:not(:first-child):not(:last-child) .feature button .row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>button.feature,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>.feature button,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>* button.feature,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>* .feature button{border-radius:0}.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:first-child .feature button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) 0 0 0}.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:last-child .feature button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:last-child .feature button{border-radius:0 var(--border-radius) 0 0}.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:last-child .feature button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:last-child .feature button{border-radius:0 0 var(--border-radius) 0}.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:first-child .feature button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:first-child .feature button{border-radius:0 0 0 var(--border-radius)}.feature{position:relative}button.feature,.feature button{padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.feature button{position:relative}button.can,.can button{background-color:var(--layer-color);cursor:pointer}button.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}button.locked,.locked button{background-color:var(--locked);cursor:not-allowed}button.bought,.bought button{background-color:var(--bought);cursor:default}.resize-listener[data-v-e0f93f6c],svg[data-v-e0f93f6c]{position:absolute;top:0;left:0;z-index:-10;pointer-events:none;margin:0;width:100%;height:100%}.left-side-nodes[data-v-5267d3ea]{position:absolute;left:15px;top:65px}.side-nodes[data-v-5267d3ea]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-5267d3ea] .treeNode,.side-nodes[data-v-5267d3ea] .treeNode{margin:20px auto}.small[data-v-5267d3ea] .treeNode{height:60px;width:60px}.small[data-v-5267d3ea] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-87cf0f3f]{height:100px;width:100px;border:2px solid rgba(0,0,0,.125);border-radius:50%;padding:0;margin:0 10px;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);display:flex}.treeNode[data-v-87cf0f3f]>*{pointer-events:none}.key[data-v-7bcb4952]{display:inline-block;height:1.4em;min-width:1em;margin-block:.1em;padding-inline:.2em;vertical-align:.1em;background:var(--foreground);color:var(--feature-foreground);border:1px solid #0007;border-radius:.3em;box-shadow:0 .1em #0007,0 .1em var(--foreground);font-size:smaller;text-align:center;-webkit-user-select:none;user-select:none;transition:transform 0s,box-shadow 0s}.key[data-v-7bcb4952]:active{transform:translateY(.1em);box-shadow:none}.sticky[data-v-10a04be9]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.main-display-container{vertical-align:middle;margin-bottom:20px;display:flex;transition-duration:0s}.tooltip-container[data-v-242b1351]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-242b1351],.tooltip[data-v-242b1351]:after{pointer-events:none;position:absolute}.tooltip[data-v-242b1351]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-242b1351] hr{margin:var(--feature-margin) 0}.shown[data-v-242b1351]{z-index:10}.fade-enter-from[data-v-242b1351],.fade-leave-to[data-v-242b1351]{opacity:0}.tooltip[data-v-242b1351]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-242b1351],.side-nodes .tooltip[data-v-242b1351]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-242b1351]:after,.side-nodes .tooltip[data-v-242b1351]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-242b1351]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-242b1351]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-242b1351]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-242b1351]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-242b1351]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.collapsible-container[data-v-9e1c6f19]{width:calc(100% - 10px)}.collapsible-toggle[data-v-9e1c6f19]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-9e1c6f19]:last-child{margin-left:unset}[data-v-9e1c6f19] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-9e1c6f19] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-9e1c6f19]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-9e1c6f19] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.clickable[data-v-1f365c4c]{min-height:120px;width:120px;font-size:10px}.clickable[data-v-1f365c4c]>*{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.node-text{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:200%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.field{display:flex;position:relative;min-height:2em;margin:10px 0;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input{font-size:inherit}.vue-input input::placeholder{color:var(--link)}form[data-v-495d5085]{margin:0;width:100%}.field[data-v-495d5085]>*{margin:0}input[data-v-495d5085]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-495d5085]{width:100%}.container[data-v-b3b9693a]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-b3b9693a]{font-size:1em}.container[data-v-b3b9693a]>*{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.save[data-v-ddcad8b8]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-ddcad8b8]{border-color:var(--bought)}.open[data-v-ddcad8b8]{display:inline;margin:0;padding-left:0}.open[data-v-ddcad8b8]:disabled{cursor:inherit;color:var(--foreground);opacity:1;pointer-events:none}.handle[data-v-ddcad8b8]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-ddcad8b8]{margin:0 80px 0 0;flex-grow:1}.save.readonly .details[data-v-ddcad8b8]{margin-right:0}.error[data-v-ddcad8b8]{font-size:.8em;color:var(--danger)}.save-version[data-v-ddcad8b8]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-ddcad8b8]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-ddcad8b8]{margin:0}.time[data-v-ddcad8b8]{font-size:small}.synced[data-v-ddcad8b8]{font-size:100%;margin-right:.5em;vertical-align:middle;cursor:default}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field{margin:0}.details>.tooltip-container{display:inline}.field form[data-v-552b39a8],.field .field-title[data-v-552b39a8],.field .field-buttons[data-v-552b39a8]{margin:0}.field-buttons[data-v-552b39a8]{display:flex}.field-buttons .field[data-v-552b39a8]{margin:0 0 0 8px}.modal-footer[data-v-552b39a8]{margin-top:-20px}.footer[data-v-552b39a8]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.vga-modal-header[data-v-84eac81b]{padding-top:10px;margin-left:10px}.vga-footer[data-v-84eac81b]{display:flex;justify-content:flex-end}.vga-footer button[data-v-84eac81b]{margin:0 10px}p[data-v-84eac81b]{margin-bottom:10px}.cloud-saves-modal-header[data-v-c79a1b2e]{padding:10px 0;margin-left:10px}.cloud-saves-footer[data-v-c79a1b2e]{display:flex;justify-content:flex-end}.cloud-saves-footer button[data-v-c79a1b2e]{margin:0 10px}.conflict-container[data-v-c79a1b2e]{display:flex}.conflict-container[data-v-c79a1b2e]>*{flex-basis:50%;display:flex;flex-flow:column;margin:0}.conflict-container+.conflict-container[data-v-c79a1b2e]{margin-top:1em}.conflict-container h2[data-v-c79a1b2e]{display:flex;flex-flow:column wrap;height:1.5em;margin:0}.note[data-v-c79a1b2e]{font-size:x-small;opacity:.7;margin-right:1em}.save[data-v-c79a1b2e]{border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px;height:100%}.conflict-container .save{cursor:pointer}.conflict-container .selected .save{border-color:var(--bought)}.field[data-v-faad62a6]{cursor:pointer}input[data-v-faad62a6]{-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}span[data-v-faad62a6]{width:100%;padding-right:41px;position:relative}input+span[data-v-faad62a6]:before{content:"";position:absolute;top:calc(50% - 7px);right:0;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s}input+span[data-v-faad62a6]:after{content:"";position:absolute;top:calc(50% - 10px);right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s}input:checked+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-faad62a6]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-faad62a6]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-faad62a6]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-faad62a6]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}.game-over-modal-header[data-v-c9c5bad4]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header[data-v-c9c5bad4] *{margin:0}.game-over-modal-logo[data-v-c9c5bad4]{height:4em;width:4em}.game-over-modal-title[data-v-c9c5bad4]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-c9c5bad4]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-c9c5bad4]{margin:0 10px}.game-over-modal-discord-link[data-v-c9c5bad4]{display:flex;align-items:center}.game-over-modal-discord[data-v-c9c5bad4]{margin:0 4px 0 0}.nan-modal-header[data-v-cab8d401]{padding:10px 0;margin-left:10px}.nan-footer[data-v-cab8d401]{display:flex;justify-content:flex-end}.nan-footer button[data-v-cab8d401]{margin:0 10px}.nan-modal-discord-link[data-v-cab8d401]{display:flex;align-items:center}.nan-modal-discord[data-v-cab8d401]{margin:0 4px 0 0}.layer-container[data-v-0e9ef3e1]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-0e9ef3e1]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-0e9ef3e1]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-0e9ef3e1]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized[data-v-0e9ef3e1]>*{margin:0;writing-mode:vertical-rl;text-align:left;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-0e9ef3e1]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-0e9ef3e1]{padding-bottom:0}.modal-body .layer-tab[data-v-0e9ef3e1]:not(.hasSubtabs){padding-top:0}.minimize[data-v-0e9ef3e1]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-0e9ef3e1]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-0e9ef3e1]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-0e9ef3e1]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}.layer-tab.minimized>*>.desc{color:var(--accent1);font-size:30px}details[data-v-0fdea059]{margin:10px 0;padding-left:18px}summary[data-v-0fdea059]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-0fdea059]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-0fdea059]{margin:8px 0}li[data-v-0fdea059]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-0fdea059]:before{content:"Feature";background:var(--accent1)}.fix[data-v-0fdea059]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-0fdea059]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-0fdea059]:before{content:"Breaking";background:var(--danger)}.info-modal-header[data-v-4d9ac4e0]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header[data-v-4d9ac4e0] *{margin:0}.info-modal-logo[data-v-4d9ac4e0]{height:4em;width:4em}.info-modal-title[data-v-4d9ac4e0]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-4d9ac4e0]{display:flex;align-items:center}.info-modal-discord[data-v-4d9ac4e0]{margin:0 4px 0 0}.option-tabs{border-bottom:2px solid var(--outline);margin-top:10px;margin-bottom:-10px}.option-tabs button{background-color:transparent;color:var(--foreground);margin-bottom:-2px;font-size:14px;cursor:pointer;padding:5px 20px;border:none;border-bottom:2px solid var(--foreground)}.option-tabs button:not(.selected){border-bottom-color:transparent}.option-title .tooltip-container{display:inline;margin-left:5px}.option-title desc{display:block;opacity:.6;font-size:small;width:300px;margin-left:0}.save-button{text-align:right}.nav[data-v-1806f117]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav[data-v-1806f117]>*{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-1806f117]{height:100%;width:unset}.overlay-nav[data-v-1806f117]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav[data-v-1806f117]>*{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-1806f117]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-1806f117]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-1806f117],.nav .info[data-v-1806f117]{display:flex}.tooltip-container[data-v-1806f117]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-1806f117]{position:relative}.discord img[data-v-1806f117]{width:100%;height:100%}.discord-links[data-v-1806f117]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-1806f117]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-1806f117]{left:-10px}.discord-links li[data-v-1806f117]{margin-bottom:4px}.discord-links li[data-v-1806f117]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-1806f117]{right:0}.material-icons[data-v-1806f117]{font-size:36px}.material-icons[data-v-1806f117]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-1806f117]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-1806f117]{width:unset;height:25px}.version[data-v-1806f117]{color:var(--points)}.version:hover span[data-v-1806f117]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-1806f117],.overlay-nav>div>a[data-v-1806f117]{color:var(--foreground);text-shadow:none}.needsSync[data-v-1806f117]{color:var(--danger);animation:4s wiggle-1806f117 ease infinite}@keyframes wiggle-1806f117{0%{transform:rotate(-3deg);box-shadow:0 2px 2px #0003}5%{transform:rotate(20deg)}10%{transform:rotate(-15deg)}15%{transform:rotate(5deg)}20%{transform:rotate(-1deg)}25%{transform:rotate(0);box-shadow:0 2px 2px #0003}}.tabs-container[data-v-d0a3afce]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-d0a3afce]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-d0a3afce]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-d0a3afce]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-d0a3afce]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.tpsDisplay[data-v-7df31503]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-7df31503]{color:var(--danger)}.fade-leave-to[data-v-7df31503]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}:disabled{pointer-events:none}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr}.app[data-v-b45f2ee2]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-b45f2ee2]{position:absolute;min-height:100%;height:100%;color:var(--foreground)}.error-container[data-v-b45f2ee2]{background:var(--background);overflow:auto;width:100%;height:100%}.error-container>.error[data-v-b45f2ee2]{position:static} +.feedback[data-v-f82eae5d]{position:relative}.feedback[data-v-f82eae5d]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"✔";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-f82eae5d]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-f82eae5d]:after{animation:feedback-f82eae5d .5s ease-out forwards}@keyframes feedback-f82eae5d{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.error[data-v-2524e23e]{border:solid 10px var(--danger);position:absolute;top:0;left:0;right:0;min-height:calc(100% - 20px);text-align:left;color:var(--foreground)}.error-title[data-v-2524e23e]{background:var(--danger);color:var(--feature-foreground);display:block;margin:-10px 0 10px;position:sticky;top:0}.error-details[data-v-2524e23e]{white-space:nowrap;overflow:auto;padding:10px;background-color:var(--raised-background)}.instructions[data-v-2524e23e]{padding:10px}.discord-link[data-v-2524e23e]{display:inline}summary[data-v-2524e23e]{cursor:pointer;-webkit-user-select:none;user-select:none}.resize-listener[data-v-4fc505f1]{position:absolute;top:0;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.node[data-v-4673aca5]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent *,.row.mergeAdjacent button.feature,.row.mergeAdjacent .feature button{margin-left:0;margin-right:0}.row.mergeAdjacent button.feature,.row.mergeAdjacent .feature button{border-radius:0}.row.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>:last-child .feature button{border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>button.feature:first-child:last-child,.row.mergeAdjacent>.feature:first-child:last-child button,.row.mergeAdjacent>:first-child:last-child button.feature,.row.mergeAdjacent>:first-child:last-child .feature button{border-radius:var(--border-radius)}.col.mergeAdjacent *,.col.mergeAdjacent button.feature,.col.mergeAdjacent .feature button{margin-top:0;margin-bottom:0}.col.mergeAdjacent button.feature,.col.mergeAdjacent .feature button{border-radius:0}.col.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>:last-child .feature button{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent>button.feature:first-child:last-child,.col.mergeAdjacent>.feature:first-child:last-child button,.col.mergeAdjacent>:first-child:last-child button.feature,.col.mergeAdjacent>:first-child:last-child .feature button{border-radius:var(--border-radius)}.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>button.feature:not(:first-child):not(:last-child),.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>.feature:not(:first-child):not(:last-child) button,.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>:not(:first-child):not(:last-child) button.feature,.col.mergeAdjacent>.table>.row.mergeAdjacent:first-child>:not(:first-child):not(:last-child) .feature button,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>button.feature:not(:first-child):not(:last-child),.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>.feature:not(:first-child):not(:last-child) button,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>:not(:first-child):not(:last-child) button.feature,.col.mergeAdjacent>.table>.row.mergeAdjacent:last-child>:not(:first-child):not(:last-child) .feature button .col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>button.feature,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>.feature button,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>* button.feature,.col.mergeAdjacent>.table:not(:first-child):not(:last-child)>.row.mergeAdjacent>* .feature button .row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>button.feature:not(:first-child):not(:last-child),.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>.feature:not(:first-child):not(:last-child) button,.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>:not(:first-child):not(:last-child) button.feature,.row.mergeAdjacent>.table>.col.mergeAdjacent:first-child>:not(:first-child):not(:last-child) .feature button,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>button.feature:not(:first-child):not(:last-child),.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>.feature:not(:first-child):not(:last-child) button,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>:not(:first-child):not(:last-child) button.feature,.row.mergeAdjacent>.table>.col.mergeAdjacent:last-child>:not(:first-child):not(:last-child) .feature button .row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>button.feature,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>.feature button,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>* button.feature,.row.mergeAdjacent>.table:not(:first-child):not(:last-child)>.col.mergeAdjacent>* .feature button{border-radius:0}.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:first-child .feature button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:first-child .feature button{border-radius:var(--border-radius) 0 0 0}.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>.table:first-child>.row.mergeAdjacent>:last-child .feature button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>.table:first-child>.col.mergeAdjacent>:last-child .feature button{border-radius:0 var(--border-radius) 0 0}.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>button.feature:last-child,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>.feature:last-child button,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:last-child button.feature,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:last-child .feature button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>button.feature:last-child,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>.feature:last-child button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:last-child button.feature,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:last-child .feature button{border-radius:0 0 var(--border-radius) 0}.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>button.feature:first-child,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>.feature:first-child button,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:first-child button.feature,.col.mergeAdjacent>.table:last-child>.row.mergeAdjacent>:first-child .feature button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>button.feature:first-child,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>.feature:first-child button,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:first-child button.feature,.row.mergeAdjacent>.table:last-child>.col.mergeAdjacent>:first-child .feature button{border-radius:0 0 0 var(--border-radius)}.feature{position:relative}button.feature,.feature button{padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.feature button{position:relative}button.can,.can button{background-color:var(--layer-color);cursor:pointer}button.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}button.locked,.locked button{background-color:var(--locked);cursor:not-allowed}button.bought,.bought button{background-color:var(--bought);cursor:default}.resize-listener[data-v-95f1a2c2],svg[data-v-95f1a2c2]{position:absolute;top:0;left:0;z-index:-10;pointer-events:none;margin:0;width:100%;height:100%}.left-side-nodes[data-v-b63a12ba]{position:absolute;left:15px;top:65px}.side-nodes[data-v-b63a12ba]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-b63a12ba] .treeNode,.side-nodes[data-v-b63a12ba] .treeNode{margin:20px auto}.small[data-v-b63a12ba] .treeNode{height:60px;width:60px}.small[data-v-b63a12ba] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-80b5b7b8]{height:100px;width:100px;border:2px solid rgba(0,0,0,.125);border-radius:50%;padding:0;margin:0 10px;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);display:flex}.treeNode[data-v-80b5b7b8]>*{pointer-events:none}.key[data-v-7bcb4952]{display:inline-block;height:1.4em;min-width:1em;margin-block:.1em;padding-inline:.2em;vertical-align:.1em;background:var(--foreground);color:var(--feature-foreground);border:1px solid #0007;border-radius:.3em;box-shadow:0 .1em #0007,0 .1em var(--foreground);font-size:smaller;text-align:center;-webkit-user-select:none;user-select:none;transition:transform 0s,box-shadow 0s}.key[data-v-7bcb4952]:active{transform:translateY(.1em);box-shadow:none}.sticky[data-v-10a04be9]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.main-display-container{vertical-align:middle;margin-bottom:20px;display:flex;transition-duration:0s}.tooltip-container[data-v-ad4ea959]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-ad4ea959],.tooltip[data-v-ad4ea959]:after{pointer-events:none;position:absolute}.tooltip[data-v-ad4ea959]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-ad4ea959] hr{margin:var(--feature-margin) 0}.shown[data-v-ad4ea959]{z-index:10}.fade-enter-from[data-v-ad4ea959],.fade-leave-to[data-v-ad4ea959]{opacity:0}.tooltip[data-v-ad4ea959]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-ad4ea959],.side-nodes .tooltip[data-v-ad4ea959]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-ad4ea959]:after,.side-nodes .tooltip[data-v-ad4ea959]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-ad4ea959]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-ad4ea959]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-ad4ea959]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-ad4ea959]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-ad4ea959]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.collapsible-container[data-v-9e1c6f19]{width:calc(100% - 10px)}.collapsible-toggle[data-v-9e1c6f19]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-9e1c6f19]:last-child{margin-left:unset}[data-v-9e1c6f19] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-9e1c6f19] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-9e1c6f19]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-9e1c6f19] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.clickable[data-v-396784a5]{min-height:120px;width:120px;font-size:10px}.clickable[data-v-396784a5]>*{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.node-text{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:200%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.field{display:flex;position:relative;min-height:2em;margin:10px 0;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input{font-size:inherit}.vue-input input::placeholder{color:var(--link)}form[data-v-495d5085]{margin:0;width:100%}.field[data-v-495d5085]>*{margin:0}input[data-v-495d5085]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-495d5085]{width:100%}.container[data-v-b3b9693a]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-b3b9693a]{font-size:1em}.container[data-v-b3b9693a]>*{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.save[data-v-0058f767]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-0058f767]{border-color:var(--bought)}.open[data-v-0058f767]{display:inline;margin:0;padding-left:0}.open[data-v-0058f767]:disabled{cursor:inherit;color:var(--foreground);opacity:1;pointer-events:none}.handle[data-v-0058f767]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-0058f767]{margin:0 80px 0 0;flex-grow:1}.save.readonly .details[data-v-0058f767]{margin-right:0}.error[data-v-0058f767]{font-size:.8em;color:var(--danger)}.save-version[data-v-0058f767]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-0058f767]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-0058f767]{margin:0}.time[data-v-0058f767]{font-size:small}.synced[data-v-0058f767]{font-size:100%;margin-right:.5em;vertical-align:middle;cursor:default}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field{margin:0}.details>.tooltip-container{display:inline}.field form[data-v-99458d64],.field .field-title[data-v-99458d64],.field .field-buttons[data-v-99458d64]{margin:0}.field-buttons[data-v-99458d64]{display:flex}.field-buttons .field[data-v-99458d64]{margin:0 0 0 8px}.modal-footer[data-v-99458d64]{margin-top:-20px}.footer[data-v-99458d64]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.vga-modal-header[data-v-84eac81b]{padding-top:10px;margin-left:10px}.vga-footer[data-v-84eac81b]{display:flex;justify-content:flex-end}.vga-footer button[data-v-84eac81b]{margin:0 10px}p[data-v-84eac81b]{margin-bottom:10px}.cloud-saves-modal-header[data-v-c79a1b2e]{padding:10px 0;margin-left:10px}.cloud-saves-footer[data-v-c79a1b2e]{display:flex;justify-content:flex-end}.cloud-saves-footer button[data-v-c79a1b2e]{margin:0 10px}.conflict-container[data-v-c79a1b2e]{display:flex}.conflict-container[data-v-c79a1b2e]>*{flex-basis:50%;display:flex;flex-flow:column;margin:0}.conflict-container+.conflict-container[data-v-c79a1b2e]{margin-top:1em}.conflict-container h2[data-v-c79a1b2e]{display:flex;flex-flow:column wrap;height:1.5em;margin:0}.note[data-v-c79a1b2e]{font-size:x-small;opacity:.7;margin-right:1em}.save[data-v-c79a1b2e]{border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px;height:100%}.conflict-container .save{cursor:pointer}.conflict-container .selected .save{border-color:var(--bought)}.field[data-v-faad62a6]{cursor:pointer}input[data-v-faad62a6]{-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}span[data-v-faad62a6]{width:100%;padding-right:41px;position:relative}input+span[data-v-faad62a6]:before{content:"";position:absolute;top:calc(50% - 7px);right:0;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s}input+span[data-v-faad62a6]:after{content:"";position:absolute;top:calc(50% - 10px);right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s}input:checked+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-faad62a6]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-faad62a6]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-faad62a6]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-faad62a6]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-faad62a6]:before{background-color:var(--link);opacity:.6}.game-over-modal-header[data-v-c9c5bad4]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header[data-v-c9c5bad4] *{margin:0}.game-over-modal-logo[data-v-c9c5bad4]{height:4em;width:4em}.game-over-modal-title[data-v-c9c5bad4]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-c9c5bad4]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-c9c5bad4]{margin:0 10px}.game-over-modal-discord-link[data-v-c9c5bad4]{display:flex;align-items:center}.game-over-modal-discord[data-v-c9c5bad4]{margin:0 4px 0 0}.nan-modal-header[data-v-cab8d401]{padding:10px 0;margin-left:10px}.nan-footer[data-v-cab8d401]{display:flex;justify-content:flex-end}.nan-footer button[data-v-cab8d401]{margin:0 10px}.nan-modal-discord-link[data-v-cab8d401]{display:flex;align-items:center}.nan-modal-discord[data-v-cab8d401]{margin:0 4px 0 0}.layer-container[data-v-bac44152]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-bac44152]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-bac44152]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-bac44152]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized[data-v-bac44152]>*{margin:0;writing-mode:vertical-rl;text-align:left;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-bac44152]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-bac44152]{padding-bottom:0}.modal-body .layer-tab[data-v-bac44152]:not(.hasSubtabs){padding-top:0}.minimize[data-v-bac44152]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-bac44152]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-bac44152]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-bac44152]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}.layer-tab.minimized>*>.desc{color:var(--accent1);font-size:30px}details[data-v-0fdea059]{margin:10px 0;padding-left:18px}summary[data-v-0fdea059]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-0fdea059]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-0fdea059]{margin:8px 0}li[data-v-0fdea059]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-0fdea059]:before{content:"Feature";background:var(--accent1)}.fix[data-v-0fdea059]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-0fdea059]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-0fdea059]:before{content:"Breaking";background:var(--danger)}.info-modal-header[data-v-e80d3d22]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header[data-v-e80d3d22] *{margin:0}.info-modal-logo[data-v-e80d3d22]{height:4em;width:4em}.info-modal-title[data-v-e80d3d22]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-e80d3d22]{display:flex;align-items:center}.info-modal-discord[data-v-e80d3d22]{margin:0 4px 0 0}.option-tabs{border-bottom:2px solid var(--outline);margin-top:10px;margin-bottom:-10px}.option-tabs button{background-color:transparent;color:var(--foreground);margin-bottom:-2px;font-size:14px;cursor:pointer;padding:5px 20px;border:none;border-bottom:2px solid var(--foreground)}.option-tabs button:not(.selected){border-bottom-color:transparent}.option-title .tooltip-container{display:inline;margin-left:5px}.option-title desc{display:block;opacity:.6;font-size:small;width:300px;margin-left:0}.save-button{text-align:right}.nav[data-v-fcec1ed1]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav[data-v-fcec1ed1]>*{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-fcec1ed1]{height:100%;width:unset}.overlay-nav[data-v-fcec1ed1]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav[data-v-fcec1ed1]>*{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-fcec1ed1]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-fcec1ed1]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-fcec1ed1],.nav .info[data-v-fcec1ed1]{display:flex}.tooltip-container[data-v-fcec1ed1]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-fcec1ed1]{position:relative}.discord img[data-v-fcec1ed1]{width:100%;height:100%}.discord-links[data-v-fcec1ed1]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-fcec1ed1]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-fcec1ed1]{left:-10px}.discord-links li[data-v-fcec1ed1]{margin-bottom:4px}.discord-links li[data-v-fcec1ed1]:first-child{font-size:1.2em}:not(.overlay-nav) .discord:hover .discord-links[data-v-fcec1ed1]{right:0}.material-icons[data-v-fcec1ed1]{font-size:36px}.material-icons[data-v-fcec1ed1]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-fcec1ed1]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-fcec1ed1]{width:unset;height:25px}.version[data-v-fcec1ed1]{color:var(--points)}.version:hover span[data-v-fcec1ed1]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-fcec1ed1],.overlay-nav>div>a[data-v-fcec1ed1]{color:var(--foreground);text-shadow:none}.needsSync[data-v-fcec1ed1]{color:var(--danger);animation:4s wiggle-fcec1ed1 ease infinite}@keyframes wiggle-fcec1ed1{0%{transform:rotate(-3deg);box-shadow:0 2px 2px #0003}5%{transform:rotate(20deg)}10%{transform:rotate(-15deg)}15%{transform:rotate(5deg)}20%{transform:rotate(-1deg)}25%{transform:rotate(0);box-shadow:0 2px 2px #0003}}.tabs-container[data-v-d0a3afce]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-d0a3afce]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-d0a3afce]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-d0a3afce]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-d0a3afce]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.tpsDisplay[data-v-7df31503]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-7df31503]{color:var(--danger)}.fade-leave-to[data-v-7df31503]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}:disabled{pointer-events:none}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr}.app[data-v-b45f2ee2]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-b45f2ee2]{position:absolute;min-height:100%;height:100%;color:var(--foreground)}.error-container[data-v-b45f2ee2]{background:var(--background);overflow:auto;width:100%;height:100%}.error-container>.error[data-v-b45f2ee2]{position:static} diff --git a/assets/index-DxM-pCoC.js b/assets/index-DxM-pCoC.js new file mode 100644 index 0000000..9aca05c --- /dev/null +++ b/assets/index-DxM-pCoC.js @@ -0,0 +1,18 @@ +var kn=Object.defineProperty;var Cn=(n,e,t)=>e in n?kn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $=(n,e,t)=>Cn(n,typeof e!="symbol"?e+"":e,t);/* empty css */import"./vue-GVBARt8q.js";import{aX as He,bo as d,X as z,aZ as F,aR as b,A as C,b0 as xe,bS as Xe,aA as K,az as Be,w as L,aJ as it,G as g,bf as O,F as j,a$ as Se,z as E,aC as fe,P as V,Q as v,bN as _,b9 as bt,aT as at,y as J,bP as Tt,bF as Sn,ay as ke,l as Ht,T as In,ap as xn,ar as se,am as ct,bb as rt,bI as ae,bj as Oe,aO as Wt,bl as jt,aB as Mn,bJ as Jt,au as Tn,bi as Ot,bE as $n,bA as Pn,aI as En,bk as Lt,b3 as Fn,x as Vn}from"./@vue-CCfogNd1.js";import{L as $e}from"./lz-string-BZNGtwso.js";import{c as Zt}from"./nanoevents-BxCKNB1V.js";import{i as _n}from"./unofficial-galaxy-sdk-C_siawBx.js";import{D as On}from"./vuedraggable-BgvaSe-I.js";import{Y as Ln}from"./vue-next-select-CgtHQcl0.js";import{p as Dn}from"./vue-textarea-autosize-DLc4kbjP.js";import{s as An,u as Rn}from"./vue-toastification-CjoTmBGg.js";import"./sortablejs-BZuNQ3iR.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();const qn="./projInfo-schema.json",Un="Profectus",Bn="A project made in Profectus",zn="",Gn="",Hn="",Wn="",jn="0.0",Jn="Initial Commit",Zn=!0,Yn=!1,Kn=2,Xn=!0,Qn=null,ei="",ti=["main"],ni=3600,ii=1,ri=!0,si="base64",ai=!1,B={$schema:qn,title:Un,description:Bn,id:zn,author:Gn,discordName:Hn,discordLink:Wn,versionNumber:jn,versionTitle:Jn,allowGoBack:Zn,defaultShowSmall:Yn,defaultDecimalsShown:Kn,useHeader:Xn,banner:Qn,logo:ei,initialTabs:ti,maxTickLength:ni,offlineLimit:ii,enablePausing:ri,exportEncoding:si,disableHealthWarning:ai},oi=He({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}}),x=window.player=oi;function ze(n){return JSON.stringify(n,(e,t)=>d(t)??null)}const li=z({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(n,{emit:e}){const t=e,i=F(!1),r=F(null);function s(){t("click"),r.value!=null&&clearTimeout(r.value),i.value=!1,Be(()=>{i.value=!0,r.value=setTimeout(()=>i.value=!1,500)})}return(u,a)=>(b(),C("button",{onClick:Xe(s,["stop"]),class:K(["feedback",{activated:i.value,left:u.left}])},[xe(u.$slots,"default",{},void 0,!0)],2))}}),Z=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},$t=Z(li,[["__scopeId","data-v-f82eae5d"]]),ui={class:"error"},ci={class:"error-title"},di={class:"error-details",style:{"margin-top":"-10px"}},fi={key:0},mi={class:"instructions"},gi=["href"],pi={key:0,style:{"margin-top":"20px"}},hi={class:"error-details"},vi={key:0,style:{"margin-top":"10px"}},bi={key:1,style:{"margin-top":"10px"}},yi=z({__name:"Error",props:{errors:{}},setup(n){const e=n,t=L(()=>e.errors[0]),i=L(()=>e.errors.map(u=>u.stack==null?[]:u.stack.split(` +`))),r=L(()=>e.errors.map(u=>u.cause==null?[]:(typeof u.cause=="string"?u.cause:JSON.stringify(u.cause)).split(` +`)));function s(){let u=ze(x);switch(B.exportEncoding){default:console.warn(`Unknown save encoding: ${B.exportEncoding}. Defaulting to lz`);case"lz":u=$e.compressToUTF16(u);break;case"base64":u=btoa(unescape(encodeURIComponent(u)));break;case"plain":break}console.log(u);const a=document.createElement("textarea");a.value=u,document.body.appendChild(a),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(a)}return it(()=>{x.autosave=!1,x.devSpeed=0}),(u,a)=>(b(),C("div",ui,[g("h1",ci,O(t.value.name)+": "+O(t.value.message),1),g("div",di,[t.value.cause?(b(),C("div",fi,[(b(!0),C(j,null,Se(r.value[0],o=>(b(),C("div",{key:o},O(o),1))),128))])):E("",!0),t.value.stack?(b(),C("div",{key:1,style:fe(t.value.cause?"margin-top: 10px":"")},[(b(!0),C(j,null,Se(i.value[0],o=>(b(),C("div",{key:o},O(o),1))),128))],4)):E("",!0)]),g("div",mi,[a[2]||(a[2]=V(" Check the console for more details, and consider sharing it with the developers on ")),g("a",{href:d(B).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,gi),a[3]||(a[3]=V("! ")),v($t,{onClick:s,class:"button",style:{display:"inline-flex"}},{default:_(()=>a[0]||(a[0]=[g("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1),g("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)])),_:1}),a[4]||(a[4]=g("br",null,null,-1)),u.errors.length>1?(b(),C("div",pi,a[1]||(a[1]=[g("h3",null,"Other errors",-1)]))):E("",!0),(b(!0),C(j,null,Se(u.errors.slice(1),(o,f)=>(b(),C("div",{key:f,style:{"margin-top":"20px"}},[g("details",hi,[g("summary",null,O(o.name)+": "+O(o.message),1),o.cause?(b(),C("div",vi,[(b(!0),C(j,null,Se(r.value[f+1],y=>(b(),C("div",{key:y},O(y),1))),128))])):E("",!0),o.stack?(b(),C("div",bi,[(b(!0),C(j,null,Se(i.value[f+1],y=>(b(),C("div",{key:y},O(y),1))),128))])):E("",!0)])]))),128))])]))}}),Yt=Z(yi,[["__scopeId","data-v-2524e23e"]]),Fe={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Pt=(n=>(n.Classic="classic",n.Paper="paper",n.Nordic="nordic",n.Aqua="aqua",n))(Pt||{});const Et={classic:Fe,paper:{...Fe,variables:{...Fe.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Fe,variables:{...Fe.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Fe,variables:{...Fe.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}},G=window.state=bt({lastTenTicks:[],mouseActivity:[!1],hasNaN:!1,NaNPath:[],errors:He([])}),ne=Zt();"fonts"in document&&(document.fonts.onloadingdone=()=>ne.emit("fontsLoaded"));document.onmousemove=function(){G.mouseActivity[G.mouseActivity.length-1]=!0};const wi=z({__name:"Context",emits:["updateNodes"],setup(n,{emit:e}){var N;const t=e,i=F({}),r=new ResizeObserver(o),s=F(null);it(()=>{const w=s.value;w!=null&&r.observe(w)});let u=!0,a=F((N=s.value)==null?void 0:N.getBoundingClientRect());function o(){u&&(u=!1,Be(()=>{var w;a.value=(w=s.value)==null?void 0:w.getBoundingClientRect(),Object.values(i.value).filter(p=>p).forEach(p=>p.rect=p.element.getBoundingClientRect()),t("updateNodes",i.value),u=!0}))}ne.on("fontsLoaded",o);const f={attributes:!1,childList:!0,subtree:!1};at(on,(w,p)=>{const k=new MutationObserver(()=>y(w));k.observe(p,f),i.value[w]={element:p,observer:k,rect:p.getBoundingClientRect()},o()}),at(ln,w=>{var p;(p=i.value[w])==null||p.observer.disconnect(),i.value[w]=void 0,o()}),at(un,i),at(cn,a);function y(w){const p=i.value[w];p!=null&&(p.rect=p.element.getBoundingClientRect(),t("updateNodes",i.value))}return(w,p)=>(b(),C(j,null,[xe(w.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:s,class:"resize-listener"},null,512)],64))}}),Kt=Z(wi,[["__scopeId","data-v-4fc505f1"]]),Ni={class:"modal-wrapper"},ki=["width"],Ci={class:"modal-header"},Si={class:"modal-body"},Ii={class:"modal-footer"},Pe=z({__name:"Modal",props:{modelValue:{type:Boolean},preventClosing:{type:Boolean},width:{}},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=L(()=>i.modelValue||a.value);function u(){i.preventClosing!==!0&&r("update:modelValue",!1)}const a=F(!1),o=F(null),f=L(()=>{var y;return((y=o.value)==null?void 0:y.nodes)??null});return e({isOpen:s,nodes:f}),(y,N)=>(b(),J(In,{to:"#modal-root"},[v(Ht,{name:"modal",onBeforeEnter:N[0]||(N[0]=w=>a.value=!0),onAfterLeave:N[1]||(N[1]=w=>a.value=!1),appear:""},{default:_(()=>[Tt(g("div",ke({class:"modal-mask",onPointerdown:Xe(u,["self"])},y.$attrs),[g("div",Ni,[g("div",{class:"modal-container",width:y.width},[g("div",Ci,[xe(y.$slots,"header",{shown:s.value})]),g("div",Si,[v(Kt,{ref_key:"contextRef",ref:o},{default:_(()=>[xe(y.$slots,"body",{shown:s.value})]),_:3},512)]),g("div",Ii,[xe(y.$slots,"footer",{shown:s.value},()=>[g("div",{class:"modal-default-footer"},[N[2]||(N[2]=g("div",{class:"modal-default-flex-grow"},null,-1)),g("button",{class:"button modal-default-button",onClick:u}," Close ")])])])],8,ki)])],16),[[Sn,y.modelValue]])]),_:3})]))}});class xi{constructor(e){$(this,"map",new Map);$(this,"first");$(this,"last");$(this,"maxSize");this.maxSize=e}get size(){return this.map.size}get(e){const t=this.map.get(e);if(t!==void 0)return t!==this.first&&(t===this.last?(this.last=t.prev,this.last.next=void 0):(t.prev.next=t.next,t.next.prev=t.prev),t.next=this.first,this.first.prev=t,this.first=t),t.value}set(e,t){if(this.maxSize<1)return;if(this.map.has(e))throw new Error("Cannot update existing keys in the cache");const i=new Mi(e,t);for(this.first===void 0?(this.first=i,this.last=i):(i.next=this.first,this.first.prev=i,this.first=i),this.map.set(e,i);this.map.size>this.maxSize;){const r=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void 0}}}class Mi{constructor(e,t){$(this,"key");$(this,"value");$(this,"next");$(this,"prev");this.key=e,this.value=t}}const St=17,Ti=9e15,$i=Math.log10(9e15),Pi=1/9e15,Ei=308,Fi=-324,Dt=5,Vi=1023,_i=function(){const n=[];for(let t=Fi+1;t<=Ei;t++)n.push(+("1e"+t));const e=323;return function(t){return n[t+e]}}(),Ve=[2,Math.E,3,4,5,6,7,8,9,10],Oi=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Li=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let h=function(e){return c.fromValue_noAlloc(e)},A=function(n,e,t){return c.fromComponents(n,e,t)},U=function(e,t,i){return c.fromComponents_noNormalize(e,t,i)};const Ce=function(e,t){const i=t+1,r=Math.ceil(Math.log10(Math.abs(e))),s=Math.round(e*Math.pow(10,i-r))*Math.pow(10,r-i);return parseFloat(s.toFixed(Math.max(i-r,0)))},It=function(n){return Math.sign(n)*Math.log10(Math.abs(n))},Di=function(n){if(!isFinite(n))return n;if(n<-50)return n===Math.trunc(n)?Number.NEGATIVE_INFINITY:0;let e=1;for(;n<10;)e=e*n,++n;n-=1;let t=.9189385332046727;t=t+(n+.5)*Math.log(n),t=t-n;const i=n*n;let r=n;return t=t+1/(12*r),r=r*i,t=t+1/(360*r),r=r*i,t=t+1/(1260*r),r=r*i,t=t+1/(1680*r),r=r*i,t=t+1/(1188*r),r=r*i,t=t+691/(360360*r),r=r*i,t=t+7/(1092*r),r=r*i,t=t+3617/(122400*r),Math.exp(t)/e},Xt=.5671432904097838,At=function(n,e=1e-10){let t,i;if(!Number.isFinite(n)||n===0)return n;if(n===1)return Xt;n<10?t=0:t=Math.log(n)-Math.log(Math.log(n));for(let r=0;r<100;++r){if(i=(n*Math.exp(-t)+t*t)/(t+1),Math.abs(i-t).5?1:-1;if(Math.random()*20<1)return U(t,0,1);const i=Math.floor(Math.random()*(e+1));let r=i===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(r=Math.trunc(r));let s=Math.pow(10,r);return Math.random()>.9&&(s=Math.trunc(s)),A(t,i,s)}static affordGeometricSeries_core(e,t,i,r){const s=t.mul(i.pow(r));return m.floor(e.div(s).mul(i.sub(1)).add(1).log10().div(i.log10()))}static sumGeometricSeries_core(e,t,i,r){return t.mul(i.pow(r)).mul(m.sub(1,i.pow(e))).div(m.sub(1,i))}static affordArithmeticSeries_core(e,t,i,r){const u=t.add(r.mul(i)).sub(i.div(2)),a=u.pow(2);return u.neg().add(a.add(i.mul(e).mul(2)).sqrt()).div(i).floor()}static sumArithmeticSeries_core(e,t,i,r){const s=t.add(r.mul(i));return e.div(2).mul(s.mul(2).plus(e.sub(1).mul(i)))}static efficiencyOfPurchase_core(e,t,i){return e.div(t).add(e.div(i))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Ti)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<$i&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,i){return this.sign=e,this.layer=t,this.mag=i,this.normalize(),this}fromComponents_noNormalize(e,t,i){return this.sign=e,this.layer=t,this.mag=i,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,i=m.fromStringCache.get(t);if(i!==void 0)return this.fromDecimal(i);e=e.replace(",","");const r=e.split("^^^");if(r.length===2){const S=parseFloat(r[0]),M=parseFloat(r[1]),T=r[1].split(";");let P=1;if(T.length===2&&(P=parseFloat(T[1]),isFinite(P)||(P=1)),isFinite(S)&&isFinite(M)){const q=m.pentate(S,M,P);return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}const s=e.split("^^");if(s.length===2){const S=parseFloat(s[0]),M=parseFloat(s[1]),T=s[1].split(";");let P=1;if(T.length===2&&(P=parseFloat(T[1]),isFinite(P)||(P=1)),isFinite(S)&&isFinite(M)){const q=m.tetrate(S,M,P);return this.sign=q.sign,this.layer=q.layer,this.mag=q.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}const u=e.split("^");if(u.length===2){const S=parseFloat(u[0]),M=parseFloat(u[1]);if(isFinite(S)&&isFinite(M)){const T=m.pow(S,M);return this.sign=T.sign,this.layer=T.layer,this.mag=T.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}e=e.trim().toLowerCase();let a,o,f=e.split("pt");if(f.length===2){a=10,o=parseFloat(f[0]),f[1]=f[1].replace("(",""),f[1]=f[1].replace(")","");let S=parseFloat(f[1]);if(isFinite(S)||(S=1),isFinite(a)&&isFinite(o)){const M=m.tetrate(a,o,S);return this.sign=M.sign,this.layer=M.layer,this.mag=M.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}if(f=e.split("p"),f.length===2){a=10,o=parseFloat(f[0]),f[1]=f[1].replace("(",""),f[1]=f[1].replace(")","");let S=parseFloat(f[1]);if(isFinite(S)||(S=1),isFinite(a)&&isFinite(o)){const M=m.tetrate(a,o,S);return this.sign=M.sign,this.layer=M.layer,this.mag=M.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}const y=e.split("e"),N=y.length-1;if(N===0){const S=parseFloat(e);if(isFinite(S))return this.fromNumber(S),m.fromStringCache.size>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}else if(N===1){const S=parseFloat(e);if(isFinite(S)&&S!==0)return this.fromNumber(S),m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}const w=e.split("e^");if(w.length===2){this.sign=1,w[0].charAt(0)=="-"&&(this.sign=-1);let S="";for(let M=0;M=43&&T<=57||T===101)S+=w[1].charAt(M);else return this.layer=parseFloat(S),this.mag=parseFloat(w[1].substr(M+1)),this.normalize(),m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}}if(N<1)return this.sign=0,this.layer=0,this.mag=0,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this;const p=parseFloat(y[0]);if(p===0)return this.sign=0,this.layer=0,this.mag=0,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this;let k=parseFloat(y[y.length-1]);if(N>=2){const S=parseFloat(y[y.length-2]);isFinite(S)&&(k*=Math.sign(S),k+=It(S))}if(!isFinite(p))this.sign=y[0]==="-"?-1:1,this.layer=N,this.mag=k;else if(N===1)this.sign=Math.sign(p),this.layer=1,this.mag=k+Math.log10(Math.abs(p));else if(this.sign=Math.sign(p),this.layer=N,N===2){const S=m.mul(A(1,2,k),h(p));return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}else this.mag=k;return this.normalize(),m.fromStringCache.maxSize>=1&&m.fromStringCache.set(t,m.fromDecimal(this)),this}fromValue(e){return e instanceof m?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Ce(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Ce(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=Dt?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Ce(this.m,e)+"e"+Ce(this.e,e):this.layer===1?Ce(this.m,e)+"e"+Ce(this.e,e):this.layer<=Dt?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Ce(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Ce(this.mag,e)}abs(){return U(this.sign===0?0:1,this.layer,this.mag)}neg(){return U(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?m.dZero:this.layer===0?A(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?m.dZero:this.layer===0?A(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?m.dZero:this.layer===0?A(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?m.dZero:this.layer===0?A(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return U(0,0,0);let i,r;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(m.cmpabs(this,t)>0?(i=this,r=t):(i=t,r=this),i.layer===0&&r.layer===0)return m.fromNumber(i.sign*i.mag+r.sign*r.mag);const s=i.layer*Math.sign(i.mag),u=r.layer*Math.sign(r.mag);if(s-u>=2)return i;if(s===0&&u===-1){if(Math.abs(r.mag-Math.log10(i.mag))>St)return i;{const a=Math.pow(10,Math.log10(i.mag)-r.mag),o=r.sign+i.sign*a;return A(Math.sign(o),1,r.mag+Math.log10(Math.abs(o)))}}if(s===1&&u===0){if(Math.abs(i.mag-Math.log10(r.mag))>St)return i;{const a=Math.pow(10,i.mag-Math.log10(r.mag)),o=r.sign+i.sign*a;return A(Math.sign(o),1,Math.log10(r.mag)+Math.log10(Math.abs(o)))}}if(Math.abs(i.mag-r.mag)>St)return i;{const a=Math.pow(10,i.mag-r.mag),o=r.sign+i.sign*a;return A(Math.sign(o),1,r.mag+Math.log10(Math.abs(o)))}}plus(e){return this.add(e)}sub(e){return this.add(h(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=h(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return U(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return U(this.sign*t.sign,0,1);let i,r;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(i=this,r=t):(i=t,r=this),i.layer===0&&r.layer===0)return m.fromNumber(i.sign*r.sign*i.mag*r.mag);if(i.layer>=3||i.layer-r.layer>=2)return A(i.sign*r.sign,i.layer,i.mag);if(i.layer===1&&r.layer===0)return A(i.sign*r.sign,1,i.mag+Math.log10(r.mag));if(i.layer===1&&r.layer===1)return A(i.sign*r.sign,1,i.mag+r.mag);if(i.layer===2&&r.layer===1){const s=A(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)).add(A(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return A(i.sign*r.sign,s.layer+1,s.sign*s.mag)}if(i.layer===2&&r.layer===2){const s=A(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)).add(A(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return A(i.sign*r.sign,s.layer+1,s.sign*s.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=h(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?m.dNaN:this.layer===0?A(this.sign,0,1/this.mag):A(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=h(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,r=t.mag>0?t.layer:-t.layer;return i>r?1:it.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const i=h(e);return this.eq_tolerance(i,t)?0:this.cmp(i)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const i=h(e);if(t==null&&(t=1e-7),this.sign!==i.sign||Math.abs(this.layer-i.layer)>1)return!1;let r=this.mag,s=i.mag;return this.layer>i.layer&&(s=It(s)),this.layer0?A(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):A(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?m.dNaN:this.layer>0?A(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):A(this.sign,0,Math.log10(this.mag))}log(e){return e=h(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?m.dNaN:this.layer===0&&e.layer===0?A(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):m.div(this.log10(),e.log10())}log2(){return this.sign<=0?m.dNaN:this.layer===0?A(this.sign,0,Math.log2(this.mag)):this.layer===1?A(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?A(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):A(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?m.dNaN:this.layer===0?A(this.sign,0,Math.log(this.mag)):this.layer===1?A(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?A(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):A(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=h(e),i=this,r=t;if(i.sign===0)return r.eq(0)?U(1,0,1):i;if(i.sign===1&&i.layer===0&&i.mag===1)return i;if(r.sign===0)return U(1,0,1);if(r.sign===1&&r.layer===0&&r.mag===1)return i;const s=i.absLog10().mul(r).pow10();return this.sign===-1?Math.abs(r.toNumber()%2)%2===1?s.neg():Math.abs(r.toNumber()%2)%2===0?s:m.dNaN:s}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return m.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return A(1,0,t);if(e.sign===0)return m.dOne;e=U(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?A(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?A(-e.sign,e.layer+1,-e.mag):m.dOne}pow_base(e){return h(e).pow(this)}root(e){const t=h(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?m.exp(m.mul(this,m.ln(this).sub(1))):m.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(U(1,0,24)))return m.fromNumber(Di(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const i=e*e;let r=e,s=12*r,u=1/s,a=t+u;if(a===t||(t=a,r=r*i,s=360*r,u=1/s,a=t-u,a===t))return m.exp(t);t=a,r=r*i,s=1260*r;let o=1/s;return t=t+o,r=r*i,s=1680*r,o=1/s,t=t-o,m.exp(t)}else return this.layer===1?m.exp(m.mul(this,m.ln(this).sub(1))):m.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?m.dOne:this.layer===0&&this.mag<=709.7?m.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?A(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?A(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):A(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return m.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return A(1,2,Math.log10(this.mag)-.3010299956639812);{const e=m.div(U(this.sign,this.layer-1,this.mag),U(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=U(1,0,1)){if(e===1)return m.pow(this,t);if(e===0)return new m(t);if(this.eq(m.dOne))return m.dOne;if(this.eq(-1))return m.pow(this,t);if(e===Number.POSITIVE_INFINITY){const s=this.toNumber();if(s<=1.444667861009766&&s>=.06598803584531254){if(s>1.444667861009099)return m.fromNumber(Math.E);const u=m.ln(this).neg();return u.lambertw().div(u)}else return s>1.444667861009766?m.fromNumber(Number.POSITIVE_INFINITY):m.dNaN}if(this.eq(m.dZero)){let s=Math.abs((e+1)%2);return s>1&&(s=2-s),m.fromNumber(s)}if(e<0)return m.iteratedlog(t,this,-e);t=h(t);const i=e;e=Math.trunc(e);const r=i-e;if(this.gt(m.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let s=0;s3)return U(t.sign,t.layer+(e-s-1),t.mag);if(s>1e4)return t}return t}iteratedexp(e=2,t=U(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return m.tetrate(e,-t,this);e=h(e);let i=m.fromDecimal(this);const r=t;t=Math.trunc(t);const s=r-t;if(i.layer-e.layer>3){const u=Math.min(t,i.layer-e.layer-3);t-=u,i.layer-=u}for(let u=0;u1e4)return i}return s>0&&s<1&&(e.eq(10)?i=i.layeradd10(-s):i=i.layeradd(-s,e)),i}slog(e=10,t=100){let i=.001,r=!1,s=!1,u=this.slog_internal(e).toNumber();for(let a=1;a1&&s!=f&&(r=!0),s=f,r?i/=2:i*=2,i=Math.abs(i)*(f?-1:1),u+=i,i===0)break}return m.fromNumber(u)}slog_internal(e=10){if(e=h(e),e.lte(m.dZero)||e.eq(m.dOne))return m.dNaN;if(e.lt(m.dOne))return this.eq(m.dOne)?m.dZero:this.eq(m.dZero)?m.dNegOne:m.dNaN;if(this.mag<0||this.eq(m.dZero))return m.dNegOne;let t=0,i=m.fromDecimal(this);if(i.layer-e.layer>3){const r=i.layer-e.layer-3;t+=r,i.layer-=r}for(let r=0;r<100;++r)if(i.lt(m.dZero))i=m.pow(e,i),t-=1;else{if(i.lte(m.dOne))return m.fromNumber(t+m.slog_critical(e.toNumber(),i.toNumber()));t+=1,i=m.log(i,e)}return m.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:m.critical_section(e,t,Li)}static tetrate_critical(e,t){return m.critical_section(e,t,Oi)}static critical_section(e,t,i){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let r=0,s=0;for(let a=0;ae){const o=(e-Ve[a])/(Ve[a+1]-Ve[a]);r=i[a][Math.floor(t)]*(1-o)+i[a+1][Math.floor(t)]*o,s=i[a][Math.ceil(t)]*(1-o)+i[a+1][Math.ceil(t)]*o;break}const u=t-Math.floor(t);return r<=0||s<=0?r*(1-u)+s*u:Math.pow(e,Math.log(r)/Math.log(e)*(1-u)+Math.log(s)/Math.log(e)*u)}layeradd10(e){e=m.fromValue_noAlloc(e).toNumber();const t=m.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const i=Math.trunc(e);e-=i,t.layer+=i}if(e<=-1){const i=Math.trunc(e);if(e-=i,t.layer+=i,t.layer<0)for(let r=0;r<100;++r){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const r=this.slog(t).toNumber()+e;return r>=0?m.tetrate(t,r):Number.isFinite(r)?r>=-1?m.log(m.tetrate(t,r+1),t):m.log(m.log(m.tetrate(t,r+2),t),t):m.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return m.fromNumber(At(this.toNumber()));if(this.layer===0)return m.fromNumber(At(this.sign*this.mag));if(this.layer===1)return Rt(this);if(this.layer===2)return Rt(this);if(this.layer>=3)return U(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return U(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=U(1,0,1)){t=h(t);const i=e;e=Math.trunc(e);const r=i-e;r!==0&&(t.eq(m.dOne)?(++e,t=m.fromNumber(r)):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let s=0;s10)return t}return t}sin(){return this.mag<0?this:this.layer===0?m.fromNumber(Math.sin(this.sign*this.mag)):U(0,0,0)}cos(){return this.mag<0?m.dOne:this.layer===0?m.fromNumber(Math.cos(this.sign*this.mag)):U(0,0,0)}tan(){return this.mag<0?this:this.layer===0?m.fromNumber(Math.tan(this.sign*this.mag)):U(0,0,0)}asin(){return this.mag<0?this:this.layer===0?m.fromNumber(Math.asin(this.sign*this.mag)):U(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?m.fromNumber(Math.acos(this.toNumber())):this.layer===0?m.fromNumber(Math.acos(this.sign*this.mag)):U(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?m.fromNumber(Math.atan(this.sign*this.mag)):m.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return m.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return m.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?U(Number.NaN,Number.NaN,Number.NaN):m.ln(this.add(1).div(m.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(m.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};$(m,"dZero"),$(m,"dOne"),$(m,"dNegOne"),$(m,"dTwo"),$(m,"dTen"),$(m,"dNaN"),$(m,"dInf"),$(m,"dNegInf"),$(m,"dNumberMax"),$(m,"dNumberMin"),$(m,"fromStringCache",new xi(Vi));let c=m;c.dZero=U(0,0,0);c.dOne=U(1,0,1);c.dNegOne=U(-1,0,1);c.dTwo=U(1,0,2);c.dTen=U(1,0,10);c.dNaN=U(Number.NaN,Number.NaN,Number.NaN);c.dInf=U(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);c.dNegInf=U(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);c.dNumberMax=A(1,0,Number.MAX_VALUE);c.dNumberMin=A(1,0,Number.MIN_VALUE);h=c.fromValue_noAlloc;A=c.fromComponents;U=c.fromComponents_noNormalize;c.fromMantissaExponent;c.fromMantissaExponent_noNormalize;const Ai=new c(1);function Ze(n,e,t=!0){let i=c.log10(n).floor(),r=c.div(n,c.pow(10,i));r.toStringWithDecimalPlaces(e)==="10"&&(r=Ai,i=i.add(1));const s=i.gte(1e9)?me(i,Math.max(Math.max(e,3),B.defaultDecimalsShown)):i.gte(1e4)?dt(i,0):i.toStringWithDecimalPlaces(0);return t?r.toStringWithDecimalPlaces(e)+"e"+s:"e"+s}function dt(n,e){if(n==null)return"NaN";if(n=new c(n),n.mag<.001)return 0 .toFixed(e);const i=n.toStringWithDecimalPlaces(e).split(".");return i[0]=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),i.length===1?i[0]:i[0]+"."+i[1]}function Qt(n,e){return n==null?"NaN":(n=new c(n),n.mag<1e-4?0 .toFixed(e):(n.mag<.1&&e!==0&&(e=Math.max(Math.max(e,n.log10().negate().ceil().toNumber()),B.defaultDecimalsShown)),n.toStringWithDecimalPlaces(e)))}const Ri=new c("eeee1000"),qi=new c("e100000"),qt=new c("e1000"),en=new c(1e9),Ui=new c(1e6),Bi=new c(1e3),zi=new c(.98),Gi=new c(.001),tn=new c(0);function me(n,e,t){if(e==null&&(e=B.defaultDecimalsShown),t=t??B.defaultShowSmall,n=new c(n),isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag))return"NaN";if(n.sign<0)return"-"+me(n.neg(),e);if(n.mag===Number.POSITIVE_INFINITY)return"Infinity";if(n.gte(Ri)){const i=n.slog();return i.gte(Ui)?"F"+me(i.floor()):c.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+dt(i.floor(),0)}else{if(n.gte(qi))return Ze(n,0,!1);if(n.gte(qt))return Ze(n,0);if(n.gte(en))return Ze(n,e);if(n.gte(Bi))return dt(n,0);if(n.gte(Gi)||!t)return Qt(n,e);if(n.eq(tn))return 0 .toFixed(e)}return n=rn(n),n.lt(qt)?Ze(n,e).replace(/([^(?:e|F)]*)$/,"-$1"):me(n,e)+"⁻¹"}function de(n){return n=new c(n),n.sign<0?"-"+de(n.neg()):n.gte(en)||n.lte(zi)&&!n.eq(tn)?me(n):me(n,0)}function nn(n){return c.lt(n,0)?"-"+nn(c.neg(n)):c.gt(n,2**51)?me(c.div(n,31536e3))+"y":(n=new c(n).toNumber(),n<60?me(n)+"s":n<3600?de(Math.floor(n/60))+"m "+me(n%60)+"s":n<86400?de(Math.floor(n/3600))+"h "+de(Math.floor(n/60)%60)+"m "+de(n%60)+"s":n<31536e3?de(Math.floor(n/84600)%365)+"d "+de(Math.floor(n/3600)%24)+"h "+de(Math.floor(n/60)%60)+"m":de(Math.floor(n/31536e3))+"y "+de(Math.floor(n/84600)%365)+"d "+de(Math.floor(n/3600)%24)+"h")}function Hi(n,e,t){n=new c(n);let i=n.toStringWithDecimalPlaces(e);return new c(i).gte(t)&&(i=c.sub(t,Math.pow(.1,e)).toStringWithDecimalPlaces(e)),i}function Wi(n,e){return me(n,e,!0)}function rn(n){let e=c.log10(n).ceil();const t=c.div(n,c.pow(10,e));return e=e.neg(),n=new c(10).pow(e).times(t),n}const ji=Object.freeze(Object.defineProperty({__proto__:null,commaFormat:dt,default:c,exponentialFormat:Ze,format:me,formatSmall:Wi,formatTime:nn,formatWhole:de,invertOOM:rn,regularFormat:Qt,toPlaces:Hi},Symbol.toStringTag,{value:"Module"})),{exponentialFormat:Ji,commaFormat:Zi,regularFormat:Yi,format:pe,formatWhole:Qe,formatTime:yt,toPlaces:Ki,formatSmall:Xi,invertOOM:Qi}=ji;window.Decimal=c;window.exponentialFormat=Ji;window.commaFormat=Zi;window.regularFormat=Yi;window.format=pe;window.formatWhole=Qe;window.formatTime=yt;window.toPlaces=Ki;window.formatSmall=Xi;window.invertOOM=Qi;const Ie=Symbol("ProxyState"),ft=Symbol("AfterEvaluation");function Ee(n,e={}){const t=e;let i=!1,r=!1;const s=[];function u(){if(!i){if(r)throw new Error("Cyclical dependency detected. Cannot evaluate lazy proxy.");r=!0,Object.assign(t,n.call(t,t)),i=!0,s.forEach(o=>o(t))}return t}function a(o){i?o(t):s.push(o)}return new Proxy(t,{get(o,f){if(f===Ie)return u();if(f===ft)return a;const y=u()[f];return y!=null&&typeof y=="object"&&ye in y?y[ye]:y},set(o,f,y){return u()[f]=y,!0},has(o,f){return f===Ie||f===ft?!0:Reflect.has(u(),f)},ownKeys(){return Reflect.ownKeys(u())},getOwnPropertyDescriptor(o,f){return i||(Object.assign(t,n.call(t,t)),i=!0),Object.getOwnPropertyDescriptor(o,f)}})}function er(n,e){ft in n?n[ft](e):e(n)}function tr(n){let e=n.replace(/([A-Z])/g," $1");return e=e.charAt(0).toUpperCase()+e.slice(1),e}function nr(n){return(n[0]+n.slice(1).replace(/[A-Z]/g,e=>`-${e}`)).toLowerCase()}function ir(n){return typeof n=="function"}var Y=(n=>(n.Up="Up",n.Down="Down",n.Left="Left",n.Right="Right",n.Default="Up",n))(Y||{});function R(n){return ir(n)&&n.length===0?L(n):n}const sn=c.ln(10);function ut(n){return n}function je(n,...e){const t=e.find(i=>I(i));return t==null?(console.error("Could not invert due to no input being a variable"),0):t.invert(n)}function rr(n,e){return I(e)?e.invert(c.neg(n)):(console.error("Could not invert due to no input being a variable"),0)}function sr(n,e){return I(e)?e.isIntegrable()?l.neg(e.getIntegralFormula(n)):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function ar(n){return l.neg(n)}function or(n,e,t){return I(e)?e.invert(c.sub(n,X(t))):I(t)?t.invert(c.sub(n,X(e))):(console.error("Could not invert due to no input being a variable"),0)}function lr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.times(t,e.innermostVariable??0).add(i)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.times(e,t.innermostVariable??0).add(i)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ur(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.add(i,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.add(i,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function cr(n,e,t){return I(e)?e.invert(c.add(n,X(t))):I(t)?t.invert(c.sub(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function dr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.sub(i,l.times(t,e.innermostVariable??0))}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.times(e,t.innermostVariable??0).sub(i)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function fr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.sub(i,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.sub(i,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function mr(n,e,t){return I(e)?e.invert(c.div(n,X(t))):I(t)?t.invert(c.div(n,X(e))):(console.error("Could not invert due to no input being a variable"),0)}function gr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.times(i,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.times(i,e)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function pr(n,e,t){return I(e)?l.div(n,t):I(t)?l.div(n,e):(console.error("Could not apply substitution due to no input being a variable"),l.constant(0))}function hr(n,e,t){return I(e)?e.invert(c.mul(n,X(t))):I(t)?t.invert(c.div(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function vr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.div(i,t)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.div(e,i)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function br(n,e,t){return I(e)?l.mul(n,t):I(t)?l.mul(n,e):(console.error("Could not apply substitution due to no input being a variable"),l.constant(0))}function yr(n,e){return I(e)?e.invert(c.recip(n)):(console.error("Could not invert due to no input being a variable"),0)}function wr(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.ln(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Nr(n,e){return I(e)?e.invert(c.pow10(n)):(console.error("Could not invert due to no input being a variable"),0)}function kr(n){return c.ln(n).sub(1).times(n).div(sn)}function Cr(n,e){if(I(e)){const t=sn.times(n);return e.invert(t.div(t.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Sr(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:kr,invert:Cr}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Ir(n,e,t){return I(e)?e.invert(c.pow(X(t),n)):I(t)?t.invert(c.root(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function xr(n,e){return c.ln(n).sub(1).times(n).div(c.ln(e))}function Mr(n,e,t){if(I(e)){const i=c.ln(X(t)).times(n);return e.invert(i.div(i.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Tr(n,e,t){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n),t],evaluate:xr,invert:Mr}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function $r(n,e){return I(e)?e.invert(c.pow(2,n)):(console.error("Could not invert due to no input being a variable"),0)}function Pr(n){return c.ln(n).sub(1).times(n).div(c.ln(2))}function Er(n,e){if(I(e)){const t=c.ln(2).times(n);return e.invert(t.div(t.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Fr(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:Pr,invert:Er}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Vr(n,e){return I(e)?e.invert(c.exp(n)):(console.error("Could not invert due to no input being a variable"),0)}function _r(n){return c.ln(n).sub(1).times(n)}function Or(n,e){return I(e)?e.invert(c.div(n,c.div(n,Math.E).lambertw())):(console.error("Could not invert due to no input being a variable"),0)}function Lr(n,e){return I(e)?e.isIntegrable()?new l({inputs:[e.getIntegralFormula(n)],evaluate:_r,invert:Or}):(console.error("Could not integrate due to variable not being integrable"),l.constant(0)):(console.error("Could not integrate due to no input being a variable"),l.constant(0))}function Dr(n,e,t){return I(e)?e.invert(c.root(n,X(t))):I(t)?t.invert(c.ln(n).div(c.ln(X(e)))):(console.error("Could not invert due to no input being a variable"),0)}function Ar(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n),r=l.add(t,1);return l.pow(i,r).div(r)}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n);return l.pow(e,i).div(l.ln(e))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Rr(n,e){return I(e)?e.invert(c.root(n,10)):(console.error("Could not invert due to no input being a variable"),0)}function qr(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.pow10(t).div(l.ln(10))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ur(n,e,t){return I(e)?e.invert(c.ln(n).div(c.ln(X(t)))):I(t)?t.invert(c.root(X(e),n)):(console.error("Could not invert due to no input being a variable"),0)}function Br(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.pow(t,i).div(l.ln(t))}else if(I(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=t.getIntegralFormula(n),r=l.add(e,1);return l.pow(i,r).div(r)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function zr(n,e,t){return I(e)?e.invert(c.root(n,c.recip(X(t)))):I(t)?t.invert(c.ln(X(e)).div(c.ln(n))):(console.error("Could not invert due to no input being a variable"),0)}function Gr(n,e,t){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const i=e.getIntegralFormula(n);return l.pow(i,l.recip(t).add(1)).times(t).div(l.add(t,1))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Hr(n,e){return I(e)?e.invert(c.ln(n)):(console.error("Could not invert due to no input being a variable"),0)}function Wr(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.exp(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function jr(n,e=2,t=c.fromComponents_noNormalize(1,0,1)){const i=c.minabs(e,1e308).toNumber();return c.tetrate(n,i,t)}function Jr(n,e,t,i){return I(e)?e.invert(c.ssqrt(n)):(console.error("Could not invert due to no input being a variable"),0)}function Zr(n,e=2,t=c.fromComponents_noNormalize(1,0,1)){const i=c.minabs(e,1e308).toNumber();return c.iteratedexp(n,i,new c(t))}function Yr(n,e,t,i){return I(e)?e.invert(c.iteratedlog(n,Math.E,c.minabs(1e308,X(t)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Kr(n,e=10,t=2){const i=c.minabs(t,1e308).toNumber();return c.iteratedlog(n,e,i)}function Xr(n,e=10){const t=c.minabs(e,1e308).toNumber();return c.slog(n,t)}function Qr(n,e,t){return I(e)?e.invert(c.tetrate(n,c.minabs(1e308,X(t)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function es(n,e,t){const i=c.minabs(e,1e308).toNumber();return c.layeradd(n,i,t)}function ts(n,e,t,i){return I(e)?e.invert(c.layeradd(n,c.minabs(1e308,X(t)).negate().toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function ns(n,e){return I(e)?e.invert(c.pow(Math.E,n).times(n)):(console.error("Could not invert due to no input being a variable"),0)}function is(n,e){return I(e)?e.invert(c.tetrate(n,2)):(console.error("Could not invert due to no input being a variable"),0)}function rs(n,e,t){const i=c.minabs(e,1e308).toNumber();return c.pentate(n,i,t)}function ss(n,e){return I(e)?e.invert(c.asin(n)):(console.error("Could not invert due to no input being a variable"),0)}function as(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cos(t).neg()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function os(n,e){return I(e)?e.invert(c.acos(n)):(console.error("Could not invert due to no input being a variable"),0)}function ls(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.sin(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function us(n,e){return I(e)?e.invert(c.atan(n)):(console.error("Could not invert due to no input being a variable"),0)}function cs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cos(t).ln().neg()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ds(n,e){return I(e)?e.invert(c.sin(n)):(console.error("Could not invert due to no input being a variable"),0)}function fs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.asin(t).times(t).add(l.sqrt(l.sub(1,l.pow(t,2))))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ms(n,e){return I(e)?e.invert(c.cos(n)):(console.error("Could not invert due to no input being a variable"),0)}function gs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.acos(t).times(t).sub(l.sqrt(l.sub(1,l.pow(t,2))))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ps(n,e){return I(e)?e.invert(c.tan(n)):(console.error("Could not invert due to no input being a variable"),0)}function hs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.atan(t).times(t).sub(l.ln(l.pow(t,2).add(1)).div(2))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function vs(n,e){return I(e)?e.invert(c.asinh(n)):(console.error("Could not invert due to no input being a variable"),0)}function bs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cosh(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function ys(n,e){return I(e)?e.invert(c.acosh(n)):(console.error("Could not invert due to no input being a variable"),0)}function ws(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.sinh(t)}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ns(n,e){return I(e)?e.invert(c.atanh(n)):(console.error("Could not invert due to no input being a variable"),0)}function ks(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.cosh(t).ln()}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Cs(n,e){return I(e)?e.invert(c.sinh(n)):(console.error("Could not invert due to no input being a variable"),0)}function Ss(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.asinh(t).times(t).sub(l.pow(t,2).add(1).sqrt())}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Is(n,e){return I(e)?e.invert(c.cosh(n)):(console.error("Could not invert due to no input being a variable"),0)}function xs(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.acosh(t).times(t).sub(l.add(t,1).sqrt().times(l.sub(t,1).sqrt()))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function Ms(n,e){return I(e)?e.invert(c.tanh(n)):(console.error("Could not invert due to no input being a variable"),0)}function Ts(n,e){if(I(e)){if(!e.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),l.constant(0);const t=e.getIntegralFormula(n);return l.atanh(t).times(t).add(l.sub(1,l.pow(t,2)).ln().div(2))}return console.error("Could not integrate due to no input being a variable"),l.constant(0)}function De(n){return(e,t)=>new l({inputs:[e,t],evaluate:n,invert:ut})}function I(n){return n instanceof et&&n.hasVariable()}function X(n,e){return n instanceof et?n.evaluate(e):d(n)}function $s(){return l.pow(this,2).div(2)}function Ps(){return this}const D=class D{constructor(e){$(this,"inputs");$(this,"internalEvaluate");$(this,"internalInvert");$(this,"internalIntegrate");$(this,"internalIntegrateInner");$(this,"applySubstitution");$(this,"description");$(this,"internalVariables");$(this,"innermostVariable");$(this,"negate",this.neg);$(this,"negated",this.neg);$(this,"sgn",this.sign);$(this,"plus",this.add);$(this,"subtract",this.sub);$(this,"minus",this.sub);$(this,"multiply",this.mul);$(this,"times",this.mul);$(this,"divide",this.div);$(this,"divideBy",this.div);$(this,"dividedBy",this.div);$(this,"reciprocal",this.recip);$(this,"reciprocate",this.recip);$(this,"logarithm",this.log);let t;"inputs"in e&&(e.inputs=e.inputs.map(i=>typeof i=="object"&&ye in i?i[ye]:i)),"variable"in e?(typeof e.variable=="object"&&ye in e.variable&&(e.variable=e.variable[ye]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution,this.description=e.description}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:$s,internalIntegrateInner:Ps,applySubstitution:ut}}setupConstant({inputs:e}){return e.length!==1&&console.error("Evaluate function is required if inputs is not length 1"),{inputs:e,internalVariables:0}}setupFormula(e){const{inputs:t,evaluate:i,invert:r,integrate:s,integrateInner:u,applySubstitution:a}=e,o=t.reduce((p,k)=>p+(k instanceof D?k.internalVariables:0),0),f=t.find(p=>p instanceof D&&p.hasVariable()),y=o===1?f==null?void 0:f.innermostVariable:void 0,N=(f==null?void 0:f.isInvertible())??!1,w=(f==null?void 0:f.isIntegrable())??!1;return{inputs:t,internalEvaluate:i,internalInvert:N?r:void 0,internalIntegrate:w?s:void 0,internalIntegrateInner:u,applySubstitution:a,innermostVariable:y,internalVariables:o}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t;return((t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(i=>X(i,e))))??(this.hasVariable()?e:null)??X(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,i)=>t instanceof D&&e.inputs[i]instanceof D?t.equals(e.inputs[i]):!(t instanceof D)&&!(e.inputs[i]instanceof D)&&c.eq(d(t),d(e.inputs[i])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new l({inputs:[e]})}static variable(e){return new l({variable:e})}static stringify(e){return e instanceof D?e.description!=null?e.description:e.internalEvaluate==null?e.hasVariable()?"x":pe(e.inputs[0]??0):`${e.internalEvaluate.name}(${e.inputs.map(l.stringify).join(", ")})`:pe(d(e))}static step(e,t,i){const r=i(l.variable(0)),s=R(t);function u(o){return c.lt(o,d(s))?o:c.add(r.evaluate(c.sub(o,d(s))),d(s))}function a(o,f){return I(f)&&r.isInvertible()?(c.gt(o,d(s))&&(o=c.add(r.invert(c.sub(o,d(s))),d(s))),f.invert(o)):(console.error("Could not invert due to no input being a variable"),0)}return new l({inputs:[e],evaluate:u,invert:r.isInvertible()&&r.hasVariable()?a:void 0,description:"indeterminate"})}static if(e,t,i,r){const s=F(0),u=l.variable(s),a=i(u),o=r==null?void 0:r(u),f=R(t);function y(w){return d(f)?(s.value=w,a.evaluate()):o?(s.value=w,o.evaluate()):w}function N(w,p){return!I(p)||!a.isInvertible()||o!=null&&!o.isInvertible()?(console.error("Could not invert due to no input being a variable"),0):d(f)?p.invert(a.invert(w)):o?p.invert(o.invert(w)):p.invert(w)}return new l({inputs:[e],evaluate:y,invert:a.isInvertible()&&a.hasVariable()?N:void 0,description:"indeterminate"})}static conditional(e,t,i,r){return l.if(e,t,i,r)}static abs(e){return new l({inputs:[e],evaluate:c.abs})}static neg(e){return new l({inputs:[e],evaluate:c.neg,invert:rr,applySubstitution:ar,integrate:sr})}static sign(e){return new l({inputs:[e],evaluate:c.sign})}static round(e){return new l({inputs:[e],evaluate:c.round,invert:je})}static floor(e){return new l({inputs:[e],evaluate:c.floor,invert:je})}static ceil(e){return new l({inputs:[e],evaluate:c.ceil,invert:je})}static trunc(e){return new l({inputs:[e],evaluate:c.trunc,invert:je})}static add(e,t){return new l({inputs:[e,t],evaluate:c.add,invert:or,integrate:lr,integrateInner:ur,applySubstitution:ut})}static sub(e,t){return new l({inputs:[e,t],evaluate:c.sub,invert:cr,integrate:dr,integrateInner:fr,applySubstitution:ut})}static mul(e,t){return new l({inputs:[e,t],evaluate:c.mul,invert:mr,integrate:gr,applySubstitution:pr})}static div(e,t){return new l({inputs:[e,t],evaluate:c.div,invert:hr,integrate:vr,applySubstitution:br})}static recip(e){return new l({inputs:[e],evaluate:c.recip,invert:yr,integrate:wr})}static clamp(e,t,i){return new l({inputs:[e,t,i],evaluate:c.clamp,invert:je})}static pLog10(e){return new l({inputs:[e],evaluate:c.pLog10})}static absLog10(e){return new l({inputs:[e],evaluate:c.absLog10})}static log10(e){return new l({inputs:[e],evaluate:c.log10,invert:Nr,integrate:Sr})}static log(e,t){return new l({inputs:[e,t],evaluate:c.log,invert:Ir,integrate:Tr})}static log2(e){return new l({inputs:[e],evaluate:c.log2,invert:$r,integrate:Fr})}static ln(e){return new l({inputs:[e],evaluate:c.ln,invert:Vr,integrate:Lr})}static pow(e,t){return new l({inputs:[e,t],evaluate:c.pow,invert:Dr,integrate:Ar})}static pow10(e){return new l({inputs:[e],evaluate:c.pow10,invert:Rr,integrate:qr})}static pow_base(e,t){return new l({inputs:[e,t],evaluate:c.pow_base,invert:Ur,integrate:Br})}static root(e,t){return new l({inputs:[e,t],evaluate:c.root,invert:zr,integrate:Gr})}static factorial(e){return new l({inputs:[e],evaluate:c.factorial})}static gamma(e){return new l({inputs:[e],evaluate:c.gamma})}static lngamma(e){return new l({inputs:[e],evaluate:c.lngamma})}static exp(e){return new l({inputs:[e],evaluate:c.exp,invert:Hr,integrate:Wr})}static sqr(e){return l.pow(e,2)}static sqrt(e){return l.root(e,2)}static cube(e){return l.pow(e,3)}static cbrt(e){return l.root(e,3)}static tetrate(e,t=2,i=c.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,i],evaluate:jr,invert:Jr})}static iteratedexp(e,t=2,i=c.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,i],evaluate:Zr,invert:Yr})}static iteratedlog(e,t=10,i=1){return new l({inputs:[e,t,i],evaluate:Kr})}static slog(e,t=10){return new l({inputs:[e,t],evaluate:Xr,invert:Qr})}static layeradd10(e,t){return new l({inputs:[e,t],evaluate:c.layeradd10})}static layeradd(e,t,i=10){return new l({inputs:[e,t,i],evaluate:es,invert:ts})}static lambertw(e){return new l({inputs:[e],evaluate:c.lambertw,invert:ns})}static ssqrt(e){return new l({inputs:[e],evaluate:c.ssqrt,invert:is})}static pentate(e,t=2,i=c.fromComponents_noNormalize(1,0,1)){return new l({inputs:[e,t,i],evaluate:rs})}static sin(e){return new l({inputs:[e],evaluate:c.sin,invert:ds,integrate:as})}static cos(e){return new l({inputs:[e],evaluate:c.cos,invert:ms,integrate:ls})}static tan(e){return new l({inputs:[e],evaluate:c.tan,invert:ps,integrate:cs})}static asin(e){return new l({inputs:[e],evaluate:c.asin,invert:ss,integrate:fs})}static acos(e){return new l({inputs:[e],evaluate:c.acos,invert:os,integrate:gs})}static atan(e){return new l({inputs:[e],evaluate:c.atan,invert:us,integrate:hs})}static sinh(e){return new l({inputs:[e],evaluate:c.sinh,invert:Cs,integrate:bs})}static cosh(e){return new l({inputs:[e],evaluate:c.cosh,invert:Is,integrate:ws})}static tanh(e){return new l({inputs:[e],evaluate:c.tanh,invert:Ms,integrate:ks})}static asinh(e){return new l({inputs:[e],evaluate:c.asinh,invert:vs,integrate:Ss})}static acosh(e){return new l({inputs:[e],evaluate:c.acosh,invert:ys,integrate:xs})}static atanh(e){return new l({inputs:[e],evaluate:c.atanh,invert:Ns,integrate:Ts})}stringify(){return l.stringify(this)}step(e,t){return l.step(this,e,t)}if(e,t){return l.if(this,e,t)}conditional(e,t){return l.if(this,e,t)}abs(){return l.abs(this)}neg(){return l.neg(this)}sign(){return l.sign(this)}round(){return l.round(this)}floor(){return l.floor(this)}ceil(){return l.ceil(this)}trunc(){return l.trunc(this)}add(e){return l.add(this,e)}sub(e){return l.sub(this,e)}mul(e){return l.mul(this,e)}div(e){return l.div(this,e)}recip(){return l.recip(this)}max(e){return l.max(this,e)}min(e){return l.min(this,e)}maxabs(e){return l.maxabs(this,e)}minabs(e){return l.minabs(this,e)}clamp(e,t){return l.clamp(this,e,t)}clampMin(e){return l.clampMin(this,e)}clampMax(e){return l.clampMax(this,e)}pLog10(){return l.pLog10(this)}absLog10(){return l.absLog10(this)}log10(){return l.log10(this)}log(e){return l.log(this,e)}log2(){return l.log2(this)}ln(){return l.ln(this)}pow(e){return l.pow(this,e)}pow10(){return l.pow10(this)}pow_base(e){return l.pow_base(this,e)}root(e){return l.root(this,e)}factorial(){return l.factorial(this)}gamma(){return l.gamma(this)}lngamma(){return l.lngamma(this)}exp(){return l.exp(this)}sqr(){return l.pow(this,2)}sqrt(){return l.root(this,2)}cube(){return l.pow(this,3)}cbrt(){return l.root(this,3)}tetrate(e=2,t=c.fromComponents_noNormalize(1,0,1)){return l.tetrate(this,e,t)}iteratedexp(e=2,t=c.fromComponents_noNormalize(1,0,1)){return l.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return l.iteratedlog(this,e,t)}slog(e=10){return l.slog(this,e)}layeradd10(e){return l.layeradd10(this,e)}layeradd(e,t){return l.layeradd(this,e,t)}lambertw(){return l.lambertw(this)}ssqrt(){return l.ssqrt(this)}pentate(e=2,t=c.fromComponents_noNormalize(1,0,1)){return l.pentate(this,e,t)}sin(){return l.sin(this)}cos(){return l.cos(this)}tan(){return l.tan(this)}asin(){return l.asin(this)}acos(){return l.acos(this)}atan(){return l.atan(this)}sinh(){return l.sinh(this)}cosh(){return l.cosh(this)}tanh(){return l.tanh(this)}asinh(){return l.asinh(this)}acosh(){return l.acosh(this)}atanh(){return l.atanh(this)}};$(D,"negate",D.neg),$(D,"negated",D.neg),$(D,"sgn",D.sign),$(D,"plus",D.add),$(D,"subtract",D.sub),$(D,"minus",D.sub),$(D,"multiply",D.mul),$(D,"times",D.mul),$(D,"divide",D.div),$(D,"divideBy",D.div),$(D,"dividedBy",D.div),$(D,"reciprocal",D.recip),$(D,"reciprocate",D.recip),$(D,"max",De(c.max)),$(D,"min",De(c.min)),$(D,"minabs",De(c.minabs)),$(D,"maxabs",De(c.maxabs)),$(D,"clampMin",De(c.clampMin)),$(D,"clampMax",De(c.clampMax)),$(D,"logarithm",D.log);let et=D;class l extends et{constructor(){super(...arguments);$(this,"integralFormula")}invert(t){return this.internalInvert&&this.hasVariable()?this.internalInvert.call(this,t,...this.inputs):this.inputs.length===1&&this.hasVariable()?t:(console.error("Cannot invert non-invertible formula"),0)}evaluateIntegral(t){return this.isIntegrable()?this.getIntegralFormula().evaluate(t):(console.error("Cannot evaluate integral of formula without integral"),0)}invertIntegral(t){return!this.isIntegrable()||!this.getIntegralFormula().isInvertible()?(console.error("Cannot invert integral of formula without invertible integral"),0):this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),i=c.add(this.evaluate(0),this.evaluate(1)).div(2);return c.sub(i,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)return console.error("Cannot integrate formula with non-integrable operation"),l.constant(0);let i=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(r=>i=r(i)),this.integralFormula=i}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else return console.error("Cannot integrate formula without variable"),l.constant(0);return this.integralFormula}else return this.applySubstitution==null?(console.error("Cannot have two complex operations in an integrable formula"),l.constant(0)):(t.push(i=>this.applySubstitution.call(this,i,...this.inputs)),this.internalIntegrateInner?this.internalIntegrateInner.call(this,t,...this.inputs):this.internalIntegrate?this.internalIntegrate.call(this,t,...this.inputs):this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable()?this:(console.error("Cannot integrate formula without variable"),l.constant(0)))}}const Me=Symbol("PersistentState"),Le=Symbol("DefaultValue"),mt=Symbol("StackTrace"),gt=Symbol("Deleted"),ye=Symbol("NonPersistent"),_e=Symbol("SaveDataPath"),Ge=Symbol("SkipPersistence");function Es(){var n;return((n=new Error().stack)==null?void 0:n.split(` +`).slice(3,5).map(e=>e.trim()).join(` +`))??""}function Ut(n,e){var t;c.isNaN(e)&&(G.hasNaN||(x.autosave=!1,G.hasNaN=!0,G.NaNPath=n[_e],G.NaNPersistent=n),console.error(`Attempted to save NaN value to ${(t=n[_e])==null?void 0:t.join(".")}`)),n[Me].value=e}function st(n,e=!0){const t=se(n)?n:F(n);se(n)&&(n=n.value);const i=L({get(){return t.value},set(s){e?Ut(r,s):r[Me].value=s}});i[Le]=n;const r={get value(){return t.value},set value(s){e?Ut(r,s):r[Me].value=s},__v_isRef:!0,[Me]:t,[Le]:n,[mt]:Es(),[gt]:!1,[ye]:i,[_e]:void 0};return le.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,` +Created at: +`+r[mt]):Re[le[le.length-1]].add(r),r}function Fs(n){return n!=null&&typeof n=="object"&&Me in n}function an(n){return!(Ie in n)&&ye in n?n[ye]:new Proxy(n,{get(e,t){if(t!==Me)return t===Ge?!0:e[t]},set(e,t,i){return e[t]=i,!0},has(e,t){return t===Me?!1:t===Ge?!0:Reflect.has(e,t)}})}function Vs(n){le.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",n):Re[le[le.length-1]].delete(n),n[gt]=!0}ne.on("addLayer",(n,e)=>{const t=[],i=(r,s=[])=>{let u=!1;return Object.keys(r).forEach(a=>{let o=r[a];if(o!=null&&typeof o=="object"){if(Ge in o&&o[Ge]===!0)return;if(Ie in o&&(o=o[Ie]),Fs(o)){if(u=!0,o[gt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",o,` +Created at: +`+o[mt]);return}Re[n.id].delete(o);const f=[n.id,...s,a];o[_e]!=null&&JSON.stringify(f)!==JSON.stringify(o[_e])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${o[_e].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),o[_e]=f;const y=s.reduce((w,p)=>(p in w||(w[p]={}),w[p]),e),N=y[a];y[a]=o[Me],xn(y)?N!=null?y[a]=N:y[a]=o[Le]:N!=null?y[a].value=N:y[a].value=o[Le]}else!(o instanceof c)&&!(o instanceof l)&&!se(o)&&!t.includes(o)&&(typeof o.type=="symbol"&&t.push(o),i(o,[...s,a])&&(Array.isArray(o)&&!Array.isArray(r)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Ie in r?r[Ie]:r,a):u=!0))}}),u};i(n[Ie]),Re[n.id].forEach(r=>{r[gt]||console.error(`Created persistent ref in "${n.id}" without registering it to the layer!`,`Make sure to include everything persistent in the returned object. + +Created at: +`+r[mt])}),Re[n.id].clear()});const on=Symbol("RegisterNode"),ln=Symbol("UnregisterNode"),un=Symbol("Nodes"),cn=Symbol("Bounds"),re=bt({});window.layers=re;const Re={},le=[];function dn(n,e){return Ee(()=>{const t=Zt();le.push(n),Re[n]=new Set;const i={id:n,emitter:t,...t,nodes:F({}),minimized:st(!1,!1)},r=e(i),{color:s,display:u,classes:a,style:o,name:f,forceHideGoBack:y,minWidth:N,minimizable:w,minimizedDisplay:p,...k}=r;if(le[le.length-1]==null||le[le.length-1]!==n)throw new Error(`Adding layers stack in invalid state. This should not happen +Stack: ${le} +Trying to pop ${n}`);le.pop();const S=R(o),M={...i,...k,color:R(s),display:u,classes:R(a),style:L(()=>{let T=d(M.minWidth);return(typeof T=="number"||!Number.isNaN(parseInt(T)))&&(T=T+"px"),{...d(S),...i.minimized.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:T,flexBasis:T,margin:""}}}),name:R(f)??n,forceHideGoBack:R(y),minWidth:R(N)??600,minimizable:R(w)??!0,minimizedDisplay:p};return M})}function _s(n,e){if(console.info("Adding layer",n.id),re[n.id]!=null){console.error("Attempted to add layer with same ID as existing layer",n.id,re[n.id]);return}e.layers??(e.layers={}),e.layers[n.id]==null&&(e.layers[n.id]={}),re[n.id]=n,ne.emit("addLayer",n,e.layers[n.id])}function Os(n){console.info("Removing layer",n.id),ne.emit("removeLayer",n),delete re[n.id]}ne.on("update",function(e){Object.values(re).forEach(t=>{t==null||t.emit("preUpdate",e)}),Object.values(re).forEach(t=>{t==null||t.emit("update",e)}),Object.values(re).forEach(t=>{t==null||t.emit("postUpdate",e)})});const Ls=z({__name:"Node",props:{id:{}},setup(n){const e=n,t=ct(on,()=>{}),i=ct(ln,()=>{}),r=rt(null),s=L(()=>r.value&&r.value.parentElement);return ae([s,Oe(e,"id")],([u,a],[o,f])=>{o&&i(d(f)),u&&t(a,u)}),Wt(()=>i(e.id)),(u,a)=>(b(),C("div",{class:"node",ref_key:"node",ref:r},null,512))}}),Ye=Z(Ls,[["__scopeId","data-v-4673aca5"]]),Ds=z({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(n){return(e,t)=>(b(),C("div",{style:fe({width:e.width,height:e.height})},null,4))}});function fn(n,e="points",t=0,i=void 0){const r=se(n)?n:st(n);if(r.displayName=e,r.precision=t,r.small=i,!se(n)){const s=r[ye];s.displayName=e,s.precision=t,s.small=i}return r}function As(n){const e=st(n.value);return ae(n,t=>{Nt.value||c.gt(t,e.value)&&(e.value=t)}),e}function Rs(n){const e=st(n.value);return ae(n,(t,i)=>{Nt.value||c.gt(t,i)&&(e.value=c.add(e.value,c.sub(t,i)))}),e}const qs=new c("10^^8"),Us=new c("1e100");function Bs(n,e){const t=F(0),i=F(0),r=F(0);return ne.on("update",u=>{if(i.value=0,c.lte(n.value,Us)){r.value=n.value;return}let a=n.value,o=r.value;if(r.value=a,c.gt(a,o))if(c.gte(a,qs))a=c.slog(a,1e10),o=c.slog(o,1e10),t.value=a.sub(o).div(u),i.value=-1;else for(;c.div(a,o).log(10).div(u).gte("100")&&i.value<=5&&c.gt(o,0);)a=c.log10(a),o=c.log10(o),t.value=a.sub(o).div(u),i.value++}),L(()=>i.value===0?e?pe(e.value,n.precision,n.small)+" "+n.displayName+"/s":"":pe(t.value)+" OOM"+(i.value<0?"^OOM":"^"+i.value)+"s/sec")}function pt(n,e){const t=e??n.value;return c.eq(n.precision,0)?Qe(n.small?t:c.floor(t)):pe(t,n.precision,n.small)}let zs=0;function Gs(n="feature-"){return n+zs++}function mn(n){const e=d(n);return e!==2&&e!==!1}function Hs(n){return d(n)===1}function gn(n,...e){const t=[],i=r=>{Object.keys(r).forEach(s=>{const u=r[s];u!=null&&typeof u=="object"&&u.__v_isVNode!==!0&&(e.includes(u.type)?t.push(u):!(u instanceof c)&&!se(u)&&i(u))})};return i(n),t}const Ws=z({__name:"VueFeature",props:{id:{},components:{},wrappers:{},visibility:{default:!0},style:{default:()=>({})},classes:{default:()=>({})}},setup(n){const e=n,t=()=>e.wrappers.reduce((i,r)=>()=>r(i),()=>v(j,null,[e.components.map(i=>te(i))]))();return(i,r)=>d(mn)(d(i.visibility))?(b(),C("div",{key:0,style:fe([{visibility:d(Hs)(d(i.visibility))?"hidden":void 0},d(i.style)]),class:K({feature:!0,...d(i.classes)})},[v(t),v(Ye,{id:i.id},null,8,["id"])],6)):E("",!0)}}),pn=Symbol("VueFeature");function wt(n,e,t){return{id:Gs(n),visibility:R(e.visibility),classes:R(e.classes),style:R(e.style),components:t==null?[]:[t],wrappers:[],[pn]:!0}}function te(n,e){if(typeof n=="object"&&pn in n){const{id:t,visibility:i,style:r,classes:s,components:u,wrappers:a}=n;return v(Ws,{id:t,visibility:i,style:r,classes:s,components:u,wrappers:a},null)}return n=jt(n),(e==null?void 0:e(n))??n}function js(n){return n!=null&&typeof n=="object"&&"type"in n&&"children"in n}function hn(n){const e=F(null),t=F(void 0);function i(u){e.value==null&&(e.value=setInterval(s,250)),t.value=u}function r(){e.value!=null&&(clearInterval(e.value),e.value=null)}function s(){n(t.value)}return Wt(r),{start:i,stop:r,handleHolding:s}}function Js(n){return Object.keys(n).reduce((e,t)=>(e[nr(t)]=n[t],e),{})}const Zs=["x1","y1","x2","y2"],Ys=z({__name:"Link",props:{link:{},startNode:{},endNode:{},boundingRect:{}},setup(n){const e=n,t=L(()=>{const s=e.startNode.rect,u=e.boundingRect,a=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return e.link.offsetStart&&(a.x+=e.link.offsetStart.x,a.y+=e.link.offsetStart.y),a}),i=L(()=>{const s=e.endNode.rect,u=e.boundingRect,a=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return e.link.offsetEnd&&(a.x+=e.link.offsetEnd.x,a.y+=e.link.offsetEnd.y),a}),r=L(()=>Js(e.link));return(s,u)=>(b(),C("line",ke({"stroke-width":"15px",stroke:"white"},r.value,{x1:t.value.x,y1:t.value.y,x2:i.value.x,y2:i.value.y}),null,16,Zs))}}),Ks=z({__name:"Links",props:{links:{}},setup(n){var f;const e=n;function t(){var y;a.value=(y=r.value)==null?void 0:y.getBoundingClientRect()}const i=new ResizeObserver(t),r=rt(null),s=ct(un,F({})),u=ct(cn,F(void 0)),a=F((f=r.value)==null?void 0:f.getBoundingClientRect());ae(u,t),it(()=>{const y=r.value;y!=null&&i.observe(y),t()});const o=L(()=>{var N;const y=s.value;return((N=d(e.links))==null?void 0:N.filter(w=>{var p,k;return((p=y[w.startNode.id])==null?void 0:p.rect)&&((k=y[w.endNode.id])==null?void 0:k.rect)}))??[]});return(y,N)=>(b(),C(j,null,[o.value?(b(),C("svg",Mn(ke({key:0},y.$attrs)),[(b(!0),C(j,null,Se(o.value,(w,p)=>(b(),J(Ys,{key:p,link:w,boundingRect:a.value,startNode:d(s)[w.startNode.id],endNode:d(s)[w.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):E("",!0),g("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}}),Xs=Z(Ks,[["__scopeId","data-v-95f1a2c2"]]),Qs=z({__name:"Tree",props:{nodes:{},leftSideNodes:{},rightSideNodes:{},branches:{}},setup(n){const e=n,t=()=>d(e.nodes).map(s=>v("span",{class:"row tree-row",style:"margin: 50px auto;"},[s.map(u=>te(u))])),i=()=>e.leftSideNodes==null?v(j,null,null):v("span",{class:"left-side-nodes small"},[d(e.leftSideNodes).map(s=>te(s))]),r=()=>e.rightSideNodes==null?v(j,null,null):v("span",{class:"side-nodes small"},[d(e.rightSideNodes).map(s=>te(s))]);return(s,u)=>(b(),C(j,null,[v(t),s.leftSideNodes?(b(),J(i,{key:0})):E("",!0),s.rightSideNodes?(b(),J(r,{key:1})):E("",!0),s.branches?(b(),J(Xs,{key:2,links:d(s.branches)},null,8,["links"])):E("",!0)],64))}}),ea=Z(Qs,[["__scopeId","data-v-b63a12ba"]]),ta=z({__name:"TreeNode",props:{canClick:{},display:{},color:{},glowColor:{}},emits:["click","hold"],setup(n,{emit:e}){const t=n,i=e,r=()=>t.display==null?v(j,null,null):te(t.display,a=>v("div",null,[a])),{start:s,stop:u}=hn(()=>i("hold"));return(a,o)=>(b(),C("button",{style:fe({backgroundColor:d(a.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${d(a.glowColor)}`}),class:K({treeNode:!0,can:d(a.canClick)}),onClick:o[0]||(o[0]=f=>i("click",f)),onMousedown:o[1]||(o[1]=(...f)=>d(s)&&d(s)(...f)),onMouseleave:o[2]||(o[2]=(...f)=>d(u)&&d(u)(...f)),onMouseup:o[3]||(o[3]=(...f)=>d(u)&&d(u)(...f)),onTouchstartPassive:o[4]||(o[4]=(...f)=>d(s)&&d(s)(...f)),onTouchendPassive:o[5]||(o[5]=(...f)=>d(u)&&d(u)(...f)),onTouchcancelPassive:o[6]||(o[6]=(...f)=>d(u)&&d(u)(...f))},[v(r)],38))}}),na=Z(ta,[["__scopeId","data-v-80b5b7b8"]]),ia=Symbol("TreeNode"),ra=Symbol("Tree");function sa(n){return Ee(()=>{const e=(n==null?void 0:n())??{},{canClick:t,color:i,display:r,glowColor:s,onClick:u,onHold:a,...o}=e,f={type:ia,...o,...wt("treeNode",e,()=>v(na,{canClick:f.canClick,display:f.display,onClick:f.onClick,onHold:f.onHold,color:f.color,glowColor:f.glowColor},null)),canClick:R(t)??!0,color:R(i),display:r,glowColor:R(s),onClick:u==null?void 0:function(y){d(f.canClick)!==!1&&u.call(f,y)},onHold:a==null?void 0:function(){d(f.canClick)!==!1&&a.call(f)}};return f})}function aa(n){return Ee(()=>{const e=n(),{branches:t,nodes:i,leftSideNodes:r,rightSideNodes:s,resetPropagation:u,onReset:a,style:o,...f}=e,y=R(o);e.style=()=>({position:"static",...d(y)??{}});const N=t==null?void 0:R(t),w={type:ra,...f,...wt("tree",e,()=>v(ea,{nodes:w.nodes,leftSideNodes:w.leftSideNodes,rightSideNodes:w.rightSideNodes,branches:w.branches},null)),branches:N,isResetting:F(!1),resettingNode:rt(null),nodes:R(i),leftSideNodes:R(r),rightSideNodes:R(s),links:N==null?[]:an(N),resetPropagation:u,onReset:a,reset:function(p){var k,S;w.isResetting.value=!0,w.resettingNode.value=p,(k=w.resetPropagation)==null||k.call(w,w,p),(S=w.onReset)==null||S.call(w,p),w.isResetting.value=!1,w.resettingNode.value=null}};return w})}const oa=function(n,e){var s;const t=d(n.branches);if(t==null)return;const i=[];let r=[e];for(;r.length!==0;){const u=[];for(const a of r)for(const o of t.filter(f=>f.startNode===a))[...i,...r].includes(o.endNode)||(u.push(o.endNode),(s=o.endNode.reset)==null||s.reset());i.push(...r),r=u}};function la(n,e=null,t=0){const i=R(t);return()=>e==null||c.gte(n.value,d(i))?pt(n)+" "+n.displayName:`Reach ${c.eq(e.precision,0)?Qe(d(i)):pe(d(i),e.precision)} ${e.displayName} to unlock (You have ${c.eq(e.precision,0)?Qe(e.value):pe(e.value,e.precision)})`}const ua=Symbol("Conversion");function ca(n){return Ee(()=>{const e=n(),{baseResource:t,gainResource:i,formula:r,currentGain:s,actualGain:u,currentAt:a,nextAt:o,convert:f,spend:y,buyMax:N,onConvert:w,...p}=e,k=s==null?L(()=>{let M=c.floor(S.formula.evaluate(t.value)).max(0);return d(S.buyMax)===!1&&(M=M.min(1)),M}):R(s),S={type:ua,...p,baseResource:t,gainResource:i,formula:r(l.variable(t)),currentGain:k,actualGain:u==null?k:R(u),currentAt:a==null?L(()=>S.formula.invert(c.floor(d(S.currentGain)))):R(a),nextAt:o==null?L(()=>S.formula.invert(c.floor(d(S.currentGain)).add(1))):R(o),convert:f??function(){const M=d(S.currentGain);i.value=c.add(i.value,M),S.spend(M),w==null||w(M)},spend:y??(()=>t.value=0),buyMax:R(N)??!0,onConvert:w};return S})}function da(n){return ca(n)}const fa={class:"key"},ma=z({__name:"Hotkey",props:{hotkey:{}},setup(n){const e=n;let t="",i=!1,r=!1,s=!1;return Jt(()=>{t=e.hotkey.key,i=t.startsWith("ctrl+"),i&&(t=t.slice(5)),r=t.startsWith("shift+"),r&&(t=t.slice(6)),s=t.length==1&&t.toLowerCase()!=t.toUpperCase(),s&&(t=t.toUpperCase())}),(u,a)=>(b(),C(j,null,[d(i)?(b(),C(j,{key:0},[a[0]||(a[0]=g("div",{class:"key"},"Ctrl",-1)),a[1]||(a[1]=V("+"))],64)):E("",!0),d(r)?(b(),C(j,{key:1},[a[2]||(a[2]=g("div",{class:"key"},"Shift",-1)),a[3]||(a[3]=V("+"))],64)):E("",!0),g("div",fa,O(d(t)),1)],64))}}),ga=Z(ma,[["__scopeId","data-v-7bcb4952"]]),tt=bt({}),Ft=Symbol("Hotkey"),Je=[")","!","@","#","$","%","^","&","*","("];function pa(n){return Ee(()=>{const e=n(),{enabled:t,description:i,key:r,onPress:s,...u}=e;return{type:Ft,...u,enabled:R(t)??!0,description:R(i),key:r,onPress:s}})}ne.on("addLayer",n=>{gn(n,Ft).forEach(e=>{tt[e.key]=e})});ne.on("removeLayer",n=>{gn(n,Ft).forEach(e=>{tt[e.key]=void 0})});document.onkeydown=function(n){var i;if(((i=n.target)==null?void 0:i.tagName)==="INPUT"||qe.value&&!x.keepGoing)return;const e=[n.key];n.shiftKey&&n.ctrlKey?(e.splice(0,1),e.push("ctrl+shift+"+n.key.toUpperCase()),e.push("shift+ctrl+"+n.key.toUpperCase()),Je.includes(n.key)?(e.push("ctrl+shift+"+Je.indexOf(n.key)),e.push("shift+ctrl+"+Je.indexOf(n.key))):(e.push("ctrl+shift+"+n.key.toLowerCase()),e.push("shift+ctrl+"+n.key.toLowerCase()))):Je.includes(n.key)?(e.push("shift+"+n.key),e.push("shift+"+Je.indexOf(n.key))):n.shiftKey?(e.push("shift+"+n.key.toUpperCase()),e.push("shift+"+n.key.toLowerCase())):n.ctrlKey&&(e.splice(0,1),e.push("ctrl+"+n.key));const t=tt[e.find(r=>r in tt)??""];t!=null&&d(t.enabled)!==!1&&(n.preventDefault(),t.onPress())};ne.on("setupVue",()=>Ba(()=>{const n=Object.values(tt).filter(e=>d(e==null?void 0:e.enabled));return n.length===0?"":v("div",null,[v("br",null,null),v("h4",null,[V("Hotkeys")]),v("div",{style:"column-count: 2"},[n.map(e=>v("div",null,[v(ga,{hotkey:e},null),V(" "),d(e==null?void 0:e.description)]))])])}));const ha=Symbol("Reset");function va(n){return Ee(()=>{const e=n(),{thingsToReset:t,onReset:i,...r}=e,s={type:ha,...r,onReset:i,thingsToReset:R(t),reset:function(){const u=a=>{if(a!=null&&typeof a=="object"&&!(a instanceof c)&&!(a instanceof l)){if(Ge in a&&a[Ge]===!0)return;if(Le in a){const o=a;o.value=o[Le]}else!(a instanceof c)&&!se(a)&&Object.values(a).forEach(o=>u(o))}};d(s.thingsToReset).forEach(u),ne.emit("reset",s),i==null||i()}};return s})}const ot={};ne.on("removeLayer",n=>{var e;(e=ot[n.id])==null||e.call(ot),ot[n.id]=void 0});const ba=z({__name:"Sticky",setup(n){const e=F("0"),t=new ResizeObserver(r),i=rt(null);function r(){let s=i.value;if(s==null)return;let u=0;for(;s.previousSibling;){const a=s.previousSibling;a.dataset&&"vSticky"in a.dataset&&(u+=a.offsetHeight),s=a}e.value=u+"px"}return Be(r),document.fonts.ready.then(r),it(()=>{var u;const s=(u=i.value)==null?void 0:u.parentElement;s&&t.observe(s)}),(s,u)=>(b(),C("div",{class:"sticky",style:fe({top:e.value}),ref_key:"element",ref:i,"data-v-sticky":""},[xe(s.$slots,"default",{},void 0,!0)],4))}}),ya=Z(ba,[["__scopeId","data-v-10a04be9"]]),wa=z({__name:"Resource",props:{resource:{},color:{}},setup(n){const e=n,t=L(()=>pt(e.resource));return(i,r)=>(b(),C("h2",{style:fe({color:i.color,"text-shadow":"0px 0px 10px "+i.color})},O(t.value),5))}}),Na={key:0},ka={key:1},Ca=z({__name:"MainDisplay",props:{resource:{},color:{},classes:{},style:{},effectDisplay:{}},setup(n){const e=n,t=F(null),i=()=>jt(e.effectDisplay),r=L(()=>c.lt(e.resource.value,"1e1000"));return(s,u)=>(b(),J(ya,null,{default:_(()=>{var a;return[g("div",{class:K(["main-display-container",s.classes??{}]),style:fe([{height:`${(((a=t.value)==null?void 0:a.clientHeight)??0)+20}px`},s.style??{}])},[g("div",{class:"main-display",ref_key:"displayRef",ref:t},[r.value?(b(),C("span",Na,"You have ")):E("",!0),v(wa,{resource:s.resource,color:s.color||"white"},null,8,["resource","color"]),V(" "+O(s.resource.displayName)+" ",1),s.effectDisplay?(b(),C("span",ka,[u[0]||(u[0]=V(", ")),v(i)])):E("",!0)],512)],6)]}),_:1}))}}),Sa={key:0,class:"material-icons pinned"},Ia=z({__name:"Tooltip",props:{pinned:{},display:{},style:{},classes:{},direction:{},xoffset:{},yoffset:{}},setup(n){const e=n,t=F(!1),i=L(()=>{var a;return((a=e.pinned)==null?void 0:a.value)===!0||t.value}),r=()=>te(e.display);function s(a){const o=e.pinned;a.shiftKey&&o!=null&&(o.value=!o.value,a.stopPropagation(),a.preventDefault())}const u=L(()=>{var a;return((a=e.pinned)==null?void 0:a.value)===!0&&Et[H.theme].showPin});return(a,o)=>(b(),C("div",{class:K(["tooltip-container",{shown:i.value}]),onMouseenter:o[0]||(o[0]=f=>t.value=!0),onMouseleave:o[1]||(o[1]=f=>t.value=!1),onClickCapture:s},[xe(a.$slots,"default",{},void 0,!0),v(Ht,{name:"fade"},{default:_(()=>[i.value?(b(),C("div",{key:0,class:K(["tooltip",{top:d(a.direction)===d(Y).Up,left:d(a.direction)===d(Y).Left,right:d(a.direction)===d(Y).Right,bottom:d(a.direction)===d(Y).Down,...d(a.classes)}]),style:fe([{"--xoffset":d(a.xoffset)||"0px","--yoffset":d(a.yoffset)||"0px"},d(a.style)??{}])},[u.value?(b(),C("span",Sa,"push_pin")):E("",!0),v(r)],6)):E("",!0)]),_:1})],34))}}),Q=Z(Ia,[["__scopeId","data-v-ad4ea959"]]);function xa(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Tn(n)}function Ma(n,e){const t=st(!1,!1),i=Ee(()=>{const r=e(),{pinnable:s,display:u,direction:a,xoffset:o,yoffset:f,...y}=r;return s===!1&&Vs(t),{...y,...wt("tooltip",r),pinnable:s??!0,pinned:s===!1?void 0:t,display:u,direction:R(a??Y.Up),xoffset:R(o),yoffset:R(f)}});er(n,r=>{i.id,r.tooltip=i,r.wrappers.push(s=>mn(i.visibility??!0)?v(Q,{pinned:i.pinned,display:i.display,classes:i.classes,style:i.style,direction:i.direction,xoffset:i.xoffset,yoffset:i.yoffset},xa(s)?s:{default:()=>[s]}):v(j,null,[s]))})}const Ta=["disabled"],$a=z({__name:"Clickable",props:{canClick:{},display:{}},emits:["click","hold"],setup(n,{emit:e}){const t=n,i=e,r=()=>t.display==null?v(j,null,null):te(t.display),{start:s,stop:u}=hn(()=>i("hold"));return(a,o)=>(b(),C("button",{onClick:o[0]||(o[0]=f=>i("click",f)),onMousedown:o[1]||(o[1]=(...f)=>d(s)&&d(s)(...f)),onMouseleave:o[2]||(o[2]=(...f)=>d(u)&&d(u)(...f)),onMouseup:o[3]||(o[3]=(...f)=>d(u)&&d(u)(...f)),onTouchstartPassive:o[4]||(o[4]=(...f)=>d(s)&&d(s)(...f)),onTouchendPassive:o[5]||(o[5]=(...f)=>d(u)&&d(u)(...f)),onTouchcancelPassive:o[6]||(o[6]=(...f)=>d(u)&&d(u)(...f)),class:K({clickable:!0,can:d(a.canClick),locked:!d(a.canClick)}),disabled:!d(a.canClick)},[v(r)],42,Ta))}}),Pa=Z($a,[["__scopeId","data-v-396784a5"]]),Ea=Symbol("Clickable");function Fa(n){return Ee(()=>{const e=(n==null?void 0:n())??{},{canClick:t,display:i,onClick:r,onHold:s,...u}=e;let a;typeof i=="object"&&!js(i)?a=()=>v("span",null,[i.title!=null?v("div",null,[te(i.title,f=>v("h3",null,[f]))]):null,te(i.description,f=>v("div",null,[f]))]):i!=null&&(a=i);const o={type:Ea,...u,...wt("clickable",e,()=>v(Pa,{canClick:o.canClick,onClick:o.onClick,onHold:o.onClick,display:o.display},null)),canClick:R(t)??!0,display:a,onClick:r==null?void 0:function(f){d(o.canClick)!==!1&&r.call(o,f)},onHold:s==null?void 0:function(){d(o.canClick)!==!1&&s.call(o)}};return o})}function Va(n){const e=Fa(()=>{const t=n(),{conversion:i,tree:r,treeNode:s,resetTime:u,resetDescription:a,showNextAt:o,minimumGain:f,display:y,canClick:N,onClick:w,...p}=t;return{...p,conversion:i,tree:r,treeNode:s,resetTime:u,resetDescription:R(a)??L(()=>c.lt(i.gainResource.value,1e3)?"Reset for ":""),showNextAt:R(o)??!0,minimumGain:R(f)??1,canClick:R(N)??L(()=>c.gte(d(i.actualGain),d(e.minimumGain))),display:y??(()=>v("span",null,[d(e.resetDescription),v("b",null,[pt(i.gainResource,c.max(d(i.actualGain),d(e.minimumGain)))])," ",i.gainResource.displayName,d(e.showNextAt)!=null?v("div",null,[v("br",null,null),d(i.buyMax)?"Next:":"Req:"," ",pt(i.baseResource,!d(i.buyMax)&&c.gte(d(i.actualGain),1)?d(i.currentAt):d(i.nextAt))," ",i.baseResource.displayName]):null])),onClick:function(k){d(e.canClick)!==!1&&(i.convert(),r.reset(s),u&&(u.value=u[Le]),w==null||w.call(e,k))}}});return e}function _a(n){const e=sa(()=>{const t=n(),{display:i,append:r,layerID:s,...u}=t;return{...u,layerID:s,display:i??s,append:R(r)??!0,onClick(){if(d(e.append))if(x.tabs.includes(s)){const a=x.tabs.lastIndexOf(s);x.tabs.splice(a,1)}else x.tabs.push(s);else x.tabs.splice(1,1,s)}}});return e}const Bt="p",ht=dn(Bt,()=>{const n="Prestige",e="#4BDC13",t=fn(0,"prestige points"),i=da(()=>({formula:f=>f.div(10).sqrt(),baseResource:xt.points,gainResource:t})),r=va(()=>({thingsToReset:()=>[ht]})),s=_a(()=>({layerID:Bt,color:e,reset:r})),u=Ma(s,()=>({display:la(t),pinnable:!0})),a=Va(()=>({conversion:i,tree:xt.tree,treeNode:s})),o=pa(()=>({description:"Reset for prestige points",key:"p",onPress:a.onClick}));return{name:n,color:e,points:t,tooltip:u,display:()=>v(j,null,[v(Ca,{resource:t,color:e},null),te(a)]),treeNode:s,hotkey:o}}),xt=dn("main",n=>{const e=fn(10),t=As(e),i=Rs(e),r=L(()=>new c(1));n.on("update",a=>{e.value=c.add(e.value,c.times(r.value,a))});const s=Bs(e,r),u=aa(()=>({nodes:an([[ht.treeNode]]),branches:[],onReset(){e.value=Ot(u.resettingNode.value)===Ot(ht.treeNode)?0:10,t.value=e.value,i.value=e.value},resetPropagation:oa}));return{name:"Tree",links:u.links,display:()=>v(j,null,[x.devSpeed===0?v("div",null,[V("Game Paused"),v(Ye,{id:"paused"},null)]):null,x.devSpeed!=null&&x.devSpeed!==0&&x.devSpeed!==1?v("div",null,[V("Dev Speed: "),pe(x.devSpeed),V("x"),v(Ye,{id:"devspeed"},null)]):null,x.offlineTime!=null&&x.offlineTime!==0?v("div",null,[V("Offline Time: "),yt(x.offlineTime),v(Ye,{id:"offline"},null)]):null,v("div",null,[c.lt(e.value,"1e1000")?v("span",null,[V("You have ")]):null,v("h2",null,[pe(e.value)]),c.lt(e.value,"1e1e6")?v("span",null,[V(" points")]):null]),c.gt(r.value,0)?v("div",null,[V("("),s.value,V(")"),v(Ye,{id:"oomps"},null)]):null,v(Ds,null,null),te(u)]),points:e,best:t,total:i,oomps:s,tree:u}}),Oa=n=>[xt,ht],qe=L(()=>!1);function we(n={}){return Object.assign({id:`${B.id}-0`,name:"Default Save",tabs:B.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:B.id,modVersion:B.versionNumber,layers:{}},n)}function ie(n){const e=$e.compressToUTF16(ze(n??x));return localStorage.setItem((n??x).id,e),e}async function La(){qa();try{let n=localStorage.getItem(H.active);if(n==null){await Ne(Ue());return}if(n=Te(n),n==null)throw"Unable to determine save encoding";const e=JSON.parse(n);if(e.modID!==B.id){await Ne(Ue());return}e.id=H.active,await Ne(e)}catch(n){console.error(`Failed to load save. Falling back to new save. +`,n),await Ne(Ue())}}function Te(n){if(n[0]!=="{")if(n[0]==="e")n=decodeURIComponent(escape(atob(n)));else if(n[0]==="ᯡ")n=$e.decompressFromUTF16(n);else return console.warn("Unable to determine preset encoding",n),null;return n}function Ue(){const n=Ke(),e=we({id:n});return ie(e),H.saves.push(n),e}function Ke(){let n,e=0;do n=`${B.id}-${e++}`;while(localStorage.getItem(n)!=null);return n}const Nt=F(!1);async function Ne(n){console.info("Loading save",n),Nt.value=!0;for(const e in re){const t=re[e];t!=null&&Os(t)}Oa().forEach(e=>_s(e,n)),n=we(n),n.offlineProd&&n.time!=null&&n.time&&n.devSpeed!==0&&(n.offlineTime==null&&(n.offlineTime=0),n.offlineTime+=Math.min(n.offlineTime+(Date.now()-n.time)/1e3,B.offlineLimit*3600)),n.time=Date.now(),n.modVersion!==B.versionNumber&&(n.modVersion,n.modVersion=B.versionNumber),Object.assign(x,n),H.active=x.id,ne.emit("onLoad")}const ge=bt({});function Da(n){if(ge[n]==null){let e=localStorage.getItem(n);if(e==null)ge[n]={error:"Save doesn't exist in localStorage",id:n};else if(e==="dW5kZWZpbmVk")ge[n]={error:"Save is undefined",id:n};else try{if(e=Te(e),e==null)return console.warn("Unable to determine preset encoding",e),ge[n]={error:"Unable to determine preset encoding",id:n},ge[n];ge[n]={...JSON.parse(e),id:n}}catch(t){ge[n]={error:t,id:n},console.warn(`Failed to load info about save with id ${n}: +${t} +${e}`)}}return ge[n]}function Aa(){Object.keys(ge).forEach(n=>delete ge[n])}function lt(n){ge[n]=void 0}setInterval(()=>{x.autosave&&ie()},1e3);window.onbeforeunload=()=>{x.autosave&&ie()};window.save=ie;const Ra=window.hardReset=async()=>{await Ne(Ue())};window.deleteLowerSaves=()=>{const n=Object.values(H.saves).indexOf(x.id)+1;Object.values(H.saves).slice(n).forEach(e=>localStorage.removeItem(e)),H.saves=H.saves.slice(0,n)};const nt=He({active:"",saves:[],showTPS:!0,theme:Pt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0});ae(nt,n=>{const e=$e.compressToUTF16(JSON.stringify(n));localStorage.setItem(B.id,e)},{deep:!0});const H=window.settings=nt;window.hardResetSettings=()=>{const n={active:"",saves:[],showTPS:!0,theme:Pt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0};ne.emit("loadSettings",n),Object.assign(nt,n),Ra()};function qa(){try{let n=localStorage.getItem(B.id);if(n!=null&&n!==""){if(n=Te(n),n==null){console.warn("Unable to determine settings encoding",n);return}const e=JSON.parse(n);typeof e=="object"&&Object.assign(nt,e)}ne.emit("loadSettings",nt)}catch{}}const Ua=He([]),vn=He([]);function Ba(n){vn.push(n)}const za=He([]),ue=F(),ve=F([]),We=F([]);function Ga(){var n;((n=ue.value)==null?void 0:n.loggedIn)===!0&&(ve.value.length>0||ue.value.getSaveList().then(bn).then(e=>{We.value=e.map(t=>t.content.id)}).catch(console.error))}_n({supportsSaving:!0,supportsSaveManager:!0,onLoggedInChanged:zt}).then(n=>{ue.value=n,zt(n)}).catch(console.error);function zt(n){n.loggedIn===!0&&(ve.value.length>0||(n.getSaveList().then(e=>{const t=bn(e);if(We.value=t.map(i=>i.content.id),x.timePlayed<120*1e3&&t.length>0){const i=t.reduce((r,s)=>r.content.times)),i=Object.keys(n).map(r=>{const{label:s,content:u}=n[parseInt(r)];try{return{slot:parseInt(r),label:s,content:JSON.parse(Te(u)??"")}}catch{return null}}).filter(r=>r!=null&&typeof r.content.id=="string"&&typeof r.content.time=="number"&&typeof r.content.timePlayed=="number").filter(r=>{var u;r.label!=null&&(r.content.name=r.label),t.delete(r.slot);const s=H.saves.find(a=>a===r.content.id);if(s==null)H.saves.push(r.content.id),ie(we(r.content));else{e.delete(s);try{const a=JSON.parse(Te(localStorage.getItem(s)??"")??"");if(a==null)return!1;a.id=s,a.time=a.time??0,a.timePlayed=a.timePlayed??0;const o=Math.abs(a.timePlayed-r.content.timePlayed),f=Math.abs(a.time-r.content.time);o<120*1e3&&f<120*1e3?a.time{var s;try{if(t.size>0){const u=localStorage.getItem(r)??"",a=JSON.parse(Te(u)??""),o=t.values().next().value;if(o==null)return;(s=ue.value)==null||s.save(o,u,a.name).then(()=>We.value.push(a.id)).catch(console.error),t.delete(o)}}catch{}}),i}const Ha={class:"field"},Wa={key:0,class:"field-title"},yn=z({__name:"Select",props:{title:{},modelValue:{},options:{},placeholder:{},closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=()=>t.title?te(t.title,a=>v("span",null,[a])):v(j,null,null),s=F(t.options.find(a=>a.value===t.modelValue)??null);ae(Oe(t,"modelValue"),a=>{d(s)!==a&&(s.value=t.options.find(o=>o.value===a)??null)});function u(a){i("update:modelValue",a.value)}return(a,o)=>(b(),C("div",Ha,[a.title?(b(),C("span",Wa,[v(r)])):E("",!0),v(d(Ln),{options:a.options,modelValue:s.value,"onUpdate:modelValue":[o[0]||(o[0]=f=>s.value=f),u],min:1,placeholder:a.placeholder,"close-on-select":a.closeOnSelect,"label-by":"label"},null,8,["options","modelValue","placeholder","close-on-select"])]))}}),ja={class:"field"},Ja={key:0,class:"field-title"},Za=["placeholder"],Ya=z({__name:"Text",props:{title:{},modelValue:{},textArea:{type:Boolean},placeholder:{},maxHeight:{},submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(n,{emit:e}){const t=n,i=e,r=()=>t.title==null?v(j,null,null):te(t.title,f=>v("span",null,[f])),s=rt(null);it(()=>{var f;(f=s.value)==null||f.focus()});const u=L({get(){return d(t.modelValue)??""},set(f){i("update:modelValue",f)}});function a(){i("submit")}function o(){t.submitOnBlur!==!1?i("submit"):i("cancel")}return(f,y)=>(b(),C("form",{onSubmit:Xe(a,["prevent"])},[g("div",ja,[f.title?(b(),C("span",Ja,[v(r)])):E("",!0),f.textArea?(b(),J(d(Dn),{key:1,modelValue:u.value,"onUpdate:modelValue":y[0]||(y[0]=N=>u.value=N),placeholder:f.placeholder,maxHeight:f.maxHeight,onBlur:o,ref_key:"field",ref:s},null,8,["modelValue","placeholder","maxHeight"])):Tt((b(),C("input",{key:2,type:"text","onUpdate:modelValue":y[1]||(y[1]=N=>u.value=N),placeholder:f.placeholder,class:K({fullWidth:!f.title}),onBlur:o,ref_key:"field",ref:s},null,42,Za)),[[$n,u.value]])])],32))}}),wn=Z(Ya,[["__scopeId","data-v-495d5085"]]),Ka={key:0},Xa=["disabled"],Qa={key:0},eo=z({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(n,{emit:e}){const t=n,i=e,r=F(!1);ae(r,a=>{i("confirmingChanged",a)});function s(){if(t.skipConfirm){i("click");return}r.value&&i("click"),r.value=!r.value}function u(){r.value=!1}return(a,o)=>(b(),C("span",{class:K(["container",{confirming:r.value}])},[r.value?(b(),C("span",Ka,"Are you sure?")):E("",!0),g("button",{onClick:Xe(s,["stop"]),class:"button danger",disabled:a.disabled},[r.value?(b(),C("span",Qa,"Yes")):xe(a.$slots,"default",{key:1},void 0,!0)],8,Xa),r.value?(b(),C("button",{key:1,class:"button",onClick:Xe(u,["stop"])},"No")):E("",!0)],2))}}),to=Z(eo,[["__scopeId","data-v-b3b9693a"]]),no={key:0,class:"handle material-icons"},io={key:1,class:"actions"},ro={key:2,class:"actions"},so={key:3,class:"details"},ao=["disabled"],oo={class:"save-version"},lo={key:1,class:"time"},uo={key:4,class:"details"},co={key:5,class:"details error"},fo=z({__name:"Save",props:{save:{},readonly:{type:Boolean}},emits:["export","open","duplicate","delete","editName"],setup(n,{emit:e}){const t=n,i=e,r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=F(!1),u=F(!1),a=F("");ae(s,()=>a.value=t.save.name??"");const o=L(()=>t.save!=null&&t.save.id===x.id&&!t.readonly),f=L(()=>o.value?x.time:(t.save!=null&&t.save.time)??0),y=L(()=>{var w;return!t.readonly&&((w=ue.value)==null?void 0:w.loggedIn)===!0&&We.value.includes(t.save.id)});function N(){i("editName",a.value),s.value=!1}return(w,p)=>(b(),C("div",{class:K(["save",{active:o.value,readonly:w.readonly}])},[w.readonly!==!0?(b(),C("div",no,"drag_handle")):E("",!0),!s.value&&w.readonly!==!0?(b(),C("div",io,[w.save.error==null&&!u.value?(b(),J($t,{key:0,onClick:p[0]||(p[0]=k=>i("export")),class:"button",left:""},{default:_(()=>[v(Q,{display:"Export",direction:d(Y).Left,class:"info"},{default:_(()=>p[8]||(p[8]=[g("span",{class:"material-icons"},"content_paste",-1)])),_:1},8,["direction"])]),_:1})):E("",!0),w.save.error==null&&!u.value?(b(),C("button",{key:1,onClick:p[1]||(p[1]=k=>i("duplicate")),class:"button"},[v(Q,{display:"Duplicate",direction:d(Y).Left,class:"info"},{default:_(()=>p[9]||(p[9]=[g("span",{class:"material-icons"},"content_copy",-1)])),_:1},8,["direction"])])):E("",!0),w.save.error==null&&!u.value?(b(),C("button",{key:2,onClick:p[2]||(p[2]=k=>s.value=!s.value),class:"button"},[v(Q,{display:"Edit Name",direction:d(Y).Left,class:"info"},{default:_(()=>p[10]||(p[10]=[g("span",{class:"material-icons"},"edit",-1)])),_:1},8,["direction"])])):E("",!0),v(to,{disabled:o.value,onClick:p[3]||(p[3]=k=>i("delete")),onConfirmingChanged:p[4]||(p[4]=k=>u.value=k)},{default:_(()=>[v(Q,{display:"Delete",direction:d(Y).Left,class:"info"},{default:_(()=>p[11]||(p[11]=[g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)])),_:1},8,["direction"])]),_:1},8,["disabled"])])):w.readonly!==!0?(b(),C("div",ro,[g("button",{onClick:N,class:"button"},[v(Q,{display:"Save",direction:d(Y).Left,class:"info"},{default:_(()=>p[12]||(p[12]=[g("span",{class:"material-icons"},"check",-1)])),_:1},8,["direction"])]),g("button",{onClick:p[5]||(p[5]=k=>s.value=!s.value),class:"button"},[v(Q,{display:"Cancel",direction:d(Y).Left,class:"info"},{default:_(()=>p[13]||(p[13]=[g("span",{class:"material-icons"},"close",-1)])),_:1},8,["direction"])])])):E("",!0),w.save.error==null&&!s.value?(b(),C("div",so,[y.value?(b(),J(Q,{key:0,display:"Synced!",direction:d(Y).Right},{default:_(()=>p[14]||(p[14]=[g("span",{class:"material-icons synced"},"cloud",-1)])),_:1},8,["direction"])):E("",!0),g("button",{class:"button open",onClick:p[6]||(p[6]=k=>i("open")),disabled:w.readonly},[g("h3",null,O(w.save.name),1)],8,ao),g("span",oo,"v"+O(w.save.modVersion),1),p[15]||(p[15]=g("br",null,null,-1)),f.value?(b(),C("div",lo," Last played "+O(d(r).format(f.value)),1)):E("",!0)])):w.save.error==null&&s.value?(b(),C("div",uo,[v(wn,{modelValue:a.value,"onUpdate:modelValue":p[7]||(p[7]=k=>a.value=k),class:"editname",onSubmit:N},null,8,["modelValue"])])):(b(),C("div",co,[V(" Error: Failed to load save with id "+O(w.save.id),1),p[16]||(p[16]=g("br",null,null,-1)),V(O(w.save.error),1)]))],2))}}),Mt=Z(fo,[["__scopeId","data-v-0058f767"]]),mo={key:0,style:{color:"var(--danger)"}},go={class:"modal-footer"},po={class:"field"},ho={class:"field-buttons"},vo={class:"footer"},bo=z({__name:"SavesManager",setup(n,{expose:e}){const t=F(!1),i=F(null);e({open(){t.value=!0}});const r=F(!1),s=F(""),u=F(null);ae(s,T=>{T?Be(()=>{try{if(T=Te(T)??"",T===""){console.warn("Unable to determine preset encoding",T),r.value=!0;return}const P=JSON.parse(T);if(typeof P!="object"){r.value=!0;return}const q=Ke();P.id=q,ie(P),s.value="",r.value=!1,H.saves.push(q)}catch{r.value=!0}}):r.value=!1});let a=Object.assign({}),o=F(Object.keys(a).reduce((T,P)=>(T.push({label:P.split("/").slice(-1)[0].slice(0,-4),value:a[P]}),T),[]));ae(t,T=>{T&&Aa()});const f=L(()=>H.saves.reduce((T,P)=>(T[P]=Da(P),T),{})),y=L(()=>{var T;return((T=ue.value)==null?void 0:T.loggedIn)===!0&&H.saves.length{var he;const oe=Object.keys(q).find(kt=>{const Ct=q[parseInt(kt)].content;try{if(JSON.parse(Ct).id===T)return!0}catch{return!1}});oe!=null&&((he=ue.value)==null||he.save(parseInt(oe),"","").catch(console.error))}),H.saves=H.saves.filter(q=>q!==T),localStorage.removeItem(T),lt(T)}function k(T){f.value[x.id].time=x.time,ie(),lt(x.id),Ne(f.value[T]),lt(T)}function S(T){if(u.value=T,Be(()=>{u.value=null}),T=Te(T)??"",T===""){console.warn("Unable to determine preset encoding",T);return}const P=JSON.parse(T);P.id=Ke(),ie(P),H.saves.push(P.id),k(P.id)}function M(T,P){const q=f.value[T];q!=null&&(q.name=P,x.id===T?(x.name=P,ie()):(ie(q),lt(T)))}return(T,P)=>(b(),J(Pe,{modelValue:t.value,"onUpdate:modelValue":P[4]||(P[4]=q=>t.value=q),ref_key:"modal",ref:i},{header:_(()=>P[5]||(P[5]=[g("h2",null,"Saves Manager",-1)])),body:_(({shown:q})=>[y.value?(b(),C("div",mo," Not all saves are synced! You may need to delete stale saves. ")):E("",!0),q?(b(),J(d(On),{key:1,list:d(H).saves,handle:".handle",itemKey:oe=>oe},{item:_(({element:oe})=>[v(Mt,{save:f.value[oe],onOpen:he=>k(oe),onExport:he=>N(oe),onEditName:he=>M(oe,he),onDuplicate:he=>w(oe),onDelete:he=>p(oe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):E("",!0)]),footer:_(()=>[g("div",go,[v(wn,{modelValue:s.value,"onUpdate:modelValue":P[0]||(P[0]=q=>s.value=q),title:"Import Save",placeholder:"Paste your save here!",class:K({importingFailed:r.value})},null,8,["modelValue","class"]),g("div",po,[P[6]||(P[6]=g("span",{class:"field-title"},"Create Save",-1)),g("div",ho,[g("button",{class:"button",onClick:P[1]||(P[1]=q=>k(d(Ue)().id))},"New Game"),Object.keys(d(o)).length>0?(b(),J(yn,{key:0,options:d(o),modelValue:u.value,"onUpdate:modelValue":P[2]||(P[2]=q=>S(q)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):E("",!0)])]),g("div",vo,[P[7]||(P[7]=g("div",{style:{"flex-grow":"1"}},null,-1)),g("button",{class:"button modal-default-button",onClick:P[3]||(P[3]=q=>t.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}}),Vt=Z(bo,[["__scopeId","data-v-99458d64"]]),yo={class:"vga-footer"},wo=z({__name:"AddictionWarning",setup(n){const e=F(!1);Jt(()=>{B.disableHealthWarning===!1&&H.showHealthWarning&&G.mouseActivity.filter(i=>i).length>6&&(e.value=!0)});function t(){H.showHealthWarning=!1,e.value=!1}return(i,r)=>(b(),C(j,null,[v(Pe,ke({modelValue:e.value,"onUpdate:modelValue":r[1]||(r[1]=s=>e.value=s)},i.$attrs),{header:_(()=>r[2]||(r[2]=[g("div",{class:"vga-modal-header"},[g("h2",null,"Kindly consider taking a break.")],-1)])),body:_(()=>r[3]||(r[3]=[g("p",null," You've been actively enjoying this game for awhile recently - and it's great that you've been having a good time! That said, there are dangers to games like these that you should be aware of: ",-1),g("p",null," While incremental games can be fun and even healthy in certain contexts, they can exacerbate video game addiction even more than other genres. If you feel like playing incremental games is taking priority over other things in your life, or manipulating your sleep schedule, it may be prudent to seek help. ",-1),g("h4",null,"Resources:",-1),g("p",null,[g("span",null,[g("a",{style:{display:"inline"},href:"https://www.samhsa.gov/",target:"_blank"}," SAMHSA "),V(" ("),g("a",{style:{display:"inline"},href:"tel:1-800-662-4357"},"1-800-662-HELP"),V(") ")]),g("br"),g("a",{href:"https://www.reddit.com/r/StopGaming/"},"r/StopGaming")],-1)])),footer:_(()=>[g("div",yo,[g("button",{onClick:t,class:"button"},"Never show this again"),g("button",{onClick:r[0]||(r[0]=s=>e.value=!1),class:"button"},"Close")])]),_:1},16,["modelValue"]),v(Vt,{ref:"savesManager"},null,512)],64))}}),No=Z(wo,[["__scopeId","data-v-84eac81b"]]),ko={class:"cloud-saves-modal-header"},Co=["onClick"],So={key:0,class:"note"},Io={key:1,class:"note"},xo=["onClick"],Mo={key:0,class:"note"},To={key:1,class:"note"},$o=["onClick"],Po=z({__name:"CloudSaveResolver",setup(n){const e=F(!1),t=F([]),i=L(()=>ve.value.length>1?"saves":"save"),r=F(null);ae(()=>ve.value.length>0,f=>{f&&(t.value=ve.value.map(({local:y,cloud:N})=>(y.time??0)<(N.time??0)?"cloud":"local"),e.value=!0)},{immediate:!0}),ae(()=>{var f;return(f=r.value)==null?void 0:f.isOpen},f=>{f===!1&&(ve.value=[])});function s(f){t.value[f]="local"}function u(f){t.value[f]="cloud"}function a(f){t.value[f]="both"}function o(){var f,y;for(let N=0;N(b(),J(Pe,{modelValue:e.value,"onUpdate:modelValue":y[0]||(y[0]=N=>e.value=N),width:"960px",ref_key:"modal",ref:r,"prevent-closing":!0},{header:_(()=>[g("div",ko,[g("h2",null,"Cloud "+O(i.value)+" loaded!",1)])]),body:_(()=>[g("div",null," Upon loading, your cloud "+O(i.value)+" "+O(d(ve).length>1?"appear":"appears")+" to be out of sync with your local "+O(i.value)+". Which "+O(i.value)+" do you want to keep? ",1),y[4]||(y[4]=g("br",null,null,-1)),(b(!0),C(j,null,Se(d(d(ve)),(N,w)=>(b(),C("div",{key:N.id,class:"conflict-container"},[g("div",{onClick:p=>u(w),class:K({selected:t.value[w]==="cloud"})},[g("h2",null,[y[1]||(y[1]=V(" Cloud ")),(N.cloud.time??0)>(N.local.time??0)?(b(),C("span",So,"(more recent)")):E("",!0),(N.cloud.timePlayed??0)>(N.local.timePlayed??0)?(b(),C("span",Io,"(more playtime)")):E("",!0)]),v(Mt,{save:N.cloud,readonly:!0},null,8,["save"])],10,Co),g("div",{onClick:p=>s(w),class:K({selected:t.value[w]==="local"})},[g("h2",null,[y[2]||(y[2]=V(" Local ")),(N.cloud.time??0)<=(N.local.time??0)?(b(),C("span",Mo,"(more recent)")):E("",!0),(N.cloud.timePlayed??0)<=(N.local.timePlayed??0)?(b(),C("span",To,"(more playtime)")):E("",!0)]),v(Mt,{save:N.local,readonly:!0},null,8,["save"])],10,xo),g("div",{onClick:p=>a(w),class:K({selected:t.value[w]==="both"}),style:{"flex-basis":"30%"}},y[3]||(y[3]=[g("h2",null,"Both",-1),g("div",{class:"save"},"Keep Both",-1)]),10,$o)]))),128))]),footer:_(()=>[g("div",{class:"cloud-saves-footer"},[g("button",{onClick:o,class:"button"},"Confirm")])]),_:1},8,["modelValue"]))}}),Eo=Z(Po,[["__scopeId","data-v-c79a1b2e"]]),Fo={class:"field"},Vo=z({__name:"Toggle",props:{title:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=()=>te(t.title??"",u=>v("span",null,[u])),s=L({get(){return!!t.modelValue},set(u){i("update:modelValue",u)}});return(u,a)=>(b(),C("label",Fo,[Tt(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":a[0]||(a[0]=o=>s.value=o)},null,512),[[Pn,s.value]]),v(r)]))}}),be=Z(Vo,[["__scopeId","data-v-faad62a6"]]),_o={class:"game-over-modal-header"},Oo=["src","alt"],Lo={class:"game-over-modal-title"},Do={key:0},Ao={key:0},Ro=["href"],qo={key:1},Uo=z({__name:"GameOverScreen",setup(n){const{title:e,logo:t,discordName:i,discordLink:r,versionNumber:s,versionTitle:u}=B,a=L(()=>yt(x.timePlayed)),o=L(()=>qe.value&&!x.keepGoing),f=Oe(x,"autosave");function y(){x.keepGoing=!0}function N(){Ne(Ue())}return(w,p)=>(b(),J(Pe,{"model-value":o.value},{header:_(()=>[g("div",_o,[d(t)?(b(),C("img",{key:0,class:"game-over-modal-logo",src:d(t),alt:d(e)},null,8,Oo)):E("",!0),g("div",Lo,[p[1]||(p[1]=g("h2",null,"Congratulations!",-1)),g("h4",null,"You've beaten "+O(d(e))+" v"+O(d(s))+": "+O(d(u)),1)])])]),body:_(({shown:k})=>[k?(b(),C("div",Do,[g("div",null,"It took you "+O(a.value)+" to beat the game.",1),p[4]||(p[4]=g("br",null,null,-1)),p[5]||(p[5]=g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),p[6]||(p[6]=g("br",null,null,-1)),d(r)&&d(i)?(b(),C("div",Ao,[g("a",{href:d(r),class:"game-over-modal-discord-link"},[p[2]||(p[2]=g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),V(" "+O(d(i)),1)],8,Ro)])):(b(),C("div",qo,p[3]||(p[3]=[g("a",{href:"https://discord.gg/yJ4fjnjU54",class:"game-over-modal-discord-link"},[g("span",{class:"material-icons game-over-modal-discord"},"discord"),V(" Profectus & Friends ")],-1)]))),v(be,{title:"Autosave",modelValue:f.value,"onUpdate:modelValue":p[0]||(p[0]=S=>f.value=S)},null,8,["modelValue"])])):E("",!0)]),footer:_(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:y,class:"button"},"Keep Going"),g("button",{onClick:N,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}}),Bo=Z(Uo,[["__scopeId","data-v-c9c5bad4"]]),zo={key:0},Go=["href"],Ho={class:"nan-footer"},Wo=z({__name:"NaNScreen",setup(n){const{discordName:e,discordLink:t}=B,i=F(!0),r=F(!0),s=Oe(G,"hasNaN"),u=F(null);ae(s,w=>{w?(i.value=x.autosave,r.value=x.devSpeed===0):(x.autosave=i.value,x.devSpeed=r.value?0:null)});const a=L(()=>{var w;return(w=G.NaNPath)==null?void 0:w.join(".")}),o=L(()=>G.NaNPersistent!=null?G.NaNPersistent.value:null);function f(){G.NaNPersistent!=null&&(G.NaNPersistent.value=new c(0),G.hasNaN=!1)}function y(){G.NaNPersistent&&(G.NaNPersistent.value=new c(1),G.hasNaN=!1)}function N(){G.NaNPersistent&&(G.NaNPersistent.value=new c(NaN),G.hasNaN=!1)}return(w,p)=>(b(),C(j,null,[v(Pe,ke({modelValue:s.value,"onUpdate:modelValue":p[4]||(p[4]=k=>s.value=k)},w.$attrs),{header:_(()=>p[5]||(p[5]=[g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)])),body:_(()=>[g("div",null,[V(' Attempted to assign "'+O(a.value)+'" to NaN',1),o.value?(b(),C("span",zo,O(" ")+"(previously "+O(d(pe)(o.value))+")",1)):E("",!0),V(". Auto-saving has been "+O(i.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),p[7]||(p[7]=g("br",null,null,-1)),g("div",null,[g("a",{href:d(t)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[p[6]||(p[6]=g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),V(" "+O(d(e)||"Profectus & Friends"),1)],8,Go)]),p[8]||(p[8]=g("br",null,null,-1)),v(be,{title:"Autosave",modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=k=>i.value=k)},null,8,["modelValue"]),d(B).enablePausing?(b(),J(be,{key:0,title:"Pause game",modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=k=>r.value=k)},null,8,["modelValue"])):E("",!0)]),footer:_(()=>[g("div",Ho,[g("button",{onClick:p[2]||(p[2]=k=>{var S;return(S=u.value)==null?void 0:S.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:f,class:"button"},"Set to 0"),g("button",{onClick:y,class:"button"},"Set to 1"),o.value&&d(c).neq(o.value,0)&&d(c).neq(o.value,1)?(b(),C("button",{key:0,onClick:p[3]||(p[3]=k=>s.value=!1),class:"button"}," Set to previous ")):E("",!0),g("button",{onClick:N,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),v(Vt,{ref_key:"savesManager",ref:u},null,512)],64))}}),jo=Z(Wo,[["__scopeId","data-v-cab8d401"]]),Jo={key:1},Zo=z({__name:"Layer",props:{display:{},minimizedDisplay:{},minimized:{},name:{},color:{},minimizable:{},nodes:{},forceHideGoBack:{},index:{}},setup(n){const e=n,t=()=>te(e.display),i=()=>e.minimizedDisplay==null?void 0:te(e.minimizedDisplay),r=L(()=>B.allowGoBack&&!d(e.forceHideGoBack)&&e.index>0&&!d(e.minimized));function s(){x.tabs.splice(d(e.index),1/0)}function u(o){e.nodes.value=o}const a=F([]);return En((o,f,y)=>(console.warn(`Error caught in "${e.name}" layer`,o,f,y),a.value.push(o instanceof Error?o:new Error(JSON.stringify(o))),!1)),(o,f)=>a.value.length>0?(b(),J(Yt,{key:0,errors:a.value},null,8,["errors"])):(b(),C("div",ke({key:1,class:"layer-container",style:{"--layer-color":d(o.color)}},o.$attrs),[r.value?(b(),C("button",{key:0,class:"goBack",onClick:s},"❌")):E("",!0),d(o.minimized)?(b(),C("button",{key:1,class:"layer-tab minimized",onClick:f[0]||(f[0]=y=>o.$emit("setMinimized",!1))},[o.minimizedDisplay?(b(),J(i,{key:0})):(b(),C("div",Jo,O(d(o.name)),1))])):(b(),C("div",{key:2,class:K(["layer-tab",{showGoBack:r.value}])},[v(Kt,{onUpdateNodes:u},{default:_(()=>[v(t)]),_:1})],2)),d(o.minimizable)?(b(),C("button",{key:3,class:"minimize",onClick:f[1]||(f[1]=y=>o.$emit("setMinimized",!0))}," ▼ ")):E("",!0)],16))}}),Yo=Z(Zo,[["__scopeId","data-v-bac44152"]]),Ko=z({__name:"Changelog",setup(n,{expose:e}){const t=F(!1);return e({open(){t.value=!0}}),(i,r)=>(b(),J(Pe,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=s=>t.value=s)},{header:_(()=>r[1]||(r[1]=[g("h2",null,"Changelog",-1)])),body:_(()=>r[2]||(r[2]=[g("details",{open:""},[g("summary",null,[V("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),V(" This is the first release :D "),g("ul",null,[g("li",{class:"feature"},"Did everything"),g("li",{class:"fix"},"Had some fun"),g("li",{class:"breaking"},"Removed everything"),g("li",{class:"balancing"},"Created some bugs to fix later")])],-1)])),_:1},8,["modelValue"]))}}),Xo=Z(Ko,[["__scopeId","data-v-0fdea059"]]),Qo={class:"info-modal-header"},el=["src","alt"],tl={class:"info-modal-title"},nl={key:0},il={key:0},rl={key:0},sl=["href"],al=z({__name:"Info",emits:["openChangelog"],setup(n,{expose:e,emit:t}){const{title:i,logo:r,author:s,discordName:u,discordLink:a,versionNumber:o,versionTitle:f}=B,y=t,N=F(!1),w=L(()=>yt(x.timePlayed)),p=()=>vn.map(k=>te(k));return e({open(){N.value=!0}}),(k,S)=>(b(),J(Pe,{modelValue:N.value,"onUpdate:modelValue":S[1]||(S[1]=M=>N.value=M)},{header:_(()=>[g("div",Qo,[d(r)?(b(),C("img",{key:0,class:"info-modal-logo",src:d(r),alt:d(i)},null,8,el)):E("",!0),g("div",tl,[g("h2",null,O(d(i)),1),g("h4",null,[V(" v"+O(d(o)),1),d(f)?(b(),C("span",nl,": "+O(d(f)),1)):E("",!0)])])])]),body:_(({shown:M})=>[M?(b(),C("div",il,[d(s)?(b(),C("div",rl,"By "+O(d(s)),1)):E("",!0),S[3]||(S[3]=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),S[4]||(S[4]=g("br",null,null,-1)),g("div",{class:"link",onClick:S[0]||(S[0]=T=>y("openChangelog"))},"Changelog"),S[5]||(S[5]=g("br",null,null,-1)),g("div",null,[d(a)?(b(),C("a",{key:0,href:d(a),class:"info-modal-discord-link",target:"_blank"},[S[2]||(S[2]=g("span",{class:"material-icons info-modal-discord"},"discord",-1)),V(" "+O(d(u)),1)],8,sl)):E("",!0)]),S[6]||(S[6]=g("div",null,[g("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),V(" Profectus & Friends ")])],-1)),S[7]||(S[7]=g("div",null,[g("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),V(" The Modding Tree ")])],-1)),S[8]||(S[8]=g("br",null,null,-1)),g("div",null,"Time Played: "+O(w.value),1),v(p)])):E("",!0)]),_:1},8,["modelValue"]))}}),ol=Z(al,[["__scopeId","data-v-e80d3d22"]]),ll={class:"header"},ul={class:"option-tabs"},cl={key:0},dl={key:1},fl=z({__name:"Options",setup(n,{expose:e}){const t=F(!1),i=F("behaviour");function r(ce){return ce==i.value}function s(ce){i.value=ce}e({isTab:r,setTab:s,save:ie,open(){t.value=!0}});const u=Object.keys(Et).map(ce=>({label:tr(ce),value:ce})),a=()=>Ua.map(ce=>te(ce)),{showTPS:o,theme:f,unthrottled:y,alignUnits:N,showHealthWarning:w}=Lt(H),{autosave:p,offlineProd:k}=Lt(x),S=L({get(){return x.devSpeed===0},set(ce){x.devSpeed=ce?0:null}}),M=v("span",{class:"option-title"},[V("Unthrottled"),v("desc",null,[V("Allow the game to run as fast as possible. Not battery friendly.")])]),T=v("span",{class:"option-title"},[V("Offline production"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[V("*")]}),v("desc",null,[V("Simulate production that occurs while the game is closed.")])]),P=v("span",{class:"option-title"},[V("Show videogame addiction warning"),v("desc",null,[V("Show a helpful warning after playing for a long time about video game addiction and encouraging you to take a break.")])]),q=v("span",{class:"option-title"},[V("Autosave"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[V("*")]}),v("desc",null,[V("Automatically save the game every second or when the game is closed.")])]),oe=v("span",{class:"option-title"},[V("Pause game"),v(Q,{display:"Save-specific",direction:Y.Right},{default:()=>[V("*")]}),v("desc",null,[V("Stop everything from moving.")])]),he=v("span",{class:"option-title"},[V("Theme"),v("desc",null,[V("How the game looks.")])]),kt=v("span",{class:"option-title"},[V("Show TPS"),v("desc",null,[V("Show TPS meter at the bottom-left corner of the page.")])]),Ct=v("span",{class:"option-title"},[V("Align modifier units"),v("desc",null,[V("Align numbers to the beginning of the unit in modifier view.")])]);return(ce,W)=>(b(),J(Pe,{modelValue:t.value,"onUpdate:modelValue":W[11]||(W[11]=ee=>t.value=ee)},{header:_(()=>[g("div",ll,[W[12]||(W[12]=g("h2",null,"Settings",-1)),g("div",ul,[g("button",{class:K({selected:r("behaviour")}),onClick:W[0]||(W[0]=ee=>s("behaviour"))},"Behaviour",2),g("button",{class:K({selected:r("appearance")}),onClick:W[1]||(W[1]=ee=>s("appearance"))},"Appearance",2)])])]),body:_(()=>[r("behaviour")?(b(),C("div",cl,[v(be,{title:d(M),modelValue:d(y),"onUpdate:modelValue":W[2]||(W[2]=ee=>se(y)?y.value=ee:null)},null,8,["title","modelValue"]),d(B).enablePausing?(b(),J(be,{key:0,title:d(oe),modelValue:S.value,"onUpdate:modelValue":W[3]||(W[3]=ee=>S.value=ee)},null,8,["title","modelValue"])):E("",!0),v(be,{title:d(T),modelValue:d(k),"onUpdate:modelValue":W[4]||(W[4]=ee=>se(k)?k.value=ee:null)},null,8,["title","modelValue"]),d(B).disableHealthWarning?E("",!0):(b(),J(be,{key:1,title:d(P),modelValue:d(w),"onUpdate:modelValue":W[5]||(W[5]=ee=>se(w)?w.value=ee:null)},null,8,["title","modelValue"])),v(be,{title:d(q),modelValue:d(p),"onUpdate:modelValue":W[6]||(W[6]=ee=>se(p)?p.value=ee:null)},null,8,["title","modelValue"]),d(p)?E("",!0):(b(),J($t,{key:2,class:"button save-button",onClick:W[7]||(W[7]=ee=>d(ie)())},{default:_(()=>W[13]||(W[13]=[V("Manually save")])),_:1}))])):E("",!0),r("appearance")?(b(),C("div",dl,[v(yn,{title:d(he),options:d(u),modelValue:d(f),"onUpdate:modelValue":W[8]||(W[8]=ee=>se(f)?f.value=ee:null)},null,8,["title","options","modelValue"]),v(a),v(be,{title:d(kt),modelValue:d(o),"onUpdate:modelValue":W[9]||(W[9]=ee=>se(o)?o.value=ee:null)},null,8,["title","modelValue"]),v(be,{title:d(Ct),modelValue:d(N),"onUpdate:modelValue":W[10]||(W[10]=ee=>se(N)?N.value=ee:null)},null,8,["title","modelValue"])])):E("",!0)]),_:1},8,["modelValue"]))}}),ml=["src","alt"],gl={key:1,class:"title"},pl={class:"discord"},hl={class:"discord-links"},vl={key:0},bl=["href"],yl={href:"https://forums.moddingtree.com/",target:"_blank"},wl={href:"https://forums.moddingtree.com/",target:"_blank"},Nl={class:"discord"},kl={class:"discord-links"},Cl={key:0},Sl=["href"],Il=z({__name:"Nav",setup(n){const e=F(null),t=F(null),i=F(null),r=F(null),{useHeader:s,banner:u,title:a,discordName:o,discordLink:f,versionNumber:y}=B;function N(){window.open(f,"mywindow")}const w=L(()=>{var p;return((p=ue.value)==null?void 0:p.loggedIn)===!0&&!We.value.includes(H.active)});return(p,k)=>(b(),C(j,null,[d(s)?(b(),C("div",ke({key:0,class:"nav"},p.$attrs),[d(u)?(b(),C("img",{key:0,src:d(u),class:"banner",alt:d(a)},null,8,ml)):(b(),C("div",gl,O(d(a)),1)),g("div",{onClick:k[0]||(k[0]=S=>{var M;return(M=r.value)==null?void 0:M.open()}),class:"version-container"},[v(Q,{display:"Changelog",direction:d(Y).Down,class:"version"},{default:_(()=>[g("span",null,"v"+O(d(y)),1)]),_:1},8,["direction"])]),k[14]||(k[14]=g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),g("div",pl,[g("span",{onClick:N,class:"material-icons"},"discord"),g("ul",hl,[d(f)?(b(),C("li",vl,[g("a",{href:d(f),target:"_blank"},O(d(o)),9,bl)])):E("",!0),k[9]||(k[9]=g("li",null,[g("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),k[10]||(k[10]=g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1))])]),g("div",null,[g("a",yl,[v(Q,{display:"Forums",direction:d(Y).Down,yoffset:"5px"},{default:_(()=>k[11]||(k[11]=[g("span",{class:"material-icons"},"forum",-1)])),_:1},8,["direction"])])]),g("div",{onClick:k[1]||(k[1]=S=>{var M;return(M=e.value)==null?void 0:M.open()})},[v(Q,{display:"Info",direction:d(Y).Down,class:"info"},{default:_(()=>k[12]||(k[12]=[g("span",{class:"material-icons"},"info",-1)])),_:1},8,["direction"])]),g("div",{onClick:k[2]||(k[2]=S=>{var M;return(M=t.value)==null?void 0:M.open()})},[v(Q,{display:"Saves",direction:d(Y).Down,xoffset:"-20px"},{default:_(()=>[g("span",{class:K(["material-icons",{needsSync:w.value}])},"library_books",2)]),_:1},8,["direction"])]),g("div",{onClick:k[3]||(k[3]=S=>{var M;return(M=i.value)==null?void 0:M.open()})},[v(Q,{display:"Settings",direction:d(Y).Down,xoffset:"-66px"},{default:_(()=>k[13]||(k[13]=[g("span",{class:"material-icons"},"settings",-1)])),_:1},8,["direction"])])],16)):(b(),C("div",ke({key:1,class:"overlay-nav"},p.$attrs),[g("div",{onClick:k[4]||(k[4]=S=>{var M;return(M=r.value)==null?void 0:M.open()}),class:"version-container"},[v(Q,{display:"Changelog",direction:d(Y).Right,xoffset:"25%",class:"version"},{default:_(()=>[g("span",null,"v"+O(d(y)),1)]),_:1},8,["direction"])]),g("div",{onClick:k[5]||(k[5]=S=>{var M;return(M=t.value)==null?void 0:M.open()})},[v(Q,{display:"Saves",direction:d(Y).Right},{default:_(()=>[g("span",{class:K(["material-icons",{needsSync:w.value}])},"library_books",2)]),_:1},8,["direction"])]),g("div",{onClick:k[6]||(k[6]=S=>{var M;return(M=i.value)==null?void 0:M.open()})},[v(Q,{display:"Settings",direction:d(Y).Right},{default:_(()=>k[15]||(k[15]=[g("span",{class:"material-icons"},"settings",-1)])),_:1},8,["direction"])]),g("div",{onClick:k[7]||(k[7]=S=>{var M;return(M=e.value)==null?void 0:M.open()})},[v(Q,{display:"Info",direction:d(Y).Right},{default:_(()=>k[16]||(k[16]=[g("span",{class:"material-icons"},"info",-1)])),_:1},8,["direction"])]),g("div",null,[g("a",wl,[v(Q,{display:"Forums",direction:d(Y).Right,xoffset:"7px"},{default:_(()=>k[17]||(k[17]=[g("span",{class:"material-icons"},"forum",-1)])),_:1},8,["direction"])])]),g("div",Nl,[g("span",{onClick:N,class:"material-icons"},"discord"),g("ul",kl,[d(f)?(b(),C("li",Cl,[g("a",{href:d(f),target:"_blank"},O(d(o)),9,Sl)])):E("",!0),k[18]||(k[18]=g("li",null,[g("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),k[19]||(k[19]=g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1))])])],16)),v(ol,{ref_key:"info",ref:e,onOpenChangelog:k[8]||(k[8]=S=>{var M;return(M=r.value)==null?void 0:M.open()})},null,512),v(Vt,{ref_key:"savesManager",ref:t},null,512),v(fl,{ref_key:"options",ref:i},null,512),v(Xo,{ref_key:"changelog",ref:r},null,512)],64))}}),Nn=Z(Il,[["__scopeId","data-v-fcec1ed1"]]),xl={class:"inner-tab"},Ml=z({__name:"Game",setup(n){const e=Oe(x,"tabs"),t=L(()=>Object.keys(re)),i=B.useHeader;function r(s){const{display:u,name:a,color:o,minimizable:f,minimizedDisplay:y,minimized:N,nodes:w,forceHideGoBack:p}=s;return{display:u,name:a,color:o,minimizable:f,minimizedDisplay:y,minimized:N,nodes:w,forceHideGoBack:p}}return(s,u)=>(b(),C("div",{class:K(["tabs-container",{useHeader:d(i)}])},[(b(!0),C(j,null,Se(e.value,(a,o)=>{var f,y;return b(),C("div",{key:o,class:K(["tab",d((f=d(re)[a])==null?void 0:f.classes)]),style:fe(d((y=d(re)[a])==null?void 0:y.style))},[o===0&&!d(i)?(b(),J(Nn,{key:0})):E("",!0),g("div",xl,[t.value.includes(a)?(b(),J(Yo,ke({key:0,ref_for:!0},r(d(re)[a]),{index:o,onSetMinimized:N=>d(re)[a].minimized.value=N}),null,16,["index","onSetMinimized"])):(b(),J(Fn(a),{key:1,index:o},null,8,["index"]))])],6)}),128))],2))}}),Tl=Z(Ml,[["__scopeId","data-v-d0a3afce"]]),$l={key:0,class:"tpsDisplay"},Pl=z({__name:"TPS",setup(n){const e=L(()=>c.div(G.lastTenTicks.length,G.lastTenTicks.reduce((t,i)=>t+i,0)));return(t,i)=>e.value.isNan()?E("",!0):(b(),C("div",$l,"TPS: "+O(d(Qe)(e.value)),1))}}),El=Z(Pl,[["__scopeId","data-v-7df31503"]]),Fl=z({__name:"App",setup(n){const e=B.useHeader,t=L(()=>Et[H.theme].variables),i=Oe(H,"showTPS"),r=Oe(G,"errors"),s=()=>za.map(u=>te(u));return(u,a)=>r.value.length>0?(b(),C("div",{key:0,class:"error-container",style:fe(t.value)},[v(Yt,{errors:r.value},null,8,["errors"])],4)):(b(),C(j,{key:1},[g("div",{id:"modal-root",style:fe(t.value)},null,4),g("div",{class:K(["app",{useHeader:d(e)}]),style:fe(t.value)},[d(e)?(b(),J(Nn,{key:0})):E("",!0),v(Tl),d(i.value)?(b(),J(El,{key:1})):E("",!0),v(No),v(Bo),v(jo),v(Eo),v(s)],6)],64))}}),Vl=Z(Fl,[["__scopeId","data-v-b45f2ee2"]]);ne.on("setupVue",n=>n.use(An));const _l="modulepreload",Ol=function(n,e){return new URL(n,e).href},Gt={},Ll=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){const u=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(t.map(f=>{if(f=Ol(f,i),f in Gt)return;Gt[f]=!0;const y=f.endsWith(".css"),N=y?'[rel="stylesheet"]':"";if(!!i)for(let k=u.length-1;k>=0;k--){const S=u[k];if(S.href===f&&(!y||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${N}`))return;const p=document.createElement("link");if(p.rel=y?"stylesheet":_l,y||(p.as="script"),p.crossOrigin="",p.href=f,o&&p.setAttribute("nonce",o),document.head.appendChild(p),y)return new Promise((k,S)=>{p.addEventListener("load",k),p.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(u){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=u,window.dispatchEvent(a),!a.defaultPrevented)throw u}return r.then(u=>{for(const a of u||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function Dl(n={}){const{immediate:e=!1,onNeedRefresh:t,onOfflineReady:i,onRegistered:r,onRegisteredSW:s,onRegisterError:u}=n;let a,o;const f=async(N=!0)=>{await o};async function y(){if("serviceWorker"in navigator){if(a=await Ll(async()=>{const{Workbox:N}=await import("./workbox-window-D5gOYdM7.js");return{Workbox:N}},[],import.meta.url).then(({Workbox:N})=>new N("./sw.js",{scope:"./",type:"classic"})).catch(N=>{u==null||u(N)}),!a)return;a.addEventListener("activated",N=>{(N.isUpdate||N.isExternal)&&window.location.reload()}),a.addEventListener("installed",N=>{N.isUpdate||i==null||i()}),a.register({immediate:e}).then(N=>{s?s("./sw.js",N):r==null||r(N)}).catch(N=>{u==null||u(N)})}}return o=y(),f}function Al(n={}){const{immediate:e=!0,onNeedRefresh:t,onOfflineReady:i,onRegistered:r,onRegisteredSW:s,onRegisterError:u}=n,a=F(!1),o=F(!1);return{updateServiceWorker:Dl({immediate:e,onNeedRefresh(){a.value=!0,t==null||t()},onOfflineReady(){o.value=!0,i==null||i()},onRegistered:r,onRegisteredSW:s,onRegisterError:u}),offlineReady:o,needRefresh:a}}let Ae=null;function vt(){const n=Date.now();let e=(n-x.time)/1e3;x.time=n;const t=e;if(G.lastTenTicks.push(t),G.lastTenTicks.length>10&&(G.lastTenTicks=G.lastTenTicks.slice(1)),!(qe!=null&&qe.value&&!x.keepGoing)&&!G.hasNaN&&(e=Math.max(e,0),x.devSpeed!==0)){if(Nt.value=!1,x.offlineTime!=null){if(c.gt(x.offlineTime,B.offlineLimit*3600)&&(x.offlineTime=B.offlineLimit*3600),c.gt(x.offlineTime,0)&&x.devSpeed!==0){const i=Math.max(x.offlineTime/10,e);x.offlineTime=x.offlineTime-i,e+=i}else x.devSpeed===0&&(x.offlineTime+=e);(!x.offlineProd||c.lt(x.offlineTime,0))&&(x.offlineTime=null)}e=Math.min(e,B.maxTickLength),x.devSpeed!=null&&(e*=x.devSpeed),Number.isFinite(e)||(e=1e308),!c.eq(e,0)&&(x.timePlayed+=e,Number.isFinite(x.timePlayed)||(x.timePlayed=1e308),ne.emit("update",e,t),H.unthrottled?(requestAnimationFrame(vt),Ae!=null&&(clearInterval(Ae),Ae=null)):Ae==null&&(Ae=setInterval(vt,50)))}}async function Rl(){H.unthrottled?requestAnimationFrame(vt):Ae=setInterval(vt,50)}ae(qe,n=>{n&&ne.emit("gameWon")});setInterval(()=>{G.mouseActivity=[...G.mouseActivity.slice(-7),!1]},1e3*60*60);const _t=console.error;console.error=function(...n){_t(...n)};window.onerror=function(n,e,t,i,r){return G.errors.push(r instanceof Error?r:new Error(JSON.stringify(r))),_t(r),!0};window.onunhandledrejection=function(n){G.errors.push(n.reason instanceof Error?n.reason:new Error(JSON.stringify(n.reason))),_t(n.reason)};document.title=B.title;window.projInfo=B;B.id===""&&console.error("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 La();const n=window.vue=Vn(Vl);n.config.errorHandler=function(e,t,i){console.error(e,i,t)},ne.emit("setupVue",n),n.mount("#app"),Be(()=>{const e=Rn();Al({immediate:!0,onOfflineReady(){e.info("App ready to work offline")},onRegisterError:console.warn,onRegistered:console.info})}),Rl()}); diff --git a/index.html b/index.html index 1a008ac..47a966d 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ Profectus - + @@ -27,7 +27,7 @@ - + diff --git a/sw.js b/sw.js index 40b683a..92bfacf 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).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=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const u=s=>i(s,r),t={module:{uri:r},exports:o,require:u};e[r]=Promise.all(n.map((s=>t[s]||u(s)))).then((s=>(l(...s),o)))}}define(["./workbox-3e911b1d"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource-eKXrrvg3.css",revision:null},{url:"assets/@vue-CCfogNd1.js",revision:null},{url:"assets/index-BuYvdT6z.js",revision:null},{url:"assets/index-MSbJGb5U.css",revision:null},{url:"assets/lz-string-BZNGtwso.js",revision:null},{url:"assets/nanoevents-BxCKNB1V.js",revision:null},{url:"assets/sortablejs-BZuNQ3iR.js",revision:null},{url:"assets/unofficial-galaxy-sdk-C_siawBx.js",revision:null},{url:"assets/vue-GVBARt8q.js",revision:null},{url:"assets/vue-next-select-CgtHQcl0.js",revision:null},{url:"assets/vue-next-select-DdLJwKAl.css",revision:null},{url:"assets/vue-textarea-autosize-DLc4kbjP.js",revision:null},{url:"assets/vue-toastification-C2Rkk2Fc.css",revision:null},{url:"assets/vue-toastification-CjoTmBGg.js",revision:null},{url:"assets/vuedraggable-BgvaSe-I.js",revision:null},{url:"assets/workbox-window-D5gOYdM7.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"f481b6aa88dd267cf2558fad46028dd5"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const i=(i,n)=>(i=new URL(i+".js",n).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=(n,l)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const u=s=>i(s,r),t={module:{uri:r},exports:o,require:u};e[r]=Promise.all(n.map((s=>t[s]||u(s)))).then((s=>(l(...s),o)))}}define(["./workbox-3e911b1d"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource-eKXrrvg3.css",revision:null},{url:"assets/@vue-CCfogNd1.js",revision:null},{url:"assets/index-Dn8XcuKS.css",revision:null},{url:"assets/index-DxM-pCoC.js",revision:null},{url:"assets/lz-string-BZNGtwso.js",revision:null},{url:"assets/nanoevents-BxCKNB1V.js",revision:null},{url:"assets/sortablejs-BZuNQ3iR.js",revision:null},{url:"assets/unofficial-galaxy-sdk-C_siawBx.js",revision:null},{url:"assets/vue-GVBARt8q.js",revision:null},{url:"assets/vue-next-select-CgtHQcl0.js",revision:null},{url:"assets/vue-next-select-DdLJwKAl.css",revision:null},{url:"assets/vue-textarea-autosize-DLc4kbjP.js",revision:null},{url:"assets/vue-toastification-C2Rkk2Fc.css",revision:null},{url:"assets/vue-toastification-CjoTmBGg.js",revision:null},{url:"assets/vuedraggable-BgvaSe-I.js",revision:null},{url:"assets/workbox-window-D5gOYdM7.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"4484bf6a654bf89a188288f95f8835af"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));