Profectus-Niffix/js/app.0ae1f71d.js

2 lines
No EOL
186 KiB
JavaScript

(function(){var e={1037:function(e,o,t){"use strict";t.d(o,{b:function(){return r}});const l={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#eee","--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"},stackedInfoboxes:!1,floatingTabs:!0,showSingleTab:!1,mergeAdjacent:!0};var r;(function(e){e["Classic"]="classic",e["Paper"]="paper",e["Nordic"]="nordic",e["Aqua"]="aqua"})(r||(r={})),o["Z"]={classic:l,paper:{...l,variables:{...l.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},stackedInfoboxes:!0,floatingTabs:!1},nordic:{...l,variables:{...l.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"},stackedInfoboxes:!0,floatingTabs:!1},aqua:{...l,variables:{...l.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}}},6113:function(e,o,t){"use strict";t.d(o,{wA:function(){return r},tj:function(){return i},QI:function(){return a},EE:function(){return s},tZ:function(){return m},Rh:function(){return u}});t(9706);var l=t(9583);t(4865);const r=Symbol("Component"),i=Symbol("GatherProps");let n=0;function a(e="feature-"){return(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](n++):e+n++)()}var s;function m(e){return e[l.mM]=!0,e}function u(e,o,t){void 0===e[o]&&(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e[o]=t)}(function(e){e[e["Visible"]=0]="Visible",e[e["Hidden"]=1]="Hidden",e[e["None"]=2]="None"})(s||(s={}))},630:function(e,o,t){"use strict";t.d(o,{Z:function(){return l},w:function(){return r}});const l=Symbol("RegisterLinkNode"),r=Symbol("UnregisterLinkNode")},7302:function(e,o,t){"use strict";t.r(o),t.d(o,{globalBus:function(){return m},startGameLoop:function(){return c}});var l=t(2345),r=t(9706),i=t(8111),n=t(5967),a=t(9266),s=t(3032);const m=(0,i.i)();let u=null,f=null;function y(){const e=Date.now();let o=(()=>e-n.Z.time!==void 0&&e-n.Z.time!==null&&(e-n.Z.time)[Symbol.for("/")]?(e-n.Z.time)[Symbol.for("/")](1e3):(e-n.Z.time)/1e3)();n.Z.time=e;const t=o;if(s.Z.lastTenTicks.push(t),(()=>void 0!==s.Z.lastTenTicks.length&&null!==s.Z.lastTenTicks.length&&s.Z.lastTenTicks.length[Symbol.for(">")]?s.Z.lastTenTicks.length[Symbol.for(">")](10):s.Z.lastTenTicks.length>10)()&&(s.Z.lastTenTicks=s.Z.lastTenTicks.slice(1)),(!f?.value||!(()=>void 0!==n.Z.keepGoing&&null!==n.Z.keepGoing&&n.Z.keepGoing[Symbol.for("!")]?n.Z.keepGoing[Symbol.for("!")]():!n.Z.keepGoing)())&&!s.Z.hasNaN&&(o=new r.ZP(o).max(0),0!==n.Z.devSpeed)){if((()=>void 0!==n.Z.offlineTime&&null!==n.Z.offlineTime&&n.Z.offlineTime[Symbol.for("!=")]?n.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=n.Z.offlineTime)()){if(r.ZP.gt(n.Z.offlineTime,(()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)())&&(n.Z.offlineTime=new r.ZP((()=>void 0!==l.offlineLimit&&null!==l.offlineLimit&&l.offlineLimit[Symbol.for("*")]?l.offlineLimit[Symbol.for("*")](3600):3600*l.offlineLimit)())),r.ZP.gt(n.Z.offlineTime,0)&&(()=>void 0!==n.Z.devSpeed&&null!==n.Z.devSpeed&&n.Z.devSpeed[Symbol.for("!==")]?n.Z.devSpeed[Symbol.for("!==")](0):0!==n.Z.devSpeed)()){const e=r.ZP.div(n.Z.offlineTime,10).max(o);n.Z.offlineTime=r.ZP.sub(n.Z.offlineTime,e),o=o.add(e)}else 0===n.Z.devSpeed&&(n.Z.offlineTime=r.ZP.add(n.Z.offlineTime,o));((()=>void 0!==n.Z.offlineProd&&null!==n.Z.offlineProd&&n.Z.offlineProd[Symbol.for("!")]?n.Z.offlineProd[Symbol.for("!")]():!n.Z.offlineProd)()||r.ZP.lt(n.Z.offlineTime,0))&&(n.Z.offlineTime=null)}o=r.ZP.min(o,l.maxTickLength),(()=>void 0!==n.Z.devSpeed&&null!==n.Z.devSpeed&&n.Z.devSpeed[Symbol.for("!=")]?n.Z.devSpeed[Symbol.for("!=")](void 0):void 0!=n.Z.devSpeed)()&&(o=o.times(n.Z.devSpeed)),o.eq(0)||(n.Z.timePlayed=r.ZP.add(n.Z.timePlayed,o),m.emit("update",o,t),a.ZP.unthrottled?(requestAnimationFrame(y),(()=>void 0!==u&&null!==u&&u[Symbol.for("!=")]?u[Symbol.for("!=")](null):null!=u)()&&(clearInterval(u),u=null)):(()=>void 0!==u&&null!==u&&u[Symbol.for("==")]?u[Symbol.for("==")](null):null==u)()&&(u=setInterval(y,50)))}}async function c(){f=(await Promise.resolve().then(t.bind(t,8097))).hasWon,a.ZP.unthrottled?requestAnimationFrame(y):u=setInterval(y,50)}},4061:function(e,o,t){"use strict";t.d(o,{ax:function(){return u}});var l=t(7302),r=t(9706),i=t(3273),n=t(3577),a=t(4865);const s=Symbol("PersistentState"),m=Symbol("DefaultValue");function u(e){const o=(0,a.isRef)(e)?e:(0,a.ref)(e);return o[s]=o,o[m]=(0,a.isRef)(e)?e.value:e,o}l.globalBus.on("addLayer",((e,o)=>{const t=[],l=(e,u=[])=>{let f=!1;return Object.keys(e).forEach((y=>{const c=e[y];if(c&&"object"===typeof c)if((()=>void 0!==s&&null!==s&&s[Symbol.for("in")]?s[Symbol.for("in")](c):s in c)()){f=!0;const e=u.reduce(((e,o)=>((()=>o in e!==void 0&&o in e!==null&&(o in e)[Symbol.for("!")]?(o in e)[Symbol.for("!")]():!(o in e))()&&(e[o]={}),e[o])),o),t=e[y];e[y]=c[s],(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](null):null!=t)()?e[y].value=t:e[y].value=c[m]}else if((()=>c instanceof r.ZP!==void 0&&c instanceof r.ZP!==null&&(c instanceof r.ZP)[Symbol.for("!")]?(c instanceof r.ZP)[Symbol.for("!")]():!(c instanceof r.ZP))()&&(()=>void 0!==(0,a.isRef)(c)&&null!==(0,a.isRef)(c)&&(0,a.isRef)(c)[Symbol.for("!")]?(0,a.isRef)(c)[Symbol.for("!")]():!(0,a.isRef)(c))()&&(()=>void 0!==t.includes(c)&&null!==t.includes(c)&&t.includes(c)[Symbol.for("!")]?t.includes(c)[Symbol.for("!")]():!t.includes(c))()){"symbol"===typeof c.type&&t.push(c);const o=l(c,[...u,y]);o&&((0,n.kJ)(c)&&(()=>void 0!==(0,n.kJ)(e)&&null!==(0,n.kJ)(e)&&(0,n.kJ)(e)[Symbol.for("!")]?(0,n.kJ)(e)[Symbol.for("!")]():!(0,n.kJ)(e))()?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.",(()=>void 0!==i.Le&&null!==i.Le&&i.Le[Symbol.for("in")]?i.Le[Symbol.for("in")](e):i.Le in e)()?e[i.Le]:e,y):f=!0)}})),f};l(e)}))},5967:function(e,o,t){"use strict";t.d(o,{U:function(){return m}});var l=t(9706),r=t(1349),i=t(3273),n=t(4865),a=t(3032);const s=(0,n.reactive)({id:"",devSpeed:null,name:"",tabs:[],time:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:new l.ZP(0),keepGoing:!1,modID:"",modVersion:"",layers:{}});function m(e){return JSON.stringify(e,((e,o)=>(0,n.unref)(o)))}const u={get(e,o){if(o===i.Le||o===i.c4)return e[o];const t=e[i.Le][o];if((()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")]("value"):"value"!==o)()&&(0,r.PO)(t)&&(()=>t instanceof l.ZP!==void 0&&t instanceof l.ZP!==null&&(t instanceof l.ZP)[Symbol.for("!")]?(t instanceof l.ZP)[Symbol.for("!")]():!(t instanceof l.ZP))()){if((()=>void 0!==t&&null!==t&&t[Symbol.for("!==")]?t[Symbol.for("!==")](e[o]?.[i.Le]):t!==e[o]?.[i.Le])()){const l=[...e[i.c4],o];e[o]=new Proxy({[i.Le]:t,[i.c4]:l},u)}return e[o]}return t},set(e,o,t,r){if((()=>void 0!==a.Z.hasNaN&&null!==a.Z.hasNaN&&a.Z.hasNaN[Symbol.for("!")]?a.Z.hasNaN[Symbol.for("!")]():!a.Z.hasNaN)()&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))){const t=e[i.Le][o];if((()=>void 0!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&null!==("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))&&("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]?("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag)))[Symbol.for("!")]():!("number"===typeof t&&isNaN(t)||t instanceof l.ZP&&(isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag))))())throw s.autosave=!1,a.Z.hasNaN=!0,a.Z.NaNPath=[...e[i.c4],o],a.Z.NaNReceiver=r,console.error("Attempted to set NaN value",[...e[i.c4],o],e[i.Le]),"Attempted to set NaN value. See above for details"}return e[i.Le][o]=t,!0},ownKeys(e){return Reflect.ownKeys(e[i.Le])},has(e,o){return Reflect.has(e[i.Le],o)},getOwnPropertyDescriptor(e,o){return Object.getOwnPropertyDescriptor(e[i.Le],o)}};o["Z"]=window.player=new Proxy({[i.Le]:s,[i.c4]:["player"]},u)},9266:function(e,o,t){"use strict";t.d(o,{ri:function(){return m},V$:function(){return u}});var l=t(2345),r=t(1037),i=t(7302),n=t(463),a=t(4865);const s=(0,a.reactive)({active:"",saves:[],showTPS:!0,theme:r.b.Nordic,unthrottled:!1});function m(){try{const e=localStorage.getItem(l.id);if((()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](""):""!==e)()){const o=JSON.parse(decodeURIComponent(escape(atob(e))));"object"===typeof o&&Object.assign(s,o)}i.globalBus.emit("loadSettings",s)}catch{}}(0,a.watch)(s,(e=>localStorage.setItem(l.id,btoa(unescape(encodeURIComponent(JSON.stringify(e)))))),{deep:!0}),o["ZP"]=window.settings=s;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:r.b.Nordic};i.globalBus.emit("loadSettings",e),Object.assign(s,e),(0,n.y6)()};const u=(0,a.reactive)([])},3032:function(e,o,t){"use strict";var l=t(4865);o["Z"]=window.state=(0,l.shallowReactive)({lastTenTicks:[],hasNaN:!1,NaNPath:[]})},1008:function(e,o,t){"use strict";t.d(o,{Z:function(){return O}});var l=t(2482);t(1703);let r,i,n,a,s,m,u,f,y,c,d;const b=17,h=9e15,S=Math.log10(9e15),g=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](9e15):1/9e15)(),v=308,p=(()=>324[Symbol.for("minus")]?324[Symbol.for("minus")]():-324)(),N=5,k=!0,M=!1,V=function(){const e=[];for(let t=(()=>void 0!==p&&null!==p&&p[Symbol.for("+")]?p[Symbol.for("+")](1):p+1)();(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](v):t<=v)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("postfix-increment")]?t[Symbol.for("postfix-increment")]():t++)())e.push(Number((()=>"1e"[Symbol.for("+")]?"1e"[Symbol.for("+")](t):"1e"+t)()));const o=323;return function(t){return e[(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](o):t+o)()]}}(),w=[2,Math.E,3,4,5,6,7,8,9,10],Z=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.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.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],x=[[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9194161097107025[Symbol.for("minus")]?.9194161097107025[Symbol.for("minus")]():-.9194161097107025)(),(()=>.8335625019330468[Symbol.for("minus")]?.8335625019330468[Symbol.for("minus")]():-.8335625019330468)(),(()=>.7425599821143978[Symbol.for("minus")]?.7425599821143978[Symbol.for("minus")]():-.7425599821143978)(),(()=>.6466611521029437[Symbol.for("minus")]?.6466611521029437[Symbol.for("minus")]():-.6466611521029437)(),(()=>.5462617907227869[Symbol.for("minus")]?.5462617907227869[Symbol.for("minus")]():-.5462617907227869)(),(()=>.4419033816638769[Symbol.for("minus")]?.4419033816638769[Symbol.for("minus")]():-.4419033816638769)(),(()=>.3342645487554494[Symbol.for("minus")]?.3342645487554494[Symbol.for("minus")]():-.3342645487554494)(),(()=>.224140440909962[Symbol.for("minus")]?.224140440909962[Symbol.for("minus")]():-.224140440909962)(),(()=>.11241087890006762[Symbol.for("minus")]?.11241087890006762[Symbol.for("minus")]():-.11241087890006762)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.90603157029014[Symbol.for("minus")]?.90603157029014[Symbol.for("minus")]():-.90603157029014)(),(()=>.80786507256596[Symbol.for("minus")]?.80786507256596[Symbol.for("minus")]():-.80786507256596)(),(()=>.7064666939634[Symbol.for("minus")]?.7064666939634[Symbol.for("minus")]():-.7064666939634)(),(()=>.60294836853664[Symbol.for("minus")]?.60294836853664[Symbol.for("minus")]():-.60294836853664)(),(()=>.49849837513117[Symbol.for("minus")]?.49849837513117[Symbol.for("minus")]():-.49849837513117)(),(()=>.39430303318768[Symbol.for("minus")]?.39430303318768[Symbol.for("minus")]():-.39430303318768)(),(()=>.29147201034755[Symbol.for("minus")]?.29147201034755[Symbol.for("minus")]():-.29147201034755)(),(()=>.19097820800866[Symbol.for("minus")]?.19097820800866[Symbol.for("minus")]():-.19097820800866)(),(()=>.09361896280296[Symbol.for("minus")]?.09361896280296[Symbol.for("minus")]():-.09361896280296)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.9021579584316141[Symbol.for("minus")]?.9021579584316141[Symbol.for("minus")]():-.9021579584316141)(),(()=>.8005762598234203[Symbol.for("minus")]?.8005762598234203[Symbol.for("minus")]():-.8005762598234203)(),(()=>.6964780623319391[Symbol.for("minus")]?.6964780623319391[Symbol.for("minus")]():-.6964780623319391)(),(()=>.5911906810998454[Symbol.for("minus")]?.5911906810998454[Symbol.for("minus")]():-.5911906810998454)(),(()=>.486050182576545[Symbol.for("minus")]?.486050182576545[Symbol.for("minus")]():-.486050182576545)(),(()=>.3823089430815083[Symbol.for("minus")]?.3823089430815083[Symbol.for("minus")]():-.3823089430815083)(),(()=>.28106046722897615[Symbol.for("minus")]?.28106046722897615[Symbol.for("minus")]():-.28106046722897615)(),(()=>.1831906535795894[Symbol.for("minus")]?.1831906535795894[Symbol.for("minus")]():-.1831906535795894)(),(()=>.08935809204418144[Symbol.for("minus")]?.08935809204418144[Symbol.for("minus")]():-.08935809204418144)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8917227442365535[Symbol.for("minus")]?.8917227442365535[Symbol.for("minus")]():-.8917227442365535)(),(()=>.781258746326964[Symbol.for("minus")]?.781258746326964[Symbol.for("minus")]():-.781258746326964)(),(()=>.6705130326902455[Symbol.for("minus")]?.6705130326902455[Symbol.for("minus")]():-.6705130326902455)(),(()=>.5612813129406509[Symbol.for("minus")]?.5612813129406509[Symbol.for("minus")]():-.5612813129406509)(),(()=>.4551067709033134[Symbol.for("minus")]?.4551067709033134[Symbol.for("minus")]():-.4551067709033134)(),(()=>.35319256652135966[Symbol.for("minus")]?.35319256652135966[Symbol.for("minus")]():-.35319256652135966)(),(()=>.2563741554088552[Symbol.for("minus")]?.2563741554088552[Symbol.for("minus")]():-.2563741554088552)(),(()=>.1651412821106526[Symbol.for("minus")]?.1651412821106526[Symbol.for("minus")]():-.1651412821106526)(),(()=>.0796919581982668[Symbol.for("minus")]?.0796919581982668[Symbol.for("minus")]():-.0796919581982668)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8843387974366064[Symbol.for("minus")]?.8843387974366064[Symbol.for("minus")]():-.8843387974366064)(),(()=>.7678744063886243[Symbol.for("minus")]?.7678744063886243[Symbol.for("minus")]():-.7678744063886243)(),(()=>.6529563724510552[Symbol.for("minus")]?.6529563724510552[Symbol.for("minus")]():-.6529563724510552)(),(()=>.5415870994657841[Symbol.for("minus")]?.5415870994657841[Symbol.for("minus")]():-.5415870994657841)(),(()=>.4352842206588936[Symbol.for("minus")]?.4352842206588936[Symbol.for("minus")]():-.4352842206588936)(),(()=>.33504449124791424[Symbol.for("minus")]?.33504449124791424[Symbol.for("minus")]():-.33504449124791424)(),(()=>.24138853420685147[Symbol.for("minus")]?.24138853420685147[Symbol.for("minus")]():-.24138853420685147)(),(()=>.15445285440944467[Symbol.for("minus")]?.15445285440944467[Symbol.for("minus")]():-.15445285440944467)(),(()=>.07409659641336663[Symbol.for("minus")]?.07409659641336663[Symbol.for("minus")]():-.07409659641336663)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8786709358426346[Symbol.for("minus")]?.8786709358426346[Symbol.for("minus")]():-.8786709358426346)(),(()=>.7577735191184886[Symbol.for("minus")]?.7577735191184886[Symbol.for("minus")]():-.7577735191184886)(),(()=>.6399546189952064[Symbol.for("minus")]?.6399546189952064[Symbol.for("minus")]():-.6399546189952064)(),(()=>.527284921869926[Symbol.for("minus")]?.527284921869926[Symbol.for("minus")]():-.527284921869926)(),(()=>.4211627631006314[Symbol.for("minus")]?.4211627631006314[Symbol.for("minus")]():-.4211627631006314)(),(()=>.3223479611761232[Symbol.for("minus")]?.3223479611761232[Symbol.for("minus")]():-.3223479611761232)(),(()=>.23107655627789858[Symbol.for("minus")]?.23107655627789858[Symbol.for("minus")]():-.23107655627789858)(),(()=>.1472057700818259[Symbol.for("minus")]?.1472057700818259[Symbol.for("minus")]():-.1472057700818259)(),(()=>.07035171210706326[Symbol.for("minus")]?.07035171210706326[Symbol.for("minus")]():-.07035171210706326)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8740862815291583[Symbol.for("minus")]?.8740862815291583[Symbol.for("minus")]():-.8740862815291583)(),(()=>.7497032990976209[Symbol.for("minus")]?.7497032990976209[Symbol.for("minus")]():-.7497032990976209)(),(()=>.6297119746181752[Symbol.for("minus")]?.6297119746181752[Symbol.for("minus")]():-.6297119746181752)(),(()=>.5161838335958787[Symbol.for("minus")]?.5161838335958787[Symbol.for("minus")]():-.5161838335958787)(),(()=>.41036238255751956[Symbol.for("minus")]?.41036238255751956[Symbol.for("minus")]():-.41036238255751956)(),(()=>.31277212146489963[Symbol.for("minus")]?.31277212146489963[Symbol.for("minus")]():-.31277212146489963)(),(()=>.2233976621705518[Symbol.for("minus")]?.2233976621705518[Symbol.for("minus")]():-.2233976621705518)(),(()=>.1418697367979619[Symbol.for("minus")]?.1418697367979619[Symbol.for("minus")]():-.1418697367979619)(),(()=>.06762117662323441[Symbol.for("minus")]?.06762117662323441[Symbol.for("minus")]():-.06762117662323441)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8702632331800649[Symbol.for("minus")]?.8702632331800649[Symbol.for("minus")]():-.8702632331800649)(),(()=>.7430366914122081[Symbol.for("minus")]?.7430366914122081[Symbol.for("minus")]():-.7430366914122081)(),(()=>.6213373075161548[Symbol.for("minus")]?.6213373075161548[Symbol.for("minus")]():-.6213373075161548)(),(()=>.5072025698095242[Symbol.for("minus")]?.5072025698095242[Symbol.for("minus")]():-.5072025698095242)(),(()=>.40171437727184167[Symbol.for("minus")]?.40171437727184167[Symbol.for("minus")]():-.40171437727184167)(),(()=>.30517930701410456[Symbol.for("minus")]?.30517930701410456[Symbol.for("minus")]():-.30517930701410456)(),(()=>.21736343968190863[Symbol.for("minus")]?.21736343968190863[Symbol.for("minus")]():-.21736343968190863)(),(()=>.137710238299109[Symbol.for("minus")]?.137710238299109[Symbol.for("minus")]():-.137710238299109)(),(()=>.06550774483471955[Symbol.for("minus")]?.06550774483471955[Symbol.for("minus")]():-.06550774483471955)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8670016295947213[Symbol.for("minus")]?.8670016295947213[Symbol.for("minus")]():-.8670016295947213)(),(()=>.7373984232432306[Symbol.for("minus")]?.7373984232432306[Symbol.for("minus")]():-.7373984232432306)(),(()=>.6143173985094293[Symbol.for("minus")]?.6143173985094293[Symbol.for("minus")]():-.6143173985094293)(),(()=>.49973884395492807[Symbol.for("minus")]?.49973884395492807[Symbol.for("minus")]():-.49973884395492807)(),(()=>.394584953527678[Symbol.for("minus")]?.394584953527678[Symbol.for("minus")]():-.394584953527678)(),(()=>.2989649949848695[Symbol.for("minus")]?.2989649949848695[Symbol.for("minus")]():-.2989649949848695)(),(()=>.21245647317021688[Symbol.for("minus")]?.21245647317021688[Symbol.for("minus")]():-.21245647317021688)(),(()=>.13434688362382652[Symbol.for("minus")]?.13434688362382652[Symbol.for("minus")]():-.13434688362382652)(),(()=>.0638072667348083[Symbol.for("minus")]?.0638072667348083[Symbol.for("minus")]():-.0638072667348083)(),0],[(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),(()=>.8641642839543857[Symbol.for("minus")]?.8641642839543857[Symbol.for("minus")]():-.8641642839543857)(),(()=>.732534623168535[Symbol.for("minus")]?.732534623168535[Symbol.for("minus")]():-.732534623168535)(),(()=>.6083127477059322[Symbol.for("minus")]?.6083127477059322[Symbol.for("minus")]():-.6083127477059322)(),(()=>.4934049257184696[Symbol.for("minus")]?.4934049257184696[Symbol.for("minus")]():-.4934049257184696)(),(()=>.3885773075899922[Symbol.for("minus")]?.3885773075899922[Symbol.for("minus")]():-.3885773075899922)(),(()=>.29376029055315767[Symbol.for("minus")]?.29376029055315767[Symbol.for("minus")]():-.29376029055315767)(),(()=>.2083678561173622[Symbol.for("minus")]?.2083678561173622[Symbol.for("minus")]():-.2083678561173622)(),(()=>.13155653399373268[Symbol.for("minus")]?.13155653399373268[Symbol.for("minus")]():-.13155653399373268)(),(()=>.062401588652553186[Symbol.for("minus")]?.062401588652553186[Symbol.for("minus")]():-.062401588652553186)(),0]],C=function(e){return O.fromValue_noAlloc(e)},E=function(e,o,t){return O.fromComponents(e,o,t)},B=function(e,o,t){return O.fromComponents_noNormalize(e,o,t)},I=function(e,o){const t=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),l=Math.ceil(Math.log10(Math.abs(e))),r=(()=>void 0!==Math.round(e*Math.pow(10,t-l))&&null!==Math.round(e*Math.pow(10,t-l))&&Math.round(e*Math.pow(10,t-l))[Symbol.for("*")]?Math.round(e*Math.pow(10,t-l))[Symbol.for("*")](Math.pow(10,l-t)):Math.round(e*Math.pow(10,t-l))*Math.pow(10,l-t))();return parseFloat(r.toFixed(Math.max((()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](l):t-l)(),0)))},P=function(e){return(()=>void 0!==Math.sign(e)&&null!==Math.sign(e)&&Math.sign(e)[Symbol.for("*")]?Math.sign(e)[Symbol.for("*")](Math.log10(Math.abs(e))):Math.sign(e)*Math.log10(Math.abs(e)))()},F=function(e){if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))())return e;if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](-50):e<-50)())return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let o=1;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)())o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](e):o*e)(),(()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})();e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)();let t=.9189385332046727;t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")]((e+.5)*Math.log(e)):t+(e+.5)*Math.log(e))(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();const l=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let r=e;return t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(12*r)):t+1/(12*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(360*r)):t+1/(360*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1260*r)):t+1/(1260*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1680*r)):t+1/(1680*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](1/(1188*r)):t+1/(1188*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](691/(360360*r)):t+691/(360360*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](7/(1092*r)):t+7/(1092*r))(),r=(()=>void 0!==r&&null!==r&&r[Symbol.for("*")]?r[Symbol.for("*")](l):r*l)(),t=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](3617/(122400*r)):t+3617/(122400*r))(),(()=>void 0!==Math.exp(t)&&null!==Math.exp(t)&&Math.exp(t)[Symbol.for("/")]?Math.exp(t)[Symbol.for("/")](o):Math.exp(t)/o)()},T=.5671432904097838,D=function(e,o=1e-10){let t,l;if((()=>void 0!==Number.isFinite(e)&&null!==Number.isFinite(e)&&Number.isFinite(e)[Symbol.for("!")]?Number.isFinite(e)[Symbol.for("!")]():!Number.isFinite(e))())return e;if(0===e)return e;if(1===e)return T;t=(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](10):e<10)()?0:(()=>void 0!==Math.log(e)&&null!==Math.log(e)&&Math.log(e)[Symbol.for("-")]?Math.log(e)[Symbol.for("-")](Math.log(Math.log(e))):Math.log(e)-Math.log(Math.log(e)))();for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](100):r<100)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(l=(()=>e*Math.exp(-t)+t*t!==void 0&&e*Math.exp(-t)+t*t!==null&&(e*Math.exp(-t)+t*t)[Symbol.for("/")]?(e*Math.exp(-t)+t*t)[Symbol.for("/")](t+1):(e*Math.exp(-t)+t*t)/(t+1))(),(()=>void 0!==Math.abs(l-t)&&null!==Math.abs(l-t)&&Math.abs(l-t)[Symbol.for("<")]?Math.abs(l-t)[Symbol.for("<")](o*Math.abs(l)):Math.abs(l-t)<o*Math.abs(l))())return l;t=l}throw Error(`Iteration failed to converge: ${e.toString()}`)};function _(e,o=1e-10){let t,l,r,i;if((()=>void 0!==Number.isFinite(e.mag)&&null!==Number.isFinite(e.mag)&&Number.isFinite(e.mag)[Symbol.for("!")]?Number.isFinite(e.mag)[Symbol.for("!")]():!Number.isFinite(e.mag))())return e;if(e===O.dZero)return e;if(e===O.dOne)return C(T);O.abs(e);t=O.ln(e);for(let n=0;(()=>void 0!==n&&null!==n&&n[Symbol.for("<")]?n[Symbol.for("<")](100):n<100)();(()=>void 0!==n&&null!==n&&"object"===typeof n&&n[Symbol.for("prefix-increment")]?n[Symbol.for("prefix-increment")]():++n)()){if(l=O.exp((()=>void 0!==t&&null!==t&&t[Symbol.for("minus")]?t[Symbol.for("minus")]():-t)()),r=t.sub(e.mul(l)),i=t.sub(r.div(t.add(1).sub(t.add(2).mul(r).div(O.mul(2,t).add(2))))),O.abs(i.sub(t)).lt(O.abs(i).mul(o)))return i;t=i}throw Error(`Iteration failed to converge: ${e.toString()}`)}r=Symbol.for("+"),i=Symbol.for("-"),n=Symbol.for("*"),a=Symbol.for("/"),s=Symbol.for("minus"),m=Symbol.for("=="),u=Symbol.for(">"),f=Symbol.for("<"),y=Symbol.for(">="),c=Symbol.for("<="),d=Symbol.for("!=");class O{constructor(e){(0,l.Z)(this,"sign",Number.NaN),(0,l.Z)(this,"mag",Number.NaN),(0,l.Z)(this,"layer",Number.NaN),e instanceof O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(0===this.sign)return 0;if(0===this.layer){const e=Math.floor(Math.log10(this.mag));let o;return o=5e-324===this.mag?5:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("/")]?this.mag[Symbol.for("/")](V(e)):this.mag/V(e))(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o):this.sign*o)()}if(1===this.layer){const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](Math.floor(this.mag)):this.mag-Math.floor(this.mag))();return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,e)):this.sign*Math.pow(10,e))()}return this.sign}set m(e){(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](2):this.layer<=2)()?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),0===this.sign&&(this.layer,this.exponent))}get e(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor((()=>void 0!==Math.sign(this.mag)&&null!==Math.sign(this.mag)&&Math.sign(this.mag)[Symbol.for("*")]?Math.sign(this.mag)[Symbol.for("*")](Math.pow(10,Math.abs(this.mag))):Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag)))()):(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("*")]?this.mag[Symbol.for("*")](Number.POSITIVE_INFINITY):this.mag*Number.POSITIVE_INFINITY)()}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){0===e?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,o,t){return(new O).fromComponents(e,o,t)}static fromComponents_noNormalize(e,o,t){return(new O).fromComponents_noNormalize(e,o,t)}static fromMantissaExponent(e,o){return(new O).fromMantissaExponent(e,o)}static fromMantissaExponent_noNormalize(e,o){return(new O).fromMantissaExponent_noNormalize(e,o)}static fromDecimal(e){return(new O).fromDecimal(e)}static fromNumber(e){return(new O).fromNumber(e)}static fromString(e){return(new O).fromString(e)}static fromValue(e){return(new O).fromValue(e)}static fromValue_noAlloc(e){return e instanceof O?e:new O(e)}static abs(e){return C(e).abs()}static neg(e){return C(e).neg()}static negate(e){return C(e).neg()}static negated(e){return C(e).neg()}static sign(e){return C(e).sign}static sgn(e){return C(e).sign}static round(e){return C(e).round()}static floor(e){return C(e).floor()}static ceil(e){return C(e).ceil()}static trunc(e){return C(e).trunc()}static add(e,o){return C(e).add(o)}static plus(e,o){return C(e).add(o)}static sub(e,o){return C(e).sub(o)}static subtract(e,o){return C(e).sub(o)}static minus(e,o){return C(e).sub(o)}static mul(e,o){return C(e).mul(o)}static multiply(e,o){return C(e).mul(o)}static times(e,o){return C(e).mul(o)}static div(e,o){return C(e).div(o)}static divide(e,o){return C(e).div(o)}static recip(e){return C(e).recip()}static reciprocal(e){return C(e).recip()}static reciprocate(e){return C(e).reciprocate()}static cmp(e,o){return C(e).cmp(o)}static cmpabs(e,o){return C(e).cmpabs(o)}static compare(e,o){return C(e).cmp(o)}static isNaN(e){return e=C(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=C(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,o){return C(e).eq(o)}static equals(e,o){return C(e).eq(o)}static neq(e,o){return C(e).neq(o)}static notEquals(e,o){return C(e).notEquals(o)}static lt(e,o){return C(e).lt(o)}static lte(e,o){return C(e).lte(o)}static gt(e,o){return C(e).gt(o)}static gte(e,o){return C(e).gte(o)}static max(e,o){return C(e).max(o)}static min(e,o){return C(e).min(o)}static minabs(e,o){return C(e).minabs(o)}static maxabs(e,o){return C(e).maxabs(o)}static clamp(e,o,t){return C(e).clamp(o,t)}static clampMin(e,o){return C(e).clampMin(o)}static clampMax(e,o){return C(e).clampMax(o)}static cmp_tolerance(e,o,t){return C(e).cmp_tolerance(o,t)}static compare_tolerance(e,o,t){return C(e).cmp_tolerance(o,t)}static eq_tolerance(e,o,t){return C(e).eq_tolerance(o,t)}static equals_tolerance(e,o,t){return C(e).eq_tolerance(o,t)}static neq_tolerance(e,o,t){return C(e).neq_tolerance(o,t)}static notEquals_tolerance(e,o,t){return C(e).notEquals_tolerance(o,t)}static lt_tolerance(e,o,t){return C(e).lt_tolerance(o,t)}static lte_tolerance(e,o,t){return C(e).lte_tolerance(o,t)}static gt_tolerance(e,o,t){return C(e).gt_tolerance(o,t)}static gte_tolerance(e,o,t){return C(e).gte_tolerance(o,t)}static pLog10(e){return C(e).pLog10()}static absLog10(e){return C(e).absLog10()}static log10(e){return C(e).log10()}static log(e,o){return C(e).log(o)}static log2(e){return C(e).log2()}static ln(e){return C(e).ln()}static logarithm(e,o){return C(e).logarithm(o)}static pow(e,o){return C(e).pow(o)}static pow10(e){return C(e).pow10()}static root(e,o){return C(e).root(o)}static factorial(e,o){return C(e).factorial()}static gamma(e,o){return C(e).gamma()}static lngamma(e,o){return C(e).lngamma()}static exp(e){return C(e).exp()}static sqr(e){return C(e).sqr()}static sqrt(e){return C(e).sqrt()}static cube(e){return C(e).cube()}static cbrt(e){return C(e).cbrt()}static tetrate(e,o=2,t=B(1,0,1)){return C(e).tetrate(o,t)}static iteratedexp(e,o=2,t=B(1,0,1)){return C(e).iteratedexp(o,t)}static iteratedlog(e,o=10,t=1){return C(e).iteratedlog(o,t)}static layeradd10(e,o){return C(e).layeradd10(o)}static layeradd(e,o,t=10){return C(e).layeradd(o,t)}static slog(e,o=10){return C(e).slog(o)}static lambertw(e){return C(e).lambertw()}static ssqrt(e){return C(e).ssqrt()}static pentate(e,o=2,t=B(1,0,1)){return C(e).pentate(o,t)}static affordGeometricSeries(e,o,t,l){return this.affordGeometricSeries_core(C(e),C(o),C(t),l)}static sumGeometricSeries(e,o,t,l){return this.sumGeometricSeries_core(e,C(o),C(t),l)}static affordArithmeticSeries(e,o,t,l){return this.affordArithmeticSeries_core(C(e),C(o),C(t),C(l))}static sumArithmeticSeries(e,o,t,l){return this.sumArithmeticSeries_core(C(e),C(o),C(t),C(l))}static efficiencyOfPurchase(e,o,t){return this.efficiencyOfPurchase_core(C(e),C(o),C(t))}static randomDecimalForTesting(e){if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return B(0,0,0);const o=(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.5):Math.random()>.5)()?1:(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();if((()=>20*Math.random()!==void 0&&20*Math.random()!==null&&(20*Math.random())[Symbol.for("<")]?(20*Math.random())[Symbol.for("<")](1):20*Math.random()<1)())return B(o,0,1);const t=Math.floor((()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](e+1):Math.random()*(e+1))());let l=0===t?(()=>616*Math.random()!==void 0&&616*Math.random()!==null&&(616*Math.random())[Symbol.for("-")]?(616*Math.random())[Symbol.for("-")](308):616*Math.random()-308)():(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for("*")]?Math.random()[Symbol.for("*")](16):16*Math.random())();(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(l=Math.trunc(l));let r=Math.pow(10,l);return(()=>void 0!==Math.random()&&null!==Math.random()&&Math.random()[Symbol.for(">")]?Math.random()[Symbol.for(">")](.9):Math.random()>.9)()&&(r=Math.trunc(r)),E(o,t,r)}static affordGeometricSeries_core(e,o,t,l){const r=o.mul(t.pow(l));return O.floor(e.div(r).mul(t.sub(1)).add(1).log10().div(t.log10()))}static sumGeometricSeries_core(e,o,t,l){return o.mul(t.pow(l)).mul(O.sub(1,t.pow(e))).div(O.sub(1,t))}static affordArithmeticSeries_core(e,o,t,l){const r=o.add(l.mul(t)),i=r.sub(t.div(2)),n=i.pow(2);return i.neg().add(n.add(t.mul(e).mul(2)).sqrt()).div(t).floor()}static sumArithmeticSeries_core(e,o,t,l){const r=o.add(l.mul(t));return e.div(2).mul(r.mul(2).plus(e.sub(1).mul(t)))}static efficiencyOfPurchase_core(e,o,t){return e.div(o).add(e.div(t))}[r](e){return this.add(e)}[i](e){return this.sub(e)}[n](e){return this.times(e)}[a](e){return this.div(e)}[s](){return this.neg()}[m](e){return this.eq(e)}[u](e){return this.gt(e)}[f](e){return this.lt(e)}[y](e){return this.gte(e)}[c](e){return this.lte(e)}[d](e){return this.neq(e)}normalize(){if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()&&(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()),0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](g):this.mag<g)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),o=Math.sign(this.mag);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](h):e>=h)())return this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.log10(e)):o*Math.log10(e))(),this;while((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](S):e<S)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)())this.layer=(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](Math.pow(10,e)):o*Math.pow(10,e))(),e=Math.abs(this.mag),o=Math.sign(this.mag));return 0===this.layer&&((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?(this.mag=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)(),this.sign=(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)()):0===this.mag&&(this.sign=0)),this}fromComponents(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this.normalize(),this}fromComponents_noNormalize(e,o,t){return this.sign=e,this.layer=o,this.mag=t,this}fromMantissaExponent(e,o){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](Math.log10(e)):o+Math.log10(e))(),this.normalize(),this}fromMantissaExponent_noNormalize(e,o){return this.fromMantissaExponent(e,o),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){k?e=e.replace(",",""):M&&(e=e.replace(",","."));const o=e.split("^^^");if(2===o.length){const e=parseFloat(o[0]),t=parseFloat(o[1]),l=o[1].split(";");let r=1;if(2===l.length&&(r=parseFloat(l[1]),(()=>void 0!==isFinite(r)&&null!==isFinite(r)&&isFinite(r)[Symbol.for("!")]?isFinite(r)[Symbol.for("!")]():!isFinite(r))()&&(r=1)),isFinite(e)&&isFinite(t)){const o=O.pentate(e,t,r);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const t=e.split("^^");if(2===t.length){const e=parseFloat(t[0]),o=parseFloat(t[1]),l=t[1].split(";");let r=1;if(2===l.length&&(r=parseFloat(l[1]),(()=>void 0!==isFinite(r)&&null!==isFinite(r)&&isFinite(r)[Symbol.for("!")]?isFinite(r)[Symbol.for("!")]():!isFinite(r))()&&(r=1)),isFinite(e)&&isFinite(o)){const t=O.tetrate(e,o,r);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}const l=e.split("^");if(2===l.length){const e=parseFloat(l[0]),o=parseFloat(l[1]);if(isFinite(e)&&isFinite(o)){const t=O.pow(e,o);return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this}}let r,i;e=e.trim().toLowerCase();let n=e.split("pt");if(2===n.length){r=10,i=parseFloat(n[0]),n[1]=n[1].replace("(",""),n[1]=n[1].replace(")","");let e=parseFloat(n[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(r)&&isFinite(i)){const o=O.tetrate(r,i,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}if(n=e.split("p"),2===n.length){r=10,i=parseFloat(n[0]),n[1]=n[1].replace("(",""),n[1]=n[1].replace(")","");let e=parseFloat(n[1]);if((()=>void 0!==isFinite(e)&&null!==isFinite(e)&&isFinite(e)[Symbol.for("!")]?isFinite(e)[Symbol.for("!")]():!isFinite(e))()&&(e=1),isFinite(r)&&isFinite(i)){const o=O.tetrate(r,i,e);return this.sign=o.sign,this.layer=o.layer,this.mag=o.mag,this}}const a=e.split("e"),s=(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)();if(0===s){const o=parseFloat(e);if(isFinite(o))return this.fromNumber(o)}else if(1===s){const o=parseFloat(e);if(isFinite(o)&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)())return this.fromNumber(o)}const m=e.split("e^");if(2===m.length){this.sign=1,(()=>void 0!==m[0].charAt(0)&&null!==m[0].charAt(0)&&m[0].charAt(0)[Symbol.for("==")]?m[0].charAt(0)[Symbol.for("==")]("-"):"-"==m[0].charAt(0))()&&(this.sign=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());let e="";for(let o=0;(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](m[1].length):o<m[1].length)();(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("prefix-increment")]?o[Symbol.for("prefix-increment")]():++o)()){const t=m[1].charCodeAt(o);if(!((()=>void 0!==t&&null!==t&&t[Symbol.for(">=")]?t[Symbol.for(">=")](43):t>=43)()&&(()=>void 0!==t&&null!==t&&t[Symbol.for("<=")]?t[Symbol.for("<=")](57):t<=57)()||101===t))return this.layer=parseFloat(e),this.mag=parseFloat(m[1].substr((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)())),this.normalize(),this;e=(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](m[1].charAt(o)):e+m[1].charAt(o))()}}if((()=>void 0!==s&&null!==s&&s[Symbol.for("<")]?s[Symbol.for("<")](1):s<1)())return this.sign=0,this.layer=0,this.mag=0,this;const u=parseFloat(a[0]);if(0===u)return this.sign=0,this.layer=0,this.mag=0,this;let f=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](1):a.length-1)()]);if((()=>void 0!==s&&null!==s&&s[Symbol.for(">=")]?s[Symbol.for(">=")](2):s>=2)()){const e=parseFloat(a[(()=>void 0!==a.length&&null!==a.length&&a.length[Symbol.for("-")]?a.length[Symbol.for("-")](2):a.length-2)()]);isFinite(e)&&(f=(()=>void 0!==f&&null!==f&&f[Symbol.for("*")]?f[Symbol.for("*")](Math.sign(e)):f*Math.sign(e))(),f=(()=>void 0!==f&&null!==f&&f[Symbol.for("+")]?f[Symbol.for("+")](P(e)):f+P(e))())}if((()=>void 0!==isFinite(u)&&null!==isFinite(u)&&isFinite(u)[Symbol.for("!")]?isFinite(u)[Symbol.for("!")]():!isFinite(u))())this.sign="-"===a[0]?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():1,this.layer=s,this.mag=f;else if(1===s)this.sign=Math.sign(u),this.layer=1,this.mag=(()=>void 0!==f&&null!==f&&f[Symbol.for("+")]?f[Symbol.for("+")](Math.log10(Math.abs(u))):f+Math.log10(Math.abs(u)))();else{if(this.sign=Math.sign(u),this.layer=s,2===s){const e=O.mul(E(1,2,f),C(u));return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}this.mag=f}return this.normalize(),this}fromValue(e){return e instanceof O||(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&"object"===typeof e&&(()=>"sign"[Symbol.for("in")]?"sign"[Symbol.for("in")](e):"sign"in e)()&&(()=>"mag"[Symbol.for("in")]?"mag"[Symbol.for("in")](e):"mag"in e)()&&(()=>"layer"[Symbol.for("in")]?"layer"[Symbol.for("in")](e):"layer"in e)()?this.fromDecimal(e):"number"===typeof e?this.fromNumber(e):"string"===typeof e?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return(()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()?Number.NaN:0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)():1===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.pow(10,this.mag)):this.sign*Math.pow(10,this.mag))():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](0):this.sign>0)()?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:0===this.m?0:I(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:0===this.mag?0:I(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?1===this.sign?"Infinity":"-Infinity":0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toString():(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():1===this.layer?(()=>this.m+"e"!==void 0&&this.m+"e"!==null&&(this.m+"e")[Symbol.for("+")]?(this.m+"e")[Symbol.for("+")](this.e):this.m+"e"+this.e)():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](N):this.layer<=N)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"e".repeat(this.layer)+this.mag)():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](this.mag):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+this.mag)()}toExponential(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return 0===this.layer?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return(()=>void 0!==this.e&&null!==this.e&&this.e[Symbol.for("<=")]?this.e[Symbol.for("<=")](-7):this.e<=-7)()?this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)()):(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](this.e):e>this.e)()?this.toFixed((()=>e-this.exponent!==void 0&&e-this.exponent!==null&&(e-this.exponent)[Symbol.for("-")]?(e-this.exponent)[Symbol.for("-")](1):e-this.exponent-1)()):this.toExponential((()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](1):e-1)())}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return 0===this.layer?(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](1e21):this.mag<1e21)()&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](1e-7):this.mag>1e-7)()||0===this.mag?(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)().toFixed(e):(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():1===this.layer?(()=>I(this.m,e)+"e"!==void 0&&I(this.m,e)+"e"!==null&&(I(this.m,e)+"e")[Symbol.for("+")]?(I(this.m,e)+"e")[Symbol.for("+")](I(this.e,e)):I(this.m,e)+"e"+I(this.e,e))():(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<=")]?this.layer[Symbol.for("<=")](N):this.layer<=N)()?(()=>(-1===this.sign?"-":"")+"e".repeat(this.layer)!==void 0&&(-1===this.sign?"-":"")+"e".repeat(this.layer)!==null&&((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")]?((-1===this.sign?"-":"")+"e".repeat(this.layer))[Symbol.for("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"e".repeat(this.layer)+I(this.mag,e))():(()=>(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==void 0&&(-1===this.sign?"-":"")+"(e^"+this.layer+")"!==null&&((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")]?((-1===this.sign?"-":"")+"(e^"+this.layer+")")[Symbol.for("+")](I(this.mag,e)):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+I(this.mag,e))()}abs(){return B(0===this.sign?0:1,this.layer,this.mag)}neg(){return B((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("minus")]?this.sign[Symbol.for("minus")]():-this.sign)(),this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dZero:0===this.layer?E(this.sign,0,Math.round(this.mag)):this}floor(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dZero:0===this.layer?E(this.sign,0,Math.floor(this.mag)):this}ceil(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dZero:0===this.layer?E(this.sign,0,Math.ceil(this.mag)):this}trunc(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dZero:0===this.layer?E(this.sign,0,Math.trunc(this.mag)):this}add(e){const o=C(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign)return o;if(0===o.sign)return this;if(this.sign===(()=>void 0!==o.sign&&null!==o.sign&&o.sign[Symbol.for("minus")]?o.sign[Symbol.for("minus")]():-o.sign)()&&this.layer===o.layer&&this.mag===o.mag)return B(0,0,0);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](2):this.layer>=2)()||(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](2):o.layer>=2)())return this.maxabs(o);if((()=>void 0!==O.cmpabs(this,o)&&null!==O.cmpabs(this,o)&&O.cmpabs(this,o)[Symbol.for(">")]?O.cmpabs(this,o)[Symbol.for(">")](0):O.cmpabs(this,o)>0)()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return C((()=>t.sign*t.mag!==void 0&&t.sign*t.mag!==null&&(t.sign*t.mag)[Symbol.for("+")]?(t.sign*t.mag)[Symbol.for("+")](l.sign*l.mag):t.sign*t.mag+l.sign*l.mag)());const r=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("*")]?t.layer[Symbol.for("*")](Math.sign(t.mag)):t.layer*Math.sign(t.mag))(),i=(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("*")]?l.layer[Symbol.for("*")](Math.sign(l.mag)):l.layer*Math.sign(l.mag))();if((()=>r-i!==void 0&&r-i!==null&&(r-i)[Symbol.for(">=")]?(r-i)[Symbol.for(">=")](2):r-i>=2)())return t;if(0===r&&i===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()){if((()=>void 0!==Math.abs(l.mag-Math.log10(t.mag))&&null!==Math.abs(l.mag-Math.log10(t.mag))&&Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")]?Math.abs(l.mag-Math.log10(t.mag))[Symbol.for(">")](b):Math.abs(l.mag-Math.log10(t.mag))>b)())return t;{const e=Math.pow(10,(()=>void 0!==Math.log10(t.mag)&&null!==Math.log10(t.mag)&&Math.log10(t.mag)[Symbol.for("-")]?Math.log10(t.mag)[Symbol.for("-")](l.mag):Math.log10(t.mag)-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return E(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}if(1===r&&0===i){if((()=>void 0!==Math.abs(t.mag-Math.log10(l.mag))&&null!==Math.abs(t.mag-Math.log10(l.mag))&&Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")]?Math.abs(t.mag-Math.log10(l.mag))[Symbol.for(">")](b):Math.abs(t.mag-Math.log10(l.mag))>b)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](Math.log10(l.mag)):t.mag-Math.log10(l.mag))()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return E(Math.sign(o),1,(()=>void 0!==Math.log10(l.mag)&&null!==Math.log10(l.mag)&&Math.log10(l.mag)[Symbol.for("+")]?Math.log10(l.mag)[Symbol.for("+")](Math.log10(Math.abs(o))):Math.log10(l.mag)+Math.log10(Math.abs(o)))())}}if((()=>void 0!==Math.abs(t.mag-l.mag)&&null!==Math.abs(t.mag-l.mag)&&Math.abs(t.mag-l.mag)[Symbol.for(">")]?Math.abs(t.mag-l.mag)[Symbol.for(">")](b):Math.abs(t.mag-l.mag)>b)())return t;{const e=Math.pow(10,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("-")]?t.mag[Symbol.for("-")](l.mag):t.mag-l.mag)()),o=(()=>void 0!==l.sign&&null!==l.sign&&l.sign[Symbol.for("+")]?l.sign[Symbol.for("+")](t.sign*e):l.sign+t.sign*e)();return E(Math.sign(o),1,(()=>void 0!==l.mag&&null!==l.mag&&l.mag[Symbol.for("+")]?l.mag[Symbol.for("+")](Math.log10(Math.abs(o))):l.mag+Math.log10(Math.abs(o)))())}}plus(e){return this.add(e)}sub(e){return this.add(C(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const o=C(e);if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))())return this;if((()=>void 0!==Number.isFinite(o.layer)&&null!==Number.isFinite(o.layer)&&Number.isFinite(o.layer)[Symbol.for("!")]?Number.isFinite(o.layer)[Symbol.for("!")]():!Number.isFinite(o.layer))())return o;if(0===this.sign||0===o.sign)return B(0,0,0);if(this.layer===o.layer&&this.mag===(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)())return B((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](o.sign):this.sign*o.sign)(),0,1);let t,l;if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](o.layer):this.layer>o.layer)()||(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("==")]?this.layer[Symbol.for("==")](o.layer):this.layer==o.layer)()&&(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for(">")]?Math.abs(this.mag)[Symbol.for(">")](Math.abs(o.mag)):Math.abs(this.mag)>Math.abs(o.mag))()?(t=this,l=o):(t=o,l=this),0===t.layer&&0===l.layer)return C((()=>t.sign*l.sign*t.mag!==void 0&&t.sign*l.sign*t.mag!==null&&(t.sign*l.sign*t.mag)[Symbol.for("*")]?(t.sign*l.sign*t.mag)[Symbol.for("*")](l.mag):t.sign*l.sign*t.mag*l.mag)());if((()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for(">=")]?t.layer[Symbol.for(">=")](3):t.layer>=3)()||(()=>t.layer-l.layer!==void 0&&t.layer-l.layer!==null&&(t.layer-l.layer)[Symbol.for(">=")]?(t.layer-l.layer)[Symbol.for(">=")](2):t.layer-l.layer>=2)())return E((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),t.layer,t.mag);if(1===t.layer&&0===l.layer)return E((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](Math.log10(l.mag)):t.mag+Math.log10(l.mag))());if(1===t.layer&&1===l.layer)return E((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),1,(()=>void 0!==t.mag&&null!==t.mag&&t.mag[Symbol.for("+")]?t.mag[Symbol.for("+")](l.mag):t.mag+l.mag)());if(2===t.layer&&1===l.layer){const e=E(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(E(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return E((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}if(2===t.layer&&2===l.layer){const e=E(Math.sign(t.mag),(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](1):t.layer-1)(),Math.abs(t.mag)).add(E(Math.sign(l.mag),(()=>void 0!==l.layer&&null!==l.layer&&l.layer[Symbol.for("-")]?l.layer[Symbol.for("-")](1):l.layer-1)(),Math.abs(l.mag)));return E((()=>void 0!==t.sign&&null!==t.sign&&t.sign[Symbol.for("*")]?t.sign[Symbol.for("*")](l.sign):t.sign*l.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)())}throw Error((()=>"Bad arguments to mul: "+this+", "!==void 0&&"Bad arguments to mul: "+this+", "!==null&&("Bad arguments to mul: "+this+", ")[Symbol.for("+")]?("Bad arguments to mul: "+this+", ")[Symbol.for("+")](e):"Bad arguments to mul: "+this+", "+e)())}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const o=C(e);return this.mul(o.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return 0===this.mag?O.dNaN:0===this.layer?E(this.sign,0,(()=>1[Symbol.for("/")]?1[Symbol.for("/")](this.mag):1/this.mag)()):E(this.sign,this.layer,(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("minus")]?this.mag[Symbol.for("minus")]():-this.mag)())}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const o=C(e);return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for(">")]?this.sign[Symbol.for(">")](o.sign):this.sign>o.sign)()?1:(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<")]?this.sign[Symbol.for("<")](o.sign):this.sign<o.sign)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.cmpabs(e)):this.sign*this.cmpabs(e))()}cmpabs(e){const o=C(e),t=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](0):this.mag>0)()?this.layer:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("minus")]?this.layer[Symbol.for("minus")]():-this.layer)(),l=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for(">")]?o.mag[Symbol.for(">")](0):o.mag>0)()?o.layer:(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("minus")]?o.layer[Symbol.for("minus")]():-o.layer)();return(()=>void 0!==t&&null!==t&&t[Symbol.for(">")]?t[Symbol.for(">")](l):t>l)()?1:(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](l):t<l)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for(">")]?this.mag[Symbol.for(">")](o.mag):this.mag>o.mag)()?1:(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](o.mag):this.mag<o.mag)()?(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)():0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const o=C(e);return this.sign===o.sign&&this.layer===o.layer&&this.mag===o.mag}equals(e){return this.eq(e)}neq(e){return(()=>void 0!==this.eq(e)&&null!==this.eq(e)&&this.eq(e)[Symbol.for("!")]?this.eq(e)[Symbol.for("!")]():!this.eq(e))()}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()}lte(e){return(()=>void 0!==this.gt(e)&&null!==this.gt(e)&&this.gt(e)[Symbol.for("!")]?this.gt(e)[Symbol.for("!")]():!this.gt(e))()}gt(e){return 1===this.cmp(e)}gte(e){return(()=>void 0!==this.lt(e)&&null!==this.lt(e)&&this.lt(e)[Symbol.for("!")]?this.lt(e)[Symbol.for("!")]():!this.lt(e))()}max(e){const o=C(e);return this.lt(o)?o:this}min(e){const o=C(e);return this.gt(o)?o:this}maxabs(e){const o=C(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for("<")]?this.cmpabs(o)[Symbol.for("<")](0):this.cmpabs(o)<0)()?o:this}minabs(e){const o=C(e);return(()=>void 0!==this.cmpabs(o)&&null!==this.cmpabs(o)&&this.cmpabs(o)[Symbol.for(">")]?this.cmpabs(o)[Symbol.for(">")](0):this.cmpabs(o)>0)()?o:this}clamp(e,o){return this.max(e).min(o)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,o){const t=C(e);return this.eq_tolerance(t,o)?0:this.cmp(t)}compare_tolerance(e,o){return this.cmp_tolerance(e,o)}eq_tolerance(e,o){const t=C(e);if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=1e-7),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("!==")]?this.sign[Symbol.for("!==")](t.sign):this.sign!==t.sign)())return!1;if((()=>void 0!==Math.abs(this.layer-t.layer)&&null!==Math.abs(this.layer-t.layer)&&Math.abs(this.layer-t.layer)[Symbol.for(">")]?Math.abs(this.layer-t.layer)[Symbol.for(">")](1):Math.abs(this.layer-t.layer)>1)())return!1;let l=this.mag,r=t.mag;return(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](t.layer):this.layer>t.layer)()&&(r=P(r)),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("<")]?this.layer[Symbol.for("<")](t.layer):this.layer<t.layer)()&&(l=P(l)),(()=>void 0!==Math.abs(l-r)&&null!==Math.abs(l-r)&&Math.abs(l-r)[Symbol.for("<=")]?Math.abs(l-r)[Symbol.for("<=")](o*Math.max(Math.abs(l),Math.abs(r))):Math.abs(l-r)<=o*Math.max(Math.abs(l),Math.abs(r)))()}equals_tolerance(e,o){return this.eq_tolerance(e,o)}neq_tolerance(e,o){return(()=>void 0!==this.eq_tolerance(e,o)&&null!==this.eq_tolerance(e,o)&&this.eq_tolerance(e,o)[Symbol.for("!")]?this.eq_tolerance(e,o)[Symbol.for("!")]():!this.eq_tolerance(e,o))()}notEquals_tolerance(e,o){return this.neq_tolerance(e,o)}lt_tolerance(e,o){const t=C(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.lt(t)}lte_tolerance(e,o){const t=C(e);return this.eq_tolerance(t,o)||this.lt(t)}gt_tolerance(e,o){const t=C(e);return(()=>void 0!==this.eq_tolerance(t,o)&&null!==this.eq_tolerance(t,o)&&this.eq_tolerance(t,o)[Symbol.for("!")]?this.eq_tolerance(t,o)[Symbol.for("!")]():!this.eq_tolerance(t,o))()&&this.gt(t)}gte_tolerance(e,o){const t=C(e);return this.eq_tolerance(t,o)||this.gt(t)}pLog10(){return this.lt(O.dZero)?O.dZero:this.log10()}absLog10(){return 0===this.sign?O.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?E(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):E(1,0,Math.log10(this.mag))}log10(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?O.dNaN:(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">")]?this.layer[Symbol.for(">")](0):this.layer>0)()?E(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag)):E(this.sign,0,Math.log10(this.mag))}log(e){return e=C(e),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()||(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<=")]?e.sign[Symbol.for("<=")](0):e.sign<=0)()||1===e.sign&&0===e.layer&&1===e.mag?O.dNaN:0===this.layer&&0===e.layer?E(this.sign,0,(()=>void 0!==Math.log(this.mag)&&null!==Math.log(this.mag)&&Math.log(this.mag)[Symbol.for("/")]?Math.log(this.mag)[Symbol.for("/")](Math.log(e.mag)):Math.log(this.mag)/Math.log(e.mag))()):O.div(this.log10(),e.log10())}log2(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?O.dNaN:0===this.layer?E(this.sign,0,Math.log2(this.mag)):1===this.layer?E(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](3.321928094887362):3.321928094887362*Math.abs(this.mag))()):2===this.layer?E(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.5213902276543247):Math.abs(this.mag)+.5213902276543247)()):E(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}ln(){return(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("<=")]?this.sign[Symbol.for("<=")](0):this.sign<=0)()?O.dNaN:0===this.layer?E(this.sign,0,Math.log(this.mag)):1===this.layer?E(Math.sign(this.mag),0,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("*")]?Math.abs(this.mag)[Symbol.for("*")](2.302585092994046):2.302585092994046*Math.abs(this.mag))()):2===this.layer?E(Math.sign(this.mag),1,(()=>void 0!==Math.abs(this.mag)&&null!==Math.abs(this.mag)&&Math.abs(this.mag)[Symbol.for("+")]?Math.abs(this.mag)[Symbol.for("+")](.36221568869946325):Math.abs(this.mag)+.36221568869946325)()):E(Math.sign(this.mag),(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const o=C(e),t=this,l=o;if(0===t.sign)return l.eq(0)?B(1,0,1):t;if(1===t.sign&&0===t.layer&&1===t.mag)return t;if(0===l.sign)return B(1,0,1);if(1===l.sign&&0===l.layer&&1===l.mag)return t;const r=t.absLog10().mul(l).pow10();return this.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()?1===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?r.neg():0===(()=>void 0!==Math.abs(l.toNumber()%2)&&null!==Math.abs(l.toNumber()%2)&&Math.abs(l.toNumber()%2)[Symbol.for("%")]?Math.abs(l.toNumber()%2)[Symbol.for("%")](2):Math.abs(l.toNumber()%2)%2)()?r:O.dNaN:r}pow10(){if((()=>void 0!==Number.isFinite(this.layer)&&null!==Number.isFinite(this.layer)&&Number.isFinite(this.layer)[Symbol.for("!")]?Number.isFinite(this.layer)[Symbol.for("!")]():!Number.isFinite(this.layer))()||(()=>void 0!==Number.isFinite(this.mag)&&null!==Number.isFinite(this.mag)&&Number.isFinite(this.mag)[Symbol.for("!")]?Number.isFinite(this.mag)[Symbol.for("!")]():!Number.isFinite(this.mag))())return O.dNaN;let e=this;if(0===e.layer){const o=Math.pow(10,(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("*")]?e.sign[Symbol.for("*")](e.mag):e.sign*e.mag)());if(Number.isFinite(o)&&(()=>void 0!==Math.abs(o)&&null!==Math.abs(o)&&Math.abs(o)[Symbol.for(">=")]?Math.abs(o)[Symbol.for(">=")](.1):Math.abs(o)>=.1)())return E(1,0,o);if(0===e.sign)return O.dOne;e=B(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),Math.log10(e.mag))}return(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for(">")]?e.sign[Symbol.for(">")](0):e.sign>0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?E(e.sign,(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.mag):(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()&&(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for(">=")]?e.mag[Symbol.for(">=")](0):e.mag>=0)()?E((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("minus")]?e.sign[Symbol.for("minus")]():-e.sign)(),(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("minus")]?e.mag[Symbol.for("minus")]():-e.mag)()):O.dOne}pow_base(e){return C(e).pow(this)}root(e){const o=C(e);return this.pow(o.recip())}factorial(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||0===this.layer?this.add(1).gamma():1===this.layer?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}gamma(){if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return this.recip();if(0===this.layer){if(this.lt(B(1,0,24)))return C(F((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));const e=(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("-")]?this.mag[Symbol.for("-")](1):this.mag-1)();let o=.9189385332046727;o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")]((e+.5)*Math.log(e)):o+(e+.5)*Math.log(e))(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](e):o-e)();const t=(()=>void 0!==e&&null!==e&&e[Symbol.for("*")]?e[Symbol.for("*")](e):e*e)();let l=e,r=(()=>12[Symbol.for("*")]?12[Symbol.for("*")](l):12*l)(),i=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),n=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](i):o+i)();if(n===o)return O.exp(o);if(o=n,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>360[Symbol.for("*")]?360[Symbol.for("*")](l):360*l)(),i=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),n=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](i):o-i)(),n===o)return O.exp(o);o=n,l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>1260[Symbol.for("*")]?1260[Symbol.for("*")](l):1260*l)();let a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)();return o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](a):o+a)(),l=(()=>void 0!==l&&null!==l&&l[Symbol.for("*")]?l[Symbol.for("*")](t):l*t)(),r=(()=>1680[Symbol.for("*")]?1680[Symbol.for("*")](l):1680*l)(),a=(()=>1[Symbol.for("/")]?1[Symbol.for("/")](r):1/r)(),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](a):o-a)(),O.exp(o)}return 1===this.layer?O.exp(O.mul(this,O.ln(this).sub(1))):O.exp(this)}lngamma(){return this.gamma().ln()}exp(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dOne:0===this.layer&&(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<=")]?this.mag[Symbol.for("<=")](709.7):this.mag<=709.7)()?C(Math.exp((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):0===this.layer?E(1,1,(()=>this.sign*Math.log10(Math.E)!==void 0&&this.sign*Math.log10(Math.E)!==null&&(this.sign*Math.log10(Math.E))[Symbol.for("*")]?(this.sign*Math.log10(Math.E))[Symbol.for("*")](this.mag):this.sign*Math.log10(Math.E)*this.mag)()):1===this.layer?E(1,2,(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Math.log10(.4342944819032518)+this.mag):this.sign*(Math.log10(.4342944819032518)+this.mag))()):E(1,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("+")]?this.layer[Symbol.for("+")](1):this.layer+1)(),(()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())}sqr(){return this.pow(2)}sqrt(){if(0===this.layer)return C(Math.sqrt((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return E(1,2,(()=>void 0!==Math.log10(this.mag)&&null!==Math.log10(this.mag)&&Math.log10(this.mag)[Symbol.for("-")]?Math.log10(this.mag)[Symbol.for("-")](.3010299956639812):Math.log10(this.mag)-.3010299956639812)());{const e=O.div(B(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag),B(1,0,2));return e.layer=(()=>void 0!==e.layer&&null!==e.layer&&e.layer[Symbol.for("+")]?e.layer[Symbol.for("+")](1):e.layer+1)(),e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow((()=>1[Symbol.for("/")]?1[Symbol.for("/")](3):1/3)())}tetrate(e=2,o=B(1,0,1)){if(1===e)return O.pow(this,o);if(0===e)return new O(o);if(this.eq(O.dOne))return O.dOne;if(this.eq((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))return O.pow(this,o);if(e===Number.POSITIVE_INFINITY){const e=this.toNumber();if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](1.444667861009766):e<=1.444667861009766)()&&(()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](.06598803584531254):e>=.06598803584531254)()){if((()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009099):e>1.444667861009099)())return new O(Math.E);const o=O.ln(this).neg();return o.lambertw().div(o)}return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](1.444667861009766):e>1.444667861009766)()?new O(Number.POSITIVE_INFINITY):O.dNaN}if(this.eq(O.dZero)){let o=Math.abs((()=>e+1!==void 0&&e+1!==null&&(e+1)[Symbol.for("%")]?(e+1)[Symbol.for("%")](2):(e+1)%2)());return(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](1):o>1)()&&(o=(()=>2[Symbol.for("-")]?2[Symbol.for("-")](o):2-o)()),new O(o)}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](0):e<0)())return O.iteratedlog(o,this,(()=>void 0!==e&&null!==e&&e[Symbol.for("minus")]?e[Symbol.for("minus")]():-e)());o=C(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();if(this.gt(O.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let t=0;(()=>void 0!==t&&null!==t&&t[Symbol.for("<")]?t[Symbol.for("<")](e):t<e)();(()=>void 0!==t&&null!==t&&"object"===typeof t&&t[Symbol.for("prefix-increment")]?t[Symbol.for("prefix-increment")]():++t)()){const e=o;if(o=this.pow(o),e.eq(o))return o}if((()=>void 0!==l&&null!==l&&l[Symbol.for("!=")]?l[Symbol.for("!=")](0):0!=l)()){const e=this.pow(o);return o.mul((()=>1[Symbol.for("-")]?1[Symbol.for("-")](l):1-l)()).add(e.mul(l))}return o}(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(O.dOne)?this.gt(10)?o=this.pow(l):(o=C(O.tetrate_critical(this.toNumber(),l)),this.lt(2)&&(o=o.sub(1).mul(this.minus(1)).plus(1))):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](e):r<e)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(o=this.pow(o),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>o.layer-this.layer!==void 0&&o.layer-this.layer!==null&&(o.layer-this.layer)[Symbol.for(">")]?(o.layer-this.layer)[Symbol.for(">")](3):o.layer-this.layer>3)())return B(o.sign,(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](e-r-1):o.layer+(e-r-1))(),o.mag);if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](1e4):r>1e4)())return o}return o}iteratedexp(e=2,o=B(1,0,1)){return this.tetrate(e,o)}iteratedlog(e=10,o=1){if((()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)())return O.tetrate(e,(()=>void 0!==o&&null!==o&&o[Symbol.for("minus")]?o[Symbol.for("minus")]():-o)(),this);e=C(e);let t=C(this);const l=o;o=Math.trunc(o);const r=(()=>void 0!==l&&null!==l&&l[Symbol.for("-")]?l[Symbol.for("-")](o):l-o)();if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=Math.min(o,(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](l):o-l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let i=0;(()=>void 0!==i&&null!==i&&i[Symbol.for("<")]?i[Symbol.for("<")](o):i<o)();(()=>void 0!==i&&null!==i&&"object"===typeof i&&i[Symbol.for("prefix-increment")]?i[Symbol.for("prefix-increment")]():++i)()){if(t=t.log(e),(()=>void 0!==isFinite(t.layer)&&null!==isFinite(t.layer)&&isFinite(t.layer)[Symbol.for("!")]?isFinite(t.layer)[Symbol.for("!")]():!isFinite(t.layer))()||(()=>void 0!==isFinite(t.mag)&&null!==isFinite(t.mag)&&isFinite(t.mag)[Symbol.for("!")]?isFinite(t.mag)[Symbol.for("!")]():!isFinite(t.mag))())return t.normalize();if((()=>void 0!==i&&null!==i&&i[Symbol.for(">")]?i[Symbol.for(">")](1e4):i>1e4)())return t}return(()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](0):r>0)()&&(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](1):r<1)()&&(t=e.eq(10)?t.layeradd10((()=>void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r)()):t.layeradd((()=>void 0!==r&&null!==r&&r[Symbol.for("minus")]?r[Symbol.for("minus")]():-r)(),e)),t}slog(e=10){if(e=C(e),e.lte(O.dZero))return O.dNaN;if(e.eq(O.dOne))return O.dNaN;if(e.lt(O.dOne))return this.eq(O.dOne)?O.dZero:this.eq(O.dZero)?O.dNegOne:O.dNaN;if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()||this.eq(O.dZero))return O.dNegOne;let o=0,t=C(this);if((()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for(">")]?(t.layer-e.layer)[Symbol.for(">")](3):t.layer-e.layer>3)()){const l=(()=>t.layer-e.layer!==void 0&&t.layer-e.layer!==null&&(t.layer-e.layer)[Symbol.for("-")]?(t.layer-e.layer)[Symbol.for("-")](3):t.layer-e.layer-3)();o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](l):o+l)(),t.layer=(()=>void 0!==t.layer&&null!==t.layer&&t.layer[Symbol.for("-")]?t.layer[Symbol.for("-")](l):t.layer-l)()}for(let l=0;(()=>void 0!==l&&null!==l&&l[Symbol.for("<")]?l[Symbol.for("<")](100):l<100)();(()=>void 0!==l&&null!==l&&"object"===typeof l&&l[Symbol.for("prefix-increment")]?l[Symbol.for("prefix-increment")]():++l)())if(t.lt(O.dZero))t=O.pow(e,t),o=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)();else{if(t.lte(O.dOne))return C((()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](O.slog_critical(e.toNumber(),t.toNumber())):o+O.slog_critical(e.toNumber(),t.toNumber()))());o=(()=>void 0!==o&&null!==o&&o[Symbol.for("+")]?o[Symbol.for("+")](1):o+1)(),t=O.log(t,e)}return C(o)}static slog_critical(e,o){return(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()?(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](1):o-1)():O.critical_section(e,o,x)}static tetrate_critical(e,o){return O.critical_section(e,o,Z)}static critical_section(e,o,t){o=(()=>void 0!==o&&null!==o&&o[Symbol.for("*")]?o[Symbol.for("*")](10):10*o)(),(()=>void 0!==o&&null!==o&&o[Symbol.for("<")]?o[Symbol.for("<")](0):o<0)()&&(o=0),(()=>void 0!==o&&null!==o&&o[Symbol.for(">")]?o[Symbol.for(">")](10):o>10)()&&(o=10),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](2):e<2)()&&(e=2),(()=>void 0!==e&&null!==e&&e[Symbol.for(">")]?e[Symbol.for(">")](10):e>10)()&&(e=10);let l=0,r=0;for(let a=0;(()=>void 0!==a&&null!==a&&a[Symbol.for("<")]?a[Symbol.for("<")](w.length):a<w.length)();(()=>void 0!==a&&null!==a&&"object"===typeof a&&a[Symbol.for("prefix-increment")]?a[Symbol.for("prefix-increment")]():++a)()){if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("==")]?w[a][Symbol.for("==")](e):w[a]==e)()){l=t[a][Math.floor(o)],r=t[a][Math.ceil(o)];break}if((()=>void 0!==w[a]&&null!==w[a]&&w[a][Symbol.for("<")]?w[a][Symbol.for("<")](e):w[a]<e)()&&(()=>void 0!==w[a+1]&&null!==w[a+1]&&w[a+1][Symbol.for(">")]?w[a+1][Symbol.for(">")](e):w[a+1]>e)()){const i=(()=>e-w[a]!==void 0&&e-w[a]!==null&&(e-w[a])[Symbol.for("/")]?(e-w[a])[Symbol.for("/")](w[a+1]-w[a]):(e-w[a])/(w[a+1]-w[a]))();l=(()=>t[a][Math.floor(o)]*(1-i)!==void 0&&t[a][Math.floor(o)]*(1-i)!==null&&(t[a][Math.floor(o)]*(1-i))[Symbol.for("+")]?(t[a][Math.floor(o)]*(1-i))[Symbol.for("+")](t[a+1][Math.floor(o)]*i):t[a][Math.floor(o)]*(1-i)+t[a+1][Math.floor(o)]*i)(),r=(()=>t[a][Math.ceil(o)]*(1-i)!==void 0&&t[a][Math.ceil(o)]*(1-i)!==null&&(t[a][Math.ceil(o)]*(1-i))[Symbol.for("+")]?(t[a][Math.ceil(o)]*(1-i))[Symbol.for("+")](t[a+1][Math.ceil(o)]*i):t[a][Math.ceil(o)]*(1-i)+t[a+1][Math.ceil(o)]*i)();break}}const i=(()=>void 0!==o&&null!==o&&o[Symbol.for("-")]?o[Symbol.for("-")](Math.floor(o)):o-Math.floor(o))(),n=(()=>l*(1-i)!==void 0&&l*(1-i)!==null&&(l*(1-i))[Symbol.for("+")]?(l*(1-i))[Symbol.for("+")](r*i):l*(1-i)+r*i)();return n}layeradd10(e){e=O.fromValue_noAlloc(e).toNumber();const o=C(this);if((()=>void 0!==e&&null!==e&&e[Symbol.for(">=")]?e[Symbol.for(">=")](1):e>=1)()){(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("<")]?o.mag[Symbol.for("<")](0):o.mag<0)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">")]?o.layer[Symbol.for(">")](0):o.layer>0)()?(o.sign=0,o.mag=0,o.layer=0):o.sign===(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("==")]?o.layer[Symbol.for("==")](0):0==o.layer)()&&(o.sign=1,o.mag=(()=>void 0!==o.mag&&null!==o.mag&&o.mag[Symbol.for("minus")]?o.mag[Symbol.for("minus")]():-o.mag)());const t=Math.trunc(e);e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)()}if((()=>void 0!==e&&null!==e&&e[Symbol.for("<=")]?e[Symbol.for("<=")](-1):e<=-1)()){const t=Math.trunc(e);if(e=(()=>void 0!==e&&null!==e&&e[Symbol.for("-")]?e[Symbol.for("-")](t):e-t)(),o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("+")]?o.layer[Symbol.for("+")](t):o.layer+t)(),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())for(let e=0;(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](100):e<100)();(()=>void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e)()){if((()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag),(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return 0===o.sign&&(o.sign=1),(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)()&&(o.layer=0),o.normalize();if((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](0):o.layer>=0)())break}}while((()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("<")]?o.layer[Symbol.for("<")](0):o.layer<0)())(()=>{void 0!==o.layer&&null!==o.layer&&"object"===typeof o.layer&&o.layer[Symbol.for("postfix-increment")]?o.layer[Symbol.for("postfix-increment")]():o.layer++})(),o.mag=Math.log10(o.mag);return 0===o.sign&&(o.sign=1,0===o.mag&&(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for(">=")]?o.layer[Symbol.for(">=")](1):o.layer>=1)()&&(o.layer=(()=>void 0!==o.layer&&null!==o.layer&&o.layer[Symbol.for("-")]?o.layer[Symbol.for("-")](1):o.layer-1)(),o.mag=1)),o.normalize(),(()=>void 0!==e&&null!==e&&e[Symbol.for("!==")]?e[Symbol.for("!==")](0):0!==e)()?o.layeradd(e,10):o}layeradd(e,o){const t=this.slog(o).toNumber(),l=(()=>void 0!==t&&null!==t&&t[Symbol.for("+")]?t[Symbol.for("+")](e):t+e)();return(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](0):l>=0)()?O.tetrate(o,l):(()=>void 0!==Number.isFinite(l)&&null!==Number.isFinite(l)&&Number.isFinite(l)[Symbol.for("!")]?Number.isFinite(l)[Symbol.for("!")]():!Number.isFinite(l))()?O.dNaN:(()=>void 0!==l&&null!==l&&l[Symbol.for(">=")]?l[Symbol.for(">=")](-1):l>=-1)()?O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](1):l+1)()),o):O.log(O.log(O.tetrate(o,(()=>void 0!==l&&null!==l&&l[Symbol.for("+")]?l[Symbol.for("+")](2):l+2)()),o),o)}lambertw(){if(this.lt((()=>.3678794411710499[Symbol.for("minus")]?.3678794411710499[Symbol.for("minus")]():-.3678794411710499)()))throw Error("lambertw is unimplemented for results less than -1, sorry!");if((()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)())return C(D(this.toNumber()));if(0===this.layer)return C(D((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)()));if(1===this.layer)return _(this);if(2===this.layer)return _(this);if((()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return B(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("==")]?this.sign[Symbol.for("==")](1):1==this.sign)()&&(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for(">=")]?this.layer[Symbol.for(">=")](3):this.layer>=3)())return B(this.sign,(()=>void 0!==this.layer&&null!==this.layer&&this.layer[Symbol.for("-")]?this.layer[Symbol.for("-")](1):this.layer-1)(),this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,o=B(1,0,1)){o=C(o);const t=e;e=Math.trunc(e);const l=(()=>void 0!==t&&null!==t&&t[Symbol.for("-")]?t[Symbol.for("-")](e):t-e)();(()=>void 0!==l&&null!==l&&l[Symbol.for("!==")]?l[Symbol.for("!==")](0):0!==l)()&&(o.eq(O.dOne)?((()=>{void 0!==e&&null!==e&&"object"===typeof e&&e[Symbol.for("prefix-increment")]?e[Symbol.for("prefix-increment")]():++e})(),o=new O(l)):o=this.eq(10)?o.layeradd10(l):o.layeradd(l,this));for(let r=0;(()=>void 0!==r&&null!==r&&r[Symbol.for("<")]?r[Symbol.for("<")](e):r<e)();(()=>void 0!==r&&null!==r&&"object"===typeof r&&r[Symbol.for("prefix-increment")]?r[Symbol.for("prefix-increment")]():++r)()){if(o=this.tetrate(o.toNumber()),(()=>void 0!==isFinite(o.layer)&&null!==isFinite(o.layer)&&isFinite(o.layer)[Symbol.for("!")]?isFinite(o.layer)[Symbol.for("!")]():!isFinite(o.layer))()||(()=>void 0!==isFinite(o.mag)&&null!==isFinite(o.mag)&&isFinite(o.mag)[Symbol.for("!")]?isFinite(o.mag)[Symbol.for("!")]():!isFinite(o.mag))())return o.normalize();if((()=>void 0!==r&&null!==r&&r[Symbol.for(">")]?r[Symbol.for(">")](10):r>10)())return o}return o}sin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?C(Math.sin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(0,0,0)}cos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?O.dOne:0===this.layer?C(Math.cos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(0,0,0)}tan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?C(Math.tan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(0,0,0)}asin(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?C(Math.asin((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(Number.NaN,Number.NaN,Number.NaN)}acos(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?C(Math.acos(this.toNumber())):0===this.layer?C(Math.acos((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):B(Number.NaN,Number.NaN,Number.NaN)}atan(){return(()=>void 0!==this.mag&&null!==this.mag&&this.mag[Symbol.for("<")]?this.mag[Symbol.for("<")](0):this.mag<0)()?this:0===this.layer?C(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](this.mag):this.sign*this.mag)())):C(Math.atan((()=>void 0!==this.sign&&null!==this.sign&&this.sign[Symbol.for("*")]?this.sign[Symbol.for("*")](Infinity):Infinity*this.sign)()))}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 O.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return O.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?B(Number.NaN,Number.NaN,Number.NaN):O.ln(this.add(1).div(C(1).sub(this))).div(2)}ascensionPenalty(e){return 0===e?this:this.root(O.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](1):this.cmp(e)<1)()}lessThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for("<")]?this.cmp(e)[Symbol.for("<")](0):this.cmp(e)<0)()}greaterThanOrEqualTo(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](-1):this.cmp(e)>-1)()}greaterThan(e){return(()=>void 0!==this.cmp(e)&&null!==this.cmp(e)&&this.cmp(e)[Symbol.for(">")]?this.cmp(e)[Symbol.for(">")](0):this.cmp(e)>0)()}}(0,l.Z)(O,"dZero",B(0,0,0)),(0,l.Z)(O,"dOne",B(1,0,1)),(0,l.Z)(O,"dNegOne",B((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),0,1)),(0,l.Z)(O,"dTwo",B(1,0,2)),(0,l.Z)(O,"dTen",B(1,0,10)),(0,l.Z)(O,"dNaN",B(Number.NaN,Number.NaN,Number.NaN)),(0,l.Z)(O,"dInf",B(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)),(0,l.Z)(O,"dNegInf",B((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY)),(0,l.Z)(O,"dNumberMax",E(1,0,Number.MAX_VALUE)),(0,l.Z)(O,"dNumberMin",E(1,0,Number.MIN_VALUE))},5634:function(e,o,t){"use strict";var l=t(4865),r=t(2345),i=t(9365),n=t(5967);function a(e,o,t,r,i,n){const a=(0,l.resolveComponent)("Links");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"layer-container",style:(0,l.normalizeStyle)({"--layer-color":e.unref(e.color)})},[e.showGoBack?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,class:"goBack",onClick:o[0]||(o[0]=(...o)=>e.goBack&&e.goBack(...o))},"←")):(0,l.createCommentVNode)("",!0),e.minimized.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"layer-tab minimized",onClick:o[1]||(o[1]=o=>e.minimized.value=!1)},[(0,l.createElementVNode)("div",null,(0,l.toDisplayString)(e.unref(e.name)),1)])):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:2,class:(0,l.normalizeClass)(["layer-tab",[{showGoBack:e.showGoBack},e.unref(e.classes)]]),style:(0,l.normalizeStyle)(e.unref(e.style))},[(0,l.createVNode)(a,{links:e.unref(e.links)},{default:(0,l.withCtx)((()=>[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component)))])),_:1},8,["links"])],6)),e.unref(e.minimizable)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:3,class:"minimize",onClick:o[2]||(o[2]=o=>e.minimized.value=!0)}," ▼ ")):(0,l.createCommentVNode)("",!0)],4)}var s=t(5389),m=t(8755),u=(0,l.defineComponent)({components:{Links:s.Z},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:(0,m.P5)(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:(0,m.P5)(Number),required:!0},name:{type:(0,m.P5)(String),required:!0},color:(0,m.P5)(String),style:(0,m.P5)(String,Object,Array),classes:(0,m.P5)(Object),links:(0,m.P5)(Array),minimizable:(0,m.P5)(Boolean)},setup(e){const{display:o,index:t,minimized:i,minWidth:a,tab:s}=(0,l.toRefs)(e),u=(0,m.vq)(o),f=(0,l.computed)((()=>r.allowGoBack&&(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for(">")]?t.value[Symbol.for(">")](0):t.value>0)()&&(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)()));function y(){n.Z.tabs.splice((0,l.unref)(e.index),1/0)}function c(e,o){const t=s.value();(()=>void 0!==t&&null!==t&&t[Symbol.for("!=")]?t[Symbol.for("!=")](void 0):void 0!=t)()&&(e?(t.style.flexGrow="0",t.style.flexShrink="0",t.style.width="60px",t.style.minWidth=t.style.flexBasis="",t.style.margin="0"):(t.style.flexGrow="",t.style.flexShrink="",t.style.width="",t.style.minWidth=t.style.flexBasis=`${o}px`,t.style.margin=""))}return(0,l.nextTick)((()=>c(i.value,(0,l.unref)(a.value)))),(0,l.watch)([i,(0,m.o9)(a)],(([e,o])=>c(e,o))),{component:u,showGoBack:f,unref:l.unref,goBack:y}}}),f=t(3744);const y=(0,f.Z)(u,[["render",a],["__scopeId","data-v-666ada59"]]);var c=y,d=t(7286);const b=e=>((0,l.pushScopeId)("data-v-3303e3d5"),e=e(),(0,l.popScopeId)(),e),h=b((()=>(0,l.createElementVNode)("h2",null,"Changelog",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),S=b((()=>(0,l.createElementVNode)("details",{open:""},[(0,l.createElementVNode)("summary",null,[(0,l.createTextVNode)("v0.0 Initial Commit - "),(0,l.createElementVNode)("time",null,"2021-09-04")]),(0,l.createTextVNode)(" This is the first release :D "),(0,l.createElementVNode)("ul",null,[(0,l.createElementVNode)("li",{class:"feature"},"Did everything"),(0,l.createElementVNode)("li",{class:"fix"},"Had some fun"),(0,l.createElementVNode)("li",{class:"breaking"},"Removed everything"),(0,l.createElementVNode)("li",{class:"balancing"},"Created some bugs to fix later")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var g=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);return o({open(){t.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(d.Z,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[h])),body:(0,l.withCtx)((()=>[S])),_:1},8,["modelValue"]))}});const v=(0,f.Z)(g,[["__scopeId","data-v-3303e3d5"]]);var p=v,N=t(9706);const k=e=>((0,l.pushScopeId)("data-v-0b3812f2"),e=e(),(0,l.popScopeId)(),e),M={class:"info-modal-header"},V=["src","alt"],w={class:"info-modal-title"},Z={key:0},x={key:0},C=k((()=>(0,l.createElementVNode)("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),E=k((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),B=k((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),I=["href"],P=k((()=>(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),F=k((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Paper Pilot Community ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),T=k((()=>(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[(0,l.createElementVNode)("span",{class:"material-icons info-modal-discord"},"discord"),(0,l.createTextVNode)(" The Modding Tree ")])],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),D=k((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var _=(0,l.defineComponent)({props:{changelog:null},setup(e,{expose:o}){const t=e,{title:i,logo:a,author:s,discordName:m,discordLink:u,versionNumber:f,versionTitle:y}=r,c=(0,l.toRefs)(t),b=(0,l.ref)(!1),h=(0,l.computed)((()=>(0,N.mr)(n.Z.timePlayed)));function S(){(0,l.unref)(c.changelog)?.open()}return o({open(){b.value=!0}}),(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(d.Z,{modelValue:b.value,"onUpdate:modelValue":o[0]||(o[0]=e=>b.value=e)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",M,[(0,l.unref)(a)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"info-modal-logo",src:(0,l.unref)(a),alt:(0,l.unref)(i)},null,8,V)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",w,[(0,l.createElementVNode)("h2",null,(0,l.toDisplayString)((0,l.unref)(i)),1),(0,l.createElementVNode)("h4",null,(()=>"v"+(0,l.toDisplayString)((0,l.unref)(f))+": "!==void 0&&"v"+(0,l.toDisplayString)((0,l.unref)(f))+": "!==null&&("v"+(0,l.toDisplayString)((0,l.unref)(f))+": ")[Symbol.for("+")]?("v"+(0,l.toDisplayString)((0,l.unref)(f))+": ")[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(y))):"v"+(0,l.toDisplayString)((0,l.unref)(f))+": "+(0,l.toDisplayString)((0,l.unref)(y)))(),1)])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",Z,[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("div",x,(()=>"By "[Symbol.for("+")]?"By "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(s))):"By "+(0,l.toDisplayString)((0,l.unref)(s)))(),1)):(0,l.createCommentVNode)("",!0),C,E,(0,l.createElementVNode)("div",{class:"link",onClick:S},"Changelog"),B,(0,l.createElementVNode)("div",null,[(()=>void 0!==(0,l.unref)(u)&&null!==(0,l.unref)(u)&&(0,l.unref)(u)[Symbol.for("!==")]?(0,l.unref)(u)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(u))()?((0,l.openBlock)(),(0,l.createElementBlock)("a",{key:0,href:(0,l.unref)(u),class:"info-modal-discord-link"},[P,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(m))):" "+(0,l.toDisplayString)((0,l.unref)(m)))(),1)],8,I)):(0,l.createCommentVNode)("",!0)]),F,T,D,(0,l.createElementVNode)("div",null,(()=>"Time Played: "[Symbol.for("+")]?"Time Played: "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(h))):"Time Played: "+(0,l.toDisplayString)((0,l.unref)(h)))(),1)])):(0,l.createCommentVNode)("",!0)])),_:1},8,["modelValue"]))}});const O=(0,f.Z)(_,[["__scopeId","data-v-0b3812f2"]]);var R=O,j=t(1037),W=t(9266),q=t(1349);const L={class:"field"};var A=(0,l.defineComponent)({props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,r=(0,l.computed)((()=>(0,m.MM)((0,l.unref)(t.title)||"<span></span>","span"))),i=(0,l.computed)({get(){return(()=>void 0!==!t.modelValue&&null!==!t.modelValue&&(!t.modelValue)[Symbol.for("!")]?(!t.modelValue)[Symbol.for("!")]():!!t.modelValue)()},set(e){o("update:modelValue",e)}});return(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("label",L,[(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(i)?i.value=e:null)},null,512),[[l.vModelCheckbox,(0,l.unref)(i)]]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(r))))]))}});const z=(0,f.Z)(A,[["__scopeId","data-v-7db643c6"]]);var U=z,G=t(9179);const J={class:"field"},Y={key:0,class:"field-title"};var H=(0,l.defineComponent)({props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=e,r=(0,m.KO)((0,l.toRef)(t,"title"),"span"),i=(0,l.ref)(t.options.find((e=>e.value===t.modelValue)));function n(e){o("update:modelValue",e.value)}return(0,l.watch)((0,l.toRef)(t,"modelValue"),(e=>{(()=>void 0!==i.value?.value&&null!==i.value?.value&&i.value?.value[Symbol.for("!==")]?i.value?.value[Symbol.for("!==")](e):i.value?.value!==e)()&&(i.value=t.options.find((o=>o.value===e)))})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",J,[(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",Y,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(r))))])):(0,l.createCommentVNode)("",!0),(0,l.createVNode)((0,l.unref)(G.Z),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>i.value=e),n],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const $=H;var X=$,Q=t(5939),K=t(6113);const ee=e=>((0,l.pushScopeId)("data-v-54e795a4"),e=e(),(0,l.popScopeId)(),e),oe=ee((()=>(0,l.createElementVNode)("div",{class:"header"},[(0,l.createElementVNode)("h2",null,"Options")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),te=ee((()=>(0,l.createElementVNode)("hr",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var le=(0,l.defineComponent)({setup(e,{expose:o}){const t=(0,l.ref)(!1);o({open(){t.value=!0}});const r=Object.keys(j.Z).map((e=>({label:(0,q.IJ)(e),value:e}))),i=(0,l.computed)((()=>(0,m.MM)((0,K.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[W.V$.map(m.sY)])))))),{showTPS:a,theme:s,unthrottled:u}=(0,l.toRefs)(W.ZP),{autosave:f,offlineProd:y}=(0,l.toRefs)(n.Z),c=(0,l.computed)({get(){return 0===n.Z.devSpeed},set(e){n.Z.devSpeed=e?0:null}}),b=(0,K.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Offline Production"),(0,l.createVNode)(Q.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),h=(0,K.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Autosave"),(0,l.createVNode)(Q.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})]))),S=(0,K.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.createTextVNode)("Pause game"),(0,l.createVNode)(Q.Z,{display:"Save-specific"},{default:()=>[(0,l.createTextVNode)("*")]})])));return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(d.Z,{modelValue:t.value,"onUpdate:modelValue":o[6]||(o[6]=e=>t.value=e)},{header:(0,l.withCtx)((()=>[oe])),body:(0,l.withCtx)((()=>[(0,l.createVNode)(X,{title:"Theme",options:(0,l.unref)(r),modelValue:(0,l.unref)(s),"onUpdate:modelValue":o[0]||(o[0]=e=>(0,l.isRef)(s)?s.value=e:null)},null,8,["options","modelValue"]),((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(i)))),(0,l.createVNode)(U,{title:"Show TPS",modelValue:(0,l.unref)(a),"onUpdate:modelValue":o[1]||(o[1]=e=>(0,l.isRef)(a)?a.value=e:null)},null,8,["modelValue"]),te,(0,l.createVNode)(U,{title:"Unthrottled",modelValue:(0,l.unref)(u),"onUpdate:modelValue":o[2]||(o[2]=e=>(0,l.isRef)(u)?u.value=e:null)},null,8,["modelValue"]),(0,l.createVNode)(U,{title:(0,l.unref)(b),modelValue:(0,l.unref)(y),"onUpdate:modelValue":o[3]||(o[3]=e=>(0,l.isRef)(y)?y.value=e:null)},null,8,["title","modelValue"]),(0,l.createVNode)(U,{title:(0,l.unref)(h),modelValue:(0,l.unref)(f),"onUpdate:modelValue":o[4]||(o[4]=e=>(0,l.isRef)(f)?f.value=e:null)},null,8,["title","modelValue"]),(0,l.createVNode)(U,{title:(0,l.unref)(S),modelValue:(0,l.unref)(c),"onUpdate:modelValue":o[5]||(o[5]=e=>(0,l.isRef)(c)?c.value=e:null)},null,8,["title","modelValue"])])),_:1},8,["modelValue"]))}});const re=(0,f.Z)(le,[["__scopeId","data-v-54e795a4"]]);var ie=re,ne=t(463),ae=t(7197);const se=["onSubmit"],me={class:"field"},ue={key:0,class:"field-title"},fe=["placeholder"];var ye=(0,l.defineComponent)({props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:o}){const t=e,r=(0,l.toRefs)(t),i=(0,l.computed)((()=>r.title?.value&&(0,m.MM)((0,l.unref)(r.title.value),"span"))),n=(0,l.ref)(null);(0,l.onMounted)((()=>{n.value?.focus()}));const a=(0,l.computed)({get(){return(0,l.unref)(r.modelValue)||""},set(e){o("update:modelValue",e)}});function s(){o("submit")}return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("form",{onSubmit:(0,l.withModifiers)(s,["prevent"])},[(0,l.createElementVNode)("div",me,[(0,l.unref)(i)?((0,l.openBlock)(),(0,l.createElementBlock)("span",ue,[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(i))))])):(0,l.createCommentVNode)("",!0),e.textArea?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(ae.Z),{key:1,modelValue:(0,l.unref)(a),"onUpdate:modelValue":t[0]||(t[0]=e=>(0,l.isRef)(a)?a.value=e:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:s,ref_key:"field",ref:n},null,8,["modelValue","placeholder","maxHeight"])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:2,type:"text","onUpdate:modelValue":t[1]||(t[1]=e=>(0,l.isRef)(a)?a.value=e:null),placeholder:e.placeholder,class:(0,l.normalizeClass)({fullWidth:(()=>void 0!==e.title&&null!==e.title&&e.title[Symbol.for("!")]?e.title[Symbol.for("!")]():!e.title)()}),onBlur:s,ref_key:"field",ref:n},null,42,fe)),[[l.vModelText,(0,l.unref)(a)]])])],40,se))}});const ce=(0,f.Z)(ye,[["__scopeId","data-v-540fa62c"]]);var de=ce;const be={key:0},he=["onClick","disabled"],Se={key:0},ge=["onClick"];var ve=(0,l.defineComponent)({props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:o}){const t=e,r=(0,l.toRefs)(t),i=(0,l.ref)(!1);function n(){(0,l.unref)(r.skipConfirm)?o("click"):(i.value&&o("click"),i.value=(()=>void 0!==i.value&&null!==i.value&&i.value[Symbol.for("!")]?i.value[Symbol.for("!")]():!i.value)())}function a(){i.value=!1}return(0,l.watch)(i,(e=>{o("confirmingChanged",e)})),(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:(0,l.normalizeClass)(["container",{confirming:i.value}])},[i.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",be,"Are you sure?")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:(0,l.withModifiers)(n,["stop"]),class:"button danger",disabled:e.disabled},[i.value?((0,l.openBlock)(),(0,l.createElementBlock)("span",Se,"Yes")):(0,l.renderSlot)(o.$slots,"default",{key:1})],8,he),i.value?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,class:"button",onClick:(0,l.withModifiers)(a,["stop"])},"No",8,ge)):(0,l.createCommentVNode)("",!0)],2))}});const pe=(0,f.Z)(ve,[["__scopeId","data-v-bf59fca4"]]);var Ne=pe;const ke=["onClick"];var Me=(0,l.defineComponent)({props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:o}){const t=(0,l.ref)(!1),r=(0,l.ref)(null);function i(){o("click"),r.value&&clearTimeout(r.value),t.value=!1,(0,l.nextTick)((()=>{t.value=!0,r.value=setTimeout((()=>t.value=!1),500)}))}return(o,r)=>((0,l.openBlock)(),(0,l.createElementBlock)("button",{onClick:(0,l.withModifiers)(i,["stop"]),class:(0,l.normalizeClass)(["feedback",{activated:t.value,left:e.left}])},[(0,l.renderSlot)(o.$slots,"default")],10,ke))}});const Ve=(0,f.Z)(Me,[["__scopeId","data-v-5bbcedd3"]]);var we=Ve;const Ze=e=>((0,l.pushScopeId)("data-v-4c4580ca"),e=e(),(0,l.popScopeId)(),e),xe=Ze((()=>(0,l.createElementVNode)("div",{class:"handle material-icons"},"drag_handle",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ce={key:0,class:"actions"},Ee=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_paste",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Be=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"content_copy",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ie=[Be],Pe=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"edit",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Fe=[Pe],Te=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons",style:{margin:"-2px"}},"delete",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),De={key:1,class:"actions"},_e=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"check",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Oe=[_e],Re=Ze((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"close",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),je=[Re],We={key:2,class:"details"},qe={class:"save-version"},Le=Ze((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ae={key:0},ze={key:3,class:"details"},Ue={key:4,class:"details error"},Ge=Ze((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var Je=(0,l.defineComponent)({props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:o}){const t=e,{save:r}=(0,l.toRefs)(t),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=(0,l.ref)(!1),s=(0,l.ref)(!1),m=(0,l.ref)("");(0,l.watch)(a,(()=>m.value=r.value.name||""));const u=(0,l.computed)((()=>r.value&&r.value.id===n.Z.id)),f=(0,l.computed)((()=>u.value?n.Z.time:r.value&&r.value.time||0));function y(){o("editName",m.value),a.value=!1}return(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["save",{active:(0,l.unref)(u)}])},[xe,(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ce,[(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==s.value&&null!==s.value&&s.value[Symbol.for("!")]?s.value[Symbol.for("!")]():!s.value)()?((0,l.openBlock)(),(0,l.createBlock)(we,{key:0,onClick:t[0]||(t[0]=e=>o("export")),class:"button",left:""},{default:(0,l.withCtx)((()=>[Ee])),_:1})):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==s.value&&null!==s.value&&s.value[Symbol.for("!")]?s.value[Symbol.for("!")]():!s.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:1,onClick:t[1]||(t[1]=e=>o("duplicate")),class:"button"},Ie)):(0,l.createCommentVNode)("",!0),(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==s.value&&null!==s.value&&s.value[Symbol.for("!")]?s.value[Symbol.for("!")]():!s.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:2,onClick:t[2]||(t[2]=e=>a.value=(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()),class:"button"},Fe)):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(Ne,{disabled:(0,l.unref)(u),onClick:t[3]||(t[3]=e=>o("delete")),onConfirmingChanged:t[4]||(t[4]=e=>s.value=e)},{default:(0,l.withCtx)((()=>[Te])),_:1},8,["disabled"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",De,[(0,l.createElementVNode)("button",{onClick:y,class:"button"},Oe),(0,l.createElementVNode)("button",{onClick:t[5]||(t[5]=e=>a.value=(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()),class:"button"},je)])),(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&(()=>void 0!==a.value&&null!==a.value&&a.value[Symbol.for("!")]?a.value[Symbol.for("!")]():!a.value)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",We,[(0,l.createElementVNode)("button",{class:"button open",onClick:t[6]||(t[6]=e=>o("open"))},[(0,l.createElementVNode)("h3",null,(0,l.toDisplayString)((0,l.unref)(r).name),1)]),(0,l.createElementVNode)("span",qe,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r).modVersion)):"v"+(0,l.toDisplayString)((0,l.unref)(r).modVersion))(),1),Le,(0,l.unref)(f)?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ae,(()=>"Last played "[Symbol.for("+")]?"Last played "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(i).format((0,l.unref)(f)))):"Last played "+(0,l.toDisplayString)((0,l.unref)(i).format((0,l.unref)(f))))(),1)):(0,l.createCommentVNode)("",!0)])):(()=>void 0!==(0,l.unref)(r).error&&null!==(0,l.unref)(r).error&&(0,l.unref)(r).error[Symbol.for("==")]?(0,l.unref)(r).error[Symbol.for("==")](void 0):void 0==(0,l.unref)(r).error)()&&a.value?((0,l.openBlock)(),(0,l.createElementBlock)("div",ze,[(0,l.createVNode)(de,{modelValue:m.value,"onUpdate:modelValue":t[7]||(t[7]=e=>m.value=e),class:"editname",onSubmit:y},null,8,["modelValue"])])):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ue,[(0,l.createTextVNode)((()=>" Error: Failed to load save with id "[Symbol.for("+")]?" Error: Failed to load save with id "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(r).id)):" Error: Failed to load save with id "+(0,l.toDisplayString)((0,l.unref)(r).id))(),1),Ge,(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(r).error),1)]))],2))}});const Ye=(0,f.Z)(Je,[["__scopeId","data-v-4c4580ca"]]);var He=Ye,$e=t(9980),Xe=t.n($e);const Qe=e=>((0,l.pushScopeId)("data-v-199ffea0"),e=e(),(0,l.popScopeId)(),e),Ke=Qe((()=>(0,l.createElementVNode)("h2",null,"Saves Manager",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),eo={class:"modal-footer"},oo={class:"field"},to=Qe((()=>(0,l.createElementVNode)("span",{class:"field-title"},"Create Save",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),lo={class:"field-buttons"},ro={class:"footer"},io=Qe((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var no=(0,l.defineComponent)({setup(e,{expose:o}){const r=(0,l.ref)(!1),i=(0,l.ref)(null);o({open(){r.value=!0}});const a=(0,l.ref)(!1),s=(0,l.ref)("");(0,l.watch)(s,(e=>{e?(0,l.nextTick)((()=>{try{const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==typeof o&&null!==typeof o&&(typeof o)[Symbol.for("!==")]?(typeof o)[Symbol.for("!==")]("object"):"object"!==typeof o)())return void(a.value=!0);const t=(0,ne.QI)();o.id=t,localStorage.setItem(t,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),s.value="",a.value=!1,W.ZP.saves.push(t)}catch(o){a.value=!0}})):a.value=!1}));let m=t(7634),u=(0,l.ref)(m.keys().reduce(((e,o)=>(e.push({label:o.slice(2,(()=>4[Symbol.for("minus")]?4[Symbol.for("minus")]():-4)()),value:m(o).default}),e)),[]));const f=(0,l.shallowReactive)({});function y(e){if((()=>void 0!==f[e]&&null!==f[e]&&f[e][Symbol.for("==")]?f[e][Symbol.for("==")](null):null==f[e])()){const t=localStorage.getItem(e);if((()=>void 0!==t&&null!==t&&t[Symbol.for("==")]?t[Symbol.for("==")](null):null==t)())f[e]={error:"Save doesn't exist in localStorage",id:e};else if("dW5kZWZpbmVk"===t)f[e]={error:"Save is undefined",id:e};else try{f[e]={...JSON.parse(decodeURIComponent(escape(atob(t)))),id:e}}catch(o){f[e]={error:o,id:e},console.warn(`SavesManager: Failed to load info about save with id ${e}:\n${o}\n${t}`)}}return f[e]}(0,l.watch)(r,(e=>{e&&Object.keys(f).forEach((e=>(()=>void 0!==f&&null!==f&&f[Symbol.for("delete")]?f[Symbol.for("delete")]("key"):delete f.key)()))}));const c=(0,l.computed)((()=>W.ZP.saves.reduce(((e,o)=>(e[o]=y(o),e)),{})));function b(e){let o;o=n.Z.id===e?(0,ne.a1)():btoa(unescape(encodeURIComponent(JSON.stringify(c.value[e]))));const t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}function h(e){n.Z.id===e&&(0,ne.a1)();const o={...c.value[e],id:(0,ne.QI)()};localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),W.ZP.saves.push(o.id)}function S(e){W.ZP.saves=W.ZP.saves.filter((o=>(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](e):o!==e)())),localStorage.removeItem(e),f[e]=void 0}function g(e){c.value[n.Z.id].time=n.Z.time,(0,ne.a1)(),(0,ne.uW)(c.value[e]),f[e]=void 0}function v(e){const o=JSON.parse(decodeURIComponent(escape(atob(e))));o.id=(0,ne.QI)(),localStorage.setItem(o.id,btoa(unescape(encodeURIComponent(JSON.stringify(o))))),W.ZP.saves.push(o.id)}function p(e,o){const t=c.value[e];t&&(t.name=o,n.Z.id===e?(n.Z.name=o,(0,ne.a1)()):(localStorage.setItem(e,btoa(unescape(encodeURIComponent(JSON.stringify(t))))),f[e]=void 0))}return(e,o)=>((0,l.openBlock)(),(0,l.createBlock)(d.Z,{modelValue:r.value,"onUpdate:modelValue":o[4]||(o[4]=e=>r.value=e),ref_key:"modal",ref:i},{header:(0,l.withCtx)((()=>[Ke])),body:(0,l.withCtx)((()=>[(0,l.unref)(i.value?.isOpen)?((0,l.openBlock)(),(0,l.createBlock)((0,l.unref)(Xe()),{key:0,list:(0,l.unref)(W.ZP).saves,handle:".handle",itemKey:e=>e},{item:(0,l.withCtx)((({element:e})=>[(0,l.createVNode)(He,{save:(0,l.unref)(c)[e],onOpen:o=>g(e),onExport:o=>b(e),onEditName:o=>p(e,o),onDuplicate:o=>h(e),onDelete:o=>S(e)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])])),_:1},8,["list","itemKey"])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",eo,[(0,l.createVNode)(de,{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=e=>s.value=e),title:"Import Save",placeholder:"Paste your save here!",class:(0,l.normalizeClass)({importingFailed:a.value})},null,8,["modelValue","class"]),(0,l.createElementVNode)("div",oo,[to,(0,l.createElementVNode)("div",lo,[(0,l.createElementVNode)("button",{class:"button",onClick:o[1]||(o[1]=(...e)=>(0,l.unref)(ne.xM)&&(0,l.unref)(ne.xM)(...e))},"New Game"),(()=>void 0!==Object.keys((0,l.unref)(u)).length&&null!==Object.keys((0,l.unref)(u)).length&&Object.keys((0,l.unref)(u)).length[Symbol.for(">")]?Object.keys((0,l.unref)(u)).length[Symbol.for(">")](0):Object.keys((0,l.unref)(u)).length>0)()?((0,l.openBlock)(),(0,l.createBlock)(X,{key:0,options:(0,l.unref)(u),modelValue:void 0,"onUpdate:modelValue":o[2]||(o[2]=e=>v(e)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",ro,[io,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:o[3]||(o[3]=e=>r.value=!1)}," Close ")])])])),_:1},8,["modelValue"]))}});const ao=(0,f.Z)(no,[["__scopeId","data-v-199ffea0"]]);var so=ao;const mo=e=>((0,l.pushScopeId)("data-v-72eb8c78"),e=e(),(0,l.popScopeId)(),e),uo=["src","alt"],fo={key:1,class:"title"},yo=mo((()=>(0,l.createElementVNode)("div",{style:{"flex-grow":"1",cursor:"unset"}},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),co={class:"discord"},bo={class:"discord-links"},ho={key:0},So=["href"],go=mo((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),vo=mo((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),po={href:"https://forums.moddingtree.com/",target:"_blank"},No=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ko=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Mo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Vo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),wo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"library_books",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Zo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"settings",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),xo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"info",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Co={href:"https://forums.moddingtree.com/",target:"_blank"},Eo=mo((()=>(0,l.createElementVNode)("span",{class:"material-icons"},"forum",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Bo={class:"discord"},Io={class:"discord-links"},Po={key:0},Fo=["href"],To=mo((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Do=mo((()=>(0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var _o=(0,l.defineComponent)({setup(e){const o=(0,l.ref)(null),t=(0,l.ref)(null),i=(0,l.ref)(null),n=(0,l.ref)(null),{useHeader:a,banner:s,title:m,discordName:u,discordLink:f,versionNumber:y}=r;function c(){window.open(f,"mywindow")}return(e,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.unref)(a)?((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:0,class:"nav"},e.$attrs),[(0,l.unref)(s)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,src:(0,l.unref)(s),height:"100%",alt:(0,l.unref)(m)},null,8,uo)):((0,l.openBlock)(),(0,l.createElementBlock)("div",fo,(0,l.toDisplayString)((0,l.unref)(m)),1)),(0,l.createElementVNode)("div",{onClick:r[0]||(r[0]=e=>n.value?.open()),class:"version-container"},[(0,l.createVNode)(Q.Z,{display:"Changelog",bottom:"",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(y))):"v"+(0,l.toDisplayString)((0,l.unref)(y)))(),1)])),_:1})]),yo,(0,l.createElementVNode)("div",co,[(0,l.createElementVNode)("span",{onClick:c,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",bo,[(()=>void 0!==(0,l.unref)(f)&&null!==(0,l.unref)(f)&&(0,l.unref)(f)[Symbol.for("!==")]?(0,l.unref)(f)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(f))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",ho,[(0,l.createElementVNode)("a",{href:(0,l.unref)(f),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(u)),9,So)])):(0,l.createCommentVNode)("",!0),go,vo])]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",po,[(0,l.createVNode)(Q.Z,{display:"Forums",bottom:"",yoffset:"5px"},{default:(0,l.withCtx)((()=>[No])),_:1})])]),(0,l.createElementVNode)("div",{onClick:r[1]||(r[1]=e=>o.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Info",bottom:"",class:"info"},{default:(0,l.withCtx)((()=>[ko])),_:1})]),(0,l.createElementVNode)("div",{onClick:r[2]||(r[2]=e=>t.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Saves",bottom:"",xoffset:"-20px"},{default:(0,l.withCtx)((()=>[Mo])),_:1})]),(0,l.createElementVNode)("div",{onClick:r[3]||(r[3]=e=>i.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Options",bottom:"",xoffset:"-66px"},{default:(0,l.withCtx)((()=>[Vo])),_:1})])],16)):((0,l.openBlock)(),(0,l.createElementBlock)("div",(0,l.mergeProps)({key:1,class:"overlay-nav"},e.$attrs),[(0,l.createElementVNode)("div",{onClick:r[4]||(r[4]=e=>n.value?.open()),class:"version-container"},[(0,l.createVNode)(Q.Z,{display:"Changelog",right:"",xoffset:"25%",class:"version"},{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("span",null,(()=>"v"[Symbol.for("+")]?"v"[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(y))):"v"+(0,l.toDisplayString)((0,l.unref)(y)))(),1)])),_:1})]),(0,l.createElementVNode)("div",{onClick:r[5]||(r[5]=e=>t.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Saves",right:""},{default:(0,l.withCtx)((()=>[wo])),_:1})]),(0,l.createElementVNode)("div",{onClick:r[6]||(r[6]=e=>i.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Options",right:""},{default:(0,l.withCtx)((()=>[Zo])),_:1})]),(0,l.createElementVNode)("div",{onClick:r[7]||(r[7]=e=>o.value?.open())},[(0,l.createVNode)(Q.Z,{display:"Info",right:""},{default:(0,l.withCtx)((()=>[xo])),_:1})]),(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",Co,[(0,l.createVNode)(Q.Z,{display:"Forums",right:"",xoffset:"7px"},{default:(0,l.withCtx)((()=>[Eo])),_:1})])]),(0,l.createElementVNode)("div",Bo,[(0,l.createElementVNode)("span",{onClick:c,class:"material-icons"},"discord"),(0,l.createElementVNode)("ul",Io,[(()=>void 0!==(0,l.unref)(f)&&null!==(0,l.unref)(f)&&(0,l.unref)(f)[Symbol.for("!==")]?(0,l.unref)(f)[Symbol.for("!==")]("https://discord.gg/WzejVAx"):"https://discord.gg/WzejVAx"!==(0,l.unref)(f))()?((0,l.openBlock)(),(0,l.createElementBlock)("li",Po,[(0,l.createElementVNode)("a",{href:(0,l.unref)(f),target:"_blank"},(0,l.toDisplayString)((0,l.unref)(u)),9,Fo)])):(0,l.createCommentVNode)("",!0),To,Do])])],16)),(0,l.createVNode)(R,{ref_key:"info",ref:o,changelog:n.value},null,8,["changelog"]),(0,l.createVNode)(so,{ref_key:"savesManager",ref:t},null,512),(0,l.createVNode)(ie,{ref_key:"options",ref:i},null,512),(0,l.createVNode)(p,{ref_key:"changelog",ref:n},null,512)],64))}});const Oo=(0,f.Z)(_o,[["__scopeId","data-v-72eb8c78"]]);var Ro=Oo;const jo={class:"tabs-container"},Wo={class:"inner-tab"},qo={key:1,class:"separator"};var Lo=(0,l.defineComponent)({setup(e){const o=(0,l.toRef)(n.Z,"tabs"),t=(0,l.computed)((()=>Object.keys(i.layers))),a=r.useHeader;function s(e){const{display:o,minimized:t,minWidth:l,name:r,color:i,style:n,classes:a,links:s,minimizable:m}=e;return{display:o,minimized:t,minWidth:l,name:r,color:i,style:n,classes:a,links:s,minimizable:m}}return(e,r)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",jo,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(o),((r,n)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:n,class:"tab",ref_for:!0,ref:`tab-${n}`},[0===n&&(()=>void 0!==(0,l.unref)(a)&&null!==(0,l.unref)(a)&&(0,l.unref)(a)[Symbol.for("!")]?(0,l.unref)(a)[Symbol.for("!")]():!(0,l.unref)(a))()?((0,l.openBlock)(),(0,l.createBlock)(Ro,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Wo,[(0,l.unref)(t).includes(r)?((0,l.openBlock)(),(0,l.createBlock)(c,(0,l.mergeProps)({key:0},s((0,l.unref)(i.layers)[r]),{index:n,tab:()=>e.$refs[`tab-${n}`]?.[0]}),null,16,["index","tab"])):((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(r),{key:1,index:n},null,8,["index"]))]),(()=>void 0!==n&&null!==n&&n[Symbol.for("!==")]?n[Symbol.for("!==")]((0,l.unref)(o).length-1):n!==(0,l.unref)(o).length-1)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",qo)):(0,l.createCommentVNode)("",!0)])))),128))]))}});const Ao=(0,f.Z)(Lo,[["__scopeId","data-v-6bcb9872"]]);var zo=Ao,Uo=t(8097);const Go=e=>((0,l.pushScopeId)("data-v-364b55bc"),e=e(),(0,l.popScopeId)(),e),Jo={class:"game-over-modal-header"},Yo=["src","alt"],Ho={class:"game-over-modal-title"},$o=Go((()=>(0,l.createElementVNode)("h2",null,"Congratulations!",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Xo={key:0},Qo=Go((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),Ko=Go((()=>(0,l.createElementVNode)("div",null," Please check the Discord to discuss the game or to check for new content updates! ",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),et=Go((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ot=["href"],tt=Go((()=>(0,l.createElementVNode)("span",{class:"material-icons game-over-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())));var lt=(0,l.defineComponent)({setup(e){const{title:o,logo:t,discordName:i,discordLink:a,versionNumber:s,versionTitle:m}=r,u=(0,l.computed)((()=>(0,N.mr)(n.Z.timePlayed))),f=(0,l.computed)((()=>Uo.hasWon.value&&(()=>void 0!==n.Z.keepGoing&&null!==n.Z.keepGoing&&n.Z.keepGoing[Symbol.for("!")]?n.Z.keepGoing[Symbol.for("!")]():!n.Z.keepGoing)())),y=(0,l.toRef)(n.Z,"autosave");function c(){n.Z.keepGoing=!0}function b(){(0,ne.uW)((0,ne.xM)())}return(e,r)=>((0,l.openBlock)(),(0,l.createBlock)(d.Z,{"model-value":(0,l.unref)(f)},{header:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",Jo,[(0,l.unref)(t)?((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:0,class:"game-over-modal-logo",src:(0,l.unref)(t),alt:(0,l.unref)(o)},null,8,Yo)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Ho,[$o,(0,l.createElementVNode)("h4",null,(()=>"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(s))+": "!==void 0&&"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(s))+": "!==null&&("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(s))+": ")[Symbol.for("+")]?("You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(s))+": ")[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(m))):"You've beaten "+(0,l.toDisplayString)((0,l.unref)(o))+" v"+(0,l.toDisplayString)((0,l.unref)(s))+": "+(0,l.toDisplayString)((0,l.unref)(m)))(),1)])])])),body:(0,l.withCtx)((({shown:e})=>[e?((0,l.openBlock)(),(0,l.createElementBlock)("div",Xo,[(0,l.createElementVNode)("div",null,(()=>"It took you "+(0,l.toDisplayString)((0,l.unref)(u))!==void 0&&"It took you "+(0,l.toDisplayString)((0,l.unref)(u))!==null&&("It took you "+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")]?("It took you "+(0,l.toDisplayString)((0,l.unref)(u)))[Symbol.for("+")](" to beat the game."):"It took you "+(0,l.toDisplayString)((0,l.unref)(u))+" to beat the game.")(),1),Qo,Ko,et,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(a),class:"game-over-modal-discord-link"},[tt,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(i))):" "+(0,l.toDisplayString)((0,l.unref)(i)))(),1)],8,ot)]),(0,l.createVNode)(U,{title:"Autosave",modelValue:(0,l.unref)(y),"onUpdate:modelValue":r[0]||(r[0]=e=>(0,l.isRef)(y)?y.value=e:null)},null,8,["modelValue"])])):(0,l.createCommentVNode)("",!0)])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",{class:"game-over-footer"},[(0,l.createElementVNode)("button",{onClick:c,class:"button"},"Keep Going"),(0,l.createElementVNode)("button",{onClick:b,class:"button danger"},"Play Again")])])),_:1},8,["model-value"]))}});const rt=(0,f.Z)(lt,[["__scopeId","data-v-364b55bc"]]);var it=rt,nt=t(3032);const at=e=>((0,l.pushScopeId)("data-v-0f93e378"),e=e(),(0,l.popScopeId)(),e),st=at((()=>(0,l.createElementVNode)("div",{class:"nan-modal-header"},[(0,l.createElementVNode)("h2",null,"NaN value detected!")],(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),mt={key:0},ut=at((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ft=["href"],yt=at((()=>(0,l.createElementVNode)("span",{class:"material-icons nan-modal-discord"},"discord",(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),ct=at((()=>(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()))),dt={class:"nan-footer"};var bt=(0,l.defineComponent)({setup(e){const{discordName:o,discordLink:t}=r,i=(0,l.toRef)(n.Z,"autosave"),a=(0,l.toRef)(nt.Z,"hasNaN"),s=(0,l.ref)(null),m=(0,l.computed)((()=>nt.Z.NaNPath.join("."))),u=(0,l.computed)((()=>nt.Z.NaNPath.slice((()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)())[0])),f=(0,l.computed)((()=>nt.Z.NaNReceiver&&u.value?nt.Z.NaNReceiver[u.value]:null)),y=(0,l.computed)({get(){return 0===n.Z.devSpeed},set(e){n.Z.devSpeed=e?null:0}});function c(){nt.Z.NaNReceiver&&u.value&&(nt.Z.NaNReceiver[u.value]=new N.ZP(0),nt.Z.hasNaN=!1)}function b(){nt.Z.NaNReceiver&&u.value&&(nt.Z.NaNReceiver[u.value]=new N.ZP(1),nt.Z.hasNaN=!1)}function h(){nt.Z.NaNReceiver&&u.value&&(nt.Z.NaNReceiver[u.value]=new N.ZP(NaN),nt.Z.hasNaN=!1)}return(e,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(d.Z,(0,l.mergeProps)({modelValue:(0,l.unref)(a),"onUpdate:modelValue":r[4]||(r[4]=e=>(0,l.isRef)(a)?a.value=e:null)},e.$attrs),{header:(0,l.withCtx)((()=>[st])),body:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",null,[(0,l.createTextVNode)((()=>' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(m))!==void 0&&' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(m))!==null&&(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")]?(' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(m)))[Symbol.for("+")]('" to NaN'):' Attempted to assign "'+(0,l.toDisplayString)((0,l.unref)(m))+'" to NaN')(),1),(0,l.unref)(f)?((0,l.openBlock)(),(0,l.createElementBlock)("span",mt,(()=>(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(N.WU)((0,l.unref)(f)))!==void 0&&(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(N.WU)((0,l.unref)(f)))!==null&&((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(N.WU)((0,l.unref)(f))))[Symbol.for("+")]?((0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(N.WU)((0,l.unref)(f))))[Symbol.for("+")](")"):(0,l.toDisplayString)(" ")+"(previously "+(0,l.toDisplayString)((0,l.unref)(N.WU)((0,l.unref)(f)))+")")(),1)):(0,l.createCommentVNode)("",!0),(0,l.createTextVNode)((()=>". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(i)?"enabled":"disabled")!==void 0&&". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(i)?"enabled":"disabled")!==null&&(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(i)?"enabled":"disabled"))[Symbol.for("+")]?(". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(i)?"enabled":"disabled"))[Symbol.for("+")](". Check the console for more details, and consider sharing it with the developers on discord. "):". Auto-saving has been "+(0,l.toDisplayString)((0,l.unref)(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ")(),1)]),ut,(0,l.createElementVNode)("div",null,[(0,l.createElementVNode)("a",{href:(0,l.unref)(t),class:"nan-modal-discord-link"},[yt,(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)((0,l.unref)(o))):" "+(0,l.toDisplayString)((0,l.unref)(o)))(),1)],8,ft)]),ct,(0,l.createVNode)(U,{title:"Autosave",modelValue:(0,l.unref)(i),"onUpdate:modelValue":r[0]||(r[0]=e=>(0,l.isRef)(i)?i.value=e:null)},null,8,["modelValue"]),(0,l.createVNode)(U,{title:"Pause game",modelValue:(0,l.unref)(y),"onUpdate:modelValue":r[1]||(r[1]=e=>(0,l.isRef)(y)?y.value=e:null)},null,8,["modelValue"])])),footer:(0,l.withCtx)((()=>[(0,l.createElementVNode)("div",dt,[(0,l.createElementVNode)("button",{onClick:r[2]||(r[2]=e=>s.value?.open()),class:"button"},"Open Saves Manager"),(0,l.createElementVNode)("button",{onClick:c,class:"button"},"Set to 0"),(0,l.createElementVNode)("button",{onClick:b,class:"button"},"Set to 1"),(0,l.unref)(f)&&(0,l.unref)(N.ZP).neq((0,l.unref)(f),0)&&(0,l.unref)(N.ZP).neq((0,l.unref)(f),1)?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:r[3]||(r[3]=e=>a.value=!1),class:"button"}," Set to previous ")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("button",{onClick:h,class:"button danger"},"Ignore")])])),_:1},16,["modelValue"]),(0,l.createVNode)(so,{ref_key:"savesManager",ref:s},null,512)],64))}});const ht=(0,f.Z)(bt,[["__scopeId","data-v-0f93e378"]]);var St=ht;const gt={key:0,class:"tpsDisplay"},vt={key:0,class:"low"};var pt=(0,l.defineComponent)({setup(e){const o=(0,l.computed)((()=>N.ZP.div(nt.Z.lastTenTicks.length,nt.Z.lastTenTicks.reduce(((e,o)=>(()=>void 0!==e&&null!==e&&e[Symbol.for("+")]?e[Symbol.for("+")](o):e+o)()),0)))),t=(0,l.ref)([]);(0,l.watchEffect)((()=>{t.value.push(Math.round(o.value.toNumber())),(()=>void 0!==t.value.length&&null!==t.value.length&&t.value.length[Symbol.for(">")]?t.value.length[Symbol.for(">")](10):t.value.length>10)()&&(t.value=t.value.slice(1))}));const r=(0,l.computed)((()=>t.value.reduce(((e,o)=>N.ZP.max(e,o)),0))),i=(0,l.computed)((()=>N.ZP.sub(o.value,r.value).gt(1)));return(e,t)=>(()=>void 0!==(0,l.unref)(o).isNan()&&null!==(0,l.unref)(o).isNan()&&(0,l.unref)(o).isNan()[Symbol.for("!")]?(0,l.unref)(o).isNan()[Symbol.for("!")]():!(0,l.unref)(o).isNan())()?((0,l.openBlock)(),(0,l.createElementBlock)("div",gt,[(0,l.createTextVNode)((()=>" TPS: "+(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(o)))!==void 0&&" TPS: "+(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(o)))!==null&&(" TPS: "+(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(o))))[Symbol.for("+")]?(" TPS: "+(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(o))))[Symbol.for("+")](" "):" TPS: "+(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(o)))+" ")(),1),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[(0,l.unref)(i)?((0,l.openBlock)(),(0,l.createElementBlock)("span",vt,(0,l.toDisplayString)((0,l.unref)(N.Ht)((0,l.unref)(r))),1)):(0,l.createCommentVNode)("",!0)])),_:1})])):(0,l.createCommentVNode)("",!0)}});const Nt=(0,f.Z)(pt,[["__scopeId","data-v-323f9b12"]]);var kt=Nt,Mt=(0,l.defineComponent)({setup(e){function o(){}const t=r.useHeader,i=(0,l.computed)((()=>j.Z[W.ZP.theme].variables)),n=(0,l.toRef)(W.ZP,"showTPS");return(e,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createElementVNode)("div",{id:"modal-root",style:(0,l.normalizeStyle)((0,l.unref)(i))},null,4),(0,l.createElementVNode)("div",{class:(0,l.normalizeClass)(["app",{useHeader:(0,l.unref)(t)}]),onMousemove:o,style:(0,l.normalizeStyle)((0,l.unref)(i))},[(0,l.unref)(t)?((0,l.openBlock)(),(0,l.createBlock)(Ro,{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(zo),(0,l.unref)((0,l.unref)(n))?((0,l.openBlock)(),(0,l.createBlock)(kt,{key:1})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(it),(0,l.createVNode)(St)],38)],64))}});const Vt=(0,f.Z)(Mt,[["__scopeId","data-v-e0e491f6"]]);var wt=Vt;requestAnimationFrame((async()=>{console.log("%cMade in Profectus%c\nLearn more at www.moddingtree.com","font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await(0,ne.zD)();const{globalBus:e,startGameLoop:o}=await t(7302),i=window.vue=(0,l.createApp)({...wt});e.emit("setupVue",i),i.mount("#app"),document.title=r.title,o()})),window.modInfo=r},9706:function(e,o,t){"use strict";t.d(o,{WU:function(){return a},Ht:function(){return s},mr:function(){return m}});var l=t(3243);const{exponentialFormat:r,commaFormat:i,regularFormat:n,format:a,formatWhole:s,formatTime:m,toPlaces:u,formatSmall:f,invertOOM:y}=l;window.Decimal=l["default"],window.exponentialFormat=r,window.commaFormat=i,window.regularFormat=n,window.format=a,window.formatWhole=s,window.formatTime=m,window.toPlaces=u,window.formatSmall=f,window.invertOOM=y,o["ZP"]=l["default"]},3243:function(e,o,t){"use strict";t.r(o),t.d(o,{exponentialFormat:function(){return n},commaFormat:function(){return a},regularFormat:function(){return s},format:function(){return m},formatWhole:function(){return u},formatTime:function(){return f},toPlaces:function(){return y},formatSmall:function(){return c},invertOOM:function(){return d}});var l=t(1008),r=t(2345);o["default"]=l.Z;const i=new l.Z(1);function n(e,o,t=!0){let n=l.Z.log10(e).floor(),s=l.Z.div(e,l.Z.pow(10,n));"10"===s.toStringWithDecimalPlaces(o)&&(s=i,n=n.add(1));const u=n.gte(1e9)?m(n,Math.max(Math.max(o,3),r.defaultDecimalsShown)):n.gte(1e4)?a(n,0):n.toStringWithDecimalPlaces(0);return t?(()=>s.toStringWithDecimalPlaces(o)+"e"!==void 0&&s.toStringWithDecimalPlaces(o)+"e"!==null&&(s.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")]?(s.toStringWithDecimalPlaces(o)+"e")[Symbol.for("+")](u):s.toStringWithDecimalPlaces(o)+"e"+u)():(()=>"e"[Symbol.for("+")]?"e"[Symbol.for("+")](u):"e"+u)()}function a(e,o){if(null===e||void 0===e)return"NaN";if(e=new l.Z(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.001):e.mag<.001)())return(0).toFixed(o);const t=e.toStringWithDecimalPlaces(o),r=t.split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),(()=>void 0!==r.length&&null!==r.length&&r.length[Symbol.for("==")]?r.length[Symbol.for("==")](1):1==r.length)()?r[0]:(()=>r[0]+"."!==void 0&&r[0]+"."!==null&&(r[0]+".")[Symbol.for("+")]?(r[0]+".")[Symbol.for("+")](r[1]):r[0]+"."+r[1])()}function s(e,o){return null===e||void 0===e?"NaN":(e=new l.Z(e),(()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](1e-4):e.mag<1e-4)()?(0).toFixed(o):((()=>void 0!==e.mag&&null!==e.mag&&e.mag[Symbol.for("<")]?e.mag[Symbol.for("<")](.1):e.mag<.1)()&&(()=>void 0!==o&&null!==o&&o[Symbol.for("!==")]?o[Symbol.for("!==")](0):0!==o)()&&(o=Math.max(Math.max(o,4),r.defaultDecimalsShown)),e.toStringWithDecimalPlaces(o)))}function m(e,o,t){if((()=>void 0!==o&&null!==o&&o[Symbol.for("==")]?o[Symbol.for("==")](null):null==o)()&&(o=r.defaultDecimalsShown),t=t||r.allowSmall,e=new l.Z(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if((()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)())return(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](m(e.neg(),o)):"-"+m(e.neg(),o))();if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte("eeee1000")){const o=e.slog();return o.gte(1e6)?(()=>"F"[Symbol.for("+")]?"F"[Symbol.for("+")](m(o.floor())):"F"+m(o.floor()))():(()=>l.Z.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==void 0&&l.Z.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"!==null&&(l.Z.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")]?(l.Z.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F")[Symbol.for("+")](a(o.floor(),0)):l.Z.pow(10,o.sub(o.floor())).toStringWithDecimalPlaces(3)+"F"+a(o.floor(),0))()}if(e.gte("1e100000"))return n(e,0,!1);if(e.gte("1e1000"))return n(e,0);if(e.gte(1e9))return n(e,o);if(e.gte(1e3))return a(e,0);if(e.gte(.001)||(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)())return s(e,o);if(e.eq(0))return(0).toFixed(o);if(e=d(e),e.lt("1e1000")){const t=n(e,o);return t.replace(/([^(?:e|F)]*)$/,"-$1")}return(()=>void 0!==m(e,o)&&null!==m(e,o)&&m(e,o)[Symbol.for("+")]?m(e,o)[Symbol.for("+")]("⁻¹"):m(e,o)+"⁻¹")()}function u(e){return e=new l.Z(e),(()=>void 0!==e.sign&&null!==e.sign&&e.sign[Symbol.for("<")]?e.sign[Symbol.for("<")](0):e.sign<0)()?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](u(e.neg())):"-"+u(e.neg()))():e.gte(1e9)||e.lte(.98)&&(()=>void 0!==e.eq(0)&&null!==e.eq(0)&&e.eq(0)[Symbol.for("!")]?e.eq(0)[Symbol.for("!")]():!e.eq(0))()?m(e):m(e,0)}function f(e){return l.Z.lt(e,0)?(()=>"-"[Symbol.for("+")]?"-"[Symbol.for("+")](f(l.Z.neg(e))):"-"+f(l.Z.neg(e)))():l.Z.gt(e,(()=>2[Symbol.for("**")]?2[Symbol.for("**")](51):2**51)())?(()=>void 0!==m(l.Z.div(e,31536e3))&&null!==m(l.Z.div(e,31536e3))&&m(l.Z.div(e,31536e3))[Symbol.for("+")]?m(l.Z.div(e,31536e3))[Symbol.for("+")]("y"):m(l.Z.div(e,31536e3))+"y")():(e=new l.Z(e).toNumber(),(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](60):e<60)()?(()=>void 0!==m(e)&&null!==m(e)&&m(e)[Symbol.for("+")]?m(e)[Symbol.for("+")]("s"):m(e)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](3600):e<3600)()?(()=>u(Math.floor(e/60))+"m "+m(e%60)!==void 0&&u(Math.floor(e/60))+"m "+m(e%60)!==null&&(u(Math.floor(e/60))+"m "+m(e%60))[Symbol.for("+")]?(u(Math.floor(e/60))+"m "+m(e%60))[Symbol.for("+")]("s"):u(Math.floor(e/60))+"m "+m(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](86400):e<86400)()?(()=>u(Math.floor(e/3600))+"h "+u(Math.floor(e/60)%60)+"m "+u(e%60)!==void 0&&u(Math.floor(e/3600))+"h "+u(Math.floor(e/60)%60)+"m "+u(e%60)!==null&&(u(Math.floor(e/3600))+"h "+u(Math.floor(e/60)%60)+"m "+u(e%60))[Symbol.for("+")]?(u(Math.floor(e/3600))+"h "+u(Math.floor(e/60)%60)+"m "+u(e%60))[Symbol.for("+")]("s"):u(Math.floor(e/3600))+"h "+u(Math.floor(e/60)%60)+"m "+u(e%60)+"s")():(()=>void 0!==e&&null!==e&&e[Symbol.for("<")]?e[Symbol.for("<")](31536e3):e<31536e3)()?(()=>u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h "+u(Math.floor(e/60)%60)!==void 0&&u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h "+u(Math.floor(e/60)%60)!==null&&(u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h "+u(Math.floor(e/60)%60))[Symbol.for("+")]?(u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h "+u(Math.floor(e/60)%60))[Symbol.for("+")]("m"):u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h "+u(Math.floor(e/60)%60)+"m")():(()=>u(Math.floor(e/31536e3))+"y "+u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)!==void 0&&u(Math.floor(e/31536e3))+"y "+u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)!==null&&(u(Math.floor(e/31536e3))+"y "+u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24))[Symbol.for("+")]?(u(Math.floor(e/31536e3))+"y "+u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24))[Symbol.for("+")]("h"):u(Math.floor(e/31536e3))+"y "+u(Math.floor(e/84600)%365)+"d "+u(Math.floor(e/3600)%24)+"h")())}function y(e,o,t){e=new l.Z(e);let r=e.toStringWithDecimalPlaces(o);return new l.Z(r).gte(t)&&(r=l.Z.sub(t,Math.pow(.1,o)).toStringWithDecimalPlaces(o)),r}function c(e,o){return m(e,o,!0)}function d(e){let o=l.Z.log10(e).ceil();const t=l.Z.div(e,l.Z.pow(10,o));return o=o.neg(),e=new l.Z(10).pow(o).times(t),e}},1349:function(e,o,t){"use strict";function l(e){let o=e.replace(/([A-Z])/g," $1");return o=(()=>void 0!==o.charAt(0).toUpperCase()&&null!==o.charAt(0).toUpperCase()&&o.charAt(0).toUpperCase()[Symbol.for("+")]?o.charAt(0).toUpperCase()[Symbol.for("+")](o.slice(1)):o.charAt(0).toUpperCase()+o.slice(1))(),o}function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function i(e){return"function"===typeof e}t.d(o,{IJ:function(){return l},PO:function(){return r},mf:function(){return i}})},9583:function(e,o,t){"use strict";t.d(o,{mM:function(){return i},yB:function(){return n}});var l=t(4865),r=t(1349);const i=Symbol("DoNotCache");function n(e,o){const t=e[o];(0,r.mf)(t)&&0===t.length&&(()=>void 0!==t[i]&&null!==t[i]&&t[i][Symbol.for("!")]?t[i][Symbol.for("!")]():!t[i])()&&(e[o]=(0,l.computed)(t.bind(e)))}},3273:function(e,o,t){"use strict";t.d(o,{Le:function(){return l},c4:function(){return r},z2:function(){return i}});const l=Symbol("ProxyState"),r=Symbol("ProxyPath");function i(e){const o={};let t=!1;function r(){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),o}return new Proxy(o,{get(e,o){return o===l?r():r()[o]},set(){return console.error("Layers and features are shallow readonly"),!1},has(e,o){return o===l||Reflect.has(r(),o)},ownKeys(){return Reflect.ownKeys(r())},getOwnPropertyDescriptor(l,r){return(()=>void 0!==t&&null!==t&&t[Symbol.for("!")]?t[Symbol.for("!")]():!t)()&&(Object.assign(o,e()),t=!0),Object.getOwnPropertyDescriptor(l,r)}})}},463:function(e,o,t){"use strict";t.d(o,{a1:function(){return m},zD:function(){return u},xM:function(){return f},QI:function(){return y},uW:function(){return c},y6:function(){return d}});var l=t(2345),r=t(5967),i=t(9266),n=t(9706),a=t(3273);function s(e={}){return Object.assign({id:`${l.id}-0`,name:"Default Save",tabs:l.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:new n.ZP(0),timePlayed:new n.ZP(0),keepGoing:!1,modID:l.id,modVersion:l.versionNumber,layers:{}},e)}function m(){const e=btoa(unescape(encodeURIComponent((0,r.U)(r.Z[a.Le]))));return localStorage.setItem(r.Z.id,e),e}async function u(){(0,i.ri)();try{const e=localStorage.getItem(i.ZP.active);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void await c(f());const o=JSON.parse(decodeURIComponent(escape(atob(e))));if((()=>void 0!==o.modID&&null!==o.modID&&o.modID[Symbol.for("!==")]?o.modID[Symbol.for("!==")](l.id):o.modID!==l.id)())return void await c(f());o.id=i.ZP.active,await c(o)}catch(e){console.error("Failed to load save. Falling back to new save.\n",e),await c(f())}}function f(){const e=y(),o=s({id:e});return localStorage.setItem(e,btoa(unescape(encodeURIComponent((0,r.U)(o))))),i.ZP.saves.push(e),o}function y(){let e,o=0;do{e=`${l.id}-${(()=>void 0!==o&&null!==o&&"object"===typeof o&&o[Symbol.for("postfix-increment")]?o[Symbol.for("postfix-increment")]():o++)()}`}while(localStorage.getItem(e));return e}async function c(e){console.info("Loading save",e);const{layers:o,removeLayer:a,addLayer:m}=await Promise.resolve().then(t.bind(t,9365)),{fixOldSave:u,getInitialLayers:f}=await Promise.resolve().then(t.bind(t,8097));for(const t in o)a(o[t]);f(e).forEach((o=>m(o,e))),e=s(e),e.offlineProd&&e.time&&((()=>void 0!==e.offlineTime&&null!==e.offlineTime&&e.offlineTime[Symbol.for("==")]?e.offlineTime[Symbol.for("==")](void 0):void 0==e.offlineTime)()&&(e.offlineTime=new n.ZP(0)),e.offlineTime=n.ZP.add(e.offlineTime,(()=>Date.now()-e.time!==void 0&&Date.now()-e.time!==null&&(Date.now()-e.time)[Symbol.for("/")]?(Date.now()-e.time)[Symbol.for("/")](1e3):(Date.now()-e.time)/1e3)())),e.time=Date.now(),(()=>void 0!==e.modVersion&&null!==e.modVersion&&e.modVersion[Symbol.for("!==")]?e.modVersion[Symbol.for("!==")](l.versionNumber):e.modVersion!==l.versionNumber)()&&u(e.modVersion,e),Object.assign(r.Z,e),i.ZP.active=r.Z.id}setInterval((()=>{r.Z.autosave&&m()}),1e3),window.onbeforeunload=()=>{r.Z.autosave&&m()},window.save=m;const d=window.hardReset=async()=>{await c(f())}},8097:function(e,o,t){"use strict";t.r(o),t.d(o,{fixOldSave:function(){return Ce},getInitialLayers:function(){return Ze},hasWon:function(){return xe},main:function(){return we}});var l=t(4865),r=(0,l.defineComponent)({props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{style:(0,l.normalizeStyle)({width:e.width,height:e.height})},null,4))}});const i=r;var n=i,a=t(6113),s=t(9706),m=t(7302),u=t(4061);function f(e,o="points",t=0,l=!1){const r=(0,u.ax)(e);return r.displayName=o,r.precision=t,r.small=l,r}function y(e){const o=(0,u.ax)(e.value);return(0,l.watch)(e,(e=>{s.ZP.gt(e,o.value)&&(o.value=e)})),o}function c(e){const o=(0,u.ax)(e.value);return(0,l.watch)(e,((e,t)=>{s.ZP.gt(e,t)&&(o.value=s.ZP.add(o.value,s.ZP.sub(e,t)))})),o}function d(e,o){const t=(0,l.ref)(0),r=(0,l.ref)(0),i=(0,l.ref)(0);m.globalBus.on("update",(o=>{if(r.value=0,s.ZP.lte(e.value,1e100))return void(i.value=e.value);let l=e.value,n=i.value;if(i.value=l,s.ZP.gt(l,n))if(s.ZP.gte(l,"10^^8"))l=s.ZP.slog(l,1e10),n=s.ZP.slog(n,1e10),t.value=l.sub(n).div(o),r.value=(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)();else while(s.ZP.div(l,n).log(10).div(o).gte("100")&&(()=>void 0!==r.value&&null!==r.value&&r.value[Symbol.for("<=")]?r.value[Symbol.for("<=")](5):r.value<=5)()&&s.ZP.gt(n,0))l=s.ZP.log10(l),n=s.ZP.log10(n),t.value=l.sub(n).div(o),(()=>{void 0!==r.value&&null!==r.value&&"object"===typeof r.value&&r.value[Symbol.for("postfix-increment")]?r.value[Symbol.for("postfix-increment")]():r.value++})()}));const n=(0,l.computed)((()=>0===r.value?o?(()=>(0,s.WU)(o.value,e.precision,e.small)+" "+e.displayName!==void 0&&(0,s.WU)(o.value,e.precision,e.small)+" "+e.displayName!==null&&((0,s.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]?((0,s.WU)(o.value,e.precision,e.small)+" "+e.displayName)[Symbol.for("+")]("/s"):(0,s.WU)(o.value,e.precision,e.small)+" "+e.displayName+"/s")():"":(()=>(0,s.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)!==void 0&&(0,s.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)!==null&&((0,s.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value))[Symbol.for("+")]?((0,s.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value))[Symbol.for("+")]("s/sec"):(0,s.WU)(t.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")()));return n}function b(e,o){const t=o??e.value;return s.ZP.eq(e.precision,0)?(0,s.Ht)(t):(0,s.WU)(t,e.precision,e.small)}const h={key:0,class:"left-side-nodes"},S={key:1,class:"side-nodes"};function g(e,o,t,r,i,n){const a=(0,l.resolveComponent)("TreeNode");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.nodes),((o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("span",(0,l.mergeProps)({class:"row",key:t},e.$attrs),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(o,((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip}),null,16,["force-tooltip"])))),128))],16)))),128)),e.unref(e.leftSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",h,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.leftSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0),e.unref(e.rightSideNodes)?((0,l.openBlock)(),(0,l.createElementBlock)("span",S,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.unref(e.rightSideNodes),((o,t)=>((0,l.openBlock)(),(0,l.createBlock)(a,(0,l.mergeProps)({key:t},e.gatherNodeProps(o),{"force-tooltip":o.forceTooltip,small:""}),null,16,["force-tooltip"])))),128))])):(0,l.createCommentVNode)("",!0)],64)}var v=t(8755);const p=["disabled"];function N(e,o,t,r,i,n){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("LinkNode"),m=(0,l.resolveComponent)("Tooltip");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createBlock)(m,(0,l.mergeProps)({key:0},e.tooltipToBind&&e.gatherTooltipProps(e.tooltipToBind),{display:e.tooltipDisplay,force:e.forceTooltip,style:{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},class:{treeNode:!0,can:e.unref(e.canClick),small:e.unref(e.small),...e.unref(e.classes)}}),{default:(0,l.withCtx)((()=>[(0,l.createElementVNode)("button",{onClick:o[0]||(o[0]=(...o)=>e.click&&e.click(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),style:(0,l.normalizeStyle)([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},e.unref(e.style)??[]]),disabled:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))()},[((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp))))],44,p),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])])),_:1},16,["display","force","style","class"])):(0,l.createCommentVNode)("",!0)}var k=t(630),M=(0,l.defineComponent)({props:{id:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(0,l.inject)(k.Z),i=(0,l.inject)(k.w),n=(0,l.ref)(null),a=(0,l.computed)((()=>n.value&&n.value.parentElement));return r&&i&&((0,l.watch)([a,t.id],(([e,o],[t,n])=>{t&&i((0,l.unref)(n)),e&&r(o,e)})),(0,l.onUnmounted)((()=>i((0,l.unref)(t.id))))),(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"branch",ref_key:"node",ref:n},null,512))}}),V=t(3744);const w=(0,V.Z)(M,[["__scopeId","data-v-1318daf7"]]);var Z=w;const x={key:0},C={key:0,class:"mark star"},E=["src"];var B=(0,l.defineComponent)({props:{mark:{type:[Boolean,String]}},setup(e){return(o,t)=>e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",x,[!0===e.mark?((0,l.openBlock)(),(0,l.createElementBlock)("div",C)):((0,l.openBlock)(),(0,l.createElementBlock)("img",{key:1,class:"mark",src:e.mark},null,8,E))])):(0,l.createCommentVNode)("",!0)}});const I=(0,V.Z)(B,[["__scopeId","data-v-c476c56a"]]);var P=I,F=t(5939);function T(e){const{display:o,top:t,left:l,right:r,bottom:i,xoffset:n,yoffset:a,force:s}=e;return{display:o,top:t,left:l,right:r,bottom:i,xoffset:n,yoffset:a,force:s}}var D=(0,l.defineComponent)({props:{display:(0,v.P5)(Object,String,Function),visibility:{type:(0,v.P5)(Number),required:!0},style:(0,v.P5)(String,Object,Array),classes:(0,v.P5)(Object),tooltip:(0,v.P5)(Object,String,Function),onClick:Function,onHold:Function,color:(0,v.P5)(String),glowColor:(0,v.P5)(String),forceTooltip:{type:Object,required:!0},canClick:{type:(0,v.P5)(Boolean),required:!0},mark:(0,v.P5)(Boolean,String),id:{type:String,required:!0},small:(0,v.P5)(Boolean)},components:{Tooltip:F.Z,MarkNode:P,LinkNode:Z},setup(e){const{tooltip:o,forceTooltip:t,onClick:r,onHold:i,display:n}=(0,l.toRefs)(e);function s(e){e.shiftKey&&o?t.value=(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)():(0,l.unref)(r)?.()}const m=(0,v.KO)(n),u=(0,l.shallowRef)(void 0);(0,l.watchEffect)((()=>{const e=(0,v.Uv)(o);"object"===typeof e&&(()=>void 0!==(0,v.RU)(e)&&null!==(0,v.RU)(e)&&(0,v.RU)(e)[Symbol.for("!")]?(0,v.RU)(e)[Symbol.for("!")]():!(0,v.RU)(e))()?u.value=e.display:u.value=e}));const f=(0,l.computed)((()=>{const e=(0,v.Uv)(o);return"object"===typeof e&&(()=>void 0!==(0,v.RU)(e)&&null!==(0,v.RU)(e)&&(0,v.RU)(e)[Symbol.for("!")]?(0,v.RU)(e)[Symbol.for("!")]():!(0,v.RU)(e))()?e:null})),{start:y,stop:c}=(0,v.ix)(r,i);return{click:s,start:y,stop:c,comp:m,tooltipDisplay:u,tooltipToBind:f,unref:l.unref,Visibility:a.EE,gatherTooltipProps:T,isCoercableComponent:v.RU}}});const _=(0,V.Z)(D,[["render",N],["__scopeId","data-v-176052a6"]]);var O=_,R=(0,l.defineComponent)({props:{nodes:{type:(0,v.P5)(Array),required:!0},leftSideNodes:(0,v.P5)(Array),rightSideNodes:(0,v.P5)(Array)},components:{TreeNode:O},setup(){function e(e){const{display:o,visibility:t,style:l,classes:r,tooltip:i,onClick:n,onHold:a,color:s,glowColor:m,forceTooltip:u,canClick:f,mark:y,id:c}=e;return{display:o,visibility:t,style:l,classes:r,tooltip:i,onClick:n,onHold:a,color:s,glowColor:m,forceTooltip:u,canClick:f,mark:y,id:c}}return{gatherNodeProps:e,unref:l.unref}}});const j=(0,V.Z)(R,[["render",g],["__scopeId","data-v-e6ef63ea"]]);var W=j,q=(t(3243),t(9583)),L=t(3273);const A=Symbol("TreeNode"),z=Symbol("Tree");function U(e){return(0,L.z2)((()=>{const o=e();return o.id=(0,a.QI)("treeNode-"),o.type=A,o.tooltip?o.forceTooltip=(0,u.ax)(!1):o.forceTooltip=(0,l.ref)(!1),(0,q.yB)(o,"visibility"),(0,a.Rh)(o,"visibility",a.EE.Visible),(0,q.yB)(o,"canClick"),(0,a.Rh)(o,"canClick",!0),(0,q.yB)(o,"color"),(0,q.yB)(o,"display"),(0,q.yB)(o,"tooltip"),(0,q.yB)(o,"glowColor"),(0,q.yB)(o,"classes"),(0,q.yB)(o,"style"),(0,q.yB)(o,"mark"),o}))}function G(e){return(0,L.z2)((()=>{const o=e();return o.id=(0,a.QI)("tree-"),o.type=z,o[a.wA]=W,o.isResetting=(0,l.ref)(!1),o.resettingNode=(0,l.ref)(null),o.reset=function(e){const t=o;t.isResetting.value=!0,t.resettingNode.value=e,t.resetPropagation?.(t,e),t.onReset?.(e),t.isResetting.value=!1,t.resettingNode.value=null},o.links=(0,l.computed)((()=>{const e=o;return(0,l.unref)(e.branches)??[]})),(0,q.yB)(o,"visibility"),(0,a.Rh)(o,"visibility",a.EE.Visible),(0,q.yB)(o,"nodes"),(0,q.yB)(o,"leftSideNodes"),(0,q.yB)(o,"rightSideNodes"),(0,q.yB)(o,"branches"),o[a.tj]=function(){const{nodes:e,leftSideNodes:o,rightSideNodes:t}=this;return{nodes:e,leftSideNodes:o,rightSideNodes:t}},o}))}const J=function(e,o){const t=[o];let r=[o];if((()=>void 0!==e.branches&&null!==e.branches&&e.branches[Symbol.for("!=")]?e.branches[Symbol.for("!=")](null):null!=e.branches)()){const o=(0,l.unref)(e.branches);while((()=>void 0!==r.length&&null!==r.length&&r.length[Symbol.for(">")]?r.length[Symbol.for(">")](0):r.length>0)()){const e=[];r.forEach((l=>{o.filter((e=>e.startNode===l||e.endNode===l)).map((e=>e.startNode===l?e.endNode:e.startNode)).filter((e=>(()=>void 0!==t.includes(e)&&null!==t.includes(e)&&t.includes(e)[Symbol.for("!")]?t.includes(e)[Symbol.for("!")]():!t.includes(e))())).forEach((o=>{(()=>void 0!==e.includes(o)&&null!==e.includes(o)&&e.includes(o)[Symbol.for("!")]?e.includes(o)[Symbol.for("!")]():!e.includes(o))()&&(e.push(o),o.reset?.reset())}))})),r=e,t.push(...r)}}};var Y=t(9365),H=t(5967);function $(e){return(0,L.z2)((()=>{const o=e();return(()=>void 0!==o.currentGain&&null!==o.currentGain&&o.currentGain[Symbol.for("==")]?o.currentGain[Symbol.for("==")](null):null==o.currentGain)()&&(o.currentGain=(0,l.computed)((()=>o.scaling.currentGain(o)))),(()=>void 0!==o.nextAt&&null!==o.nextAt&&o.nextAt[Symbol.for("==")]?o.nextAt[Symbol.for("==")](null):null==o.nextAt)()&&(o.nextAt=(0,l.computed)((()=>o.scaling.nextAt(o)))),(()=>void 0!==o.convert&&null!==o.convert&&o.convert[Symbol.for("==")]?o.convert[Symbol.for("==")](null):null==o.convert)()&&(o.convert=function(){o.gainResource.value=s.ZP.add(o.gainResource.value,o.modifyGainAmount?o.modifyGainAmount((0,l.unref)(o.currentGain)):(0,l.unref)(o.currentGain)),o.baseResource.value=0}),(0,q.yB)(o,"currentGain"),(0,q.yB)(o,"nextAt"),(0,q.yB)(o,"buyMax"),(0,a.Rh)(o,"buyMax",!0),(0,q.yB)(o,"roundUpCost"),(0,a.Rh)(o,"roundUpCost",!0),o}))}function X(e,o,t){return{currentGain(o){let r=s.ZP.div(o.baseResource.value,(0,l.unref)(e)).pow((0,l.unref)(t)).floor().max(0);return r.isNan()?new s.ZP(0):((()=>void 0!==o.buyMax&&null!==o.buyMax&&o.buyMax[Symbol.for("!")]?o.buyMax[Symbol.for("!")]():!o.buyMax)()&&(r=r.min(1)),r)},nextAt(o){let r=s.ZP.add((0,l.unref)(o.currentGain),1).root((0,l.unref)(t)).times((0,l.unref)(e)).max((0,l.unref)(e));return o.roundUpCost&&(r=r.ceil()),r}}}function Q(e){return $(e)}var K=t(1008);const ee=Symbol("Reset");function oe(e){return(0,L.z2)((()=>{const o=e();return o.id=(0,a.QI)("reset-"),o.type=ee,o.reset=function(){const e=o=>{o&&"object"===typeof o&&((()=>void 0!==a.PersistentState&&null!==a.PersistentState&&a.PersistentState[Symbol.for("in")]?a.PersistentState[Symbol.for("in")](o):a.PersistentState in o)()?o[a.PersistentState].value=o[a.DefaultValue]:(()=>o instanceof K.Z!==void 0&&o instanceof K.Z!==null&&(o instanceof K.Z)[Symbol.for("!")]?(o instanceof K.Z)[Symbol.for("!")]():!(o instanceof K.Z))()&&(()=>void 0!==(0,l.isRef)(o)&&null!==(0,l.isRef)(o)&&(0,l.isRef)(o)[Symbol.for("!")]?(0,l.isRef)(o)[Symbol.for("!")]():!(0,l.isRef)(o))()&&Object.values(o).forEach((o=>e(o))))};(0,l.unref)(o.thingsToReset).forEach(e),m.globalBus.emit("reset",o),o.onReset?.()},(0,q.yB)(o,"thingsToReset"),o}))}const te={};m.globalBus.on("removeLayer",(e=>{te[e.id]?.(),te[e.id]=void 0}));var le=(0,l.defineComponent)({props:{resource:null,color:null},setup(e){const o=e,t=(0,l.computed)((()=>b(o.resource)));return(o,r)=>((0,l.openBlock)(),(0,l.createElementBlock)("h2",{style:(0,l.normalizeStyle)({color:e.color,"text-shadow":(()=>"0px 0px 10px "[Symbol.for("+")]?"0px 0px 10px "[Symbol.for("+")](e.color):"0px 0px 10px "+e.color)()})},(0,l.toDisplayString)((0,l.unref)(t)),5))}});const re=le;var ie=re;const ne={key:0},ae={key:1},se=(0,l.createTextVNode)(", "),me=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)()),ue=(0,l.createElementVNode)("br",null,null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var fe=(0,l.defineComponent)({props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(0,v.KO)(t.effectDisplay),i=(0,l.computed)((()=>s.ZP.lt(t.resource.value,"1e1000")));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",null,[(0,l.unref)(i)?((0,l.openBlock)(),(0,l.createElementBlock)("span",ne,"You have ")):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ie,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),(0,l.createTextVNode)((()=>" "[Symbol.for("+")]?" "[Symbol.for("+")]((0,l.toDisplayString)(e.resource.displayName)):" "+(0,l.toDisplayString)(e.resource.displayName))(),1),(0,l.unref)(r)?((0,l.openBlock)(),(0,l.createElementBlock)("span",ae,[se,((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)((0,l.unref)(r))))])):(0,l.createCommentVNode)("",!0),me,ue]))}});const ye=fe;var ce=ye;const de=["disabled"];function be(e,o,t,r,i,n){const a=(0,l.resolveComponent)("MarkNode"),s=(0,l.resolveComponent)("LinkNode");return(()=>void 0!==e.unref(e.visibility)&&null!==e.unref(e.visibility)&&e.unref(e.visibility)[Symbol.for("!==")]?e.unref(e.visibility)[Symbol.for("!==")](e.Visibility.None):e.unref(e.visibility)!==e.Visibility.None)()?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,style:(0,l.normalizeStyle)({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0})},[(0,l.createElementVNode)("button",{style:(0,l.normalizeStyle)(e.unref(e.style)),onClick:o[0]||(o[0]=(...o)=>e.onClick&&e.onClick(...o)),onMousedown:o[1]||(o[1]=(...o)=>e.start&&e.start(...o)),onMouseleave:o[2]||(o[2]=(...o)=>e.stop&&e.stop(...o)),onMouseup:o[3]||(o[3]=(...o)=>e.stop&&e.stop(...o)),onTouchstart:o[4]||(o[4]=(...o)=>e.start&&e.start(...o)),onTouchend:o[5]||(o[5]=(...o)=>e.stop&&e.stop(...o)),onTouchcancel:o[6]||(o[6]=(...o)=>e.stop&&e.stop(...o)),disabled:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))(),class:(0,l.normalizeClass)({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:(()=>void 0!==e.unref(e.canClick)&&null!==e.unref(e.canClick)&&e.unref(e.canClick)[Symbol.for("!")]?e.unref(e.canClick)[Symbol.for("!")]():!e.unref(e.canClick))(),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.unref(e.comp)),{key:0})):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(a,{mark:e.unref(e.mark)},null,8,["mark"]),(0,l.createVNode)(s,{id:e.id},null,8,["id"])],46,de)],4)):(0,l.createCommentVNode)("",!0)}var he=(0,l.defineComponent)({props:{display:{type:(0,v.P5)(Object,String,Function),required:!0},visibility:{type:(0,v.P5)(Number),required:!0},style:(0,v.P5)(Object,String,Array),classes:(0,v.P5)(Object),onClick:Function,onHold:Function,canClick:{type:(0,v.P5)(Boolean),required:!0},small:Boolean,mark:(0,v.P5)(Boolean,String),id:{type:String,required:!0}},components:{LinkNode:Z,MarkNode:P},setup(e){const{display:o,onClick:t,onHold:r}=(0,l.toRefs)(e),i=(0,l.shallowRef)("");(0,l.watchEffect)((()=>{const e=(0,v.Uv)(o);if((()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)())return void(i.value="");if((0,v.RU)(e))return void(i.value=(0,v.MM)(e));const t=(0,v.MM)(e.title||"","h3"),r=(0,v.MM)(e.description,"div");i.value=(0,v.MM)((0,a.tZ)((()=>(0,l.createVNode)("span",null,[e.title?(0,l.createVNode)("div",null,[(0,l.createVNode)(t,null,null)]):null,(0,l.createVNode)(r,null,null)]))))}));const{start:n,stop:s}=(0,v.ix)(t,r);return{start:n,stop:s,comp:i,Visibility:a.EE,unref:l.unref}}});const Se=(0,V.Z)(he,[["render",be],["__scopeId","data-v-2d81e1cc"]]);var ge=Se;const ve=Symbol("Clickable");function pe(e){return(0,L.z2)((()=>{const o=e();return o.id=(0,a.QI)("clickable-"),o.type=ve,o[a.wA]=ge,(0,q.yB)(o,"visibility"),(0,a.Rh)(o,"visibility",a.EE.Visible),(0,q.yB)(o,"canClick"),(0,a.Rh)(o,"canClick",!0),(0,q.yB)(o,"classes"),(0,q.yB)(o,"style"),(0,q.yB)(o,"mark"),(0,q.yB)(o,"display"),o[a.tj]=function(){const{display:e,visibility:o,style:t,classes:l,onClick:r,onHold:i,canClick:n,small:a,mark:s,id:m}=this;return{display:e,visibility:o,style:t,classes:l,onClick:r,onHold:i,canClick:n,small:a,mark:s,id:m}},o}))}function Ne(e){return pe((()=>{const o=e();(0,q.yB)(o,"showNextAt"),(0,a.Rh)(o,"showNextAt",!0),(()=>void 0!==o.resetDescription&&null!==o.resetDescription&&o.resetDescription[Symbol.for("==")]?o.resetDescription[Symbol.for("==")](null):null==o.resetDescription)()?o.resetDescription=(0,l.computed)((()=>s.ZP.lt(o.conversion.gainResource.value,1e3)?"Reset for ":"")):(0,q.yB)(o,"resetDescription"),(()=>void 0!==o.display&&null!==o.display&&o.display[Symbol.for("==")]?o.display[Symbol.for("==")](null):null==o.display)()&&(o.display=(0,a.tZ)((()=>(0,l.createVNode)("span",null,[(0,l.unref)(o.resetDescription),(0,l.createVNode)("b",null,[b(o.conversion.gainResource,(0,l.unref)(o.conversion.currentGain))])," ",o.conversion.gainResource.displayName,(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createVNode)("br",null,null),(0,l.createTextVNode)("Next:")," ",b(o.conversion.baseResource,(0,l.unref)(o.conversion.nextAt))," ",o.conversion.baseResource.displayName]),[[l.vShow,(0,l.unref)(o.showNextAt)]])])))),(()=>void 0!==o.canClick&&null!==o.canClick&&o.canClick[Symbol.for("==")]?o.canClick[Symbol.for("==")](null):null==o.canClick)()&&(o.canClick=(0,l.computed)((()=>s.ZP.gt((0,l.unref)(o.conversion.currentGain),0))));const t=o.onClick;return o.onClick=function(){o.conversion.convert(),o.tree.reset(o.treeNode),t?.()},o}))}function ke(e){return U((()=>{const o=e();return(0,q.yB)(o,"append"),{...o,display:o.layerID,onClick:(()=>void 0!==o.append&&null!==o.append&&o.append[Symbol.for("!=")]?o.append[Symbol.for("!=")](null):null!=o.append)()&&o.append?function(){if(H.Z.tabs.includes(o.layerID)){const e=H.Z.tabs.lastIndexOf(o.layerID);H.Z.tabs.splice(e,1)}else H.Z.tabs.push(o.layerID)}:function(){H.Z.tabs.splice(1,1,o.layerID)}}}))}const Me=(0,Y.createLayer)((()=>{const e="p",o="Prestige",t="#4BDC13",r=f(0,"prestige points"),i=Q((()=>({scaling:X(10,5,.5),baseResource:we.points,gainResource:r,roundUpCost:!0}))),n=oe((()=>({thingsToReset:()=>[Me]}))),s=ke((()=>({layerID:e,color:t,reset:n}))),m=Ne((()=>({conversion:i,tree:we.tree,treeNode:s})));return{id:e,name:o,color:t,points:r,display:(0,a.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.createVNode)(ce,{resource:r,color:t},null),(0,v.sY)(m)]))),treeNode:s}}));var Ve=Me;const we=(0,Y.createLayer)((()=>{const e=f(10),o=y(e),t=c(e),r=(0,l.computed)((()=>{let e=new s.ZP(1);return e}));m.globalBus.on("update",(o=>{e.value=s.ZP.add(e.value,s.ZP.times(r.value,o))}));const i=d(e,r),u=G((()=>({nodes:[[Ve.treeNode]],branches:[],onReset(){e.value=(0,l.toRaw)(this.resettingNode.value)===(0,l.toRaw)(Ve.treeNode)?0:10,o.value=e.value,t.value=e.value},resetPropagation:J})));return{id:"main",name:"Tree",links:u.links,display:(0,a.tZ)((()=>(0,l.createVNode)(l.Fragment,null,[(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Game Paused")]),[[l.vShow,0===H.Z.devSpeed]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Dev Speed: "),(0,s.WU)(H.Z.devSpeed||0),(0,l.createTextVNode)("x")]),[[l.vShow,H.Z.devSpeed&&(()=>void 0!==H.Z.devSpeed&&null!==H.Z.devSpeed&&H.Z.devSpeed[Symbol.for("!==")]?H.Z.devSpeed[Symbol.for("!==")](1):1!==H.Z.devSpeed)()]]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("Offline Time: "),(0,s.mr)(H.Z.offlineTime||0)]),[[l.vShow,(()=>void 0!==H.Z.offlineTime&&null!==H.Z.offlineTime&&H.Z.offlineTime[Symbol.for("!=")]?H.Z.offlineTime[Symbol.for("!=")](void 0):void 0!=H.Z.offlineTime)()]]),(0,l.createVNode)("div",null,[(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)("You have ")]),[[l.vShow,s.ZP.lt(e.value,"1e1000")]]),(0,l.createVNode)("h2",null,[(0,s.WU)(e.value)]),(0,l.withDirectives)((0,l.createVNode)("span",null,[(0,l.createTextVNode)(" points")]),[[l.vShow,s.ZP.lt(e.value,"1e1e6")]])]),(0,l.withDirectives)((0,l.createVNode)("div",null,[(0,l.createTextVNode)("("),i.value,(0,l.createTextVNode)(")")]),[[l.vShow,s.ZP.gt(r.value,0)]]),(0,l.createVNode)(n,null,null),(0,v.sY)(u)]))),points:e,best:o,total:t,oomps:i,tree:u}})),Ze=e=>[we,Ve],xe=(0,l.computed)((()=>!1));function Ce(e,o){}},9365:function(e,o,t){"use strict";t.r(o),t.d(o,{layers:function(){return y},createLayer:function(){return c},addLayer:function(){return d},getLayer:function(){return b},removeLayer:function(){return h},reloadLayer:function(){return S},setupLayerModal:function(){return g}});var l=t(4865),r=t(7286),i=t(6113),n=t(9583),a=t(3273),s=t(8111),m=t(7302),u=t(4061),f=t(5967);const y={};function c(e){return(0,a.z2)((()=>{const o=e(),t=o.emitter=(0,s.i)();return o.on=t.on.bind(t),o.emit=t.emit.bind(t),o.minimized=(0,u.ax)(!1),(0,n.yB)(o,"color"),(0,n.yB)(o,"display"),(0,n.yB)(o,"name"),(0,i.Rh)(o,"name",o.id),(0,n.yB)(o,"minWidth"),(0,i.Rh)(o,"minWidth",600),(0,n.yB)(o,"minimizable"),(0,i.Rh)(o,"minimizable",!0),(0,n.yB)(o,"links"),o}))}function d(e,o){console.info("Adding layer",e.id),y[e.id]?console.error("Attempted to add layer with same ID as existing layer",e.id,y[e.id]):((0,i.Rh)(o,"layers",{}),(()=>void 0!==o.layers[e.id]&&null!==o.layers[e.id]&&o.layers[e.id][Symbol.for("==")]?o.layers[e.id][Symbol.for("==")](null):null==o.layers[e.id])()&&(o.layers[e.id]={}),y[e.id]=e,m.globalBus.emit("addLayer",e,o.layers[e.id]))}function b(e){return y[e]}function h(e){console.info("Removing layer",e.id),m.globalBus.emit("removeLayer",e),y[e.id]=void 0}function S(e){h(e),d(e,f.Z)}function g(e){const o=(0,l.ref)(!1);return{openModal:()=>o.value=!0,modal:(0,i.tZ)((()=>(0,l.createVNode)(r.Z,{modelValue:o.value,"onUpdate:modelValue":e=>o.value=e},{header:()=>(0,l.createVNode)("h2",null,[(0,l.unref)(e.name)]),body:(0,l.unref)(e.display)})))}}window.layers=y,m.globalBus.on("update",(function(e){Object.values(y).forEach((o=>{o?.emit("preUpdate",e)})),Object.values(y).forEach((o=>{o?.emit("update",e)})),Object.values(y).forEach((o=>{o?.emit("postUpdate",e)}))}))},8755:function(e,o,t){"use strict";t.d(o,{MM:function(){return n},vq:function(){return u},KO:function(){return f},RU:function(){return s},P5:function(){return d},sY:function(){return a},ix:function(){return m},Uv:function(){return c},o9:function(){return y}});var l=t(4865);t(1037),t(9266);var r=t(6113),i=t(9583);function n(e,o="span"){return"function"===typeof e?(0,l.defineComponent)({render:e}):"string"===typeof e?(()=>void 0!==e.length&&null!==e.length&&e.length[Symbol.for(">")]?e.length[Symbol.for(">")](0):e.length>0)()?(e=e.trim(),(()=>void 0!==e.charAt(0)&&null!==e.charAt(0)&&e.charAt(0)[Symbol.for("!==")]?e.charAt(0)[Symbol.for("!==")]("<"):"<"!==e.charAt(0))()&&(e=`<${o}>${e}</${o}>`),(0,l.defineComponent)({template:e})):(0,l.defineComponent)({render:()=>({})}):e}function a(e){if(s(e))return"function"===typeof e?e():n(e);const o=e[r.wA];return(0,l.createVNode)(o,e[r.tj](),null)}function s(e){return"string"===typeof e||("object"===typeof e?!(()=>void 0!==e&&null!==e&&e[Symbol.for("==")]?e[Symbol.for("==")](null):null==e)()&&((()=>"render"[Symbol.for("in")]?"render"[Symbol.for("in")](e):"render"in e)()||(()=>"component"[Symbol.for("in")]?"component"[Symbol.for("in")](e):"component"in e)()):"function"===typeof e&&!0===e[i.mM])}function m(e,o){const t=(0,l.ref)(null);function r(){(()=>void 0!==t.value&&null!==t.value&&t.value[Symbol.for("!")]?t.value[Symbol.for("!")]():!t.value)()&&(t.value=setInterval(n,250))}function i(){t.value&&(clearInterval(t.value),t.value=null)}function n(){o&&o.value?o.value():e&&e.value&&e.value()}return{start:r,stop:i,handleHolding:n}}function u(e,o="div"){const t=(0,l.shallowRef)();return(0,l.watchEffect)((()=>{t.value=n(c(e),o)})),t}function f(e,o="div"){const t=(0,l.shallowRef)(null);return(0,l.watchEffect)((()=>{const l=c(e);t.value=(()=>void 0!==l&&null!==l&&l[Symbol.for("==")]?l[Symbol.for("==")](null):null==l)()?null:n(l,o)})),t}function y(e){return(0,l.computed)((()=>c(e)))}function c(e){return(0,l.unref)((0,l.unref)(e))}function d(...e){return(()=>void 0!==e.includes(Object)&&null!==e.includes(Object)&&e.includes(Object)[Symbol.for("!")]?e.includes(Object)[Symbol.for("!")]():!e.includes(Object))()&&e.push(Object),e}},7286:function(e,o,t){"use strict";t.d(o,{Z:function(){return S}});var l=t(4865),r=t(5389);const i=["onPointerdown"],n={class:"modal-wrapper"},a={class:"modal-container"},s={class:"modal-header"},m=(0,l.createTextVNode)(" default header "),u={class:"modal-body"},f=(0,l.createTextVNode)(" default body "),y=(0,l.createTextVNode)(" default body "),c={class:"modal-footer"},d=(0,l.createElementVNode)("div",{class:"modal-default-flex-grow"},null,(()=>1[Symbol.for("minus")]?1[Symbol.for("minus")]():-1)());var b=(0,l.defineComponent)({props:{modelValue:{type:Boolean},links:null},emits:["update:modelValue"],setup(e,{expose:o,emit:t}){const b=e,h=(0,l.toRefs)(b),S=(0,l.computed)((()=>h.modelValue||v.value));function g(){t("update:modelValue",!1)}const v=(0,l.ref)(!1);return o({isOpen:S}),(o,t)=>((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:"#modal-root"},[(0,l.createVNode)(l.Transition,{name:"modal",onBeforeEnter:t[0]||(t[0]=e=>v.value=!0),onAfterLeave:t[1]||(t[1]=e=>v.value=!1)},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",(0,l.mergeProps)({class:"modal-mask",onPointerdown:(0,l.withModifiers)(g,["self"])},o.$attrs),[(0,l.createElementVNode)("div",n,[(0,l.createElementVNode)("div",a,[(0,l.createElementVNode)("div",s,[(0,l.renderSlot)(o.$slots,"header",{shown:(0,l.unref)(S)},(()=>[m]))]),(0,l.createElementVNode)("div",u,[e.links?((0,l.openBlock)(),(0,l.createBlock)(r.Z,{key:0,links:e.links},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(o.$slots,"body",{shown:(0,l.unref)(S)},(()=>[f]))])),_:3},8,["links"])):(0,l.renderSlot)(o.$slots,"body",{key:1,shown:(0,l.unref)(S)},(()=>[y]))]),(0,l.createElementVNode)("div",c,[(0,l.renderSlot)(o.$slots,"footer",{shown:(0,l.unref)(S)},(()=>[(0,l.createElementVNode)("div",{class:"modal-default-footer"},[d,(0,l.createElementVNode)("button",{class:"button modal-default-button",onClick:g}," Close ")])]))])])])],16,i),[[l.vShow,e.modelValue]])])),_:3})]))}});const h=b;var S=h},5939:function(e,o,t){"use strict";t.d(o,{Z:function(){return m}});var l=t(4865);function r(e,o,t,r,i,n){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(["tooltip-container",{shown:e.isShown}]),onMouseenter:o[0]||(o[0]=o=>e.isHovered=!0),onMouseleave:o[1]||(o[1]=o=>e.isHovered=!1)},[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0),(0,l.createVNode)(l.Transition,{name:"fade"},{default:(0,l.withCtx)((()=>[e.isShown?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,class:(0,l.normalizeClass)(["tooltip",{top:e.unref(e.top),left:e.unref(e.left),right:e.unref(e.right),bottom:e.unref(e.bottom)}]),style:(0,l.normalizeStyle)({"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"})},[e.comp?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.comp),{key:0})):(0,l.createCommentVNode)("",!0)],6)):(0,l.createCommentVNode)("",!0)])),_:1})],34)}var i=t(8755),n=(0,l.defineComponent)({props:{display:(0,i.P5)(Object,String,Function),top:(0,i.P5)(Boolean),left:(0,i.P5)(Boolean),right:(0,i.P5)(Boolean),bottom:(0,i.P5)(Boolean),xoffset:(0,i.P5)(String),yoffset:(0,i.P5)(String),force:(0,i.P5)(Boolean)},setup(e){const{display:o,force:t}=(0,l.toRefs)(e),r=(0,l.ref)(!1),n=(0,l.computed)((()=>((0,i.Uv)(t)||r.value)&&a.value)),a=(0,i.KO)(o);return{isHovered:r,isShown:n,comp:a,unref:l.unref}}}),a=t(3744);const s=(0,a.Z)(n,[["render",r],["__scopeId","data-v-2ee899a0"]]);var m=s},5389:function(e,o,t){"use strict";t.d(o,{Z:function(){return y}});var l=t(4865),r=t(630);const i=["x1","y1","x2","y2"];var n=(0,l.defineComponent)({props:{link:null,startNode:null,endNode:null},setup(e){const o=e,t=(0,l.toRefs)(o),r=(0,l.computed)((()=>{const e={x:t.startNode.value.x||0,y:t.startNode.value.y||0};return t.link.value.offsetStart&&(e.x=(()=>void 0!==e.x&&null!==e.x&&e.x[Symbol.for("+")]?e.x[Symbol.for("+")]((0,l.unref)(t.link.value.offsetStart).x):e.x+(0,l.unref)(t.link.value.offsetStart).x)(),e.y=(()=>void 0!==e.y&&null!==e.y&&e.y[Symbol.for("+")]?e.y[Symbol.for("+")]((0,l.unref)(t.link.value.offsetStart).y):e.y+(0,l.unref)(t.link.value.offsetStart).y)()),e})),n=(0,l.computed)((()=>{const e={x:t.endNode.value.x||0,y:t.endNode.value.y||0};return t.link.value.offsetEnd&&(e.x=(()=>void 0!==e.x&&null!==e.x&&e.x[Symbol.for("+")]?e.x[Symbol.for("+")]((0,l.unref)(t.link.value.offsetEnd).x):e.x+(0,l.unref)(t.link.value.offsetEnd).x)(),e.y=(()=>void 0!==e.y&&null!==e.y&&e.y[Symbol.for("+")]?e.y[Symbol.for("+")]((0,l.unref)(t.link.value.offsetEnd).y):e.y+(0,l.unref)(t.link.value.offsetEnd).y)()),e}));return(o,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("line",(0,l.mergeProps)({"stroke-width":"15px",stroke:"white"},e.link,{x1:(0,l.unref)(r).x,y1:(0,l.unref)(r).y,x2:(0,l.unref)(n).x,y2:(0,l.unref)(n).y}),null,16,i))}});const a=n;var s=a,m=(0,l.defineComponent)({props:{links:null},setup(e){const o=e,t=(0,l.toRef)(o,"links"),i=new MutationObserver(c),n=new ResizeObserver(b),a=(0,l.ref)({}),m=(0,l.ref)(new DOMRect),u=(0,l.ref)(null);(0,l.onMounted)((()=>{const e=u.value;(()=>void 0!==e&&null!==e&&e[Symbol.for("!=")]?e[Symbol.for("!=")](null):null!=e)()&&n.observe(e),c()}));const f=(0,l.computed)((()=>t.value?.filter((e=>{const o=a.value;return(()=>void 0!==o[e.startNode.id]?.x&&null!==o[e.startNode.id]?.x&&o[e.startNode.id]?.x[Symbol.for("!=")]?o[e.startNode.id]?.x[Symbol.for("!=")](void 0):void 0!=o[e.startNode.id]?.x)()&&(()=>void 0!==o[e.startNode.id]?.y&&null!==o[e.startNode.id]?.y&&o[e.startNode.id]?.y[Symbol.for("!=")]?o[e.startNode.id]?.y[Symbol.for("!=")](void 0):void 0!=o[e.startNode.id]?.y)()&&(()=>void 0!==o[e.endNode.id]?.x&&null!==o[e.endNode.id]?.x&&o[e.endNode.id]?.x[Symbol.for("!=")]?o[e.endNode.id]?.x[Symbol.for("!=")](void 0):void 0!=o[e.endNode.id]?.x)()&&(()=>void 0!==o[e.endNode.id]?.y&&null!==o[e.endNode.id]?.y&&o[e.endNode.id]?.y[Symbol.for("!=")]?o[e.endNode.id]?.y[Symbol.for("!=")](void 0):void 0!=o[e.endNode.id]?.y)()}))??[])),y={attributes:!0,childList:!0,subtree:!0};function c(){(()=>void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!=")]?u.value[Symbol.for("!=")](null):null!=u.value)()&&Object.keys(a.value).forEach((e=>d(e)))}function d(e){const o=a.value[e];if((()=>void 0!==o&&null!==o&&o[Symbol.for("!")]?o[Symbol.for("!")]():!o)())return;const t=o.element.getBoundingClientRect();o.x=(()=>t.x+t.width/2!==void 0&&t.x+t.width/2!==null&&(t.x+t.width/2)[Symbol.for("-")]?(t.x+t.width/2)[Symbol.for("-")](m.value.x):t.x+t.width/2-m.value.x)(),o.y=(()=>t.y+t.height/2!==void 0&&t.y+t.height/2!==null&&(t.y+t.height/2)[Symbol.for("-")]?(t.y+t.height/2)[Symbol.for("-")](m.value.y):t.y+t.height/2-m.value.y)()}function b(){(()=>void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!=")]?u.value[Symbol.for("!=")](null):null!=u.value)()&&(m.value=u.value.getBoundingClientRect(),c())}return(0,l.provide)(r.Z,((e,o)=>{a.value[e]={element:o},i.observe(o,y),(0,l.nextTick)((()=>{(()=>void 0!==u.value&&null!==u.value&&u.value[Symbol.for("!=")]?u.value[Symbol.for("!=")](null):null!=u.value)()&&d(e)}))})),(0,l.provide)(r.w,(e=>{a.value[e]=void 0})),(e,o)=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.renderSlot)(e.$slots,"default"),(0,l.createElementVNode)("div",{ref_key:"resizeListener",ref:u,class:"resize-listener"},null,512),(0,l.unref)(f)?((0,l.openBlock)(),(0,l.createElementBlock)("svg",(0,l.normalizeProps)((0,l.mergeProps)({key:0},e.$attrs)),[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(f),((e,o)=>((0,l.openBlock)(),(0,l.createBlock)(s,{key:o,link:e,startNode:a.value[e.startNode.id],endNode:a.value[e.endNode.id]},null,8,["link","startNode","endNode"])))),128))],16)):(0,l.createCommentVNode)("",!0)],64))}}),u=t(3744);const f=(0,u.Z)(m,[["__scopeId","data-v-5bf46048"]]);var y=f},2736:function(e,o,t){"use strict";t.r(o),o["default"]="eyJpZCI6InRtdC14LTEwNSIsIm5hbWUiOiJEZWZhdWx0IFNhZmZmZiAtIHNvbWV0aGluZyBlbHNlIiwidGFicyI6WyJtYWluIiwiYyJdLCJ0aW1lIjoxNjI0MjQ1MjYxMDg3LCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsInRpbWVQbGF5ZWQiOiIzNDQ4LjYxNTc4MTcwOTAxIiwia2VlcEdvaW5nIjpmYWxzZSwibGFzdFRlblRpY2tzIjpbMC4wNTEsMC4wNSwwLjA0OSwwLjA1LDAuMDUsMC4wNTEsMC4wNDksMC4wNSwwLjA1LDAuMDUxXSwic2hvd1RQUyI6dHJ1ZSwibXNEaXNwbGF5IjoiYWxsIiwiaGlkZUNoYWxsZW5nZXMiOmZhbHNlLCJ0aGVtZSI6InBhcGVyIiwic3VidGFicyI6e30sIm1pbmltaXplZCI6e30sIm1vZElEIjoidG10LXgiLCJtb2RWZXJzaW9uIjoiMC4wIiwicG9pbnRzIjoiMzMwMC4zNzc3NzM4NTkwNTUiLCJtYWluIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJmIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImNsaWNrYWJsZXMiOnsiMTEiOiJTdGFydCJ9LCJ1bmxvY2tlZCI6ZmFsc2UsInBvaW50cyI6IjAiLCJib29wIjpmYWxzZX0sImMiOnsidXBncmFkZXMiOlsiMTEiXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e30sImJ1eWFibGVzIjp7IjExIjoiMCJ9LCJjaGFsbGVuZ2VzIjp7IjExIjoiMCJ9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCIsImJlc3QiOiIxIiwidG90YWwiOiIwIiwiYmVlcCI6ZmFsc2UsInRoaW5neSI6InBvaW50eSIsIm90aGVyVGhpbmd5IjoxMCwic3BlbnRPbkJ1eWFibGVzIjoiMCJ9LCJhIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbIjExIl0sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9LCJ1bmxvY2tlZCI6dHJ1ZSwicG9pbnRzIjoiMCJ9LCJnIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJoIjp7InVwZ3JhZGVzIjpbXSwiYWNoaWV2ZW1lbnRzIjpbXSwibWlsZXN0b25lcyI6W10sImluZm9ib3hlcyI6e319LCJzcG9vayI6eyJ1cGdyYWRlcyI6W10sImFjaGlldmVtZW50cyI6W10sIm1pbGVzdG9uZXMiOltdLCJpbmZvYm94ZXMiOnt9fSwib29tcHNNYWciOjAsImxhc3RQb2ludHMiOiIzMzAwLjM3Nzc3Mzg1OTA1NSJ9"},7634:function(e,o,t){var l={"./safff.txt":2736};function r(e){var o=i(e);return t(o)}function i(e){if(!t.o(l,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}return l[e]}r.keys=function(){return Object.keys(l)},r.resolve=i,e.exports=r,r.id=7634},2345:function(e){"use strict";e.exports=JSON.parse('{"title":"Profectus","id":"profectus","author":"thepaperpilot","discordName":"The Paper Pilot Community","discordLink":"https://discord.gg/WzejVAx","versionNumber":"0.0","versionTitle":"Initial Commit","allowGoBack":true,"allowSmall":false,"defaultDecimalsShown":2,"useHeader":true,"banner":null,"logo":"","initialTabs":["main"],"maxTickLength":3600,"offlineLimit":1}')}},o={};function t(l){var r=o[l];if(void 0!==r)return r.exports;var i=o[l]={exports:{}};return e[l].call(i.exports,i,i.exports,t),i.exports}t.m=e,function(){var e=[];t.O=function(o,l,r,i){if(!l){var n=1/0;for(u=0;u<e.length;u++){l=e[u][0],r=e[u][1],i=e[u][2];for(var a=!0,s=0;s<l.length;s++)(!1&i||n>=i)&&Object.keys(t.O).every((function(e){return t.O[e](l[s])}))?l.splice(s--,1):(a=!1,i<n&&(n=i));if(a){e.splice(u--,1);var m=r();void 0!==m&&(o=m)}}return o}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[l,r,i]}}(),function(){t.n=function(e){var o=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(o,{a:o}),o}}(),function(){t.d=function(e,o){for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}}(),function(){t.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={143:0};t.O.j=function(o){return 0===e[o]};var o=function(o,l){var r,i,n=l[0],a=l[1],s=l[2],m=0;if(n.some((function(o){return 0!==e[o]}))){for(r in a)t.o(a,r)&&(t.m[r]=a[r]);if(s)var u=s(t)}for(o&&o(l);m<n.length;m++)i=n[m],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return t.O(u)},l=self["webpackChunkprofectus"]=self["webpackChunkprofectus"]||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))}();var l=t.O(void 0,[998],(function(){return t(5634)}));l=t.O(l)})();
//# sourceMappingURL=app.0ae1f71d.js.map