diff --git a/404.html b/404.html index 683465e4..39b2f963 100644 --- a/404.html +++ b/404.html @@ -21,7 +21,7 @@

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + diff --git a/assets/index.md.207b5a03.js b/assets/index.md.717e4090.js similarity index 88% rename from assets/index.md.207b5a03.js rename to assets/index.md.717e4090.js index 9729e23c..ebd7f31d 100644 --- a/assets/index.md.207b5a03.js +++ b/assets/index.md.717e4090.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./app.c95a51e0.js";const m=JSON.parse(`{"title":"The Paper Pilot","description":"","frontmatter":{"title":"The Paper Pilot","layout":"home","hero":{"name":"The Paper Pilot","tagline":"I'm Anthony, or The Paper Pilot, and I make fun games and tools!","actions":[{"theme":"brand","text":"My Projects","link":"/projects/"}]}},"headers":[],"relativePath":"index.md","lastUpdated":1684206020000}`),o={name:"index.md"};function n(r,s,i,c,d,p){return a(),t("div")}const h=e(o,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./app.c95a51e0.js";const m=JSON.parse(`{"title":"The Paper Pilot","description":"","frontmatter":{"title":"The Paper Pilot","layout":"home","hero":{"name":"The Paper Pilot","tagline":"I'm Anthony, or The Paper Pilot, and I make fun games and tools!","actions":[{"theme":"brand","text":"My Projects","link":"/projects/"}]}},"headers":[],"relativePath":"index.md","lastUpdated":1684370673000}`),o={name:"index.md"};function n(r,s,i,c,d,p){return a(),t("div")}const h=e(o,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/index.md.207b5a03.lean.js b/assets/index.md.717e4090.lean.js similarity index 88% rename from assets/index.md.207b5a03.lean.js rename to assets/index.md.717e4090.lean.js index 9729e23c..ebd7f31d 100644 --- a/assets/index.md.207b5a03.lean.js +++ b/assets/index.md.717e4090.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./app.c95a51e0.js";const m=JSON.parse(`{"title":"The Paper Pilot","description":"","frontmatter":{"title":"The Paper Pilot","layout":"home","hero":{"name":"The Paper Pilot","tagline":"I'm Anthony, or The Paper Pilot, and I make fun games and tools!","actions":[{"theme":"brand","text":"My Projects","link":"/projects/"}]}},"headers":[],"relativePath":"index.md","lastUpdated":1684206020000}`),o={name:"index.md"};function n(r,s,i,c,d,p){return a(),t("div")}const h=e(o,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./app.c95a51e0.js";const m=JSON.parse(`{"title":"The Paper Pilot","description":"","frontmatter":{"title":"The Paper Pilot","layout":"home","hero":{"name":"The Paper Pilot","tagline":"I'm Anthony, or The Paper Pilot, and I make fun games and tools!","actions":[{"theme":"brand","text":"My Projects","link":"/projects/"}]}},"headers":[],"relativePath":"index.md","lastUpdated":1684370673000}`),o={name:"index.md"};function n(r,s,i,c,d,p){return a(),t("div")}const h=e(o,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/projects_babble_index.md.9c508a59.js b/assets/projects_babble_index.md.07749037.js similarity index 98% rename from assets/projects_babble_index.md.9c508a59.js rename to assets/projects_babble_index.md.07749037.js index f1132c52..0f885f38 100644 --- a/assets/projects_babble_index.md.9c508a59.js +++ b/assets/projects_babble_index.md.07749037.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const s="/assets/screenshot.3bf794a2.png",o="/assets/babblemmscreenshot.7646b6c2.png",g=JSON.parse('{"title":"Babble Buds","description":"","frontmatter":{"title":"Babble Buds"},"headers":[{"level":2,"title":"Engine","slug":"engine","link":"#engine","children":[]},{"level":2,"title":"Babble Movie Maker","slug":"babble-movie-maker","link":"#babble-movie-maker","children":[]}],"relativePath":"projects/babble/index.md","lastUpdated":1684206020000}'),n={name:"projects/babble/index.md"},i=r('

Babble Buds

Babble Buds Homepage

Source Code:

Babble buds is a free, open-source virtual puppet show software. It is heavily based on the non-public software called "Puppet Pals", used in URealms Live. The software is written in javascript using React, a rendering library called PIXI.js, and electron.

Users can create puppets with different faces for different emotions, and then use the puppet on a stage where you and other users can each make your respective puppets move, change emotions, and "babble" at each other. The stage has a green screen feature and can be popped out, which gives the users tons of possibilities in terms of using the program for a role-playing live stream, faux video chatting with friends, game development, or whatever else you want!

Users can connect to the public server and create private rooms so that they and their friends can see each other's puppets and use the software however they please. For the security conscious, you can also use the server's source code to self-host your private server.

Babble Buds Screenshot

Engine

The engine originally made to make the Babble Buds program was separated into a separate engine called babble.js, so that projects created in Babble Buds can be used in other projects. For example, a game can create puppets in Babble Buds and then use them for cutscenes or player agency inside of the game. Additionally, it has been ported to C# (called babble.cs) for use with Unity, for the same kinds of purposes. You can check out Tower Offense for a pixi.js game using Babble Buds puppets for the cutscenes, or Dice Armor for a unity game using Babble Buds puppets for the cutscenes.

Babble Movie Maker

Babble Movie Maker is a cutscene editor for Babble Buds puppets. You open a babble buds project in it, and you can add actors to a stage and have them move and change expressions, etc., on a timeline. You can then use the cutscene in a game using babble.js or babble.cs, or export the cutscene into a video file. There is even support for defining custom commands with custom fields, so that if you've expanded upon the default actions provided in babble.js or babble.cs, you can still use Movie Maker to create your cutscenes.

Babble MM Screenshot

',13),b=[i];function c(l,p,d,h,u,f){return t(),a("div",null,b)}const v=e(n,[["render",c]]);export{g as __pageData,v as default}; +import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const s="/assets/screenshot.3bf794a2.png",o="/assets/babblemmscreenshot.7646b6c2.png",g=JSON.parse('{"title":"Babble Buds","description":"","frontmatter":{"title":"Babble Buds"},"headers":[{"level":2,"title":"Engine","slug":"engine","link":"#engine","children":[]},{"level":2,"title":"Babble Movie Maker","slug":"babble-movie-maker","link":"#babble-movie-maker","children":[]}],"relativePath":"projects/babble/index.md","lastUpdated":1684370673000}'),n={name:"projects/babble/index.md"},i=r('

Babble Buds

Babble Buds Homepage

Source Code:

Babble buds is a free, open-source virtual puppet show software. It is heavily based on the non-public software called "Puppet Pals", used in URealms Live. The software is written in javascript using React, a rendering library called PIXI.js, and electron.

Users can create puppets with different faces for different emotions, and then use the puppet on a stage where you and other users can each make your respective puppets move, change emotions, and "babble" at each other. The stage has a green screen feature and can be popped out, which gives the users tons of possibilities in terms of using the program for a role-playing live stream, faux video chatting with friends, game development, or whatever else you want!

Users can connect to the public server and create private rooms so that they and their friends can see each other's puppets and use the software however they please. For the security conscious, you can also use the server's source code to self-host your private server.

Babble Buds Screenshot

Engine

The engine originally made to make the Babble Buds program was separated into a separate engine called babble.js, so that projects created in Babble Buds can be used in other projects. For example, a game can create puppets in Babble Buds and then use them for cutscenes or player agency inside of the game. Additionally, it has been ported to C# (called babble.cs) for use with Unity, for the same kinds of purposes. You can check out Tower Offense for a pixi.js game using Babble Buds puppets for the cutscenes, or Dice Armor for a unity game using Babble Buds puppets for the cutscenes.

Babble Movie Maker

Babble Movie Maker is a cutscene editor for Babble Buds puppets. You open a babble buds project in it, and you can add actors to a stage and have them move and change expressions, etc., on a timeline. You can then use the cutscene in a game using babble.js or babble.cs, or export the cutscene into a video file. There is even support for defining custom commands with custom fields, so that if you've expanded upon the default actions provided in babble.js or babble.cs, you can still use Movie Maker to create your cutscenes.

Babble MM Screenshot

',13),b=[i];function c(l,p,d,h,u,f){return t(),a("div",null,b)}const v=e(n,[["render",c]]);export{g as __pageData,v as default}; diff --git a/assets/projects_babble_index.md.9c508a59.lean.js b/assets/projects_babble_index.md.07749037.lean.js similarity index 90% rename from assets/projects_babble_index.md.9c508a59.lean.js rename to assets/projects_babble_index.md.07749037.lean.js index 40a0b587..9b89cee8 100644 --- a/assets/projects_babble_index.md.9c508a59.lean.js +++ b/assets/projects_babble_index.md.07749037.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const s="/assets/screenshot.3bf794a2.png",o="/assets/babblemmscreenshot.7646b6c2.png",g=JSON.parse('{"title":"Babble Buds","description":"","frontmatter":{"title":"Babble Buds"},"headers":[{"level":2,"title":"Engine","slug":"engine","link":"#engine","children":[]},{"level":2,"title":"Babble Movie Maker","slug":"babble-movie-maker","link":"#babble-movie-maker","children":[]}],"relativePath":"projects/babble/index.md","lastUpdated":1684206020000}'),n={name:"projects/babble/index.md"},i=r("",13),b=[i];function c(l,p,d,h,u,f){return t(),a("div",null,b)}const v=e(n,[["render",c]]);export{g as __pageData,v as default}; +import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const s="/assets/screenshot.3bf794a2.png",o="/assets/babblemmscreenshot.7646b6c2.png",g=JSON.parse('{"title":"Babble Buds","description":"","frontmatter":{"title":"Babble Buds"},"headers":[{"level":2,"title":"Engine","slug":"engine","link":"#engine","children":[]},{"level":2,"title":"Babble Movie Maker","slug":"babble-movie-maker","link":"#babble-movie-maker","children":[]}],"relativePath":"projects/babble/index.md","lastUpdated":1684370673000}'),n={name:"projects/babble/index.md"},i=r("",13),b=[i];function c(l,p,d,h,u,f){return t(),a("div",null,b)}const v=e(n,[["render",c]]);export{g as __pageData,v as default}; diff --git a/assets/projects_citadel_index.md.47faae6f.js b/assets/projects_citadel_index.md.bff5e504.js similarity index 93% rename from assets/projects_citadel_index.md.47faae6f.js rename to assets/projects_citadel_index.md.bff5e504.js index ea0cc4dc..3d68f43e 100644 --- a/assets/projects_citadel_index.md.47faae6f.js +++ b/assets/projects_citadel_index.md.bff5e504.js @@ -1 +1 @@ -import{_ as a,c as r,o as s,a as e,b as t}from"./app.c95a51e0.js";const n="/assets/screenshot.f2631300.png",C=JSON.parse('{"title":"Capture the Citadel","description":"","frontmatter":{"title":"Capture the Citadel"},"headers":[],"relativePath":"projects/citadel/index.md","lastUpdated":1684206020000}'),o={name:"projects/citadel/index.md"},i=e("h1",{id:"capture-the-citadel",tabindex:"-1"},[t("Capture the Citadel "),e("a",{class:"header-anchor",href:"#capture-the-citadel","aria-hidden":"true"},"#")],-1),c=e("p",null,"A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.",-1),d=e("p",null,[t("For more details, visit "),e("a",{href:"https://grantcbarbee.github.io/conquer-the-citadel.html",target:"_blank",rel:"noreferrer"},"Grant's page on the game"),t(".")],-1),l=e("p",null,[e("img",{src:n,alt:"Screenshot"})],-1),h=[i,c,d,l];function p(_,u,f,m,g,b){return s(),r("div",null,h)}const v=a(o,[["render",p]]);export{C as __pageData,v as default}; +import{_ as a,c as r,o as s,a as e,b as t}from"./app.c95a51e0.js";const n="/assets/screenshot.f2631300.png",C=JSON.parse('{"title":"Capture the Citadel","description":"","frontmatter":{"title":"Capture the Citadel"},"headers":[],"relativePath":"projects/citadel/index.md","lastUpdated":1684370673000}'),o={name:"projects/citadel/index.md"},i=e("h1",{id:"capture-the-citadel",tabindex:"-1"},[t("Capture the Citadel "),e("a",{class:"header-anchor",href:"#capture-the-citadel","aria-hidden":"true"},"#")],-1),c=e("p",null,"A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.",-1),d=e("p",null,[t("For more details, visit "),e("a",{href:"https://grantcbarbee.github.io/conquer-the-citadel.html",target:"_blank",rel:"noreferrer"},"Grant's page on the game"),t(".")],-1),l=e("p",null,[e("img",{src:n,alt:"Screenshot"})],-1),h=[i,c,d,l];function p(_,u,f,m,g,b){return s(),r("div",null,h)}const v=a(o,[["render",p]]);export{C as __pageData,v as default}; diff --git a/assets/projects_citadel_index.md.47faae6f.lean.js b/assets/projects_citadel_index.md.bff5e504.lean.js similarity index 93% rename from assets/projects_citadel_index.md.47faae6f.lean.js rename to assets/projects_citadel_index.md.bff5e504.lean.js index ea0cc4dc..3d68f43e 100644 --- a/assets/projects_citadel_index.md.47faae6f.lean.js +++ b/assets/projects_citadel_index.md.bff5e504.lean.js @@ -1 +1 @@ -import{_ as a,c as r,o as s,a as e,b as t}from"./app.c95a51e0.js";const n="/assets/screenshot.f2631300.png",C=JSON.parse('{"title":"Capture the Citadel","description":"","frontmatter":{"title":"Capture the Citadel"},"headers":[],"relativePath":"projects/citadel/index.md","lastUpdated":1684206020000}'),o={name:"projects/citadel/index.md"},i=e("h1",{id:"capture-the-citadel",tabindex:"-1"},[t("Capture the Citadel "),e("a",{class:"header-anchor",href:"#capture-the-citadel","aria-hidden":"true"},"#")],-1),c=e("p",null,"A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.",-1),d=e("p",null,[t("For more details, visit "),e("a",{href:"https://grantcbarbee.github.io/conquer-the-citadel.html",target:"_blank",rel:"noreferrer"},"Grant's page on the game"),t(".")],-1),l=e("p",null,[e("img",{src:n,alt:"Screenshot"})],-1),h=[i,c,d,l];function p(_,u,f,m,g,b){return s(),r("div",null,h)}const v=a(o,[["render",p]]);export{C as __pageData,v as default}; +import{_ as a,c as r,o as s,a as e,b as t}from"./app.c95a51e0.js";const n="/assets/screenshot.f2631300.png",C=JSON.parse('{"title":"Capture the Citadel","description":"","frontmatter":{"title":"Capture the Citadel"},"headers":[],"relativePath":"projects/citadel/index.md","lastUpdated":1684370673000}'),o={name:"projects/citadel/index.md"},i=e("h1",{id:"capture-the-citadel",tabindex:"-1"},[t("Capture the Citadel "),e("a",{class:"header-anchor",href:"#capture-the-citadel","aria-hidden":"true"},"#")],-1),c=e("p",null,"A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.",-1),d=e("p",null,[t("For more details, visit "),e("a",{href:"https://grantcbarbee.github.io/conquer-the-citadel.html",target:"_blank",rel:"noreferrer"},"Grant's page on the game"),t(".")],-1),l=e("p",null,[e("img",{src:n,alt:"Screenshot"})],-1),h=[i,c,d,l];function p(_,u,f,m,g,b){return s(),r("div",null,h)}const v=a(o,[["render",p]]);export{C as __pageData,v as default}; diff --git a/assets/projects_dice_index.md.799584cd.js b/assets/projects_dice_index.md.c14b2e99.js similarity index 99% rename from assets/projects_dice_index.md.799584cd.js rename to assets/projects_dice_index.md.c14b2e99.js index ba6a69f9..880d2855 100644 --- a/assets/projects_dice_index.md.799584cd.js +++ b/assets/projects_dice_index.md.c14b2e99.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,d as i}from"./app.c95a51e0.js";const o="/assets/da2.57c7af0b.png",s="/assets/editors.c2eaa93b.png",n="/assets/simulator.7ede7b83.jpg",r="/assets/da1.ae7a2bb1.png",h="/assets/da6.5b5d63de.png",d="/assets/da7.b7b33663.png",l="/assets/da8.d623c64f.png",c="/assets/da3.e16fb4de.png",p="/assets/da9.35a2db61.png",I=JSON.parse('{"title":"Dice Armor","description":"","frontmatter":{"title":"Dice Armor"},"headers":[],"relativePath":"projects/dice/index.md","lastUpdated":1684206020000}'),g={name:"projects/dice/index.md"},m=i('

Dice Armor

Download Here

Dice Armor is a game that started development as a semester-long project by a team of nine: a producer, a creative director, a narrative writer, an artist, two programmers, and 3 game designers. The information here is about my contributions as the lead programmer over the semester because I can show off stuff like the editor scripts I wrote. I was doing everything from interface coding, editor scripts, integrating Babble Buds, and of course, everything related to the gameplay itself. To date I'm still the lead programmer for the game; for more up-to-date information on the current state of the game please visit the official site.

The build available here was created for showing off at the end of the semester, and as such has some buttons present to make the game easier to skip parts of the game to see all the content: You start with all the dice in the game already in the shop, there's a button to give yourself free money to buy these dice with, and in the duel, there are buttons to force a win or a loss, which can be used to skip the tutorial (not recommended for first-time players).

Tutorial

Dice Armor is a dice dueling game. Players can use abilities, flip dice, and attack each other to win in a dice game that puts chance into the hands of the players. This is what the dueling scene looks like, with a tutorial cutscene happening on top to guide the player through the basics. Also, all the dice are constructed dynamically, using quaternion math to figure out the placement of each component relative to the face it is going on. The die in the middle has one of the player' and opponents' portraits on each of its sides.

Editors

For many of the objects I've created, I've made scriptable objects so that game designers can add and modify them easily. Additionally, I would create custom inspectors for the objects to help make them as easy to understand and edit as possible. The opponent's artificial intelligence is made up of many strategies, in a prioritized list. When it is the opponents' turn they go through each strategy and check if they can be run, and if so then the opponent performs the strategy and starts back over at the top of the list of strategies. The + sign under the list of strategies opens an organized dropdown of all the various strategies.

Simulator

In addition to custom inspector code, I've created new tools for the editor for our game designers to use. This is a duel simulator that will take two opponents and simulate an arbitrary number of duels between them, and output the results and summarize them for you, much much quicker than manually going through the duels, even with an absurdly high timeScale. This will become incredibly useful in making balance changes and testing new dice against existing sets. This is a screenshot of it in edit mode, but in play mode it removes the "Dueling Managers" field and will use whatever the current duel balance settings are, allowing for the GDs to test freely in play mode without worrying about undoing all their changes afterward.

Cutscene

I created the Babble Buds puppet editor and ported the rendering library I wrote for it to C# so it could be used in Unity. Dice Armor has a full campaign using cutscenes made using the Babble Buds cutscene editor, taking advantage of its support for custom commands and fields to control things like talking, giving the player dice and money, starting duels, and controlling player progression through the story.

Action Wheel

When a cutscene ends, its final command is to either start a duel or set the next cutscene in the story. In the latter case, there is an additional field for what to call the next cutscene, and what location it takes place. The cutscene is then added to the player's save file, and when they visit the city locations are greyed out until they have at least one action to do there. Each location has a dynamically populated action wheel with a custom range of acceptable angles.

Shop

The dice shop is dynamically populated by a list of dice available to the player, which can be changed during cutscenes, and is checked against the dice owned by the player to generate sold-out indicators. On the left, the player can choose to filter the options down to a single dice effect, which also updates the "Buy All" button to buy only all the dice in the current filter.

Inventory

The inventory works most the same as the shop, but for equipping dice. It also allows you to drag individual dice or entire sets to the equipped dice glyph. While dragging it will highlight all the slots the new dice will be equipped into.

Dice Rolling

The dice rolling uses the physics engine and detects once the dice have stopped moving, then determines which side is face up based on which of the normals is closest to straight up. It flags the die as cocked if that smallest angle is above a threshold. The dice sink into the table when not rolling to not interfere with any dice that are rolling.

Missile Storm

During certain events like winning the game or having the face of a die broken, the players' portraits will flash an emotion for a second. After winning, a random living die from the winning player is chosen to play their "finisher move", a flashy and dramatic effect to end the game. Shown is the arcane mechana's finisher, "Missile Storm".

',22),u=[m];function f(y,b,w,_,v,k){return a(),t("div",null,u)}const q=e(g,[["render",f]]);export{I as __pageData,q as default}; +import{_ as e,c as t,o as a,d as i}from"./app.c95a51e0.js";const o="/assets/da2.57c7af0b.png",s="/assets/editors.c2eaa93b.png",n="/assets/simulator.7ede7b83.jpg",r="/assets/da1.ae7a2bb1.png",h="/assets/da6.5b5d63de.png",d="/assets/da7.b7b33663.png",l="/assets/da8.d623c64f.png",c="/assets/da3.e16fb4de.png",p="/assets/da9.35a2db61.png",I=JSON.parse('{"title":"Dice Armor","description":"","frontmatter":{"title":"Dice Armor"},"headers":[],"relativePath":"projects/dice/index.md","lastUpdated":1684370673000}'),g={name:"projects/dice/index.md"},m=i('

Dice Armor

Download Here

Dice Armor is a game that started development as a semester-long project by a team of nine: a producer, a creative director, a narrative writer, an artist, two programmers, and 3 game designers. The information here is about my contributions as the lead programmer over the semester because I can show off stuff like the editor scripts I wrote. I was doing everything from interface coding, editor scripts, integrating Babble Buds, and of course, everything related to the gameplay itself. To date I'm still the lead programmer for the game; for more up-to-date information on the current state of the game please visit the official site.

The build available here was created for showing off at the end of the semester, and as such has some buttons present to make the game easier to skip parts of the game to see all the content: You start with all the dice in the game already in the shop, there's a button to give yourself free money to buy these dice with, and in the duel, there are buttons to force a win or a loss, which can be used to skip the tutorial (not recommended for first-time players).

Tutorial

Dice Armor is a dice dueling game. Players can use abilities, flip dice, and attack each other to win in a dice game that puts chance into the hands of the players. This is what the dueling scene looks like, with a tutorial cutscene happening on top to guide the player through the basics. Also, all the dice are constructed dynamically, using quaternion math to figure out the placement of each component relative to the face it is going on. The die in the middle has one of the player' and opponents' portraits on each of its sides.

Editors

For many of the objects I've created, I've made scriptable objects so that game designers can add and modify them easily. Additionally, I would create custom inspectors for the objects to help make them as easy to understand and edit as possible. The opponent's artificial intelligence is made up of many strategies, in a prioritized list. When it is the opponents' turn they go through each strategy and check if they can be run, and if so then the opponent performs the strategy and starts back over at the top of the list of strategies. The + sign under the list of strategies opens an organized dropdown of all the various strategies.

Simulator

In addition to custom inspector code, I've created new tools for the editor for our game designers to use. This is a duel simulator that will take two opponents and simulate an arbitrary number of duels between them, and output the results and summarize them for you, much much quicker than manually going through the duels, even with an absurdly high timeScale. This will become incredibly useful in making balance changes and testing new dice against existing sets. This is a screenshot of it in edit mode, but in play mode it removes the "Dueling Managers" field and will use whatever the current duel balance settings are, allowing for the GDs to test freely in play mode without worrying about undoing all their changes afterward.

Cutscene

I created the Babble Buds puppet editor and ported the rendering library I wrote for it to C# so it could be used in Unity. Dice Armor has a full campaign using cutscenes made using the Babble Buds cutscene editor, taking advantage of its support for custom commands and fields to control things like talking, giving the player dice and money, starting duels, and controlling player progression through the story.

Action Wheel

When a cutscene ends, its final command is to either start a duel or set the next cutscene in the story. In the latter case, there is an additional field for what to call the next cutscene, and what location it takes place. The cutscene is then added to the player's save file, and when they visit the city locations are greyed out until they have at least one action to do there. Each location has a dynamically populated action wheel with a custom range of acceptable angles.

Shop

The dice shop is dynamically populated by a list of dice available to the player, which can be changed during cutscenes, and is checked against the dice owned by the player to generate sold-out indicators. On the left, the player can choose to filter the options down to a single dice effect, which also updates the "Buy All" button to buy only all the dice in the current filter.

Inventory

The inventory works most the same as the shop, but for equipping dice. It also allows you to drag individual dice or entire sets to the equipped dice glyph. While dragging it will highlight all the slots the new dice will be equipped into.

Dice Rolling

The dice rolling uses the physics engine and detects once the dice have stopped moving, then determines which side is face up based on which of the normals is closest to straight up. It flags the die as cocked if that smallest angle is above a threshold. The dice sink into the table when not rolling to not interfere with any dice that are rolling.

Missile Storm

During certain events like winning the game or having the face of a die broken, the players' portraits will flash an emotion for a second. After winning, a random living die from the winning player is chosen to play their "finisher move", a flashy and dramatic effect to end the game. Shown is the arcane mechana's finisher, "Missile Storm".

',22),u=[m];function f(y,b,w,_,v,k){return a(),t("div",null,u)}const q=e(g,[["render",f]]);export{I as __pageData,q as default}; diff --git a/assets/projects_dice_index.md.799584cd.lean.js b/assets/projects_dice_index.md.c14b2e99.lean.js similarity index 90% rename from assets/projects_dice_index.md.799584cd.lean.js rename to assets/projects_dice_index.md.c14b2e99.lean.js index 9f30051f..c9d4ce66 100644 --- a/assets/projects_dice_index.md.799584cd.lean.js +++ b/assets/projects_dice_index.md.c14b2e99.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,d as i}from"./app.c95a51e0.js";const o="/assets/da2.57c7af0b.png",s="/assets/editors.c2eaa93b.png",n="/assets/simulator.7ede7b83.jpg",r="/assets/da1.ae7a2bb1.png",h="/assets/da6.5b5d63de.png",d="/assets/da7.b7b33663.png",l="/assets/da8.d623c64f.png",c="/assets/da3.e16fb4de.png",p="/assets/da9.35a2db61.png",I=JSON.parse('{"title":"Dice Armor","description":"","frontmatter":{"title":"Dice Armor"},"headers":[],"relativePath":"projects/dice/index.md","lastUpdated":1684206020000}'),g={name:"projects/dice/index.md"},m=i("",22),u=[m];function f(y,b,w,_,v,k){return a(),t("div",null,u)}const q=e(g,[["render",f]]);export{I as __pageData,q as default}; +import{_ as e,c as t,o as a,d as i}from"./app.c95a51e0.js";const o="/assets/da2.57c7af0b.png",s="/assets/editors.c2eaa93b.png",n="/assets/simulator.7ede7b83.jpg",r="/assets/da1.ae7a2bb1.png",h="/assets/da6.5b5d63de.png",d="/assets/da7.b7b33663.png",l="/assets/da8.d623c64f.png",c="/assets/da3.e16fb4de.png",p="/assets/da9.35a2db61.png",I=JSON.parse('{"title":"Dice Armor","description":"","frontmatter":{"title":"Dice Armor"},"headers":[],"relativePath":"projects/dice/index.md","lastUpdated":1684370673000}'),g={name:"projects/dice/index.md"},m=i("",22),u=[m];function f(y,b,w,_,v,k){return a(),t("div",null,u)}const q=e(g,[["render",f]]);export{I as __pageData,q as default}; diff --git a/assets/projects_index.md.685ec61e.js b/assets/projects_index.md.b420d47c.js similarity index 97% rename from assets/projects_index.md.685ec61e.js rename to assets/projects_index.md.b420d47c.js index 05190b49..692fc759 100644 --- a/assets/projects_index.md.685ec61e.js +++ b/assets/projects_index.md.b420d47c.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const f=JSON.parse('{"title":"Projects","description":"","frontmatter":{"title":"Projects","lastUpdated":false},"headers":[],"relativePath":"projects/index.md","lastUpdated":1684206020000}'),n={name:"projects/index.md"},s=r('

Games!

I make games regularly! Check them out in the sidebar or on my itch.io page.

Profectus!

I contributed to a modding framework called The Modding Tree and then made Profectus as an alternative that gives developers more control. Profectus is a game engine for the web that uses TS and Vue.

V-ecs!

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

OptiSpeech!

I led a team updating a legacy Unity project for research on speech therapy to use a modern version with a focus on extensibility to facilitate future maintenance and features.

Babble Buds!

Babble Buds is a free, open-source virtual puppet show engine I made for various platforms including HTLM5 and Unity, as well as an accompanying electron-based puppet editor and multiplayer stage.

Dice Armor

I was the lead programmer on a team of nine creating this game in a semester-long college course. I programmed all the gameplay systems as well as incorporated Babble Buds for the cutscenes and tutorial.

Capture the Citadel

A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee.

',14),i=[s];function o(d,h,c,l,p,u){return t(),a("div",null,i)}const b=e(n,[["render",o]]);export{f as __pageData,b as default}; +import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const f=JSON.parse('{"title":"Projects","description":"","frontmatter":{"title":"Projects","lastUpdated":false},"headers":[],"relativePath":"projects/index.md","lastUpdated":1684370673000}'),n={name:"projects/index.md"},s=r('

Games!

I make games regularly! Check them out in the sidebar or on my itch.io page.

Profectus!

I contributed to a modding framework called The Modding Tree and then made Profectus as an alternative that gives developers more control. Profectus is a game engine for the web that uses TS and Vue.

V-ecs!

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

OptiSpeech!

I led a team updating a legacy Unity project for research on speech therapy to use a modern version with a focus on extensibility to facilitate future maintenance and features.

Babble Buds!

Babble Buds is a free, open-source virtual puppet show engine I made for various platforms including HTLM5 and Unity, as well as an accompanying electron-based puppet editor and multiplayer stage.

Dice Armor

I was the lead programmer on a team of nine creating this game in a semester-long college course. I programmed all the gameplay systems as well as incorporated Babble Buds for the cutscenes and tutorial.

Capture the Citadel

A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee.

',14),i=[s];function o(d,h,c,l,p,u){return t(),a("div",null,i)}const b=e(n,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/projects_index.md.685ec61e.lean.js b/assets/projects_index.md.b420d47c.lean.js similarity index 84% rename from assets/projects_index.md.685ec61e.lean.js rename to assets/projects_index.md.b420d47c.lean.js index 07cb28f3..90be87cd 100644 --- a/assets/projects_index.md.685ec61e.lean.js +++ b/assets/projects_index.md.b420d47c.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const f=JSON.parse('{"title":"Projects","description":"","frontmatter":{"title":"Projects","lastUpdated":false},"headers":[],"relativePath":"projects/index.md","lastUpdated":1684206020000}'),n={name:"projects/index.md"},s=r("",14),i=[s];function o(d,h,c,l,p,u){return t(),a("div",null,i)}const b=e(n,[["render",o]]);export{f as __pageData,b as default}; +import{_ as e,c as a,o as t,d as r}from"./app.c95a51e0.js";const f=JSON.parse('{"title":"Projects","description":"","frontmatter":{"title":"Projects","lastUpdated":false},"headers":[],"relativePath":"projects/index.md","lastUpdated":1684370673000}'),n={name:"projects/index.md"},s=r("",14),i=[s];function o(d,h,c,l,p,u){return t(),a("div",null,i)}const b=e(n,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/projects_optispeech_index.md.3a9da03b.js b/assets/projects_optispeech_index.md.605ff847.js similarity index 97% rename from assets/projects_optispeech_index.md.3a9da03b.js rename to assets/projects_optispeech_index.md.605ff847.js index a7b23d2a..bbc5c774 100644 --- a/assets/projects_optispeech_index.md.3a9da03b.js +++ b/assets/projects_optispeech_index.md.605ff847.js @@ -1 +1 @@ -import{_ as t,c as s,o as a,a as e,b as o}from"./app.c95a51e0.js";const n="/assets/system-architecture-600.254c8a7e.jpg",r="/assets/new-interface.99f03ba7.png",i="/assets/documentation.4e9ae6e0.png",c="/assets/unittests.e8833eb5.png",U=JSON.parse('{"title":"OptiSpeech","description":"","frontmatter":{"title":"OptiSpeech"},"headers":[],"relativePath":"projects/optispeech/index.md","lastUpdated":1684206020000}'),l={name:"projects/optispeech/index.md"},d=e("h1",{id:"optispeech",tabindex:"-1"},[o("OptiSpeech "),e("a",{class:"header-anchor",href:"#optispeech","aria-hidden":"true"},"#")],-1),p=e("p",null,"The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks \u2014 for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.",-1),h=e("p",null,[e("img",{src:n,alt:"System Architecture"})],-1),u=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/9uHqIRs7ZjM",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),m=e("p",null,"This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.",-1),g=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/Oz42mKvlzqI",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),_=e("p",null,"This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.",-1),f=e("p",null,"The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.",-1),w=e("p",null,[e("img",{src:r,alt:"New Interface"})],-1),y=e("p",null,"In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.",-1),b=e("p",null,[e("img",{src:i,alt:"Documentation"})],-1),v=e("p",null,[e("img",{src:c,alt:"Unit Tests"})],-1),T=[d,p,h,u,m,g,_,f,w,y,b,v];function k(x,A,I,N,S,j){return a(),s("div",null,T)}const D=t(l,[["render",k]]);export{U as __pageData,D as default}; +import{_ as t,c as s,o as a,a as e,b as o}from"./app.c95a51e0.js";const n="/assets/system-architecture-600.254c8a7e.jpg",r="/assets/new-interface.99f03ba7.png",i="/assets/documentation.4e9ae6e0.png",c="/assets/unittests.e8833eb5.png",U=JSON.parse('{"title":"OptiSpeech","description":"","frontmatter":{"title":"OptiSpeech"},"headers":[],"relativePath":"projects/optispeech/index.md","lastUpdated":1684370673000}'),l={name:"projects/optispeech/index.md"},d=e("h1",{id:"optispeech",tabindex:"-1"},[o("OptiSpeech "),e("a",{class:"header-anchor",href:"#optispeech","aria-hidden":"true"},"#")],-1),p=e("p",null,"The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks \u2014 for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.",-1),h=e("p",null,[e("img",{src:n,alt:"System Architecture"})],-1),u=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/9uHqIRs7ZjM",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),m=e("p",null,"This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.",-1),g=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/Oz42mKvlzqI",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),_=e("p",null,"This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.",-1),f=e("p",null,"The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.",-1),w=e("p",null,[e("img",{src:r,alt:"New Interface"})],-1),y=e("p",null,"In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.",-1),b=e("p",null,[e("img",{src:i,alt:"Documentation"})],-1),v=e("p",null,[e("img",{src:c,alt:"Unit Tests"})],-1),T=[d,p,h,u,m,g,_,f,w,y,b,v];function k(x,A,I,N,S,j){return a(),s("div",null,T)}const D=t(l,[["render",k]]);export{U as __pageData,D as default}; diff --git a/assets/projects_optispeech_index.md.3a9da03b.lean.js b/assets/projects_optispeech_index.md.605ff847.lean.js similarity index 97% rename from assets/projects_optispeech_index.md.3a9da03b.lean.js rename to assets/projects_optispeech_index.md.605ff847.lean.js index a7b23d2a..bbc5c774 100644 --- a/assets/projects_optispeech_index.md.3a9da03b.lean.js +++ b/assets/projects_optispeech_index.md.605ff847.lean.js @@ -1 +1 @@ -import{_ as t,c as s,o as a,a as e,b as o}from"./app.c95a51e0.js";const n="/assets/system-architecture-600.254c8a7e.jpg",r="/assets/new-interface.99f03ba7.png",i="/assets/documentation.4e9ae6e0.png",c="/assets/unittests.e8833eb5.png",U=JSON.parse('{"title":"OptiSpeech","description":"","frontmatter":{"title":"OptiSpeech"},"headers":[],"relativePath":"projects/optispeech/index.md","lastUpdated":1684206020000}'),l={name:"projects/optispeech/index.md"},d=e("h1",{id:"optispeech",tabindex:"-1"},[o("OptiSpeech "),e("a",{class:"header-anchor",href:"#optispeech","aria-hidden":"true"},"#")],-1),p=e("p",null,"The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks \u2014 for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.",-1),h=e("p",null,[e("img",{src:n,alt:"System Architecture"})],-1),u=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/9uHqIRs7ZjM",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),m=e("p",null,"This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.",-1),g=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/Oz42mKvlzqI",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),_=e("p",null,"This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.",-1),f=e("p",null,"The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.",-1),w=e("p",null,[e("img",{src:r,alt:"New Interface"})],-1),y=e("p",null,"In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.",-1),b=e("p",null,[e("img",{src:i,alt:"Documentation"})],-1),v=e("p",null,[e("img",{src:c,alt:"Unit Tests"})],-1),T=[d,p,h,u,m,g,_,f,w,y,b,v];function k(x,A,I,N,S,j){return a(),s("div",null,T)}const D=t(l,[["render",k]]);export{U as __pageData,D as default}; +import{_ as t,c as s,o as a,a as e,b as o}from"./app.c95a51e0.js";const n="/assets/system-architecture-600.254c8a7e.jpg",r="/assets/new-interface.99f03ba7.png",i="/assets/documentation.4e9ae6e0.png",c="/assets/unittests.e8833eb5.png",U=JSON.parse('{"title":"OptiSpeech","description":"","frontmatter":{"title":"OptiSpeech"},"headers":[],"relativePath":"projects/optispeech/index.md","lastUpdated":1684370673000}'),l={name:"projects/optispeech/index.md"},d=e("h1",{id:"optispeech",tabindex:"-1"},[o("OptiSpeech "),e("a",{class:"header-anchor",href:"#optispeech","aria-hidden":"true"},"#")],-1),p=e("p",null,"The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks \u2014 for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.",-1),h=e("p",null,[e("img",{src:n,alt:"System Architecture"})],-1),u=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/9uHqIRs7ZjM",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),m=e("p",null,"This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.",-1),g=e("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/Oz42mKvlzqI",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{display:"block",margin:"auto"}},null,-1),_=e("p",null,"This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.",-1),f=e("p",null,"The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.",-1),w=e("p",null,[e("img",{src:r,alt:"New Interface"})],-1),y=e("p",null,"In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.",-1),b=e("p",null,[e("img",{src:i,alt:"Documentation"})],-1),v=e("p",null,[e("img",{src:c,alt:"Unit Tests"})],-1),T=[d,p,h,u,m,g,_,f,w,y,b,v];function k(x,A,I,N,S,j){return a(),s("div",null,T)}const D=t(l,[["render",k]]);export{U as __pageData,D as default}; diff --git a/assets/projects_vecs_index.md.668eb31c.js b/assets/projects_vecs_index.md.4db19782.js similarity index 96% rename from assets/projects_vecs_index.md.668eb31c.js rename to assets/projects_vecs_index.md.4db19782.js index 909d100d..e04cc724 100644 --- a/assets/projects_vecs_index.md.668eb31c.js +++ b/assets/projects_vecs_index.md.4db19782.js @@ -1 +1 @@ -import{_ as e,c as t,o as s,d as a}from"./app.c95a51e0.js";const o="/assets/screenshot.78830a30.png",n="/assets/debug.0a8c47b7.png",r="/assets/sandsoftime.ba63f865.png",w=JSON.parse('{"title":"V-ecs","description":"","frontmatter":{"title":"V-ecs"},"headers":[],"relativePath":"projects/vecs/index.md","lastUpdated":1684206020000}'),i={name:"projects/vecs/index.md"},d=a('

V-ecs

V-ecs Screenshot

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

The engine works with "worlds", which are collections of systems and renderers. The engine comes with several worlds using systems and renderers I made, including a voxel world, an incremental game, and some test scenes. All of these include systems to render the fps as well as show a debug console by typing the grave key (`). The default world is a title screen that detects any worlds in the "worlds" folder and displays a button for each of them.

Debug Menu

The original plans were to eventually put it on the steam workshop so people could more easily share their creations amongst each other, but I never became happy enough with the performance of the engine - the parallelization of the lua code involved a lot of overhead that severely limited performance.

Instead, I made a couple of worlds by myself - an infinite procedurally generated voxel world, a simple incremental game, and a more complex incremental game I call "Sands of Time".

Sands of Time

',8),l=[d];function c(p,h,m,u,_,g){return s(),t("div",null,l)}const y=e(i,[["render",c]]);export{w as __pageData,y as default}; +import{_ as e,c as t,o as s,d as a}from"./app.c95a51e0.js";const o="/assets/screenshot.78830a30.png",n="/assets/debug.0a8c47b7.png",r="/assets/sandsoftime.ba63f865.png",w=JSON.parse('{"title":"V-ecs","description":"","frontmatter":{"title":"V-ecs"},"headers":[],"relativePath":"projects/vecs/index.md","lastUpdated":1684370673000}'),i={name:"projects/vecs/index.md"},d=a('

V-ecs

V-ecs Screenshot

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

The engine works with "worlds", which are collections of systems and renderers. The engine comes with several worlds using systems and renderers I made, including a voxel world, an incremental game, and some test scenes. All of these include systems to render the fps as well as show a debug console by typing the grave key (`). The default world is a title screen that detects any worlds in the "worlds" folder and displays a button for each of them.

Debug Menu

The original plans were to eventually put it on the steam workshop so people could more easily share their creations amongst each other, but I never became happy enough with the performance of the engine - the parallelization of the lua code involved a lot of overhead that severely limited performance.

Instead, I made a couple of worlds by myself - an infinite procedurally generated voxel world, a simple incremental game, and a more complex incremental game I call "Sands of Time".

Sands of Time

',8),l=[d];function c(p,h,m,u,_,g){return s(),t("div",null,l)}const y=e(i,[["render",c]]);export{w as __pageData,y as default}; diff --git a/assets/projects_vecs_index.md.668eb31c.lean.js b/assets/projects_vecs_index.md.4db19782.lean.js similarity index 87% rename from assets/projects_vecs_index.md.668eb31c.lean.js rename to assets/projects_vecs_index.md.4db19782.lean.js index a4c4d27a..1a5e41cf 100644 --- a/assets/projects_vecs_index.md.668eb31c.lean.js +++ b/assets/projects_vecs_index.md.4db19782.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as s,d as a}from"./app.c95a51e0.js";const o="/assets/screenshot.78830a30.png",n="/assets/debug.0a8c47b7.png",r="/assets/sandsoftime.ba63f865.png",w=JSON.parse('{"title":"V-ecs","description":"","frontmatter":{"title":"V-ecs"},"headers":[],"relativePath":"projects/vecs/index.md","lastUpdated":1684206020000}'),i={name:"projects/vecs/index.md"},d=a("",8),l=[d];function c(p,h,m,u,_,g){return s(),t("div",null,l)}const y=e(i,[["render",c]]);export{w as __pageData,y as default}; +import{_ as e,c as t,o as s,d as a}from"./app.c95a51e0.js";const o="/assets/screenshot.78830a30.png",n="/assets/debug.0a8c47b7.png",r="/assets/sandsoftime.ba63f865.png",w=JSON.parse('{"title":"V-ecs","description":"","frontmatter":{"title":"V-ecs"},"headers":[],"relativePath":"projects/vecs/index.md","lastUpdated":1684370673000}'),i={name:"projects/vecs/index.md"},d=a("",8),l=[d];function c(p,h,m,u,_,g){return s(),t("div",null,l)}const y=e(i,[["render",c]]);export{w as __pageData,y as default}; diff --git a/guide-to-incrementals/design/introduction/index.html b/guide-to-incrementals/design/introduction/index.html index 6817ecef..36a6abe4 100644 --- a/guide-to-incrementals/design/introduction/index.html +++ b/guide-to-incrementals/design/introduction/index.html @@ -22,7 +22,7 @@
Return to top
On this page

Making an Incremental Game

- + diff --git a/guide-to-incrementals/index.html b/guide-to-incrementals/index.html index 4f852b5e..c5b5e896 100644 --- a/guide-to-incrementals/index.html +++ b/guide-to-incrementals/index.html @@ -22,7 +22,7 @@
Return to top
On this page

Introduction

This is a comprehensive guide to Incremental Games, a genre of video games. It will explore defining the genre, why it's appealing, and how to design and build your own incremental game. Along the way will be interactive examples, snippets from other creators, and relevant material to contextualize everything.

Note: This is an incomplete document. I want to keep adding opinions and opposing views from other incremental games developers, and add interactive examples to illustrate various points regarding game design and balancing. Consider this a living document - and see the changelog at the end.

Who am I?

That's a good question! What authority do I have to be making this site? I haven't made the best incremental games, nor the most incremental games, certainly not the most popular ones either. I do have some formal education in game development, know a lot of incremental game devs, as well as other game devs, and an interest in ludology, classifying genres, etc. I've also made a couple of incremental games myself.

If you have any additional questions about my credentials or anything on this site, feel free to contact me: I'm "The Paper Pilot" on most social media. You'll probably get a response fastest via my discord server, or if you just want to suggest changes to the website you can click the "Edit this page" link present on every single page.

- + diff --git a/guide-to-incrementals/ludology/appeal-developers/index.html b/guide-to-incrementals/ludology/appeal-developers/index.html index da163f51..5b8fcb5a 100644 --- a/guide-to-incrementals/ludology/appeal-developers/index.html +++ b/guide-to-incrementals/ludology/appeal-developers/index.html @@ -22,7 +22,7 @@
Return to top
On this page

Appeal to Developers

There are a lot of developers in the incremental games community - the genre seems to draw them in, and convert a lot of players into developers. Let's explore the reasons why this genre appeals to developers.

Incrementals are Easy to Make

Compared to other genres, incrementals have quite low expectations. You don't need to make fancy art, or music, or lay things out nicely. If you can make a button and learn the few lines of code necessary to make a number go up, you can make an incremental. This low threshold makes the genre perfect for those who are actively learning to code and haven't developed any gamedev-related skills yet.

Additionally, unlike other genres incrementals are uniquely easy to implement in a normal web page - no need to worry about rendering sprites, moving them around, implementing physics, etc. New developers can just use HTML to add a button, and the game is now available in your browser. You don't need to choose an engine, have admin privileges, or hell for the dedicated you don't even need a computer - there are tools for web development that run in the browser itself, so you can technically use your phone if that's all you have.

Javascript is a perfectly viable language for making web games, whereas other genres are typically going to require using other more difficult languages to learn. There are countless javascript tutorials that start from 0 knowledge of programming, making it incredibly accessible to beginners.

Players are Easy to Find

Once you've finished your game and uploaded it on github pages or itch or just copied the link if you're using glitch or replit (all of which are easy to do), anyone can now play the game in their browser. This low barrier to entry has shown tremendous success in getting completely unknown developers to have thousands of plays.

The incremental games community, which mostly centers around r/incremental_games, is always looking for new games and tends to flood any new ones posted with initial players.

Having your games be played can be incredibly motivating, and the community makes it quite clear that you can expect players to play your game. These communities - both for incremental games in general as well as game-specific communities - tend to be very developer friendly as well. A lot of the developers know each other, and welcome new developers with open arms, often with dedicated channels for programming help and discussions.

Monetization

I'd like to clarify that everything I've said above mainly applies to web-based incrementals. Incremental games are also incredibly popular on mobile, but with a much different culture and community. Many mobile gamers will still participate in the web-focused community for the culture. This web-focused community has a culture that has been criticized for being "anti-monetization". Ads, IAPs, and similar forms of monetization are often criticized, mainly due to the abundance of completely non-monetized games available from hobbyist developers. There are exceptions, like paid games often being considered fine, like Increlution or Stuck in Time, or donation ware games like kittens game, but even popular games that have IAP see some level of regular criticism, like NGU Idle, Idle Skilling, or Idle Pins. A large part of this can be explained by the community being hyper-aware of the addictive nature of this genre and its susceptibility to exploiting players.

On mobile, however, monetization is the norm and expected. If an incremental game is available on mobile, it almost certainly will be monetized, and mobile players are aware and accepting of that. Mobile incremental games, due to their addictive nature, tend to make a lot of money. It's very lucrative, and therefore these games are quite abundant on mobile storefronts.

- + diff --git a/guide-to-incrementals/ludology/appeal-gamers/index.html b/guide-to-incrementals/ludology/appeal-gamers/index.html index b73f50f7..7b1d5d8b 100644 --- a/guide-to-incrementals/ludology/appeal-gamers/index.html +++ b/guide-to-incrementals/ludology/appeal-gamers/index.html @@ -22,7 +22,7 @@
Return to top
On this page

Appeal to Players

This is something that has been discussed and analyzed by many people, and to some extent, I feel like everything that can be said on the topic already has. However, a lot of these analyses are from the perspective of those with not as much experience and involvement within the genre as I'd argue would be necessary for a fully contextualized answer. I recently watched a video about Vampire Survivors, which has since been taken down due to drawing negative attention, which made me think about some interesting arguments about what games are, and what makes them good. The video's argument that "Vampire Survivors is not a video game" mirrors a claim by the developer of Cookie Clicker that his games are "non-games". Using Vampire Survivors and the video made on it as a framework, I'll be answering why incremental games appeal to players. Since the video has been taken down, I'll do my best to contextualize and generalize the arguments of the video without requiring the reader to watch it. For what it's worth, while I disagreed with the video I actually liked a lot of the way it went about thinking about games, and I consider this a continuation of that discussion.

Numbers Going Up

This is a very common response to why people enjoy incremental games, although it's not one I find compels me personally, and I suspect it might be a stand-in for progression or content. But reportedly, some people do just like seeing big numbers. I must reiterate I suspect the actual cause is seeing big numbers in context though - if you start at 1e1000 of a currency and get to 1e1001, that isn't going to feel as satisfying as going from 1e10 to 1e100, and in any case, I don't think a button that just adds a zero to your number will feel quite satisfying - I believe its the sense of having made progress, and comparing where you are to where you started and feeling like you've earned your way here that is enjoyable.

Progression

Vampire Survivors can be argued to have a comparatively low depth to its combat compared to many other games. I'd argue it has sufficient depth and more than someone might expect who has only played the game for a short while, but it still definitely gets beat out by many other combat-focused games. Instead, a lot of the progression in Vampire Survivors comes from a meta-progression system by which base stats are increased by spending a currency that persists between runs. While it is technically possible to win without this meta-progression system, and indeed in many roguelikes players like to challenge themselves by beating the game without any meta-progression, the criticism can be made that meta-progression de-emphasizes player skill by making it less important to have to beat the game. Certainly, in incremental games, it is often literally impossible to complete a game without taking advantage of the meta-progression systems. I'd argue this does not detract from the game, however, and is actually a part of what makes incremental games, and roguelikes, enjoyable to many players: meta-progression augments the increases in skill the player is naturally gaining as they play. In effect, it's not replacing the skill increase, but exaggerating it to make it feel more real to the player.

Note: There is also a lot of progression from exploring the mechanics and discovering synergies, unlocking new weapons or playable characters, etc. That just isn't as relevant to this discussion, but it does make up a lot of the appeal of the game.

Effortlessness

Incremental games are so easy, a lot of them even have you progress while you're not playing! Part of the appeal is being able to feel like you're making progress while doing something actually productive - multitasking, in a way. In this sense, the game is more of a fidget toy - not something to think hard about and play actively, but something to click a few buttons every so often while you're paying attention to a lecture or studying or working. Of course, not all incremental games lend themselves to being played this way - it's specifically "idle" games that work like this. These are games that take an incredibly long amount of time to see all the content, stretching it as thin as possible, but they aren't expecting you to be sitting at your device playing it the entire time. They expect you to leave and come back later to make a bit of progress and repeat the cycle.

If you look at the higher-level play of most games, you'll see them perform difficult feats with ease and speed. They'll achieve a "flow state" that takes all their knowledge and experience of the game and uses it to play the game as instinctively as possible. It's incredible to watch things like Slay the Spire speed runs or competitive DDR-likes. I'd argue the goal of a lot of games with a competitive scene is to get so good that the game becomes effortless. In that sense, a game that allows you to reach that point earlier isn't any less legitimate, but rather lowers the barrier to entry by allowing more people to get "really good" at the game. And to be clear, Vampire Survivors and (most) incremental games aren't trivially easy - they, and to an extent, every game will have some level of learning and improvement over time.

Addiction

A lot of these reasons for why incremental games appeal may have reminded you of why gambling appeals to people, particularly those prone to addiction. Indeed, incremental games are quite often criticized for their similarity to a skinner box. Some have gone as far as to say incremental games as a genre are commenting that all games are skinner boxes. The argument goes that some games are not fun, but rather condition players into continuing to play without actually getting anything from the experience. When tied to real-world money this is seen as predatory, and to a lesser extent, even free games may be feeding the addictive sides of people and making them more prone to seek out gambling or micro-transaction heavy games.

While incremental games can be fun and even healthy in certain contexts, they can exacerbate video game addiction more than other genres. If you feel like playing incremental games is taking priority over other things in your life, or manipulating your sleep schedule, it may be prudent to seek help. See r/StopGaming for resources.

Since incremental games are often built on extrinsic motivations in the form of progression systems, it's hard to argue whether players continue to play because they are enjoying the gameplay, or if they are just conditioned to keep doing it because the game keeps rewarding them. Unfortunately, it can often feel like it's the latter, as there isn't typically anything compelling about the "gameplay" of clicking a button and waiting. There may be a significant overlap between those who enjoy incremental games and those who are most prone to addiction, and there are often posts on r/incremental_games about someone either struggling with or overcoming video game addiction.

Strategy

Incremental games could be considered a subset of strategy games, and inherit the appeals of strategy games. This includes the appeal of feeling like you've found a good solution to a puzzle, or that you're learning more about the game and are improving at making decisions within it. This applies to Vampire Survivors specifically, where you're learning about evolutions and synergies and what kinds of enemies can spawn under what conditions, and how best to handle them.

Note that strategy games are not all the same difficulty, as well. Vampire Survivors is still easier to play than Starcraft 2, and Cookie Clicker is probably somewhere in between (once you progress sufficiently). Vampire Survivors being so successful may indicate that "easier" strategies may have their separate appeal to harder strategy games - players like to feel smart and that they figured the game out and have optimized or mastered it, and the game being easier doesn't detract from that sense of accomplishment as much as it allows more and more users to be able to reach the point where they gain that sense.

Avoiding Staleness

Incremental games tend to have "paradigm shifts", where the gameplay changes in a meaningful way at various times throughout the progression of the game. These upset and change the gameplay loop, which helps keep them from stagnating. This constant "freshness" to the gameplay can keep players engaged for longer, compared to a game with a repetitive and static gameplay loop.

Good Game Design

Incremental games tend to show their game design "plainly", so it's more readily apparent if a game has good game design while playing, even if you're not looking for it. While different players have different preferences and might enjoy different types of games more than others, there are underlying good and bad game design principles that players will notice the effects of. To be clear, this isn't talking about stuff like big numbers being enjoyable, where I can comfortably agree to disagree with other players. They don't intrinsically make my experience better, but I'm aware of those for whom it does and I won't argue against their feelings. However, the game designer in me does feel like there are some extremely clear-cut examples of good and bad game design philosophies.

Let's start by giving an example of a mechanic I think can be easily and strongly argued is good game design. There are of course many examples, but a personal favorite of mine is how DOOM encourages aggressive gameplay by linking health drops to melee attacks. It has an intended experience it's trying to give the player - immersing themselves as DOOM guy, who would not hide behind cover when low on health - and this mechanic does a great job at encouraging and effectively teaching players to behave properly. This is in sharp contrast to shooters like Call of Duty, which have you regen health passively, encouraging players to hide behind cover and wait after getting hit. Note that I'm not arguing CoD is poorly designed, as the games have different intended experiences. I'm specifically praising DOOM for having a mechanic that does a good job at ensuring the player has that intended experience.

To contrast with an example I think is bad game design, let's talk about shields in souls-likes. This is a bit of a famous example, and I highly recommend this video essay which spends quite a good bit of time on this topic. Essentially, the argument boils down to players of earlier games in the souls games using shields too much - playing slowly, conservatively, and ultimately having less fun. Players wanted to feel safe, so they ended up playing in a way that ruined the experience for them. The developers solved this by removing shields, apart from an intentionally bad one effectively mocking the playstyle, and it did its job at getting players to play more aggressively, and often have more fun.

To bring the conversation back to incrementals, I'm incredibly opinionated on what makes a good incremental game, which I'll discuss in the game design section. Suffice it to say, incremental games rely more on good game design than other genres, due to not having much to distract from bad game design. This helps (although imperfectly - gamers are a bit too tolerant of bad game design!) well-designed games rise to the top within the genre.

Artistic Merit

The Vampire Survivors video made me think back to the old arguments about whether games are art, and whether they ought to be. The video seems preoccupied with attaching value to games solely based on their mechanics and the depth thereof, to the point of arguing Vampire Survivors is a waste of time due to its lack of depth. However, even setting aside the fact that if players are having fun then it's not time wasted, I think games can have artistic merit that supersedes the necessity of having (any / engaging / "deep") gameplay. I think the consensus online is that games are definitively art, although I could see the argument that some genres, like incremental games, might be a bit in a grey area. Let's talk about Vampire Survivors first though - It has a story to tell, with lore and many characters, that drive the player and encourage them to continue exploring the game and discovering things within it. Like any walking simulator, it is no less legitimate of a game or the "art" label because of any lack perceived lack of depth. For what it's worth, most art can be consumed with more ease than VS - any painting, movie, sculpture, etc.

A lot of incrementals have a narrative context that can similarly qualify them as art. Cookie Clicker is, as has been pointed out numerous times before, commenting on excess and increasing production beyond any reasonable limits - devolving into increasing production for its own sake. Indeed, a lot of incremental games are written to comment upon various concepts like capitalism or tropes in games, as discussed when defining Incrementals. However, I'd like to argue most incremental games are still art, even without any narrative context. "Art" as a concept is pretty nebulous already, but I personally like those who define it as an act of expression more than any physical result. The creator and the context within which they created the art, and any meaning they put into it, are all relevant and a part of the art itself. Most incremental games have artistic merit from things like why the creator made it, why they chose to make it an incremental game, and why they made any particular design decision. Hell, even if you play through an entire incremental game without a single thought or feeling, that very fact it elicited nothing can itself be artistic merit!

I'm not an art major, and I may be taking a somewhat extreme take on what is art and what has artistic merit, but I'd argue the overall point stands that games, and incremental games specifically, can have artistic merit, which appeals to many gamers.

- + diff --git a/guide-to-incrementals/ludology/content/index.html b/guide-to-incrementals/ludology/content/index.html index 4a634f64..71add6c9 100644 --- a/guide-to-incrementals/ludology/content/index.html +++ b/guide-to-incrementals/ludology/content/index.html @@ -22,7 +22,7 @@
Return to top
On this page

What is Content?

If you've been in the incremental games community for any amount of time, you'll quickly find the number one thing players want is content. They want as much of it as possible! The most popular incremental games have tons of content, so they just keep stretching on and on and on, introducing mechanic after mechanic, and players love it. In fact, players seem to value the amount of content over the quality of any specific content. However, there's a bit of a lack of understanding concerning what content is, and I'd like to explore what counts as content, and how we measure it. As a baseline definition, I think "content" can just be described as the parts of the game that engage the player, but to truly understand it we need to contextualize what that means and how it affects the gameplay experience.

To clarify the purpose of this page, my goal is not to get (too) nitpicky or to attack games with "low content". There's nothing wrong with short / low-content games - I'm quite a big fan of those games myself! This is mostly targeted toward those who ask for content and settle for "long" games, and those who want to provide content but want to make sure they're not just artificially inflating the game. Ultimately, I suppose the goal is to just reduce the amount of artificially inflated content for the sake of having a "longer" game.

Interaction

I think it should be a fairly non-controversial opinion that time spent solely waiting should not count towards content. That is not including the time reading various effects or making decisions in your head, but rather time spent waiting for a condition to be met so you can re-engage with the game.

That is not to say games should necessarily try to minimize this time. Plenty of games lead towards more infrequent interaction and still get popular. In fact, these games appeal to many gamers who want to have something to check up on in between bursts of working on some other activity. These games seem to have fallen slightly out of fashion amongst modern incremental games, but they're still fully valid. The point I'm trying to make here is just that this time is not content. As an extreme example, a game with no interactions and just a counter that goes up every second could safely be said to have 0 content beyond the time it takes to understand what's going on. If it has a list of "goals" to hit, then the time understanding those goals and a short time after achieving each one could be considered content, but not the idle times in between.

Let's take a look at the opposite end of the spectrum - interaction that is so frequent as to become mindless. This is any mechanic where you need to spam-click something to progress. This may be a more controversial take, but I do not believe this constitutes content either. It does not engage the player, because each consecutive click blends together and they do not individually change the gameplay experience. That is to say, a single click and 100 clicks are not meaningfully different in terms of engaging the player. I'd go as far as to say clicking 100 times would be actively worse, as it's artificially delaying the next piece of actual content, alongside the issues of accessibility and potentially causing RSI.

Repeatable Purchases

Imagine an entity in a game that you can purchase multiple times, each time it performs the same thing but for a higher cost. These are incredibly common, from the buildings in cookie clicker to the units in swarm sim to the IP and EP multipliers in antimatter dimensions. However, how much content is each specific purchase? Is it content beyond the first purchase? Does it have diminishing returns? What if you are oscillating between two different repeatable purchases? How much content is lost when you automate away a repeatable purchase?

I don't want to take too harsh a stance against repeatable purchases. They're useful tools and can be used in a myriad of interesting ways. I feel they do become "stale" or less meaningful content over time, and this happens exponentially quickly the more frequently it can be purchased. A classic example that I believe goes too far is the IP/EP multipliers in Antimatter Dimensions. I would go as far as to say they are a chore and do not provide any meaningful content after you've bought them a couple of times. It's a method for inflating numbers (effectively making every OOM a 5x step instead of 10x), that punishes the player progression-wise whenever they forget to max it again, and eventually gets automated away as a reward to the player for making enough progress.

Just to voice the other side of this argument, Acamaeda defended the IP multiplier as giving the player a "good" upgrade every OOM. I can understand that to a point and need to clarify I'm mainly criticizing IP/EP multipliers after they've been introduced for a while. In fact, I would defend the multipliers for a short while after they're introduced using the same logic I would use to defend normal dimensions as repeatable purchases, at least pre-infinity. There's "content" to be had in looking at what dimensions will become affordable next, and then choosing which to buy amongst those. The IP/EP multipliers, early into infinity or eternity respectively, provide another option that gets put into that mental queue of things to buy with each OOM reached - although the optimal order is often quite trivial and not particularly engaging.

The IP/EP multipliers are not the only repeatable purchase in antimatter dimensions I take offense to. The time dimensions are also a series of repeatable purchases, that are all so similar and static that it doesn't take long before you never need to put any thought into buying them, how much you're buying at once, or the order you buy them in - you just press max all and move on. The entire tab could've been just the max all button and it would not have made a difference beyond the start of the eternity layer. The normal dimensions technically have this problem as well, but since you're constantly getting antimatter the order feels like it has a larger impact and it's more meaningful content, right up until they're automated away. Infinity dimensions are a compromise between the two, so I'm highlighting time dimensions here as the most egregious.

Following Instructions

We're getting more and more controversial as we go along! Let's talk about how linear content is not content now (in some circumstances). A trend in incremental games is adding difficulty by adding a web of effects that abstract the true change you can expect from any specific purchase or decision you make. If a game is both linear and sufficiently abstracts the effect of player decisions, then the player will no longer be engaging with the content - they'll simply be clicking on things as they become available. This isn't necessarily a bad thing, as plenty of players don't mind this style of gameplay, but I'd argue once you reach a point where players don't bother reading the effects, those interactions are no longer truly content. Note that unlike the previous qualifiers mentioned, this qualifier is based on the player, and therefore subjective. In effect, it's a spectrum where the more complicated the web of effects becomes, the more likely it is to disengage the player.

This over-complicatedness leading to disengaging the player can also happen from non-linear gameplay. If the web of effects becomes sufficiently complicated and finding the optimal progression route too time-consuming to discover, players will seek out guides from other players who've completed the game. The second they do this, the game effectively becomes linearly following the instructions of the guide and all the above criticisms apply. Similarly to as before, though, this is a spectrum and not everyone will seek out a guide at the same level of difficulty.

Automation

Automation is a staple of the genre, but it has certain implications for the design of the game. Why, when new content is introduced, must the older content be automated away - why is it a chore and it feels rewarding to not have to do it again? Why does the new mechanic have such appeal if we know it too will just be automated away later on, and we'll be happy when that happens? It honestly begs the question of why this framework of introducing content and automating the old content is even enjoyable - and nearly nonexistent in other genres. You're not going to reach a point in a platformer game where they just automate the jumping part - that's the core mechanic! Instead, platformers either add new mechanics that build on the core mechanic or at least re-contextualize the core mechanic. However, in incremental games new content very frequently means replacing older content, as opposed to augmenting it.

Admittedly, the above paragraph ignores the obvious answer that separates incremental games in this regard. These mechanics become chores as their frequency increases. The frequency increases to give a sense of progression, and automation is seen as a reward because it now manages what was becoming unmanageable. The new content then comes in and continues the loop to give a stronger sense of progression. That's all good and a fine justification for automating content instead of building upon the base mechanic. It's also much easier to design, as each layer essentially lets you start over instead of needing to think of ideas that conform to the original core mechanic.

So, what's the problem? Even if this trend is justified and easy to implement, there are some other effects it has on the game design. First off, and this is probably a neutral point, incremental games with this cycle of replacing old mechanics with new ones trend towards more and more abstract and further away from any narrative throughline as they add layers. There are only so many justifications for resetting progress, so if a game wants to have several of these layers they're inevitably going to become generic or increasingly loosely associated with the original content. It's most unfortunate, in my opinion when an interesting or innovative core mechanic gets fully automated once a generic "prestige" layer is unlocked.

A recent example is Really Grass Cutting Incremental, an incremental game about cutting grass. Except, it doesn't continue to be about cutting grass. After you buy enough upgrades to increase your grass cutting and level up sufficiently you "prestige", an abstract term that in this case means you reset all your progress to get some currency to buy upgrades that do the same things as the original upgrades, but these won't reset on future prestiges. You'll eventually be able to "crystallize", which means you reset all your progress to get some currency to buy upgrades that do the same things as the original upgrades (and a couple of new ones) and won't reset on future crystallizes. Fine. You'll progress a bit, complete some challenges, and finally get to... grasshop? Grasshopping is this mechanic where you reset all your progress to get some resource that isn't for buying upgrades - this time you just unlock different modifiers on everything based on their amount. You may have gotten the point by now, but there are also "steelie" resets which give you steel for some reason, before unlocking a factory with various machines - none of which are directly tied to cutting grass, and start gathering things like oil and reset for rocket parts and reset to go to space and so on and so on. Throughout all of this there is absolutely no narrative justification or throughline for the direction the game is going, or why cutting grass is still relevant when we're collecting things like rocket parts. I may be going a little hard on GCI, but it is far from alone.

Tips for Developers

If you're a developer, by this point you should have a pretty decent idea of how to create "true" content in your game. Here are some other specific tips I'd suggest:

  • An upgrade that simply unlocks another upgrade trivially isn't content. However, many games have an upgrade that just unlocks a feature, which then has a wait or other requirements before it can be used. Try to make sure when you unlock a feature, there is immediately something to do with the feature - for example, perhaps give them a small amount of the new currency it unlocks, if applicable.
  • If you don't have a large web of effects, and can definitively say the impact of a purchase is to multiply the gain of the cost currency by N, and the next purchase costs N times the amount of that same currency, then this purchase effectively made no difference and it may have made more sense to just go directly to the next upgrade. That said, having effects based on things like the number of purchases made will quickly invalidate this tip.
- + diff --git a/guide-to-incrementals/ludology/definition/index.html b/guide-to-incrementals/ludology/definition/index.html index e1ea69d8..d68713ec 100644 --- a/guide-to-incrementals/ludology/definition/index.html +++ b/guide-to-incrementals/ludology/definition/index.html @@ -22,7 +22,7 @@
Return to top
On this page

Defining the Genre

Video games are placed into genres for a variety of reasons. They can give a mental shorthand to set the player's expectations up, they can help a game market itself by its similarities to other, already popular games, and honestly, people just love categorization for its own sake. For this guide, it's important to define the genre so it is clear what games it's even talking about.

This poses a problem. "Incremental" is a horribly vague way to define games. Most games have numbers going up in some form or another. We need a more specific definition - similar to how "strategy" can't just mean any game with any amount of strategy because that would be most games. What specifically differentiates incremental games from the rest?

"Incremental" implies it's a genre defined by a game mechanic, but all those game mechanics it could imply exist in many other games. Having a skill tree or upgrades doesn't make you incremental, and if a reset mechanic is all it takes then every roguelite would be an incremental as well. So clearly there's more to it than that - what makes an incremental an incremental?

I'd like to go over a couple of popular suggestions I've seen on defining the genre here. I have my personal preferences and will state them here, but I don't think there's a truly perfect answer here.

Disclaimer: I mostly play incremental games on my computer, and my definitions will be heavily biased towards the games I'm familiar with.

Incrementals vs Idlers vs Clickers

Oftentimes people refer to this genre as idle games and/or clicker games. You'll even find a trend of oxymoronic game titles that contain both terms. "Incremental games" is the umbrella term both those terms fall under. However, I'd like to argue that not only is it better to just use the term "incremental games", but calling them "idle games" or "clicker games" is wrong. Almost universally, these terms are used interchangeably to refer to the same kind of game, where you start the game click spamming and eventually automate the process. Frankly, that kind of game deserves neither title, and the genre of incremental games has trended away from ever requiring click spamming, as it's a bad mechanic, anyways.

While these games do span a spectrum of how active it requires you to be, and sorting games by that metric can be useful for those looking for a particular experience, the borders of when an incremental game counts as an "idler" is too blurry for the term to be useful. "Incremental games" may not be a great descriptive term for the genre (hence this many thousands of words long page on defining what the genre even is), but it's strictly better than calling them "idler" or "clicker" games. This guide will always use the term "incremental games" unless quoting someone else, as it is the term you typically see on all modern games in the genre.

Incrementals as Parodies

Let's start with one of the most interesting definitions of incremental games. Incremental games appear to be distilled versions of games or genres, "revealing" the naked game design at the core of these games or genres not unlike how parodies comment upon their source material.

To understand what that means, think of how a casino uses skinner boxes to emotionally manipulate its customers to keep playing, but "dressing" up the skinner box with tons of stimuli to hide that ultimately the goal is to condition you into coming back compulsively. The idea that incremental games are parodies means taking the stance that at some level all games are similarly manipulating you, giving dopamine rewards in a way that manipulates you to keep playing while not necessarily giving you any value or fulfillment. Incremental games, then, are any games that plainly display the skinner box, and the manipulative core of the game, at the forefront of the experience.

While incremental games can be fun and even healthy in certain contexts, they can exacerbate video game addiction more than other genres. If you feel like playing incremental games is taking priority over other things in your life, or manipulating your sleep schedule, it may be prudent to seek help. See r/StopGaming for resources.

This "undressing" tends to go hand in hand with a reduced focus on aesthetics, often just printing the game state directly to the screen as text. This makes incremental games much easier to develop, particularly for those with programming skills but not art skills, but that's a tangent for why Incremental Games appeal to Developers.

Before I continue, I'd like to make my stance clear that I love games and incremental games, and do not think they should be considered inherently bad or manipulative with the above logic. Skinner boxes are just a way of manipulating behavior via rewards. The games are still fun - that's the reward! I'd believe the real criticism here is that it is "empty fun", or "empty dopamine", that doesn't offer any additional value or sense of fulfillment. I don't think that's inherently bad in moderation, although it can become a problem if the game is manipulating you for profit-seeking, or if you play the game to the detriment of the other parts of your life.

Another interpretation of incremental games as parodies comes from several mainstream incremental games that are also parodies of capitalism, such as cookie clicker and adventure capitalist. It's a very common framework for incremental games to portray the ever-increasing numbers as an insatiable hunger for resources, like the ones observed within capitalism. Therefore, these games are used as evidence that the genre as a whole is about parody and commentary.

Popular videos on incremental games that portray the genre as parodies are Why Idle games make good satire, and how it was ruined. and Bad Game Design - Clicker Games. You may also be interested in this response to the latter video from a fan of incremental games: BadGood Game Design - Clicker Games.

I think that this definition ultimately ascribes a motive to the genre as a whole that only happens to apply to some of the more mainstream titles. There certainly are incremental games commenting on different things, including the genre itself as in the case of The Prestige Tree Classic, The Ascension Tree, or Omega Layers, but certainly not all. And of course, not all games that comment on something or parody something are incremental games! Additionally, a very large majority of incremental games are mobile games using these manipulative strategies to get players to spend as much money as possible - hell, Adventure Capitalist is ostensibly a critique on capitalism but features microtransactions and gameplay that manipulates you into buying them! These profit-seeking incremental games certainly belong within the genre but are hardly parodies when they too use manipulation to serve their interests. Also, from my own anecdotal experience, those who use this definition seem to do so from a fairly surface-level familiarity with the genre, and often in the context of criticizing the genre or the fans thereof.

Incrementals as NGU

Another broad definition often used is that incremental games are games where the focus of the game is "numbers going up". This definition proposes that other genres simply use increasing numbers as a means to an end, but incremental games uniquely only care about the numbers themselves going up. Put another way, it implies there should be no narrative justification for the numbers going up other than "why shouldn't they be going up?"

While this definition is common because it feels easy to understand, it is difficult to formally define. Often phrases are used to describe games using this framework, such as having an "exaggerated sense of progression" or "big" numbers. These terms are vague and don't demonstrate an actual threshold between non-incrementals and incrementals. Most games have a sense of progression, so when is it "exaggerated"? How big are "big" numbers? Most notably, RPGs that are typically not considered incrementals will often pass this definition.

Additionally, a lot of incrementals tend to have some theme guiding the gameplay, or at least the names of mechanics. This makes the line blurred between when numbers are going up for their own sake versus for a contextual reason. I believe this point is best illustrated that, while most RPGs are not considered incremental games, there is a sub-genre of "incremental RPGs" that typically relates to RPGs that perform combat automatically. This definition of incremental games does not support RPGs and "incremental RPGs" being on distinct sides of the line if the only difference between them is manual vs automatic combat.

Incrementals as Strategies

This is a rarer interpretation, but there are similarities between incremental games and strategy games, implying incrementals might just be a sub-genre of strategy games. By this approach, incremental games would be defined by their relation to strategy games, and how they involve player strategy. Incremental games are often large optimization problems - above all else, the actual gameplay the player is performing is deciding what to do next. The consequences of wrong decisions are typically more lenient in incremental games - such as just not making optimal progress - but they certainly get complex.

So if we accept the premise that incrementals could fall under strategy, we still need to define what makes a strategy game an incremental versus some other strategy sub-genre. This is a bit tricky due to one particular sub-genre of strategy games: Factory Builders.

Factory builders, such as Factorio or Satisfactory, are games about gaining ever increasing resources, optimizing production, and expanding more and more. That... sounds pretty similar, doesn't it? In fact, there's been some debate on whether factory builders would fall under the "incremental" umbrella. I think it's safe to say the two are certainly related, and probably have quite a bit of overlap in playerbase.

Roguelites as Incrementals?

Earlier on, I mentioned reset mechanics shouldn't be used in the definition because that could make all roguelites incrementals... But what if it does? A lot of incrementals can be described as games with a strong sense of progression, often with layers of meta-progression. Roguelites fit that bill to a T. What would make roguelites not incremental? I honestly don't think there's a good explanation here, but many fans of incremental games will state they do believe the two genres to be unrelated, even if there's a significant overlap between their player bases due to having similar appealing traits.

At this point, it'd be appropriate to consider what part of the definition of roguelites precludes them from also being incrementals, but that reveals a new problem: What are roguelites? They're usually defined as rogue_likes with meta-progression, but that just pushes the problem back a step: Incrementals aren't the only genre to have difficulties defining themselves, it seems! Roguelikes are another genre where the community argues over the formal definition of their genre, although that means we can borrow from their process of coming to a consensus, and maybe come across a viable definition for incremental games.

The Berlin Interpretation

By far the most popular way of defining roguelikes is the "Berlin Interpretation", which acknowledged the diversity of games within the genre and argued the definition should not be based on any ideals about what the genre ought to be, but rather defined by "its canon". They argued there are a handful of games that can be used to define the canon for roguelikes, and from those games, a list of factors can be derived to determine a game's "roguelikeness". The more factors a game has, the more of a roguelike it is. This strategy is very lenient, allowing a game to not present any specific factor so long as it shows enough, and accounts for the blurriness of any genre definition by not explicitly stating how many factors a game must have to qualify as a definite roguelike.

I believe this strategy for defining genres can be applied to other genres as well. A handful of games can be argued to be the incremental games canon, and a list of factors derived from them can be used to judge any game based on its "incrementalness". I'll propose such a canon and list of factors here, but by no means should it be considered the end-all-be-all.

Note: The "Temple of the roguelike", an authority within the genre, has since replaced the Berlin Interpretation with a new set of factors here: https://blog.roguetemple.com/what-is-a-traditional-roguelike/

The Incremental Games Canon

Alright, time to get controversial. Up til now, I've been trying my best to stay objective and analytical, but now it's time to start making some opinionated decisions. Here is a list of games I think could justifiably make up an Incremental Games Canon:

I chose a variety of games here, biasing towards newer games, purposefully to avoid making a narrow or "traditional" definition. The genre is growing and shouldn't be constrained by the traits of the early popular titles. A lot of these could easily be replaced with other games that are mechanically congruent, so ultimately I'm sure if you asked 10 people for their canon list you'd just get 10 different answers, but I think this should sufficiently allow us to determine what factors make a game have higher "incrementalness".

The Paradigm Shift

The Paradigm Shift is probably the highest possible value factor for an incremental. It's so common that for a while people referred to incrementals that exhibit this trait as "unfolding" games, to the point of trying to replace the term incremental due to their popularity. Paradigm shifts refer to when the gameplay significantly changes. There are too many examples to list here, but notably, every single reset mechanic is typically going to be a paradigm shift. Examples of games with paradigm shifts that aren't tied to reset mechanics include Universal Paperclips and A Dark Room.

There are many reasons for the appeal of paradigm shifts. Oftentimes each mechanic builds on top of the existing mechanics, increasing the complexity of the game in steps so the player can follow along. They provide a sense of mystery, with the player anticipating what will happen next. They shake up the gameplay before it gets too stale - allowing the game to entertain for longer before the illusion of content dissipates. Of the canon games selected above, I would argue every single one contains a paradigm shift (although I could see someone disagreeing with that statement wrt Increlution).

I should take a moment to say that while I'm hyping up this specific factor, we cannot just reduce the genre definition to "does it have paradigm shifts". Many games have paradigm shifts that are not incremental, so it's just an indicator of incrementalness. Additionally, it can become quite hard to determine how large of a shift is a "paradigm" shift. Take, for example, any game with a skill tree. In some games, each skill node might have a large impact on how you play with the game, and qualify as a paradigm shift for some players. In other games, each skill node might just be a small percentage modifier on some stat that doesn't really impact much more than a slight bias towards an already established mechanic that's newly buffed. Every single canon game may show that it's common amongst incremental games, but could just as easily indicate that they're common in games in general.

High-Value Factors

I won't take as long to discuss the high and low-value factors, as you've already seen most of them brought up earlier on this page. As a reminder, a game does NOT need all of these to be an incremental game, but these are factors that each indicate a strong possibility the game is an incremental, so having several of these means they probably are. These factors apply to most of the canon incremental games.

"Pure UI" Display. Incrementals typically have a textual presentation of the game state - there isn't a visual representation of the entities within the game. The interface is closer to what would be just the UI of a game in another genre or the control panel of a plane. If there is a visual representation, the player is often still interacting with non-diegetic game elements.

Reduced Consequences. Incrementals tend to have reduced repurcussions for misplaying. They very rarely have fail states, where often the largest consequence is simply not progressing - never losing progress.

Optimization Problems. The predominant gameplay of incrementals is typically solving optimization problems, from deciding which purchase to save up for to reasoning and deciding between different mutually exclusive options the game presents.

Resource Management. Incrementals tend to have a lot of resources within the game to keep track of.

Low-Value Factors

These are low-value factors, meaning they aren't as strongly correlated with incremental games. Incremental games may have none of these, and non-incrementals may have several of these - if a game only has low-value factors, they're probably not an incremental.

Fast Numeric Growth. Numbers in incremental games tend to grow faster than in other genres. There are more instances of superlinear growth. The larger the numbers get, the stronger of a signal this factor is.

Automation. As an incremental game progresses, the player often no longer has to deal with earlier mechanics, by having them either happen automatically or otherwise be replaced with an alternative that requires less player interaction.

Goal-Oriented. Incrementals are often heavily reliant on extrinsic motivation to guide the player. Typically this is through some sort of in-game goal to work towards, such as a certain amount of a resource being required to unlock or purchase something new.

Waiting is a Mechanic. In incremental games, the player may come across times where there is no action they can take, and the game will progress automatically instead. The player must wait for some amount of this automatic progress to occur before they can resume interaction with the game.

Are Roguelites Incrementals?

Having made our variation of the Berlin Interpretation for incremental games, we can compare it to the Berlin Interpretation to determine if there's enough overlap that any game that "passes" the Berlin Interpretation would also pass the incremental variant. That is to say, whether any roguelite would also be considered an incremental game.

The meta-progression of an incremental game could arguably be considered a paradigm shift, and certainly adds some resource management. Goal-oriented would probably also apply. I think anything other than those would be a stretch, and in my opinion that just isn't enough to qualify. To be totally honest, I was never expecting to conclude otherwise though 😉

Sub-Genres

There are some trends in incremental games that go beyond just being a commonly used mechanic, such that they deeply affect the rest of the game design. These trends can be used to determine sub-genres within the incremental games umbrella:

  • Loops games are a sub-genre defined by having a core mechanic related to a loop, where the player is deciding the actions taken per loop. Notable examples include Idle Loops, Stuck in Time, Cavernous II, and Increlution. You may also argue Groundhog Life and Progress Knight fall into this sub-genre.
  • ITRTG-like games are a sub-genre defined by having a core mechanic based on clearing increasingly difficult battles and often tend to have a lot of different mechanics to become progressively stronger. Notable examples include Idling to Rule the Gods, NGU Idle, and Wizard and Minion Idle.
  • Polynomial Growth games are a sub-genre defined by having a core mechanic related to a higher degree polynomial. Notable examples include the base layer of Antimatter Dimensions and Swarm Simulator.
  • Upgrades Games is a category popular on flash games websites that featured games focused on buying upgrades that would allow you to attain more currency in some sort of minigame that would earn you more money to buy more upgrades, which I'd argue now belong under the fold of incremental games. Notable examples include the Learn to Fly series and Upgrade Complete.
  • Cultivation RPGs are a genre of games, books, and anime popular in China that center around being in a fantasy world with characters getting stronger over time. While few of them get translated into English, a fan of incremental games may find the available games interesting.
- + diff --git a/hashmap.json b/hashmap.json index f7048e81..b97e1cb3 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"guide-to-incrementals_design_introduction.md":"3331f00b","guide-to-incrementals_index.md":"8abeee5c","guide-to-incrementals_ludology_appeal-developers.md":"223693e2","guide-to-incrementals_ludology_appeal-gamers.md":"0558bf0b","guide-to-incrementals_ludology_content.md":"8ae2a63b","guide-to-incrementals_ludology_definition.md":"cb4607f1","index.md":"207b5a03","projects_babble_index.md":"9c508a59","projects_citadel_index.md":"47faae6f","projects_dice_index.md":"799584cd","projects_index.md":"685ec61e","projects_optispeech_index.md":"3a9da03b","projects_vecs_index.md":"668eb31c","public_gamedevtree_2.0-format-changes.md":"94ee9d78","public_gamedevtree_readme.md":"e9b50baa","public_gamedevtree_changelog.md":"96da44a6","public_gamedevtree_docs_!general-info.md":"1dce9599","public_gamedevtree_docs_achievements.md":"a176d052","public_gamedevtree_docs_bars.md":"ee83b0f6","public_gamedevtree_docs_basic-layer-breakdown.md":"61396bc6","public_gamedevtree_docs_buyables.md":"cdb25baa","public_gamedevtree_docs_challenges.md":"75ce9378","public_gamedevtree_docs_clickables.md":"8abdae17","public_gamedevtree_docs_custom-tab-layouts.md":"e39f994d","public_gamedevtree_docs_getting-started.md":"7d2bd537","public_gamedevtree_docs_infoboxes.md":"910ca43a","public_gamedevtree_docs_layer-features.md":"6cc59d65","public_gamedevtree_docs_main-mod-info.md":"df63d099","public_gamedevtree_docs_milestones.md":"1c4f21e9","public_gamedevtree_docs_subtabs-and-microtabs.md":"f3edf9fd","public_gamedevtree_docs_updating-tmt.md":"c236d30e","public_gamedevtree_docs_upgrades.md":"db56e31b","public_kronos_old things_2.0-format-changes.md":"ac36228e","public_kronos_readme.md":"4583e09d","public_kronos_changelog.md":"f4e479b5","public_kronos_docs_!general-info.md":"16ffc414","public_kronos_docs_achievements.md":"26508a7a","public_kronos_docs_bars.md":"72a3fb7d","public_kronos_docs_basic-layer-breakdown.md":"76fdeb94","public_kronos_docs_buyables.md":"66ebb48e","public_kronos_docs_challenges.md":"0feee9d3","public_kronos_docs_clickables.md":"6b4c30f9","public_kronos_docs_custom-tab-layouts.md":"f078bb58","public_kronos_docs_getting-started.md":"d986d28f","public_kronos_docs_grids.md":"5e0e41c8","public_kronos_docs_infoboxes.md":"74fe6240","public_kronos_docs_layer-features.md":"12af1e9e","public_kronos_docs_main-mod-info.md":"3f89aaa3","public_kronos_docs_milestones.md":"a64561b9","public_kronos_docs_particles.md":"c2343fff","public_kronos_docs_subtabs-and-microtabs.md":"d883fd2e","public_kronos_docs_trees-and-tree-customization.md":"c3840cb8","public_kronos_docs_updating-tmt.md":"96ac7b0d","public_kronos_docs_upgrades.md":"39a2314e","public_lit_old things_2.0-format-changes.md":"82822887","public_lit_readme.md":"57233aa0","public_lit_changelog.md":"3a289646","public_lit_docs_!general-info.md":"63424715","public_lit_docs_achievements.md":"1aa4d17f","public_lit_docs_bars.md":"2929af1e","public_lit_docs_basic-layer-breakdown.md":"bdd9ba9b","public_lit_docs_buyables.md":"21c8278c","public_lit_docs_challenges.md":"c8d19b68","public_lit_docs_clickables.md":"3bc15e64","public_lit_docs_custom-tab-layouts.md":"a1bcc384","public_lit_docs_getting-started.md":"f14d462a","public_lit_docs_infoboxes.md":"721eb814","public_lit_docs_layer-features.md":"bcc7f108","public_lit_docs_main-mod-info.md":"e6e3f511","public_lit_docs_milestones.md":"0a33f5e8","public_lit_docs_subtabs-and-microtabs.md":"84fdefdf","public_lit_docs_trees-and-tree-customization.md":"325cf26a","public_lit_docs_updating-tmt.md":"2a0fcfd7","public_lit_docs_upgrades.md":"24f827f2"} +{"guide-to-incrementals_design_introduction.md":"3331f00b","guide-to-incrementals_index.md":"8abeee5c","guide-to-incrementals_ludology_appeal-developers.md":"223693e2","guide-to-incrementals_ludology_appeal-gamers.md":"0558bf0b","guide-to-incrementals_ludology_content.md":"8ae2a63b","guide-to-incrementals_ludology_definition.md":"cb4607f1","index.md":"717e4090","projects_babble_index.md":"07749037","projects_citadel_index.md":"bff5e504","projects_dice_index.md":"c14b2e99","projects_index.md":"b420d47c","projects_optispeech_index.md":"605ff847","projects_vecs_index.md":"4db19782","public_gamedevtree_2.0-format-changes.md":"94ee9d78","public_gamedevtree_readme.md":"e9b50baa","public_gamedevtree_changelog.md":"96da44a6","public_gamedevtree_docs_!general-info.md":"1dce9599","public_gamedevtree_docs_achievements.md":"a176d052","public_gamedevtree_docs_bars.md":"ee83b0f6","public_gamedevtree_docs_basic-layer-breakdown.md":"61396bc6","public_gamedevtree_docs_buyables.md":"cdb25baa","public_gamedevtree_docs_challenges.md":"75ce9378","public_gamedevtree_docs_clickables.md":"8abdae17","public_gamedevtree_docs_custom-tab-layouts.md":"e39f994d","public_gamedevtree_docs_getting-started.md":"7d2bd537","public_gamedevtree_docs_infoboxes.md":"910ca43a","public_gamedevtree_docs_layer-features.md":"6cc59d65","public_gamedevtree_docs_main-mod-info.md":"df63d099","public_gamedevtree_docs_milestones.md":"1c4f21e9","public_gamedevtree_docs_subtabs-and-microtabs.md":"f3edf9fd","public_gamedevtree_docs_updating-tmt.md":"c236d30e","public_gamedevtree_docs_upgrades.md":"db56e31b","public_kronos_old things_2.0-format-changes.md":"ac36228e","public_kronos_readme.md":"4583e09d","public_kronos_changelog.md":"f4e479b5","public_kronos_docs_!general-info.md":"16ffc414","public_kronos_docs_achievements.md":"26508a7a","public_kronos_docs_bars.md":"72a3fb7d","public_kronos_docs_basic-layer-breakdown.md":"76fdeb94","public_kronos_docs_buyables.md":"66ebb48e","public_kronos_docs_challenges.md":"0feee9d3","public_kronos_docs_clickables.md":"6b4c30f9","public_kronos_docs_custom-tab-layouts.md":"f078bb58","public_kronos_docs_getting-started.md":"d986d28f","public_kronos_docs_grids.md":"5e0e41c8","public_kronos_docs_infoboxes.md":"74fe6240","public_kronos_docs_layer-features.md":"12af1e9e","public_kronos_docs_main-mod-info.md":"3f89aaa3","public_kronos_docs_milestones.md":"a64561b9","public_kronos_docs_particles.md":"c2343fff","public_kronos_docs_subtabs-and-microtabs.md":"d883fd2e","public_kronos_docs_trees-and-tree-customization.md":"c3840cb8","public_kronos_docs_updating-tmt.md":"96ac7b0d","public_kronos_docs_upgrades.md":"39a2314e","public_lit_old things_2.0-format-changes.md":"82822887","public_lit_readme.md":"57233aa0","public_lit_changelog.md":"3a289646","public_lit_docs_!general-info.md":"63424715","public_lit_docs_achievements.md":"1aa4d17f","public_lit_docs_bars.md":"2929af1e","public_lit_docs_basic-layer-breakdown.md":"bdd9ba9b","public_lit_docs_buyables.md":"21c8278c","public_lit_docs_challenges.md":"c8d19b68","public_lit_docs_clickables.md":"3bc15e64","public_lit_docs_custom-tab-layouts.md":"a1bcc384","public_lit_docs_getting-started.md":"f14d462a","public_lit_docs_infoboxes.md":"721eb814","public_lit_docs_layer-features.md":"bcc7f108","public_lit_docs_main-mod-info.md":"e6e3f511","public_lit_docs_milestones.md":"0a33f5e8","public_lit_docs_subtabs-and-microtabs.md":"84fdefdf","public_lit_docs_trees-and-tree-customization.md":"325cf26a","public_lit_docs_updating-tmt.md":"2a0fcfd7","public_lit_docs_upgrades.md":"24f827f2"} diff --git a/index.html b/index.html index 21b2ed7b..c1371e35 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + @@ -22,7 +22,7 @@

The Paper Pilot

I'm Anthony, or The Paper Pilot, and I make fun games and tools!

- + diff --git a/planar/assets/gameLoop.737eab91.js b/planar/assets/gameLoop.f63e9d55.js similarity index 89% rename from planar/assets/gameLoop.737eab91.js rename to planar/assets/gameLoop.f63e9d55.js index 9c9dcee3..c6ce5732 100644 --- a/planar/assets/gameLoop.737eab91.js +++ b/planar/assets/gameLoop.f63e9d55.js @@ -1 +1 @@ -import{_ as d,s as p,p as e,a as o,l as T,D as l,b as m,g as u}from"./index.cfd83ced.js";import"./vue.c16a309b.js";import{b2 as c}from"./@vue.6b211d3c.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.dccec454.js";import"./vue-next-select.ded54c4a.js";import"./vuedraggable.1879de79.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-panzoom.8ce6f9b1.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";import"./vue-toastification.9c2dad53.js";let n=null,f=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(o.lastTenTicks.push(r),o.lastTenTicks.length>10&&(o.lastTenTicks=o.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!o.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),l.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||l.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!l.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function A(){f=(await d(()=>import("./index.cfd83ced.js").then(function(t){return t.c}),["assets/index.cfd83ced.js","assets/index.85fc03ab.css","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{A as startGameLoop}; +import{_ as d,s as p,p as e,a as o,l as T,D as l,b as m,g as u}from"./index.ffd22707.js";import"./vue.c16a309b.js";import{b2 as c}from"./@vue.6b211d3c.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.dccec454.js";import"./vue-next-select.ded54c4a.js";import"./vuedraggable.1879de79.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-panzoom.8ce6f9b1.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";import"./vue-toastification.9c2dad53.js";let n=null,f=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(o.lastTenTicks.push(r),o.lastTenTicks.length>10&&(o.lastTenTicks=o.lastTenTicks.slice(1)),!((f==null?void 0:f.value)&&!e.keepGoing)&&!o.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(l.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),l.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||l.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!l.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function A(){f=(await d(()=>import("./index.ffd22707.js").then(function(t){return t.c}),["assets/index.ffd22707.js","assets/index.bebdc1b9.css","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(f,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{A as startGameLoop}; diff --git a/planar/assets/index.85fc03ab.css b/planar/assets/index.85fc03ab.css deleted file mode 100644 index 44bee94d..00000000 --- a/planar/assets/index.85fc03ab.css +++ /dev/null @@ -1 +0,0 @@ -.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.row>:not(.feature){margin:0;display:flex}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent>.feature:not(.dontMerge),.row.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin-left:0;margin-right:0;border-radius:0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child,.row.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>.feature:not(.dontMerge):last-child,.row.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child:last-child,.row.mergeAdjacent>.tooltip-container:first-child:last-child>.feature:not(.dontMerge){border-radius:var(--border-radius)}.row-grid.mergeAdjacent>.feature:not(.dontMerge),.row-grid.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin:0;border-radius:0}.row-grid.mergeAdjacent>.feature:not(.dontMerge):last-child,.row-grid.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0}.row-grid.mergeAdjacent>.feature:not(.dontMerge):first-child,.row-grid.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:0}.table-grid>.row-grid.mergeAdjacent:last-child>.feature:not(.dontMerge):first-child{border-radius:0 0 0 var(--border-radius)}.table-grid>.row-grid.mergeAdjacent:first-child>.feature:not(.dontMerge):last-child{border-radius:0 var(--border-radius) 0 0}.table-grid>.row-grid.mergeAdjacent:first-child>.feature:not(.dontMerge):first-child{border-radius:var(--border-radius) 0 0 0}.table-grid>.row-grid.mergeAdjacent:last-child>.feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) 0}.col.mergeAdjacent .feature:not(.dontMerge){margin-top:0;margin-bottom:0;border-radius:0}.col.mergeAdjacent .feature:not(.dontMerge):first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent .feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge):first-child:last-child{border-radius:var(--border-radius)}.resize-listener[data-v-2b1dc1bc]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.layer-container[data-v-72dd78b1]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-72dd78b1]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-72dd78b1]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-72dd78b1]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized>*[data-v-72dd78b1]{margin:0;writing-mode:vertical-rl;text-align:left;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-72dd78b1]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-72dd78b1]{padding-bottom:0}.modal-body .layer-tab[data-v-72dd78b1]:not(.hasSubtabs){padding-top:0}.minimize[data-v-72dd78b1]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-72dd78b1]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-72dd78b1]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-72dd78b1]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}.layer-tab.minimized>*>.desc{color:var(--accent1);font-size:30px}details[data-v-4b4bda40]{margin:10px 0;padding-left:18px}summary[data-v-4b4bda40]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-4b4bda40]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-4b4bda40]{margin:8px 0}li[data-v-4b4bda40]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-4b4bda40]:before{content:"Feature";background:var(--accent1)}.fix[data-v-4b4bda40]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-4b4bda40]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-4b4bda40]:before{content:"Breaking";background:var(--danger)}.tooltip-container[data-v-6102fa3a]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-6102fa3a],.tooltip[data-v-6102fa3a]:after{pointer-events:none;position:absolute}.tooltip[data-v-6102fa3a]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-6102fa3a] hr{margin:var(--feature-margin) 0}.shown[data-v-6102fa3a]{z-index:10}.fade-enter-from[data-v-6102fa3a],.fade-leave-to[data-v-6102fa3a]{opacity:0}.tooltip[data-v-6102fa3a]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-6102fa3a],.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-6102fa3a]:after,.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-6102fa3a]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-6102fa3a]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-6102fa3a]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-6102fa3a]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-6102fa3a]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.info-modal-header[data-v-4f97aa40]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header *[data-v-4f97aa40]{margin:0}.info-modal-logo[data-v-4f97aa40]{height:4em;width:4em}.info-modal-title[data-v-4f97aa40]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-4f97aa40]{display:flex;align-items:center}.info-modal-discord[data-v-4f97aa40]{margin:0 4px 0 0}.field{display:flex;position:relative;min-height:2em;margin:10px 0;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input{font-size:inherit}.vue-input input::placeholder{color:var(--link)}.field[data-v-11046116]{cursor:pointer}input[data-v-11046116]{appearance:none;pointer-events:none}span[data-v-11046116]{width:100%;padding-right:41px;position:relative}input+span[data-v-11046116]:before{content:"";position:absolute;top:calc(50% - 7px);right:0px;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s}input+span[data-v-11046116]:after{content:"";position:absolute;top:calc(50% - 10px);right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s}input:checked+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-11046116]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-11046116]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-11046116]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-11046116]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}.feedback[data-v-01a1b95c]{position:relative}.feedback[data-v-01a1b95c]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"\2714";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-01a1b95c]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-01a1b95c]:after{animation:feedback-01a1b95c .5s ease-out forwards}@keyframes feedback-01a1b95c{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.option-tabs{border-bottom:2px solid var(--outline);margin-top:10px;margin-bottom:-10px}.option-tabs button{background-color:transparent;color:var(--foreground);margin-bottom:-2px;font-size:14px;cursor:pointer;padding:5px 20px;border:none;border-bottom:2px solid var(--foreground)}.option-tabs button:not(.selected){border-bottom-color:transparent}.option-title .tooltip-container{display:inline;margin-left:5px}.option-title desc{display:block;opacity:.6;font-size:small;width:300px;margin-left:0}.save-button{text-align:right}form[data-v-90bd4994]{margin:0;width:100%}.field>*[data-v-90bd4994]{margin:0}input[data-v-90bd4994]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-90bd4994]{width:100%}.container[data-v-2f8ef34c]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-2f8ef34c]{font-size:1em}.container>*[data-v-2f8ef34c]{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.save[data-v-32313015]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-32313015]{border-color:var(--bought)}.open[data-v-32313015]{display:inline;margin:0;padding-left:0}.handle[data-v-32313015]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-32313015]{margin:0 80px 0 0;flex-grow:1}.error[data-v-32313015]{font-size:.8em;color:var(--danger)}.save-version[data-v-32313015]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-32313015]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-32313015]{margin:0}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field,.field form[data-v-2a4275be],.field .field-title[data-v-2a4275be],.field .field-buttons[data-v-2a4275be]{margin:0}.field-buttons[data-v-2a4275be]{display:flex}.field-buttons .field[data-v-2a4275be]{margin:0 0 0 8px}.modal-footer[data-v-2a4275be]{margin-top:-20px}.footer[data-v-2a4275be]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.nav[data-v-318a1c31]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav>*[data-v-318a1c31]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-318a1c31]{height:100%;width:unset}.overlay-nav[data-v-318a1c31]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>*[data-v-318a1c31]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-318a1c31]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-318a1c31]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-318a1c31],.nav .info[data-v-318a1c31]{display:flex}.tooltip-container[data-v-318a1c31]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-318a1c31]{position:relative}.discord img[data-v-318a1c31]{width:100%;height:100%}.discord-links[data-v-318a1c31]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-318a1c31]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-318a1c31]{left:-10px}.discord-links li[data-v-318a1c31]{margin-bottom:4px}.discord-links li[data-v-318a1c31]:first-child{font-size:1.2em}*:not(.overlay-nav) .discord:hover .discord-links[data-v-318a1c31]{right:0}.material-icons[data-v-318a1c31]{font-size:36px}.material-icons[data-v-318a1c31]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-318a1c31]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-318a1c31]{width:unset;height:25px}.version[data-v-318a1c31]{color:var(--points)}.version:hover span[data-v-318a1c31]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-318a1c31],.overlay-nav>div>a[data-v-318a1c31]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-dcd207b4]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-dcd207b4]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-dcd207b4]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-dcd207b4]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-dcd207b4]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.sticky[data-v-cccac690]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.link[data-v-58e8d695]{transition-duration:0s}.link.pulsing[data-v-58e8d695]{animation:pulsing-58e8d695 2s ease-in infinite}@keyframes pulsing-58e8d695{0%{opacity:.25}50%{opacity:1}to{opacity:.25}}.action:not(.boardnode):hover circle[data-v-9efb2a56],.action:not(.boardnode).selected circle[data-v-9efb2a56]{r:25}.action:not(.boardnode):hover text[data-v-9efb2a56],.action:not(.boardnode).selected text[data-v-9efb2a56]{font-size:187.5%}.action:not(.boardnode) text[data-v-9efb2a56]{text-anchor:middle;dominant-baseline:central}.actions-enter-from .action,.actions-leave-to .action{transform:translate(0)}.boardnode[data-v-19cf948c]{cursor:pointer;transition-duration:0s}.boardnode:hover .body[data-v-19cf948c]{fill:var(--highlighted)}.boardnode.running .body[data-v-19cf948c]{fill:var(--accent1)!important}.boardnode:not(.isDraggable) .body[data-v-19cf948c]{fill:var(--locked)}.node-title[data-v-19cf948c]{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:200%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.node-subtitle[data-v-19cf948c]{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:150%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.progress[data-v-19cf948c]{transition-duration:.05s}.progressRing[data-v-19cf948c]{transform:rotate(-90deg)}.fade-enter-from[data-v-19cf948c],.fade-leave-to[data-v-19cf948c]{opacity:0}.pulsing[data-v-19cf948c]{animation:pulsing-19cf948c 2s ease-in infinite}@keyframes pulsing-19cf948c{0%{opacity:.25}50%{opacity:1}to{opacity:.25}}.grow-enter-from .node-container,.grow-leave-to .node-container{transform:scale(0)}.vue-pan-zoom-scene{width:100%;height:100%;cursor:grab}.vue-pan-zoom-scene:active{cursor:grabbing}.g1{transition-duration:0s}.link-enter-from,.link-leave-to{opacity:0}.tabButton[data-v-21427abb]{background-color:transparent;color:var(--foreground);font-size:20px;cursor:pointer;padding:5px 20px;margin:5px;border-radius:5px;border:2px solid;flex-shrink:0;border-color:var(--layer-color)}.tabButton[data-v-21427abb]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}:not(.floating)>.tabButton[data-v-21427abb]{height:50px;margin:0;border-left:none;border-right:none;border-top:none;border-bottom-width:4px;border-radius:0;transform:unset}:not(.floating) .tabButton[data-v-21427abb]:not(.active){border-bottom-color:transparent}.tabButton>*[data-v-21427abb]{pointer-events:none}.tab-family-container[data-v-58dbf83a]{margin:calc(50px + var(--feature-margin)) 20px var(--feature-margin) 20px;position:relative;border:solid 4px;border-color:var(--outline)}.layer-tab>.tab-family-container[data-v-58dbf83a]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-58dbf83a]:first-child:nth-last-child(3){border-bottom-style:none;border-left-style:none;border-right-style:none;height:calc(100% + 50px)}.modal-body>.tab-family-container[data-v-58dbf83a]:first-child{margin:calc(10px + var(--feature-margin)) 10px 0 10px;border:none}.tab-family-container[data-v-58dbf83a]>:nth-child(2){margin-top:20px}.modal-body>.tab-family-container[data-v-58dbf83a]>:nth-child(2){margin-top:50px}.tab-family-container[data-v-f18896fc][data-v-58dbf83a]>:last-child{margin-bottom:20px}.tab-buttons-container[data-v-58dbf83a]{z-index:4}.tab-buttons-container[data-v-58dbf83a]:not(.floating){border-bottom:solid 4px;border-color:inherit}:not(.layer-tab):not(.modal-body)>.tab-family-container>.tab-buttons-container[data-v-58dbf83a]:not(.floating){width:calc(100% + 6px);margin-left:-3px}.tab-buttons-container:not(.floating) .tab-buttons[data-v-58dbf83a]{text-align:left;margin-bottom:-4px}.tab-buttons-container.floating .tab-buttons[data-v-58dbf83a]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-58dbf83a]{margin-bottom:24px;display:flex;flex-flow:wrap;z-index:4}.layer-tab>.tab-family-container:first-child:nth-last-child(3)>.tab-buttons-container>.tab-buttons[data-v-58dbf83a]{padding-right:60px}.tab-buttons[data-v-58dbf83a]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-58dbf83a]{width:100%;margin-left:0;margin-right:0;padding-left:0}.showGoBack>.tab-family-container:first-child>.tab-buttons-container:not(.floating) .tab-buttons[data-v-58dbf83a]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-58dbf83a]{padding-left:0}.minimizable>.tab-buttons-container[data-v-58dbf83a]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-58dbf83a]{margin-top:-50px}.tab-buttons-container+*[data-v-58dbf83a]{margin-top:20px}.modifier-container{display:flex;padding:1px 8px}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-shrink:0;text-align:right}:not(:first-of-type,:last-of-type)>.modifier-amount:after{content:var(--unit);opacity:0}.modifier-description{flex-grow:1}.collapsible-container[data-v-a72c16aa]{width:calc(100% - 10px)}.collapsible-toggle[data-v-a72c16aa]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-a72c16aa]:last-child{margin-left:unset}[data-v-a72c16aa] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-a72c16aa] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-a72c16aa]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-a72c16aa] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.feature:not(li),.feature:not(li) button{position:relative;padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.can,.can button{background-color:var(--layer-color);cursor:pointer}.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}.locked,.locked button{background-color:var(--locked);cursor:not-allowed}.bought,.bought button{background-color:var(--bought);cursor:default}.mark[data-v-2207999f]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-2207999f]{left:-10px;width:0;height:0;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid #ffcc00;border-left:.3em solid transparent;font-size:10px;pointer-events:none}.star[data-v-2207999f]:before,.star[data-v-2207999f]:after{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #ffcc00;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-2207999f]:after{transform:rotate(35deg)}.node[data-v-a48cb382]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.clickable[data-v-211328c0]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-211328c0]{min-height:unset}.clickable>*[data-v-211328c0]{pointer-events:none}.resize-listener[data-v-063f6d6b]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}svg[data-v-063f6d6b]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.left-side-nodes[data-v-39ca96d0]{position:absolute;left:15px;top:65px}.side-nodes[data-v-39ca96d0]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-39ca96d0] .treeNode,.side-nodes[data-v-39ca96d0] .treeNode{margin:20px auto}.small[data-v-39ca96d0] .treeNode{height:60px;width:60px}.small[data-v-39ca96d0] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-727230a6]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px}.treeNode>*[data-v-727230a6]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px #00000040 inset,0 0 20px var(--background);display:flex}.treeNode>*:first-child>*[data-v-727230a6]{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.nav-container{margin-top:-50px;text-align:left;border-bottom:solid 1px var(--outline);margin-left:-10px;margin-right:-10px;padding:10px;width:100%}.nav-segment:not(:last-child){border-right:solid 1px var(--outline);padding-right:10px;margin-right:10px}.nav-segment .tooltip-container{display:inline}.affected-node{filter:drop-shadow(0px 0px 20px var(--accent1))}.achievement.final{border-color:var(--accent3)}.showNotif .body{filter:drop-shadow(0px 0px 20px var(--foreground))}.achievement[data-v-5673325a]{height:90px;width:90px;font-size:10px;color:#fff;text-shadow:0 0 2px #000000}.achievement[data-v-5673325a]:not(.small){height:unset;width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:#00000080;font-size:unset;text-shadow:unset}.achievement.done[data-v-5673325a]{background-color:var(--bought);cursor:default}.achievement[data-v-5673325a] .equal-spaced{display:flex;justify-content:center}.achievement[data-v-5673325a] .equal-spaced>*{margin:auto}.bar[data-v-6bd06b56]{position:relative;display:table}.overlayTextContainer[data-v-6bd06b56]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-6bd06b56]{z-index:6}.border[data-v-6bd06b56]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-6bd06b56]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2;transition-duration:.05s}.upgrade[data-v-9be6bac0]{min-height:120px;width:120px;font-size:10px}.upgrade>*[data-v-9be6bac0]{pointer-events:none}.game-over-modal-header[data-v-4a50ce42]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header *[data-v-4a50ce42]{margin:0}.game-over-modal-logo[data-v-4a50ce42]{height:4em;width:4em}.game-over-modal-title[data-v-4a50ce42]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-4a50ce42]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-4a50ce42]{margin:0 10px}.game-over-modal-discord-link[data-v-4a50ce42]{display:flex;align-items:center}.game-over-modal-discord[data-v-4a50ce42]{margin:0 4px 0 0}.nan-modal-header[data-v-2776d67d]{padding:10px 0;margin-left:10px}.nan-footer[data-v-2776d67d]{display:flex;justify-content:flex-end}.nan-footer button[data-v-2776d67d]{margin:0 10px}.nan-modal-discord-link[data-v-2776d67d]{display:flex;align-items:center}.nan-modal-discord[data-v-2776d67d]{margin:0 4px 0 0}.tpsDisplay[data-v-89b89152]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-89b89152]{color:var(--danger)}.fade-leave-to[data-v-89b89152]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}.app[data-v-41d15e5e]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-41d15e5e]{position:absolute;min-height:100%;height:100%;color:var(--foreground)} diff --git a/planar/assets/index.bebdc1b9.css b/planar/assets/index.bebdc1b9.css new file mode 100644 index 00000000..15d0a4d3 --- /dev/null +++ b/planar/assets/index.bebdc1b9.css @@ -0,0 +1 @@ +.error[data-v-1b5356cf]{border:solid 10px var(--danger);position:absolute;top:0;left:0;right:0;min-height:calc(100% - 20px);text-align:left;color:var(--foreground)}.error-title[data-v-1b5356cf]{background:var(--danger);color:var(--feature-foreground);display:block;margin:-10px 0 10px;position:sticky;top:0}.error-details[data-v-1b5356cf]{white-space:nowrap;overflow:auto;padding:10px;background-color:var(--raised-background)}.instructions[data-v-1b5356cf]{padding:10px}.discord-link[data-v-1b5356cf]{display:inline}summary[data-v-1b5356cf]{cursor:pointer;user-select:none}.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.row>:not(.feature){margin:0;display:flex}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent>.feature:not(.dontMerge),.row.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin-left:0;margin-right:0;border-radius:0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child,.row.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>.feature:not(.dontMerge):last-child,.row.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child:last-child,.row.mergeAdjacent>.tooltip-container:first-child:last-child>.feature:not(.dontMerge){border-radius:var(--border-radius)}.row-grid.mergeAdjacent>.feature:not(.dontMerge),.row-grid.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin:0;border-radius:0}.row-grid.mergeAdjacent>.feature:not(.dontMerge):last-child,.row-grid.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0}.row-grid.mergeAdjacent>.feature:not(.dontMerge):first-child,.row-grid.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:0}.table-grid>.row-grid.mergeAdjacent:last-child>.feature:not(.dontMerge):first-child{border-radius:0 0 0 var(--border-radius)}.table-grid>.row-grid.mergeAdjacent:first-child>.feature:not(.dontMerge):last-child{border-radius:0 var(--border-radius) 0 0}.table-grid>.row-grid.mergeAdjacent:first-child>.feature:not(.dontMerge):first-child{border-radius:var(--border-radius) 0 0 0}.table-grid>.row-grid.mergeAdjacent:last-child>.feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) 0}.col.mergeAdjacent .feature:not(.dontMerge){margin-top:0;margin-bottom:0;border-radius:0}.col.mergeAdjacent .feature:not(.dontMerge):first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent .feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge):first-child:last-child{border-radius:var(--border-radius)}.resize-listener[data-v-2b1dc1bc]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.layer-container[data-v-a9f5b1da]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-a9f5b1da]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-a9f5b1da]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-a9f5b1da]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized>*[data-v-a9f5b1da]{margin:0;writing-mode:vertical-rl;text-align:left;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-a9f5b1da]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-a9f5b1da]{padding-bottom:0}.modal-body .layer-tab[data-v-a9f5b1da]:not(.hasSubtabs){padding-top:0}.minimize[data-v-a9f5b1da]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-a9f5b1da]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-a9f5b1da]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-a9f5b1da]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}.layer-tab.minimized>*>.desc{color:var(--accent1);font-size:30px}details[data-v-4b4bda40]{margin:10px 0;padding-left:18px}summary[data-v-4b4bda40]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-4b4bda40]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-4b4bda40]{margin:8px 0}li[data-v-4b4bda40]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-4b4bda40]:before{content:"Feature";background:var(--accent1)}.fix[data-v-4b4bda40]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-4b4bda40]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-4b4bda40]:before{content:"Breaking";background:var(--danger)}.tooltip-container[data-v-6102fa3a]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-6102fa3a],.tooltip[data-v-6102fa3a]:after{pointer-events:none;position:absolute}.tooltip[data-v-6102fa3a]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-6102fa3a] hr{margin:var(--feature-margin) 0}.shown[data-v-6102fa3a]{z-index:10}.fade-enter-from[data-v-6102fa3a],.fade-leave-to[data-v-6102fa3a]{opacity:0}.tooltip[data-v-6102fa3a]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-6102fa3a],.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-6102fa3a]:after,.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-6102fa3a]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-6102fa3a]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-6102fa3a]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-6102fa3a]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-6102fa3a]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.info-modal-header[data-v-4f97aa40]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header *[data-v-4f97aa40]{margin:0}.info-modal-logo[data-v-4f97aa40]{height:4em;width:4em}.info-modal-title[data-v-4f97aa40]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link[data-v-4f97aa40]{display:flex;align-items:center}.info-modal-discord[data-v-4f97aa40]{margin:0 4px 0 0}.field{display:flex;position:relative;min-height:2em;margin:10px 0;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input{font-size:inherit}.vue-input input::placeholder{color:var(--link)}.field[data-v-11046116]{cursor:pointer}input[data-v-11046116]{appearance:none;pointer-events:none}span[data-v-11046116]{width:100%;padding-right:41px;position:relative}input+span[data-v-11046116]:before{content:"";position:absolute;top:calc(50% - 7px);right:0px;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s}input+span[data-v-11046116]:after{content:"";position:absolute;top:calc(50% - 10px);right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s}input:checked+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-11046116]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-11046116]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-11046116]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-11046116]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-11046116]:before{background-color:var(--link);opacity:.6}.feedback[data-v-01a1b95c]{position:relative}.feedback[data-v-01a1b95c]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"\2714";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-01a1b95c]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-01a1b95c]:after{animation:feedback-01a1b95c .5s ease-out forwards}@keyframes feedback-01a1b95c{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.option-tabs{border-bottom:2px solid var(--outline);margin-top:10px;margin-bottom:-10px}.option-tabs button{background-color:transparent;color:var(--foreground);margin-bottom:-2px;font-size:14px;cursor:pointer;padding:5px 20px;border:none;border-bottom:2px solid var(--foreground)}.option-tabs button:not(.selected){border-bottom-color:transparent}.option-title .tooltip-container{display:inline;margin-left:5px}.option-title desc{display:block;opacity:.6;font-size:small;width:300px;margin-left:0}.save-button{text-align:right}form[data-v-90bd4994]{margin:0;width:100%}.field>*[data-v-90bd4994]{margin:0}input[data-v-90bd4994]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-90bd4994]{width:100%}.container[data-v-2f8ef34c]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-2f8ef34c]{font-size:1em}.container>*[data-v-2f8ef34c]{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.save[data-v-32313015]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-32313015]{border-color:var(--bought)}.open[data-v-32313015]{display:inline;margin:0;padding-left:0}.handle[data-v-32313015]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-32313015]{margin:0 80px 0 0;flex-grow:1}.error[data-v-32313015]{font-size:.8em;color:var(--danger)}.save-version[data-v-32313015]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-32313015]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-32313015]{margin:0}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field,.field form[data-v-2a4275be],.field .field-title[data-v-2a4275be],.field .field-buttons[data-v-2a4275be]{margin:0}.field-buttons[data-v-2a4275be]{display:flex}.field-buttons .field[data-v-2a4275be]{margin:0 0 0 8px}.modal-footer[data-v-2a4275be]{margin-top:-20px}.footer[data-v-2a4275be]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.nav[data-v-318a1c31]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav>*[data-v-318a1c31]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-318a1c31]{height:100%;width:unset}.overlay-nav[data-v-318a1c31]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>*[data-v-318a1c31]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-318a1c31]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-318a1c31]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-318a1c31],.nav .info[data-v-318a1c31]{display:flex}.tooltip-container[data-v-318a1c31]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-318a1c31]{position:relative}.discord img[data-v-318a1c31]{width:100%;height:100%}.discord-links[data-v-318a1c31]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-318a1c31]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-318a1c31]{left:-10px}.discord-links li[data-v-318a1c31]{margin-bottom:4px}.discord-links li[data-v-318a1c31]:first-child{font-size:1.2em}*:not(.overlay-nav) .discord:hover .discord-links[data-v-318a1c31]{right:0}.material-icons[data-v-318a1c31]{font-size:36px}.material-icons[data-v-318a1c31]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-318a1c31]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-318a1c31]{width:unset;height:25px}.version[data-v-318a1c31]{color:var(--points)}.version:hover span[data-v-318a1c31]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-318a1c31],.overlay-nav>div>a[data-v-318a1c31]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-dcd207b4]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-dcd207b4]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-dcd207b4]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-dcd207b4]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-dcd207b4]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.sticky[data-v-cccac690]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.link[data-v-58e8d695]{transition-duration:0s}.link.pulsing[data-v-58e8d695]{animation:pulsing-58e8d695 2s ease-in infinite}@keyframes pulsing-58e8d695{0%{opacity:.25}50%{opacity:1}to{opacity:.25}}.action:not(.boardnode):hover circle[data-v-9efb2a56],.action:not(.boardnode).selected circle[data-v-9efb2a56]{r:25}.action:not(.boardnode):hover text[data-v-9efb2a56],.action:not(.boardnode).selected text[data-v-9efb2a56]{font-size:187.5%}.action:not(.boardnode) text[data-v-9efb2a56]{text-anchor:middle;dominant-baseline:central}.actions-enter-from .action,.actions-leave-to .action{transform:translate(0)}.boardnode[data-v-19cf948c]{cursor:pointer;transition-duration:0s}.boardnode:hover .body[data-v-19cf948c]{fill:var(--highlighted)}.boardnode.running .body[data-v-19cf948c]{fill:var(--accent1)!important}.boardnode:not(.isDraggable) .body[data-v-19cf948c]{fill:var(--locked)}.node-title[data-v-19cf948c]{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:200%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.node-subtitle[data-v-19cf948c]{text-anchor:middle;dominant-baseline:middle;font-family:monospace;font-size:150%;pointer-events:none;filter:drop-shadow(3px 3px 2px var(--tooltip-background))}.progress[data-v-19cf948c]{transition-duration:.05s}.progressRing[data-v-19cf948c]{transform:rotate(-90deg)}.fade-enter-from[data-v-19cf948c],.fade-leave-to[data-v-19cf948c]{opacity:0}.pulsing[data-v-19cf948c]{animation:pulsing-19cf948c 2s ease-in infinite}@keyframes pulsing-19cf948c{0%{opacity:.25}50%{opacity:1}to{opacity:.25}}.grow-enter-from .node-container,.grow-leave-to .node-container{transform:scale(0)}.vue-pan-zoom-scene{width:100%;height:100%;cursor:grab}.vue-pan-zoom-scene:active{cursor:grabbing}.g1{transition-duration:0s}.link-enter-from,.link-leave-to{opacity:0}.tabButton[data-v-21427abb]{background-color:transparent;color:var(--foreground);font-size:20px;cursor:pointer;padding:5px 20px;margin:5px;border-radius:5px;border:2px solid;flex-shrink:0;border-color:var(--layer-color)}.tabButton[data-v-21427abb]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}:not(.floating)>.tabButton[data-v-21427abb]{height:50px;margin:0;border-left:none;border-right:none;border-top:none;border-bottom-width:4px;border-radius:0;transform:unset}:not(.floating) .tabButton[data-v-21427abb]:not(.active){border-bottom-color:transparent}.tabButton>*[data-v-21427abb]{pointer-events:none}.tab-family-container[data-v-58dbf83a]{margin:calc(50px + var(--feature-margin)) 20px var(--feature-margin) 20px;position:relative;border:solid 4px;border-color:var(--outline)}.layer-tab>.tab-family-container[data-v-58dbf83a]:first-child{margin:-4px -11px var(--feature-margin) -11px}.layer-tab>.tab-family-container[data-v-58dbf83a]:first-child:nth-last-child(3){border-bottom-style:none;border-left-style:none;border-right-style:none;height:calc(100% + 50px)}.modal-body>.tab-family-container[data-v-58dbf83a]:first-child{margin:calc(10px + var(--feature-margin)) 10px 0 10px;border:none}.tab-family-container[data-v-58dbf83a]>:nth-child(2){margin-top:20px}.modal-body>.tab-family-container[data-v-58dbf83a]>:nth-child(2){margin-top:50px}.tab-family-container[data-v-f18896fc][data-v-58dbf83a]>:last-child{margin-bottom:20px}.tab-buttons-container[data-v-58dbf83a]{z-index:4}.tab-buttons-container[data-v-58dbf83a]:not(.floating){border-bottom:solid 4px;border-color:inherit}:not(.layer-tab):not(.modal-body)>.tab-family-container>.tab-buttons-container[data-v-58dbf83a]:not(.floating){width:calc(100% + 6px);margin-left:-3px}.tab-buttons-container:not(.floating) .tab-buttons[data-v-58dbf83a]{text-align:left;margin-bottom:-4px}.tab-buttons-container.floating .tab-buttons[data-v-58dbf83a]{justify-content:center;margin-top:-25px}.tab-buttons[data-v-58dbf83a]{margin-bottom:24px;display:flex;flex-flow:wrap;z-index:4}.layer-tab>.tab-family-container:first-child:nth-last-child(3)>.tab-buttons-container>.tab-buttons[data-v-58dbf83a]{padding-right:60px}.tab-buttons[data-v-58dbf83a]:not(.floating){text-align:left;border-bottom:inherit;border-width:4px;box-sizing:border-box;height:50px}.modal-body .tab-buttons[data-v-58dbf83a]{width:100%;margin-left:0;margin-right:0;padding-left:0}.showGoBack>.tab-family-container:first-child>.tab-buttons-container:not(.floating) .tab-buttons[data-v-58dbf83a]{padding-left:70px}:not(.showGoBack)>.tab-family-container>.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-58dbf83a]{padding-left:0}.minimizable>.tab-buttons-container[data-v-58dbf83a]:not(.floating):first-child{padding-right:50px}.tab-buttons-container:not(.floating):first-child .tab-buttons[data-v-58dbf83a]{margin-top:-50px}.tab-buttons-container+*[data-v-58dbf83a]{margin-top:20px}.modifier-container{display:flex;padding:1px 8px}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-shrink:0;text-align:right}:not(:first-of-type,:last-of-type)>.modifier-amount:after{content:var(--unit);opacity:0}.modifier-description{flex-grow:1}.collapsible-container[data-v-a72c16aa]{width:calc(100% - 10px)}.collapsible-toggle[data-v-a72c16aa]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-a72c16aa]:last-child{margin-left:unset}[data-v-a72c16aa] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-a72c16aa] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-a72c16aa]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-a72c16aa] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.feature:not(li),.feature:not(li) button{position:relative;padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.can,.can button{background-color:var(--layer-color);cursor:pointer}.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}.locked,.locked button{background-color:var(--locked);cursor:not-allowed}.bought,.bought button{background-color:var(--bought);cursor:default}.mark[data-v-2207999f]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-2207999f]{left:-10px;width:0;height:0;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid #ffcc00;border-left:.3em solid transparent;font-size:10px;pointer-events:none}.star[data-v-2207999f]:before,.star[data-v-2207999f]:after{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #ffcc00;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-2207999f]:after{transform:rotate(35deg)}.node[data-v-a48cb382]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.clickable[data-v-211328c0]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-211328c0]{min-height:unset}.clickable>*[data-v-211328c0]{pointer-events:none}.resize-listener[data-v-063f6d6b]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}svg[data-v-063f6d6b]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.left-side-nodes[data-v-39ca96d0]{position:absolute;left:15px;top:65px}.side-nodes[data-v-39ca96d0]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-39ca96d0] .treeNode,.side-nodes[data-v-39ca96d0] .treeNode{margin:20px auto}.small[data-v-39ca96d0] .treeNode{height:60px;width:60px}.small[data-v-39ca96d0] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-727230a6]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px}.treeNode>*[data-v-727230a6]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px #00000040 inset,0 0 20px var(--background);display:flex}.treeNode>*:first-child>*[data-v-727230a6]{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.nav-container{margin-top:-50px;text-align:left;border-bottom:solid 1px var(--outline);margin-left:-10px;margin-right:-10px;padding:10px;width:100%}.nav-segment:not(:last-child){border-right:solid 1px var(--outline);padding-right:10px;margin-right:10px}.nav-segment .tooltip-container{display:inline}.affected-node{filter:drop-shadow(0px 0px 20px var(--accent1))}.achievement.final{border-color:var(--accent3)}.showNotif .body{filter:drop-shadow(0px 0px 20px var(--foreground))}.achievement[data-v-5673325a]{height:90px;width:90px;font-size:10px;color:#fff;text-shadow:0 0 2px #000000}.achievement[data-v-5673325a]:not(.small){height:unset;width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:#00000080;font-size:unset;text-shadow:unset}.achievement.done[data-v-5673325a]{background-color:var(--bought);cursor:default}.achievement[data-v-5673325a] .equal-spaced{display:flex;justify-content:center}.achievement[data-v-5673325a] .equal-spaced>*{margin:auto}.bar[data-v-6bd06b56]{position:relative;display:table}.overlayTextContainer[data-v-6bd06b56]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-6bd06b56]{z-index:6}.border[data-v-6bd06b56]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-6bd06b56]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2;transition-duration:.05s}.upgrade[data-v-9be6bac0]{min-height:120px;width:120px;font-size:10px}.upgrade>*[data-v-9be6bac0]{pointer-events:none}.game-over-modal-header[data-v-4a50ce42]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header *[data-v-4a50ce42]{margin:0}.game-over-modal-logo[data-v-4a50ce42]{height:4em;width:4em}.game-over-modal-title[data-v-4a50ce42]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-4a50ce42]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-4a50ce42]{margin:0 10px}.game-over-modal-discord-link[data-v-4a50ce42]{display:flex;align-items:center}.game-over-modal-discord[data-v-4a50ce42]{margin:0 4px 0 0}.nan-modal-header[data-v-2776d67d]{padding:10px 0;margin-left:10px}.nan-footer[data-v-2776d67d]{display:flex;justify-content:flex-end}.nan-footer button[data-v-2776d67d]{margin:0 10px}.nan-modal-discord-link[data-v-2776d67d]{display:flex;align-items:center}.nan-modal-discord[data-v-2776d67d]{margin:0 4px 0 0}.tpsDisplay[data-v-89b89152]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-89b89152]{color:var(--danger)}.fade-leave-to[data-v-89b89152]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}.app[data-v-bf4e22ac]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-bf4e22ac]{position:absolute;min-height:100%;height:100%;color:var(--foreground)}.error-container[data-v-bf4e22ac]{background:var(--background);overflow:auto;width:100%;height:100%}.error-container>.error[data-v-bf4e22ac]{position:static} diff --git a/planar/assets/index.cfd83ced.js b/planar/assets/index.cfd83ced.js deleted file mode 100644 index 3a1713d6..00000000 --- a/planar/assets/index.cfd83ced.js +++ /dev/null @@ -1,18 +0,0 @@ -/* empty css */import"./vue.c16a309b.js";import{_ as C,C as s,l as Oe,q as mn,t as G,b2 as ht,ab as X,aF as S,a1 as R,a2 as k,aL as Rt,G as Ne,aD as wr,w as bt,b3 as $t,a9 as d,O as oe,ap as ra,az as vi,as as Gt,aH as ai,A as De,$ as ne,b7 as Y,b9 as Vi,ar as Ut,bv as xn,a8 as _,bt as aa,bc as Gn,T as sa,u as Bi,j as oa,bw as Ft,aM as kt,a0 as z,aO as Ke,J as pe,I as Be,aI as vn,aG as hn,z as nn,bo as la,bs as ua,aK as $n,bd as rr,am as ci,H as ca,bx as da,bf as pa}from"./@vue.6b211d3c.js";import{c as _r}from"./nanoevents.1080beb7.js";import{L as Qt}from"./lz-string.dccec454.js";import{Y as fa}from"./vue-next-select.ded54c4a.js";import{D as ga}from"./vuedraggable.1879de79.js";import{p as ma}from"./vue-textarea-autosize.35804eaf.js";import{P as va}from"./vue-panzoom.8ce6f9b1.js";import{s as ha,u as hi}from"./vue-toastification.9c2dad53.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";const ba=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerpolicy&&(a.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?a.credentials="include":r.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}};ba();const ya="modulepreload",ar={},wa="./",Un=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${wa}${i}`,i in ar)return;ar[i]=!0;const r=i.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=r?"stylesheet":ya,r||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),r)return new Promise((l,c)=>{u.addEventListener("load",l),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},_a="./projInfo-schema.json",Na="Planar Pioneers",Ca="A game about controlling and exploiting planes!",ka="planar-pioneers",Ma="thepaperpilot",Sa="",Ia="",xa="0.0",$a="Initial Commit",Ea=!1,Da=!1,Ta=2,Pa=!0,Aa=null,Ra="",Fa=["main"],Oa=3600,qa=0,Va=!0,Ba="base64";var we={$schema:_a,title:Na,description:Ca,id:ka,author:Ma,discordName:Sa,discordLink:Ia,versionNumber:xa,versionTitle:$a,allowGoBack:Ea,defaultShowSmall:Da,defaultDecimalsShown:Ta,useHeader:Pa,banner:Aa,logo:Ra,initialTabs:Fa,maxTickLength:Oa,offlineLimit:qa,enablePausing:Va,exportEncoding:Ba};class La{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const i=new ja(t,n);for(this.first===void 0?(this.first=i,this.last=i):(i.next=this.first,this.first.prev=i,this.first=i),this.map.set(t,i);this.map.size>this.maxSize;){const r=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void 0}}}class ja{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const Ei=17,za=9e15,Ga=Math.log10(9e15),Ua=1/9e15,Wa=308,Ha=-324,sr=5,Ya=(1<<10)-1,Za=function(){const e=[];for(let n=Ha+1;n<=Wa;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),ln=[2,Math.E,3,4,5,6,7,8,9,10],Xa=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],Ka=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let M=function(t){return o.fromValue_noAlloc(t)},J=function(e,t,n){return o.fromComponents(e,t,n)},re=function(t,n,i){return o.fromComponents_noNormalize(t,n,i)};const Kt=function(t,n){const i=n+1,r=Math.ceil(Math.log10(Math.abs(t))),a=Math.round(t*Math.pow(10,i-r))*Math.pow(10,r-i);return parseFloat(a.toFixed(Math.max(i-r,0)))},Di=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Ja=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const i=e*e;let r=e;return n=n+1/(12*r),r=r*i,n=n+1/(360*r),r=r*i,n=n+1/(1260*r),r=r*i,n=n+1/(1680*r),r=r*i,n=n+1/(1188*r),r=r*i,n=n+691/(360360*r),r=r*i,n=n+7/(1092*r),r=r*i,n=n+3617/(122400*r),Math.exp(n)/t},Nr=.5671432904097838,or=function(e,t=1e-10){let n,i;if(!Number.isFinite(e)||e===0)return e;if(e===1)return Nr;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let r=0;r<100;++r){if(i=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(i-n).5?1:-1;if(Math.random()*20<1)return re(t,0,1);const n=Math.floor(Math.random()*(e+1));let i=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(i=Math.trunc(i));let r=Math.pow(10,i);return Math.random()>.9&&(r=Math.trunc(r)),J(t,n,r)}static affordGeometricSeries_core(e,t,n,i){const r=t.mul(n.pow(i));return w.floor(e.div(r).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,i){return t.mul(n.pow(i)).mul(w.sub(1,n.pow(e))).div(w.sub(1,n))}static affordArithmeticSeries_core(e,t,n,i){const a=t.add(i.mul(n)).sub(n.div(2)),u=a.pow(2);return a.neg().add(u.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,i){const r=t.add(i.mul(n));return e.div(2).mul(r.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=za)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,n=w.fromStringCache.get(t);if(n!==void 0)return this.fromDecimal(n);e=e.replace(",","");const i=e.split("^^^");if(i.length===2){const y=parseFloat(i[0]),N=parseFloat(i[1]),E=i[1].split(";");let P=1;if(E.length===2&&(P=parseFloat(E[1]),isFinite(P)||(P=1)),isFinite(y)&&isFinite(N)){const I=w.pentate(y,N,P);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const r=e.split("^^");if(r.length===2){const y=parseFloat(r[0]),N=parseFloat(r[1]),E=r[1].split(";");let P=1;if(E.length===2&&(P=parseFloat(E[1]),isFinite(P)||(P=1)),isFinite(y)&&isFinite(N)){const I=w.tetrate(y,N,P);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const a=e.split("^");if(a.length===2){const y=parseFloat(a[0]),N=parseFloat(a[1]);if(isFinite(y)&&isFinite(N)){const E=w.pow(y,N);return this.sign=E.sign,this.layer=E.layer,this.mag=E.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}e=e.trim().toLowerCase();let u,l,c=e.split("pt");if(c.length===2){u=10,l=parseFloat(c[0]),c[1]=c[1].replace("(",""),c[1]=c[1].replace(")","");let y=parseFloat(c[1]);if(isFinite(y)||(y=1),isFinite(u)&&isFinite(l)){const N=w.tetrate(u,l,y);return this.sign=N.sign,this.layer=N.layer,this.mag=N.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}if(c=e.split("p"),c.length===2){u=10,l=parseFloat(c[0]),c[1]=c[1].replace("(",""),c[1]=c[1].replace(")","");let y=parseFloat(c[1]);if(isFinite(y)||(y=1),isFinite(u)&&isFinite(l)){const N=w.tetrate(u,l,y);return this.sign=N.sign,this.layer=N.layer,this.mag=N.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const p=e.split("e"),v=p.length-1;if(v===0){const y=parseFloat(e);if(isFinite(y))return this.fromNumber(y),w.fromStringCache.size>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}else if(v===1){const y=parseFloat(e);if(isFinite(y)&&y!==0)return this.fromNumber(y),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}const f=e.split("e^");if(f.length===2){this.sign=1,f[0].charAt(0)=="-"&&(this.sign=-1);let y="";for(let N=0;N=43&&E<=57||E===101)y+=f[1].charAt(N);else return this.layer=parseFloat(y),this.mag=parseFloat(f[1].substr(N+1)),this.normalize(),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}if(v<1)return this.sign=0,this.layer=0,this.mag=0,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this;const b=parseFloat(p[0]);if(b===0)return this.sign=0,this.layer=0,this.mag=0,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this;let h=parseFloat(p[p.length-1]);if(v>=2){const y=parseFloat(p[p.length-2]);isFinite(y)&&(h*=Math.sign(y),h+=Di(y))}if(!isFinite(b))this.sign=p[0]==="-"?-1:1,this.layer=v,this.mag=h;else if(v===1)this.sign=Math.sign(b),this.layer=1,this.mag=h+Math.log10(Math.abs(b));else if(this.sign=Math.sign(b),this.layer=v,v===2){const y=w.mul(J(1,2,h),M(b));return this.sign=y.sign,this.layer=y.layer,this.mag=y.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}else this.mag=h;return this.normalize(),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}fromValue(e){return e instanceof w?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Kt(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Kt(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=sr?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Kt(this.m,e)+"e"+Kt(this.e,e):this.layer===1?Kt(this.m,e)+"e"+Kt(this.e,e):this.layer<=sr?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Kt(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Kt(this.mag,e)}abs(){return re(this.sign===0?0:1,this.layer,this.mag)}neg(){return re(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?w.dZero:this.layer===0?J(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?w.dZero:this.layer===0?J(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?w.dZero:this.layer===0?J(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?w.dZero:this.layer===0?J(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=M(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return re(0,0,0);let n,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(w.cmpabs(this,t)>0?(n=this,i=t):(n=t,i=this),n.layer===0&&i.layer===0)return w.fromNumber(n.sign*n.mag+i.sign*i.mag);const r=n.layer*Math.sign(n.mag),a=i.layer*Math.sign(i.mag);if(r-a>=2)return n;if(r===0&&a===-1){if(Math.abs(i.mag-Math.log10(n.mag))>Ei)return n;{const u=Math.pow(10,Math.log10(n.mag)-i.mag),l=i.sign+n.sign*u;return J(Math.sign(l),1,i.mag+Math.log10(Math.abs(l)))}}if(r===1&&a===0){if(Math.abs(n.mag-Math.log10(i.mag))>Ei)return n;{const u=Math.pow(10,n.mag-Math.log10(i.mag)),l=i.sign+n.sign*u;return J(Math.sign(l),1,Math.log10(i.mag)+Math.log10(Math.abs(l)))}}if(Math.abs(n.mag-i.mag)>Ei)return n;{const u=Math.pow(10,n.mag-i.mag),l=i.sign+n.sign*u;return J(Math.sign(l),1,i.mag+Math.log10(Math.abs(l)))}}plus(e){return this.add(e)}sub(e){return this.add(M(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=M(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return re(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return re(this.sign*t.sign,0,1);let n,i;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,i=t):(n=t,i=this),n.layer===0&&i.layer===0)return w.fromNumber(n.sign*i.sign*n.mag*i.mag);if(n.layer>=3||n.layer-i.layer>=2)return J(n.sign*i.sign,n.layer,n.mag);if(n.layer===1&&i.layer===0)return J(n.sign*i.sign,1,n.mag+Math.log10(i.mag));if(n.layer===1&&i.layer===1)return J(n.sign*i.sign,1,n.mag+i.mag);if(n.layer===2&&i.layer===1){const r=J(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(J(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return J(n.sign*i.sign,r.layer+1,r.sign*r.mag)}if(n.layer===2&&i.layer===2){const r=J(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(J(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return J(n.sign*i.sign,r.layer+1,r.sign*r.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=M(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?w.dNaN:this.layer===0?J(this.sign,0,1/this.mag):J(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=M(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return n>i?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=M(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=M(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let i=this.mag,r=n.mag;return this.layer>n.layer&&(r=Di(r)),this.layer0?J(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):J(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?w.dNaN:this.layer>0?J(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):J(this.sign,0,Math.log10(this.mag))}log(e){return e=M(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?w.dNaN:this.layer===0&&e.layer===0?J(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):w.div(this.log10(),e.log10())}log2(){return this.sign<=0?w.dNaN:this.layer===0?J(this.sign,0,Math.log2(this.mag)):this.layer===1?J(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?J(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):J(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?w.dNaN:this.layer===0?J(this.sign,0,Math.log(this.mag)):this.layer===1?J(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?J(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):J(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=M(e),n=this,i=t;if(n.sign===0)return i.eq(0)?re(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(i.sign===0)return re(1,0,1);if(i.sign===1&&i.layer===0&&i.mag===1)return n;const r=n.absLog10().mul(i).pow10();return this.sign===-1?Math.abs(i.toNumber()%2)%2===1?r.neg():Math.abs(i.toNumber()%2)%2===0?r:w.dNaN:r}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return w.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return J(1,0,t);if(e.sign===0)return w.dOne;e=re(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?J(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?J(-e.sign,e.layer+1,-e.mag):w.dOne}pow_base(e){return M(e).pow(this)}root(e){const t=M(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?w.exp(w.mul(this,w.ln(this).sub(1))):w.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(re(1,0,24)))return w.fromNumber(Ja(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let i=e,r=12*i,a=1/r,u=t+a;if(u===t||(t=u,i=i*n,r=360*i,a=1/r,u=t-a,u===t))return w.exp(t);t=u,i=i*n,r=1260*i;let l=1/r;return t=t+l,i=i*n,r=1680*i,l=1/r,t=t-l,w.exp(t)}else return this.layer===1?w.exp(w.mul(this,w.ln(this).sub(1))):w.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?w.dOne:this.layer===0&&this.mag<=709.7?w.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?J(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?J(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):J(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return w.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return J(1,2,Math.log10(this.mag)-.3010299956639812);{const e=w.div(re(this.sign,this.layer-1,this.mag),re(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=re(1,0,1)){if(e===1)return w.pow(this,t);if(e===0)return new w(t);if(this.eq(w.dOne))return w.dOne;if(this.eq(-1))return w.pow(this,t);if(e===Number.POSITIVE_INFINITY){const r=this.toNumber();if(r<=1.444667861009766&&r>=.06598803584531254){if(r>1.444667861009099)return w.fromNumber(Math.E);const a=w.ln(this).neg();return a.lambertw().div(a)}else return r>1.444667861009766?w.fromNumber(Number.POSITIVE_INFINITY):w.dNaN}if(this.eq(w.dZero)){let r=Math.abs((e+1)%2);return r>1&&(r=2-r),w.fromNumber(r)}if(e<0)return w.iteratedlog(t,this,-e);t=M(t);const n=e;e=Math.trunc(e);const i=n-e;if(this.gt(w.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let r=0;r3)return re(t.sign,t.layer+(e-r-1),t.mag);if(r>1e4)return t}return t}iteratedexp(e=2,t=re(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return w.tetrate(e,-t,this);e=M(e);let n=w.fromDecimal(this);const i=t;t=Math.trunc(t);const r=i-t;if(n.layer-e.layer>3){const a=Math.min(t,n.layer-e.layer-3);t-=a,n.layer-=a}for(let a=0;a1e4)return n}return r>0&&r<1&&(e.eq(10)?n=n.layeradd10(-r):n=n.layeradd(-r,e)),n}slog(e=10,t=100){let n=.001,i=!1,r=!1,a=this.slog_internal(e).toNumber();for(let u=1;u1&&r!=c&&(i=!0),r=c,i?n/=2:n*=2,n=Math.abs(n)*(c?-1:1),a+=n,n===0)break}return w.fromNumber(a)}slog_internal(e=10){if(e=M(e),e.lte(w.dZero)||e.eq(w.dOne))return w.dNaN;if(e.lt(w.dOne))return this.eq(w.dOne)?w.dZero:this.eq(w.dZero)?w.dNegOne:w.dNaN;if(this.mag<0||this.eq(w.dZero))return w.dNegOne;let t=0,n=w.fromDecimal(this);if(n.layer-e.layer>3){const i=n.layer-e.layer-3;t+=i,n.layer-=i}for(let i=0;i<100;++i)if(n.lt(w.dZero))n=w.pow(e,n),t-=1;else{if(n.lte(w.dOne))return w.fromNumber(t+w.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=w.log(n,e)}return w.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:w.critical_section(e,t,Ka)}static tetrate_critical(e,t){return w.critical_section(e,t,Xa)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let i=0,r=0;for(let u=0;ue){const l=(e-ln[u])/(ln[u+1]-ln[u]);i=n[u][Math.floor(t)]*(1-l)+n[u+1][Math.floor(t)]*l,r=n[u][Math.ceil(t)]*(1-l)+n[u+1][Math.ceil(t)]*l;break}const a=t-Math.floor(t);return i<=0||r<=0?i*(1-a)+r*a:Math.pow(e,Math.log(i)/Math.log(e)*(1-a)+Math.log(r)/Math.log(e)*a)}layeradd10(e){e=w.fromValue_noAlloc(e).toNumber();const t=w.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let i=0;i<100;++i){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const i=this.slog(t).toNumber()+e;return i>=0?w.tetrate(t,i):Number.isFinite(i)?i>=-1?w.log(w.tetrate(t,i+1),t):w.log(w.log(w.tetrate(t,i+2),t),t):w.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return w.fromNumber(or(this.toNumber()));if(this.layer===0)return w.fromNumber(or(this.sign*this.mag));if(this.layer===1)return lr(this);if(this.layer===2)return lr(this);if(this.layer>=3)return re(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return re(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=re(1,0,1)){t=M(t);const n=e;e=Math.trunc(e);const i=n-e;i!==0&&(t.eq(w.dOne)?(++e,t=w.fromNumber(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let r=0;r10)return t}return t}sin(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.sin(this.sign*this.mag)):re(0,0,0)}cos(){return this.mag<0?w.dOne:this.layer===0?w.fromNumber(Math.cos(this.sign*this.mag)):re(0,0,0)}tan(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.tan(this.sign*this.mag)):re(0,0,0)}asin(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.asin(this.sign*this.mag)):re(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?w.fromNumber(Math.acos(this.toNumber())):this.layer===0?w.fromNumber(Math.acos(this.sign*this.mag)):re(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.atan(this.sign*this.mag)):w.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return w.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return w.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?re(Number.NaN,Number.NaN,Number.NaN):w.ln(this.add(1).div(w.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(w.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let o=w;o.fromStringCache=new La(Ya);o.dZero=re(0,0,0);o.dOne=re(1,0,1);o.dNegOne=re(-1,0,1);o.dTwo=re(1,0,2);o.dTen=re(1,0,10);o.dNaN=re(Number.NaN,Number.NaN,Number.NaN);o.dInf=re(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);o.dNegInf=re(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);o.dNumberMax=J(1,0,Number.MAX_VALUE);o.dNumberMin=J(1,0,Number.MIN_VALUE);M=o.fromValue_noAlloc;J=o.fromComponents;re=o.fromComponents_noNormalize;o.fromMantissaExponent;o.fromMantissaExponent_noNormalize;const Qa=new o(1);function Bn(e,t,n=!0){let i=o.log10(e).floor(),r=o.div(e,o.pow(10,i));r.toStringWithDecimalPlaces(t)==="10"&&(r=Qa,i=i.add(1));const a=i.gte(1e9)?yt(i,Math.max(Math.max(t,3),we.defaultDecimalsShown)):i.gte(1e4)?di(i,0):i.toStringWithDecimalPlaces(0);return n?r.toStringWithDecimalPlaces(t)+"e"+a:"e"+a}function di(e,t){if(e==null)return"NaN";if(e=new o(e),e.mag<.001)return 0 .toFixed(t);const i=e.toStringWithDecimalPlaces(t).split(".");return i[0]=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),i.length==1?i[0]:i[0]+"."+i[1]}function Cr(e,t){return e==null?"NaN":(e=new o(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),we.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const es=new o("eeee1000"),ts=new o("e100000"),ur=new o("e1000"),kr=new o(1e9),ns=new o(1e6),is=new o(1e3),rs=new o(.98),as=new o(.001),Mr=new o(0);function yt(e,t,n){if(t==null&&(t=we.defaultDecimalsShown),n=n!=null?n:we.defaultShowSmall,e=new o(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+yt(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(es)){const i=e.slog();return i.gte(ns)?"F"+yt(i.floor()):o.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+di(i.floor(),0)}else{if(e.gte(ts))return Bn(e,0,!1);if(e.gte(ur))return Bn(e,0);if(e.gte(kr))return Bn(e,t);if(e.gte(is))return di(e,0);if(e.gte(as)||!n)return Cr(e,t);if(e.eq(Mr))return 0 .toFixed(t)}return e=Ir(e),e.lt(ur)?Bn(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):yt(e,t)+"\u207B\xB9"}function We(e){return e=new o(e),e.sign<0?"-"+We(e.neg()):e.gte(kr)||e.lte(rs)&&!e.eq(Mr)?yt(e):yt(e,0)}function Sr(e){return o.lt(e,0)?"-"+Sr(o.neg(e)):o.gt(e,2**51)?yt(o.div(e,31536e3))+"y":(e=new o(e).toNumber(),e<60?yt(e)+"s":e<3600?We(Math.floor(e/60))+"m "+yt(e%60)+"s":e<86400?We(Math.floor(e/3600))+"h "+We(Math.floor(e/60)%60)+"m "+We(e%60)+"s":e<31536e3?We(Math.floor(e/84600)%365)+"d "+We(Math.floor(e/3600)%24)+"h "+We(Math.floor(e/60)%60)+"m":We(Math.floor(e/31536e3))+"y "+We(Math.floor(e/84600)%365)+"d "+We(Math.floor(e/3600)%24)+"h")}function ss(e,t,n){e=new o(e);let i=e.toStringWithDecimalPlaces(t);return new o(i).gte(n)&&(i=o.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),i}function os(e,t){return yt(e,t,!0)}function Ir(e){let t=o.log10(e).ceil();const n=o.div(e,o.pow(10,t));return t=t.neg(),e=new o(10).pow(t).times(n),e}var ls=Object.freeze(Object.defineProperty({__proto__:null,default:o,exponentialFormat:Bn,commaFormat:di,regularFormat:Cr,format:yt,formatWhole:We,formatTime:Sr,toPlaces:ss,formatSmall:os,invertOOM:Ir},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:Li,commaFormat:us,regularFormat:cs,format:xe,formatWhole:at,formatTime:bi,toPlaces:ds,formatSmall:zt,invertOOM:ps}=ls;window.Decimal=o;window.exponentialFormat=Li;window.commaFormat=us;window.regularFormat=cs;window.format=xe;window.formatWhole=at;window.formatTime=bi;window.toPlaces=ds;window.formatSmall=zt;window.invertOOM=ps;function it(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function Wn(e){return typeof e=="function"}var W=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(W||{});const Hn=Symbol("DoNotCache");function T(e,t){const n=e[t];Wn(n)&&n.length===0&&!n[Hn]?e[t]=C(n.bind(e)):Wn(n)&&(e[t]=n.bind(e),e[t][Hn]=!0)}function _e(e){return Wn(e)&&!e[Hn]&&(e=C(e)),e}const dt=Symbol("Component"),lt=Symbol("GatherProps");let fs=0;function Ht(e="feature-"){return e+fs++}var Me=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Me||{});function He(e){const t=s(e);return t!==2&&t!==!1}function bn(e){return s(e)===1}function j(e){return e[Hn]=!0,e}function se(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Yn(e,...t){const n=[],i=r=>{Object.keys(r).forEach(a=>{const u=r[a];u!=null&&typeof u=="object"&&(t.includes(u.type)?n.push(u):!(u instanceof o)&&!Oe(u)&&i(u))})};return i(e),n}const un={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var ji=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(ji||{}),Ct={classic:un,paper:{...un,variables:{...un.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...un,variables:{...un.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...un,variables:{...un.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Je=_r();"fonts"in document&&(document.fonts.onloadingdone=()=>Je.emit("fontsLoaded"));var gs=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Je},Symbol.toStringTag,{value:"Module"}));const ms=mn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var Z=window.player=ms;function xr(e){return JSON.stringify(e,(t,n)=>s(n))}function $r(e={}){return Object.assign({id:`${we.id}-0`,name:"Default Save",tabs:we.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:we.id,modVersion:we.versionNumber,layers:{}},e)}function mt(e){const t=Qt.compressToUTF16(xr(e!=null?e:Z));return localStorage.setItem((e!=null?e:Z).id,t),t}async function vs(){ys();try{let e=localStorage.getItem(te.active);if(e==null){await pn(In());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Qt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==we.id){await pn(In());return}t.id=te.active,await pn(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await pn(In())}}function In(){const e=ui(),t=$r({id:e});return mt(t),te.saves.push(e),t}function ui(){let e,t=0;do e=`${we.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const hs=G(!1);async function pn(e){console.info("Loading save",e),hs.value=!0;const{layers:t,removeLayer:n,addLayer:i}=await Un(()=>Promise.resolve().then(function(){return gl}),void 0),{fixOldSave:r,getInitialLayers:a}=await Un(()=>Promise.resolve().then(function(){return Sp}),void 0);for(const u in t){const l=t[u];l&&n(l)}a(e).forEach(u=>i(u,e)),e=$r(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,we.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==we.versionNumber&&(r(e.modVersion,e),e.modVersion=we.versionNumber),Object.assign(Z,e),te.active=Z.id,Je.emit("onLoad")}setInterval(()=>{Z.autosave&&mt()},1e3);window.onbeforeunload=()=>{Z.autosave&&mt()};window.save=mt;const bs=window.hardReset=async()=>{await pn(In())};window.deleteLowerSaves=()=>{const e=Object.values(te.saves).indexOf(Z.id)+1;Object.values(te.saves).slice(e).forEach(t=>localStorage.removeItem(t)),te.saves=te.saves.slice(0,e)};const Zn=mn({active:"",saves:[],showTPS:!0,theme:ji.Nordic,unthrottled:!1,alignUnits:!1});ht(Zn,e=>{const t=Qt.compressToUTF16(JSON.stringify(e));localStorage.setItem(we.id,t)},{deep:!0});var te=window.settings=Zn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:ji.Nordic,alignUnits:!1};Je.emit("loadSettings",e),Object.assign(Zn,e),bs()};function ys(){try{let e=localStorage.getItem(we.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Qt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Zn,t)}Je.emit("loadSettings",Zn)}catch{}}const Er=mn([]);function Dr(e){Er.push(e)}const ws=mn([]),_s=mn([]),Ns={class:"table"},Cs=X({__name:"Column",setup(e){const t=C(()=>Ct[te.theme].mergeAdjacent);return(n,i)=>(S(),R("div",Ns,[k("div",{class:Ne(["col",{mergeAdjacent:s(t)}])},[Rt(n.$slots,"default")],2)]))}}),ks={class:"table"},Ms=X({__name:"Row",setup(e){const t=C(()=>Ct[te.theme].mergeAdjacent);return(n,i)=>(S(),R("div",ks,[k("div",{class:Ne(["row",{mergeAdjacent:s(t)}])},[Rt(n.$slots,"default")],2)]))}});function Tr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ra(e)}function fe(e,t="span"){return typeof e=="function"?X({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),X({template:e})):X({render:()=>({})}):e}function st(e){if(Et(e))return typeof e=="function"?e():fe(e);const t=e[dt];return d(t,e[lt](),null)}function Ti(...e){let t;return d(Ms,null,Tr(t=e.map(st))?t:{default:()=>[t]})}function Ss(...e){let t;return d(Cs,null,Tr(t=e.map(st))?t:{default:()=>[t]})}function wt(e){if(Et(e))return typeof e=="function"?e():typeof e=="string"?d(oe,null,[e]):d(e,null,null);const t=e[dt];return d(t,e[lt](),null)}function cr(e,t){return e.reduce((n,i)=>d(oe,null,[n,t,i]))}function Et(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Hn]===!0}function Pr(e,t){const n=G(null),i=G(void 0);function r(l){n.value||(n.value=setInterval(u,250)),i.value=l}function a(){n.value&&(clearInterval(n.value),n.value=null)}function u(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return wr(a),{start:r,stop:a,handleHolding:u}}function zi(e,t="div"){const n=bt();return $t(()=>{n.value=fe(Ee(e),t)}),n}function Dn(e,t="div"){const n=bt(null);return $t(()=>{const i=Ee(e);n.value=i==""||i==null?null:fe(i,t)}),n}function Ee(e){return s(s(e))}function q(...e){return e.includes(Object)||e.push(Object),e}function dr(e){const t=G(!1),n=e[lt].bind(e);return e[lt]=()=>({...n(),onPointerenter:()=>t.value=!0,onPointerleave:()=>t.value=!1}),t}var ve=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n};const Is=X({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var v;const n=G({}),i=new ResizeObserver(l),r=G(null);vi(()=>{const f=r.value;f!=null&&i.observe(f)});let a=!0,u=G((v=r.value)==null?void 0:v.getBoundingClientRect());function l(){a&&(a=!1,Gt(()=>{var f;u.value=(f=r.value)==null?void 0:f.getBoundingClientRect(),Object.values(n.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",n.value),a=!0}))}Je.on("fontsLoaded",l);const c={attributes:!1,childList:!0,subtree:!1};ai(Gi,(f,b)=>{const h=new MutationObserver(()=>p(f));h.observe(b,c),n.value[f]={element:b,observer:h,rect:b.getBoundingClientRect()},l()}),ai(Ui,f=>{var b;(b=n.value[f])==null||b.observer.disconnect(),n.value[f]=void 0,l()}),ai(Wi,n),ai(Hi,u);function p(f){const b=n.value[f];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",n.value))}return(f,b)=>(S(),R(oe,null,[Rt(f.$slots,"default",{},void 0,!0),k("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var Ar=ve(Is,[["__scopeId","data-v-2b1dc1bc"]]);const xs=["onPointerdown"],$s={class:"modal-wrapper"},Es={class:"modal-container"},Ds={class:"modal-header"},Ts={class:"modal-body"},Ps={class:"modal-footer"},As=k("div",{class:"modal-default-flex-grow"},null,-1),Ot=X({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const r=De(e),a=C(()=>s(r.modelValue)||l.value);function u(){n("update:modelValue",!1)}const l=G(!1),c=G(null),p=C(()=>{var v,f;return(f=(v=c.value)==null?void 0:v.nodes)!=null?f:null});return t({isOpen:a,nodes:p}),(v,f)=>(S(),ne(sa,{to:"#modal-root"},[d(Gn,{name:"modal",onBeforeEnter:f[0]||(f[0]=b=>l.value=!0),onAfterLeave:f[1]||(f[1]=b=>l.value=!1)},{default:Y(()=>[Vi(k("div",Ut({class:"modal-mask",onPointerdown:xn(u,["self"])},v.$attrs),[k("div",$s,[k("div",Es,[k("div",Ds,[Rt(v.$slots,"header",{shown:s(a)},()=>[_(" default header ")])]),k("div",Ts,[d(Ar,{ref_key:"contextRef",ref:c},{default:Y(()=>[Rt(v.$slots,"body",{shown:s(a)},()=>[_(" default body ")])]),_:3},512)]),k("div",Ps,[Rt(v.$slots,"footer",{shown:s(a)},()=>[k("div",{class:"modal-default-footer"},[As,k("button",{class:"button modal-default-button",onClick:u}," Close ")])])])])])],16,xs),[[aa,e.modelValue]])]),_:3})]))}}),Jt=Symbol("ProxyState");function Qe(e,t={}){const n=t;let i=!1,r=!1;function a(){if(!i){if(r)throw new Error("Cyclical dependency detected. Cannot evaluate lazy proxy.");r=!0,Object.assign(n,e.call(n,n)),i=!0}return n}return new Proxy(n,{get(u,l){if(l===Jt)return a();const c=a()[l];return c!=null&&typeof c=="object"&&At in c?c[At]:c},set(u,l,c){return a()[l]=c,!0},has(u,l){return l===Jt?!0:Reflect.has(a(),l)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(u,l){return i||(Object.assign(n,e.call(n,n)),i=!0),Object.getOwnPropertyDescriptor(u,l)}})}var Ue=window.state=Bi({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Rr=o.ln(10);function Ln(e){return e}function Rs(e,t){if(F(t))return t.invert(o.neg(e));throw new Error("Could not invert due to no input being a variable")}function Fs(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return m.neg(t.getIntegralFormula(e))}throw new Error("Could not integrate due to no input being a variable")}function Os(e){return m.neg(e)}function qs(e,t,n){if(F(t))return t.invert(o.sub(e,Se(n)));if(F(n))return n.invert(o.sub(e,Se(t)));throw new Error("Could not invert due to no input being a variable")}function Vs(e,t,n){var i,r;if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.times(n,(i=t.innermostVariable)!=null?i:0).add(a)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).add(a)}throw new Error("Could not integrate due to no input being a variable")}function Bs(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.add(i,n)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.add(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Ls(e,t,n){if(F(t))return t.invert(o.add(e,Se(n)));if(F(n))return n.invert(o.sub(Se(t),e));throw new Error("Could not invert due to no input being a variable")}function js(e,t,n){var i,r;if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=t.getIntegralFormula(e);return m.sub(a,m.times(n,(i=t.innermostVariable)!=null?i:0))}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const a=n.getIntegralFormula(e);return m.times(t,(r=n.innermostVariable)!=null?r:0).sub(a)}throw new Error("Could not integrate due to no input being a variable")}function zs(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.sub(i,n)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.sub(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Gs(e,t,n){if(F(t))return t.invert(o.div(e,Se(n)));if(F(n))return n.invert(o.div(e,Se(t)));throw new Error("Could not invert due to no input being a variable")}function Us(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.times(i,n)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.times(i,t)}throw new Error("Could not integrate due to no input being a variable")}function Ws(e,t,n){if(F(t))return m.div(e,n);if(F(n))return m.div(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function Hs(e,t,n){if(F(t))return t.invert(o.mul(e,Se(n)));if(F(n))return n.invert(o.div(Se(t),e));throw new Error("Could not invert due to no input being a variable")}function Ys(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.div(i,n)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.div(t,i)}throw new Error("Could not integrate due to no input being a variable")}function Zs(e,t,n){if(F(t))return m.mul(e,n);if(F(n))return m.mul(e,t);throw new Error("Could not apply substitution due to no input being a variable")}function Xs(e,t){if(F(t))return t.invert(o.recip(e));throw new Error("Could not invert due to no input being a variable")}function Ks(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.ln(n)}throw new Error("Could not integrate due to no input being a variable")}function Js(e,t){if(F(t))return t.invert(o.pow10(e));throw new Error("Could not invert due to no input being a variable")}function Qs(e){return o.ln(e).sub(1).times(e).div(Rr)}function eo(e,t){if(F(t)){const n=Rr.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function to(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:Qs,invert:eo})}throw new Error("Could not integrate due to no input being a variable")}function no(e,t,n){if(F(t))return t.invert(o.pow(Se(n),e));if(F(n))return n.invert(o.root(Se(t),e));throw new Error("Could not invert due to no input being a variable")}function io(e,t){return o.ln(e).sub(1).times(e).div(o.ln(t))}function ro(e,t,n){if(F(t)){const i=o.ln(Se(n)).times(e);return t.invert(i.div(i.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function ao(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e),n],evaluate:io,invert:ro})}throw new Error("Could not integrate due to no input being a variable")}function so(e,t){if(F(t))return t.invert(o.pow(2,e));throw new Error("Could not invert due to no input being a variable")}function oo(e){return o.ln(e).sub(1).times(e).div(o.ln(2))}function lo(e,t){if(F(t)){const n=o.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}throw new Error("Could not invert due to no input being a variable")}function uo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:oo,invert:lo})}throw new Error("Could not integrate due to no input being a variable")}function co(e,t){if(F(t))return t.invert(o.exp(e));throw new Error("Could not invert due to no input being a variable")}function po(e){return o.ln(e).sub(1).times(e)}function fo(e,t){if(F(t))return t.invert(o.div(e,o.div(e,Math.E).lambertw()));throw new Error("Could not invert due to no input being a variable")}function go(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");return new m({inputs:[t.getIntegralFormula(e)],evaluate:po,invert:fo})}throw new Error("Could not integrate due to no input being a variable")}function mo(e,t,n){if(F(t))return t.invert(o.root(e,Se(n)));if(F(n))return n.invert(o.ln(e).div(o.ln(Se(t))));throw new Error("Could not invert due to no input being a variable")}function vo(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e),r=m.add(n,1);return m.pow(i,r).div(r)}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e);return m.pow(t,i).div(m.ln(t))}throw new Error("Could not integrate due to no input being a variable")}function ho(e,t){if(F(t))return t.invert(o.root(e,10));throw new Error("Could not invert due to no input being a variable")}function bo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.pow10(n).div(m.ln(10))}throw new Error("Could not integrate due to no input being a variable")}function yo(e,t,n){if(F(t))return t.invert(o.ln(e).div(o.ln(Se(n))));if(F(n))return n.invert(o.root(Se(t),e));throw new Error("Could not invert due to no input being a variable")}function wo(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(n,i).div(m.ln(n))}else if(F(n)){if(!n.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=n.getIntegralFormula(e),r=m.add(t,1);return m.pow(i,r).div(r)}throw new Error("Could not integrate due to no input being a variable")}function _o(e,t,n){if(F(t))return t.invert(o.root(e,o.recip(Se(n))));if(F(n))return n.invert(o.ln(Se(t)).div(o.ln(e)));throw new Error("Could not invert due to no input being a variable")}function No(e,t,n){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const i=t.getIntegralFormula(e);return m.pow(i,m.recip(n).add(1)).times(n).div(m.add(n,1))}throw new Error("Could not integrate due to no input being a variable")}function Co(e,t){if(F(t))return t.invert(o.ln(e));throw new Error("Could not invert due to no input being a variable")}function ko(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.exp(n)}throw new Error("Could not integrate due to no input being a variable")}function Mo(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){const i=o.minabs(t,1e308).toNumber();return o.tetrate(e,i,n)}function So(e,t,n,i){if(F(t))return t.invert(o.ssqrt(e));throw new Error("Could not invert due to no input being a variable")}function Io(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){const i=o.minabs(t,1e308).toNumber();return o.iteratedexp(e,i,new o(n))}function xo(e,t,n,i){if(F(t))return t.invert(o.iteratedlog(e,Math.E,o.minabs(1e308,Se(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function $o(e,t=10,n=2){const i=o.minabs(n,1e308).toNumber();return o.iteratedlog(e,t,i)}function Eo(e,t=10){const n=o.minabs(t,1e308).toNumber();return o.slog(e,n)}function Do(e,t,n){if(F(t))return t.invert(o.tetrate(e,o.minabs(1e308,Se(n)).toNumber()));throw new Error("Could not invert due to no input being a variable")}function To(e,t,n){const i=o.minabs(t,1e308).toNumber();return o.layeradd(e,i,n)}function Po(e,t,n,i){if(F(t))return t.invert(o.layeradd(e,o.minabs(1e308,Se(n)).negate().toNumber()));throw new Error("Could not invert due to no input being a variable")}function Ao(e,t){if(F(t))return t.invert(o.pow(Math.E,e).times(e));throw new Error("Could not invert due to no input being a variable")}function Ro(e,t){if(F(t))return t.invert(o.tetrate(e,2));throw new Error("Could not invert due to no input being a variable")}function Fo(e,t,n){const i=o.minabs(t,1e308).toNumber();return o.pentate(e,i,n)}function Oo(e,t){if(F(t))return t.invert(o.asin(e));throw new Error("Could not invert due to no input being a variable")}function qo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).neg()}throw new Error("Could not integrate due to no input being a variable")}function Vo(e,t){if(F(t))return t.invert(o.acos(e));throw new Error("Could not invert due to no input being a variable")}function Bo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sin(n)}throw new Error("Could not integrate due to no input being a variable")}function Lo(e,t){if(F(t))return t.invert(o.atan(e));throw new Error("Could not invert due to no input being a variable")}function jo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cos(n).ln().neg()}throw new Error("Could not integrate due to no input being a variable")}function zo(e,t){if(F(t))return t.invert(o.sin(e));throw new Error("Could not invert due to no input being a variable")}function Go(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asin(n).times(n).add(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function Uo(e,t){if(F(t))return t.invert(o.cos(e));throw new Error("Could not invert due to no input being a variable")}function Wo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acos(n).times(n).sub(m.sqrt(m.sub(1,m.pow(n,2))))}throw new Error("Could not integrate due to no input being a variable")}function Ho(e,t){if(F(t))return t.invert(o.tan(e));throw new Error("Could not invert due to no input being a variable")}function Yo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atan(n).times(n).sub(m.ln(m.pow(n,2).add(1)).div(2))}throw new Error("Could not integrate due to no input being a variable")}function Zo(e,t){if(F(t))return t.invert(o.asinh(e));throw new Error("Could not invert due to no input being a variable")}function Xo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n)}throw new Error("Could not integrate due to no input being a variable")}function Ko(e,t){if(F(t))return t.invert(o.acosh(e));throw new Error("Could not invert due to no input being a variable")}function Jo(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.sinh(n)}throw new Error("Could not integrate due to no input being a variable")}function Qo(e,t){if(F(t))return t.invert(o.atanh(e));throw new Error("Could not invert due to no input being a variable")}function el(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.cosh(n).ln()}throw new Error("Could not integrate due to no input being a variable")}function tl(e,t){if(F(t))return t.invert(o.sinh(e));throw new Error("Could not invert due to no input being a variable")}function nl(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.asinh(n).times(n).sub(m.pow(n,2).add(1).sqrt())}throw new Error("Could not integrate due to no input being a variable")}function il(e,t){if(F(t))return t.invert(o.cosh(e));throw new Error("Could not invert due to no input being a variable")}function rl(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.acosh(n).times(n).sub(m.add(n,1).sqrt().times(m.sub(n,1).sqrt()))}throw new Error("Could not integrate due to no input being a variable")}function al(e,t){if(F(t))return t.invert(o.tanh(e));throw new Error("Could not invert due to no input being a variable")}function sl(e,t){if(F(t)){if(!t.isIntegrable())throw new Error("Could not integrate due to variable not being integrable");const n=t.getIntegralFormula(e);return m.atanh(n).times(n).add(m.sub(1,m.pow(n,2)).ln().div(2))}throw new Error("Could not integrate due to no input being a variable")}function Tn(e){return(t,n)=>new m({inputs:[t,n],evaluate:e,invert:Ln})}function F(e){return e instanceof Te&&e.hasVariable()}function Se(e,t){return e instanceof Te?e.evaluate(t):s(e)}function ol(){return m.pow(this,2).div(2)}function ll(){return this}const qe=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&At in n?n[At]:n)),"variable"in e?(typeof e.variable=="object"&&At in e.variable&&(e.variable=e.variable[At]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:ol,internalIntegrateInner:ll,applySubstitution:Ln}}setupConstant({inputs:e}){if(e.length!==1)throw new Error("Evaluate function is required if inputs is not length 1");return{inputs:e,internalVariables:0}}setupFormula(e){var b,h;const{inputs:t,evaluate:n,invert:i,integrate:r,integrateInner:a,applySubstitution:u}=e,l=t.reduce((y,N)=>y+(N instanceof qe?N.internalVariables:0),0),c=t.find(y=>y instanceof qe&&y.hasVariable()),p=l===1?c==null?void 0:c.innermostVariable:void 0,v=(b=c==null?void 0:c.isInvertible())!=null?b:!1,f=(h=c==null?void 0:c.isIntegrable())!=null?h:!1;return{inputs:t,internalEvaluate:n,internalInvert:v?i:void 0,internalIntegrate:f?r:void 0,internalIntegrateInner:a,applySubstitution:u,innermostVariable:p,internalVariables:l}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,i;return(i=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(r=>Se(r,e))))!=null?n:this.hasVariable()?e:null)!=null?i:Se(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof qe&&e.inputs[n]instanceof qe?t.equals(e.inputs[n]):!(t instanceof qe)&&!(e.inputs[n]instanceof qe)&&o.eq(s(t),s(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new m({inputs:[e]})}static variable(e){return new m({variable:e})}static step(e,t,n){const i=n(m.variable(0)),r=_e(t);function a(l){return o.lt(l,s(r))?l:o.add(i.evaluate(o.sub(l,s(r))),s(r))}function u(l,c){if(F(c)&&i.isInvertible())return o.gt(l,s(r))&&(l=o.add(i.invert(o.sub(l,s(r))),s(r))),c.invert(l);throw new Error("Could not invert due to no input being a variable")}return new m({inputs:[e],evaluate:a,invert:i.isInvertible()&&i.hasVariable()?u:void 0})}static if(e,t,n,i){const r=G(0),a=m.variable(r),u=n(a),l=i==null?void 0:i(a),c=_e(t);function p(f){return s(c)?(r.value=f,u.evaluate()):l?(r.value=f,l.evaluate()):f}function v(f,b){if(!F(b)||!u.isInvertible()||l!=null&&!l.isInvertible())throw new Error("Could not invert due to no input being a variable");return s(c)?b.invert(u.invert(f)):l?b.invert(l.invert(f)):b.invert(f)}return new m({inputs:[e],evaluate:p,invert:u.isInvertible()&&u.hasVariable()?v:void 0})}static conditional(e,t,n,i){return m.if(e,t,n,i)}static abs(e){return new m({inputs:[e],evaluate:o.abs})}static neg(e){return new m({inputs:[e],evaluate:o.neg,invert:Rs,applySubstitution:Os,integrate:Fs})}static sign(e){return new m({inputs:[e],evaluate:o.sign})}static round(e){return new m({inputs:[e],evaluate:o.round})}static floor(e){return new m({inputs:[e],evaluate:o.floor})}static ceil(e){return new m({inputs:[e],evaluate:o.ceil})}static trunc(e){return new m({inputs:[e],evaluate:o.trunc})}static add(e,t){return new m({inputs:[e,t],evaluate:o.add,invert:qs,integrate:Vs,integrateInner:Bs,applySubstitution:Ln})}static sub(e,t){return new m({inputs:[e,t],evaluate:o.sub,invert:Ls,integrate:js,integrateInner:zs,applySubstitution:Ln})}static mul(e,t){return new m({inputs:[e,t],evaluate:o.mul,invert:Gs,integrate:Us,applySubstitution:Ws})}static div(e,t){return new m({inputs:[e,t],evaluate:o.div,invert:Hs,integrate:Ys,applySubstitution:Zs})}static recip(e){return new m({inputs:[e],evaluate:o.recip,invert:Xs,integrate:Ks})}static clamp(e,t,n){return new m({inputs:[e,t,n],evaluate:o.clamp,invert:Ln})}static pLog10(e){return new m({inputs:[e],evaluate:o.pLog10})}static absLog10(e){return new m({inputs:[e],evaluate:o.absLog10})}static log10(e){return new m({inputs:[e],evaluate:o.log10,invert:Js,integrate:to})}static log(e,t){return new m({inputs:[e,t],evaluate:o.log,invert:no,integrate:ao})}static log2(e){return new m({inputs:[e],evaluate:o.log2,invert:so,integrate:uo})}static ln(e){return new m({inputs:[e],evaluate:o.ln,invert:co,integrate:go})}static pow(e,t){return new m({inputs:[e,t],evaluate:o.pow,invert:mo,integrate:vo})}static pow10(e){return new m({inputs:[e],evaluate:o.pow10,invert:ho,integrate:bo})}static pow_base(e,t){return new m({inputs:[e,t],evaluate:o.pow_base,invert:yo,integrate:wo})}static root(e,t){return new m({inputs:[e,t],evaluate:o.root,invert:_o,integrate:No})}static factorial(e){return new m({inputs:[e],evaluate:o.factorial})}static gamma(e){return new m({inputs:[e],evaluate:o.gamma})}static lngamma(e){return new m({inputs:[e],evaluate:o.lngamma})}static exp(e){return new m({inputs:[e],evaluate:o.exp,invert:Co,integrate:ko})}static sqr(e){return m.pow(e,2)}static sqrt(e){return m.root(e,2)}static cube(e){return m.pow(e,3)}static cbrt(e){return m.root(e,3)}static tetrate(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:Mo,invert:So})}static iteratedexp(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:Io,invert:xo})}static iteratedlog(e,t=10,n=1){return new m({inputs:[e,t,n],evaluate:$o})}static slog(e,t=10){return new m({inputs:[e,t],evaluate:Eo,invert:Do})}static layeradd10(e,t){return new m({inputs:[e,t],evaluate:o.layeradd10})}static layeradd(e,t,n=10){return new m({inputs:[e,t,n],evaluate:To,invert:Po})}static lambertw(e){return new m({inputs:[e],evaluate:o.lambertw,invert:Ao})}static ssqrt(e){return new m({inputs:[e],evaluate:o.ssqrt,invert:Ro})}static pentate(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new m({inputs:[e,t,n],evaluate:Fo})}static sin(e){return new m({inputs:[e],evaluate:o.sin,invert:zo,integrate:qo})}static cos(e){return new m({inputs:[e],evaluate:o.cos,invert:Uo,integrate:Bo})}static tan(e){return new m({inputs:[e],evaluate:o.tan,invert:Ho,integrate:jo})}static asin(e){return new m({inputs:[e],evaluate:o.asin,invert:Oo,integrate:Go})}static acos(e){return new m({inputs:[e],evaluate:o.acos,invert:Vo,integrate:Wo})}static atan(e){return new m({inputs:[e],evaluate:o.atan,invert:Lo,integrate:Yo})}static sinh(e){return new m({inputs:[e],evaluate:o.sinh,invert:tl,integrate:Xo})}static cosh(e){return new m({inputs:[e],evaluate:o.cosh,invert:il,integrate:Jo})}static tanh(e){return new m({inputs:[e],evaluate:o.tanh,invert:al,integrate:el})}static asinh(e){return new m({inputs:[e],evaluate:o.asinh,invert:Zo,integrate:nl})}static acosh(e){return new m({inputs:[e],evaluate:o.acosh,invert:Ko,integrate:rl})}static atanh(e){return new m({inputs:[e],evaluate:o.atanh,invert:Qo,integrate:sl})}step(e,t){return m.step(this,e,t)}if(e,t){return m.if(this,e,t)}conditional(e,t){return m.if(this,e,t)}abs(){return m.abs(this)}neg(){return m.neg(this)}sign(){return m.sign(this)}round(){return m.round(this)}floor(){return m.floor(this)}ceil(){return m.ceil(this)}trunc(){return m.trunc(this)}add(e){return m.add(this,e)}sub(e){return m.sub(this,e)}mul(e){return m.mul(this,e)}div(e){return m.div(this,e)}recip(){return m.recip(this)}max(e){return m.max(this,e)}min(e){return m.min(this,e)}maxabs(e){return m.maxabs(this,e)}minabs(e){return m.minabs(this,e)}clamp(e,t){return m.clamp(this,e,t)}clampMin(e){return m.clampMin(this,e)}clampMax(e){return m.clampMax(this,e)}pLog10(){return m.pLog10(this)}absLog10(){return m.absLog10(this)}log10(){return m.log10(this)}log(e){return m.log(this,e)}log2(){return m.log2(this)}ln(){return m.ln(this)}pow(e){return m.pow(this,e)}pow10(){return m.pow10(this)}pow_base(e){return m.pow_base(this,e)}root(e){return m.root(this,e)}factorial(){return m.factorial(this)}gamma(){return m.gamma(this)}lngamma(){return m.lngamma(this)}exp(){return m.exp(this)}sqr(){return m.pow(this,2)}sqrt(){return m.root(this,2)}cube(){return m.pow(this,3)}cbrt(){return m.root(this,3)}tetrate(e=2,t=o.fromComponents_noNormalize(1,0,1)){return m.tetrate(this,e,t)}iteratedexp(e=2,t=o.fromComponents_noNormalize(1,0,1)){return m.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return m.iteratedlog(this,e,t)}slog(e=10){return m.slog(this,e)}layeradd10(e){return m.layeradd10(this,e)}layeradd(e,t){return m.layeradd(this,e,t)}lambertw(){return m.lambertw(this)}ssqrt(){return m.ssqrt(this)}pentate(e=2,t=o.fromComponents_noNormalize(1,0,1)){return m.pentate(this,e,t)}sin(){return m.sin(this)}cos(){return m.cos(this)}tan(){return m.tan(this)}asin(){return m.asin(this)}acos(){return m.acos(this)}atan(){return m.atan(this)}sinh(){return m.sinh(this)}cosh(){return m.cosh(this)}tanh(){return m.tanh(this)}asinh(){return m.asinh(this)}acosh(){return m.acosh(this)}atanh(){return m.atanh(this)}};let Te=qe;Te.negate=qe.neg;Te.negated=qe.neg;Te.sgn=qe.sign;Te.plus=qe.add;Te.subtract=qe.sub;Te.minus=qe.sub;Te.multiply=qe.mul;Te.times=qe.mul;Te.divide=qe.div;Te.divideBy=qe.div;Te.dividedBy=qe.div;Te.reciprocal=qe.recip;Te.reciprocate=qe.recip;Te.max=Tn(o.max);Te.min=Tn(o.min);Te.minabs=Tn(o.minabs);Te.maxabs=Tn(o.maxabs);Te.clampMin=Tn(o.clampMin);Te.clampMax=Tn(o.clampMax);Te.logarithm=qe.log;class m extends Te{invert(t){if(this.internalInvert&&this.hasVariable())return this.internalInvert.call(this,t,...this.inputs);if(this.inputs.length===1&&this.hasVariable())return t;throw new Error("Cannot invert non-invertible formula")}evaluateIntegral(t){if(!this.isIntegrable())throw new Error("Cannot evaluate integral of formula without integral");return this.getIntegralFormula().evaluate(t)}invertIntegral(t){if(!this.isIntegrable()||!this.getIntegralFormula().isInvertible())throw new Error("Cannot invert integral of formula without invertible integral");return this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=o.add(this.evaluate(0),this.evaluate(1)).div(2);return o.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)throw new Error("Cannot integrate formula with non-integrable operation");let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(i=>n=i(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else throw new Error("Cannot integrate formula without variable");return this.integralFormula}else{if(this.applySubstitution==null)throw new Error("Cannot have two complex operations in an integrable formula");if(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner)return this.internalIntegrateInner.call(this,t,...this.inputs);if(this.internalIntegrate)return this.internalIntegrate.call(this,t,...this.inputs);if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())return this;throw new Error("Cannot integrate formula without variable")}}}function Fr(e,t,n=!0,i,r=o.dInf){const a=_e(n),u=_e(i),l=_e(r);return C(()=>{var b,h,y,N;const c=s(l);if(o.eq(c,1))return o.gte(t.value,e.evaluate())?o.dOne:o.dZero;const p=s(a),v=(b=s(u))!=null?b:p?10:0;let f=0;if(o.gt(c,v)){if(!e.isInvertible())throw new Error("Cannot calculate max affordable of non-invertible formula with more maxBulkAmount than directSum");if(p){if(!e.isIntegralInvertible())throw new Error("Cannot calculate max affordable of formula with non-invertible integral");f=o.floor(e.invertIntegral(o.add(t.value,e.evaluateIntegral()))).sub((h=s(e.innermostVariable))!=null?h:0)}else f=o.floor(e.invert(t.value))}if(f=o.clampMax(f,c),v>0){const E=f;f=o.sub(f,v).clampMin(0);let P;for(p?P=en(e,f,!0,0):P=e.evaluate(o.add((y=s(e.innermostVariable))!=null?y:0,f));o.lt(f,c)&&o.lt(f,Number.MAX_SAFE_INTEGER)&&o.add(E,1).gte(f);){const I=e.evaluate(f.add((N=s(e.innermostVariable))!=null?N:0));if(o.add(P,I).lte(t.value))f=f.add(1),P=o.add(P,I);else break}}return f})}function en(e,t,n=!0,i){var c;if(o.eq(t,1))return e.evaluate();const r=(c=s(e.innermostVariable))!=null?c:0;let a=o.add(t,r);const u=a;i!=null||(i=n?10:0),a=a.sub(i).clampMin(r);let l=0;if(o.gt(t,i)){if(!e.isInvertible())throw new Error("Cannot calculate cost with indirect sum of non-invertible formula");if(n){if(!e.isIntegrable())throw new Error("Cannot calculate cost with cumulative cost of non-integrable formula");if(l=o.sub(e.evaluateIntegral(a),e.evaluateIntegral()),u.gt(1e308))return o.add(l,o.sub(u,a).times(e.evaluate(a)))}else if(l=e.evaluate(a),a=a.add(1),u.gt(1e308))return o.sub(u,a).add(1).times(l)}for(let p=a.toNumber();pn.trim()).join(` -`))!=null?t:""}function pr(e,t){var n;if(o.isNaN(t))throw Ue.hasNaN||(Z.autosave=!1,Ue.hasNaN=!0,Ue.NaNPath=e[fn],Ue.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[fn])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[tn].value=t}function ot(e,t=!0){const n=Oe(e)?e:G(e);Oe(e)&&(e=e.value);const i=C({get(){return n.value},set(a){t?pr(r,a):r[tn].value=a}});i[Wt]=e;const r={get value(){return n.value},set value(a){t?pr(r,a):r[tn].value=a},__v_isRef:!0,[tn]:n,[Wt]:e,[pi]:ul(),[fi]:!1,[At]:i,[fn]:void 0};return ct.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,` -Created at: -`+r[pi]):gn[ct[ct.length-1]].add(r),r}function cl(e){return e!=null&&typeof e=="object"&&tn in e}function Cn(e){return!(Jt in e)&&At in e?e[At]:new Proxy(e,{get(t,n){if(n!==tn)return n===Xn?!0:t[n]},set(t,n,i){return t[n]=i,!0},has(t,n){return n===tn?!1:n==Xn?!0:Reflect.has(t,n)}})}function Or(e){ct.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):gn[ct[ct.length-1]].delete(e),e[fi]=!0}Je.on("addLayer",(e,t)=>{const n=[],i=(r,a=[])=>{let u=!1;return Object.keys(r).forEach(l=>{let c=r[l];if(c!=null&&typeof c=="object"){if(c[Xn]===!0)return;if(Jt in c&&(c=c[Jt]),cl(c)){if(u=!0,c[fi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,` -Created at: -`+c[pi]);return}gn[e.id].delete(c);const p=[e.id,...a,l];c[fn]!=null&&JSON.stringify(p)!==JSON.stringify(c[fn])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${c[fn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[fn]=p;const v=a.reduce((b,h)=>(h in b||(b[h]={}),b[h]),t),f=v[l];v[l]=c[tn],oa(v)?f!=null?v[l]=f:v[l]=c[Wt]:f!=null?v[l].value=f:v[l].value=c[Wt]}else!(c instanceof o)&&!(c instanceof m)&&!Oe(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),i(c,[...a,l])&&(Ft(c)&&!Ft(r)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Jt in r?r[Jt]:r,l):u=!0))}}),u};i(e[Jt]),gn[e.id].forEach(r=>{r[fi]||console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,r,` -Created at: -`+r[pi])}),gn[e.id].clear()});const Gi=Symbol("RegisterNode"),Ui=Symbol("UnregisterNode"),Wi=Symbol("Nodes"),Hi=Symbol("Bounds"),ge=Bi({});window.layers=ge;const gn={},ct=[];function Yi(e,t){return Qe(()=>{const n={},i=n.emitter=_r();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=G({}),n.id=e,ct.push(e),gn[e]=new Set,n.minimized=ot(!1,!1),Object.assign(n,t.call(n,n)),ct[ct.length-1]==null||ct[ct.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen -Stack: ${ct} -Trying to pop ${n.id}`;ct.pop(),T(n,"color"),T(n,"display"),T(n,"classes"),T(n,"style"),T(n,"name"),se(n,"name",n.id),T(n,"minWidth"),se(n,"minWidth",600),T(n,"minimizable"),se(n,"minimizable",!0),T(n,"minimizedDisplay");const r=n.style;return n.style=C(()=>{var u,l;let a=s(n.minWidth);return(typeof a=="number"||!Number.isNaN(parseInt(a)))&&(a=a+"px"),[(u=s(r))!=null?u:"",(l=n.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:a,flexBasis:a,margin:""}]}),n})}function Zi(e,t){if(console.info("Adding layer",e.id),ge[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ge[e.id]);return}se(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ge[e.id]=e,Je.emit("addLayer",e,t.layers[e.id])}function dl(e){return ge[e]}function Xi(e){console.info("Removing layer",e.id),Je.emit("removeLayer",e),ge[e.id]=void 0}function pl(e){Xi(e),Zi(e,Z)}function fl(e){const t=G(!1);return{openModal:()=>t.value=!0,modal:j(()=>d(Ot,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>d("h2",null,[s(e.name)]),body:s(e.display)}))}}Je.on("update",function(t){Object.values(ge).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("postUpdate",t)})});var gl=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Gi,UnregisterNodeInjectionKey:Ui,NodesInjectionKey:Wi,BoundsInjectionKey:Hi,layers:ge,persistentRefs:gn,addingLayers:ct,createLayer:Yi,addLayer:Zi,getLayer:dl,removeLayer:Xi,reloadLayer:pl,setupLayerModal:fl},Symbol.toStringTag,{value:"Module"}));const ml=X({components:{Context:Ar},props:{index:{type:Number,required:!0},display:{type:q(Object,String,Function),required:!0},minimizedDisplay:q(Object,String,Function),minimized:{type:Object,required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:i,minimizedDisplay:r}=De(e),a=zi(t),u=Dn(r),l=C(()=>we.allowGoBack&&n.value>0&&!Ee(i));function c(){Z.tabs.splice(s(e.index),1/0)}function p(v){e.nodes.value=v}return{component:a,minimizedComponent:u,showGoBack:l,updateNodes:p,unref:s,goBack:c}}}),vl={key:1};function hl(e,t,n,i,r,a){const u=kt("Context");return S(),R("div",{class:"layer-container",style:Be({"--layer-color":e.unref(e.color)})},[e.showGoBack?(S(),R("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...l)=>e.goBack&&e.goBack(...l))},"\u274C")):z("",!0),e.unref(e.minimized)?(S(),R("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=l=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(S(),ne(Ke(e.minimizedComponent),{key:0})):(S(),R("div",vl,pe(e.unref(e.name)),1))])):(S(),R("div",{key:2,class:Ne(["layer-tab",{showGoBack:e.showGoBack}])},[d(u,{onUpdateNodes:e.updateNodes},{default:Y(()=>[(S(),ne(Ke(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(S(),R("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=l=>e.$emit("setMinimized",!0))}," \u25BC ")):z("",!0)],4)}var bl=ve(ml,[["render",hl],["__scopeId","data-v-72dd78b1"]]);const qr=e=>(vn("data-v-4b4bda40"),e=e(),hn(),e),yl=qr(()=>k("h2",null,"Changelog",-1)),wl=qr(()=>k("details",{open:""},[k("summary",null,[_("v0.0 Initial Commit - "),k("time",null,"2021-09-04")]),_(" This is the first release :D "),k("ul",null,[k("li",{class:"feature"},"Did everything"),k("li",{class:"fix"},"Had some fun"),k("li",{class:"breaking"},"Removed everything"),k("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),_l=X({__name:"Changelog",setup(e,{expose:t}){const n=G(!1);return t({open(){n.value=!0}}),(i,r)=>(S(),ne(Ot,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=a=>n.value=a)},{header:Y(()=>[yl]),body:Y(()=>[wl]),_:1},8,["modelValue"]))}});var Nl=ve(_l,[["__scopeId","data-v-4b4bda40"]]),Cl=X({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:n,pinned:i}=De(e),r=G(!1),a=C(()=>(Ee(i)||r.value)&&u.value),u=Dn(n),l=bt(fe(j(()=>{const v=Ee(t);return v==null?"":wt(v)})));function c(v){const f=i;v.shiftKey&&f&&(f.value=!f.value,v.stopPropagation(),v.preventDefault())}const p=C(()=>Ee(i)&&Ct[te.theme].showPin);return{Direction:W,isHovered:r,isShown:a,comp:u,elementComp:l,unref:s,togglePinned:c,showPin:p}}});const kl={key:0,class:"material-icons pinned"};function Ml(e,t,n,i,r,a){return S(),R("div",{class:Ne(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=u=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=u=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...u)=>e.togglePinned&&e.togglePinned(...u))},[Rt(e.$slots,"default",{},void 0,!0),e.elementComp?(S(),ne(Ke(e.elementComp),{key:0})):z("",!0),d(Gn,{name:"fade"},{default:Y(()=>{var u;return[e.isShown?(S(),R("div",{key:0,class:Ne(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Be([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(u=e.unref(e.style))!=null?u:{}])},[e.showPin?(S(),R("span",kl,"push_pin")):z("",!0),e.comp?(S(),ne(Ke(e.comp),{key:1})):z("",!0)],6)):z("",!0)]}),_:1})],34)}var Fe=ve(Cl,[["render",Ml],["__scopeId","data-v-6102fa3a"]]);const yn=e=>(vn("data-v-4f97aa40"),e=e(),hn(),e),Sl={class:"info-modal-header"},Il=["src","alt"],xl={class:"info-modal-title"},$l={key:0},El={key:0},Dl={key:0},Tl=yn(()=>k("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),Pl=yn(()=>k("br",null,null,-1)),Al=yn(()=>k("br",null,null,-1)),Rl=["href"],Fl=yn(()=>k("span",{class:"material-icons info-modal-discord"},"discord",-1)),Ol=yn(()=>k("div",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[k("span",{class:"material-icons info-modal-discord"},"discord"),_(" The Paper Pilot Community ")])],-1)),ql=yn(()=>k("div",null,[k("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[k("span",{class:"material-icons info-modal-discord"},"discord"),_(" The Modding Tree ")])],-1)),Vl=yn(()=>k("br",null,null,-1));var Bl=X({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:i,logo:r,author:a,discordName:u,discordLink:l,versionNumber:c,versionTitle:p}=we,v=De(n),f=G(!1),b=C(()=>bi(Z.timePlayed)),h=C(()=>fe(j(()=>d(oe,null,[ws.map(st)]))));t({open(){f.value=!0}});function y(){var N;(N=s(v.changelog))==null||N.open()}return(N,E)=>(S(),ne(Ot,{modelValue:f.value,"onUpdate:modelValue":E[0]||(E[0]=P=>f.value=P)},{header:Y(()=>[k("div",Sl,[s(r)?(S(),R("img",{key:0,class:"info-modal-logo",src:s(r),alt:s(i)},null,8,Il)):z("",!0),k("div",xl,[k("h2",null,pe(s(i)),1),k("h4",null,[_(" v"+pe(s(c)),1),s(p)?(S(),R("span",$l,": "+pe(s(p)),1)):z("",!0)])])])]),body:Y(({shown:P})=>[P?(S(),R("div",El,[s(a)?(S(),R("div",Dl,"By "+pe(s(a)),1)):z("",!0),Tl,Pl,k("div",{class:"link",onClick:y},"Changelog"),Al,k("div",null,[s(l)?(S(),R("a",{key:0,href:s(l),class:"info-modal-discord-link",target:"_blank"},[Fl,_(" "+pe(s(u)),1)],8,Rl)):z("",!0)]),Ol,ql,Vl,k("div",null,"Time Played: "+pe(s(b)),1),(S(),ne(Ke(s(h))))])):z("",!0)]),_:1},8,["modelValue"]))}});var Ll=ve(Bl,[["__scopeId","data-v-4f97aa40"]]);const jl={class:"field"},zl={key:0,class:"field-title"},Ki=X({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const n=e,i=Dn(nn(n,"title"),"span"),r=G((u=n.options.find(l=>l.value===n.modelValue))!=null?u:null);ht(nn(n,"modelValue"),l=>{var c;Ee(r)!==l&&(r.value=(c=n.options.find(p=>p.value===l))!=null?c:null)});function a(l){t("update:modelValue",l.value)}return(l,c)=>(S(),R("div",jl,[s(i)?(S(),R("span",zl,[(S(),ne(Ke(s(i))))])):z("",!0),d(s(fa),{options:e.options,modelValue:r.value,"onUpdate:modelValue":[c[0]||(c[0]=p=>r.value=p),a],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const Gl={class:"field"},Ul=X({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=C(()=>{var a;return fe((a=s(n.title))!=null?a:"","span")}),r=C({get(){return!!n.modelValue},set(a){t("update:modelValue",a)}});return(a,u)=>(S(),R("label",Gl,[Vi(k("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=l=>Oe(r)?r.value=l:null)},null,512),[[la,s(r)]]),(S(),ne(Ke(s(i))))]))}});var It=ve(Ul,[["__scopeId","data-v-11046116"]]);const Wl=["onClick"],Hl=X({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=G(!1),i=G(null);function r(){t("click"),i.value&&clearTimeout(i.value),n.value=!1,Gt(()=>{n.value=!0,i.value=setTimeout(()=>n.value=!1,500)})}return(a,u)=>(S(),R("button",{onClick:xn(r,["stop"]),class:Ne(["feedback",{activated:n.value,left:e.left}])},[Rt(a.$slots,"default",{},void 0,!0)],10,Wl))}});var Vr=ve(Hl,[["__scopeId","data-v-01a1b95c"]]);const Yl={class:"header"},Zl=k("h2",null,"Settings",-1),Xl={class:"option-tabs"},Kl={key:0},Jl={key:1};var Ql=X({__name:"Options",setup(e,{expose:t}){const n=G(!1),i=G("behaviour");function r(le){return le==i.value}function a(le){i.value=le}t({isTab:r,setTab:a,save:mt,open(){n.value=!0}});const u=Object.keys(Ct).map(le=>({label:it(le),value:le})),l=C(()=>fe(j(()=>d(oe,null,[Er.map(st)])))),{showTPS:c,theme:p,unthrottled:v,alignUnits:f}=De(te),{autosave:b,offlineProd:h}=De(Z),y=C({get(){return Z.devSpeed===0},set(le){Z.devSpeed=le?0:null}}),N=j(()=>d("span",{class:"option-title"},[_("Unthrottled"),d("desc",null,[_("Allow the game to run as fast as possible. Not battery friendly.")])])),E=j(()=>d("span",{class:"option-title"},[_("Offline Production"),d(Fe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Simulate production that occurs while the game is closed.")])])),P=j(()=>d("span",{class:"option-title"},[_("Autosave"),d(Fe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Automatically save the game every second or when the game is closed.")])])),I=j(()=>d("span",{class:"option-title"},[_("Pause game"),d(Fe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Stop everything from moving.")])])),A=j(()=>d("span",{class:"option-title"},[_("Theme"),d("desc",null,[_("How the game looks.")])])),B=j(()=>d("span",{class:"option-title"},[_("Show TPS"),d("desc",null,[_("Show TPS meter at the bottom-left corner of the page.")])])),ce=j(()=>d("span",{class:"option-title"},[_("Align modifier units"),d("desc",null,[_("Align numbers to the beginning of the unit in modifier view.")])]));return(le,ie)=>(S(),ne(Ot,{modelValue:n.value,"onUpdate:modelValue":ie[10]||(ie[10]=Q=>n.value=Q)},{header:Y(()=>[k("div",Yl,[Zl,k("div",Xl,[k("button",{class:Ne({selected:r("behaviour")}),onClick:ie[0]||(ie[0]=Q=>a("behaviour"))},"Behaviour",2),k("button",{class:Ne({selected:r("appearance")}),onClick:ie[1]||(ie[1]=Q=>a("appearance"))},"Appearance",2)])])]),body:Y(()=>[r("behaviour")?(S(),R("div",Kl,[d(It,{title:s(N),modelValue:s(v),"onUpdate:modelValue":ie[2]||(ie[2]=Q=>Oe(v)?v.value=Q:null)},null,8,["title","modelValue"]),s(we).enablePausing?(S(),ne(It,{key:0,title:s(I),modelValue:s(y),"onUpdate:modelValue":ie[3]||(ie[3]=Q=>Oe(y)?y.value=Q:null)},null,8,["title","modelValue"])):z("",!0),d(It,{title:s(E),modelValue:s(h),"onUpdate:modelValue":ie[4]||(ie[4]=Q=>Oe(h)?h.value=Q:null)},null,8,["title","modelValue"]),d(It,{title:s(P),modelValue:s(b),"onUpdate:modelValue":ie[5]||(ie[5]=Q=>Oe(b)?b.value=Q:null)},null,8,["title","modelValue"]),s(b)?z("",!0):(S(),ne(Vr,{key:1,class:"button save-button",onClick:ie[6]||(ie[6]=Q=>s(mt)())},{default:Y(()=>[_("Manually save")]),_:1}))])):z("",!0),r("appearance")?(S(),R("div",Jl,[d(Ki,{title:s(A),options:s(u),modelValue:s(p),"onUpdate:modelValue":ie[7]||(ie[7]=Q=>Oe(p)?p.value=Q:null)},null,8,["title","options","modelValue"]),(S(),ne(Ke(s(l)))),d(It,{title:s(B),modelValue:s(c),"onUpdate:modelValue":ie[8]||(ie[8]=Q=>Oe(c)?c.value=Q:null)},null,8,["title","modelValue"]),d(It,{title:s(ce),modelValue:s(f),"onUpdate:modelValue":ie[9]||(ie[9]=Q=>Oe(f)?f.value=Q:null)},null,8,["title","modelValue"])])):z("",!0)]),_:1},8,["modelValue"]))}});const eu=["onSubmit"],tu={class:"field"},nu={key:0,class:"field-title"},iu=["placeholder"],ru=X({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,i=Dn(nn(n,"title"),"span"),r=bt(null);vi(()=>{var c;(c=r.value)==null||c.focus()});const a=C({get(){var c;return(c=s(n.modelValue))!=null?c:""},set(c){t("update:modelValue",c)}});function u(){t("submit")}function l(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(c,p)=>(S(),R("form",{onSubmit:xn(u,["prevent"])},[k("div",tu,[s(i)?(S(),R("span",nu,[(S(),ne(Ke(s(i))))])):z("",!0),e.textArea?(S(),ne(s(ma),{key:1,modelValue:s(a),"onUpdate:modelValue":p[0]||(p[0]=v=>Oe(a)?a.value=v:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:l,ref_key:"field",ref:r},null,8,["modelValue","placeholder","maxHeight"])):Vi((S(),R("input",{key:2,type:"text","onUpdate:modelValue":p[1]||(p[1]=v=>Oe(a)?a.value=v:null),placeholder:e.placeholder,class:Ne({fullWidth:!e.title}),onBlur:l,ref_key:"field",ref:r},null,42,iu)),[[ua,s(a)]])])],40,eu))}});var Br=ve(ru,[["__scopeId","data-v-90bd4994"]]);const au={key:0},su=["onClick","disabled"],ou={key:0},lu=["onClick"],uu=X({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=De(e),r=G(!1);ht(r,l=>{t("confirmingChanged",l)});function a(){if(s(i.skipConfirm)){t("click");return}r.value&&t("click"),r.value=!r.value}function u(){r.value=!1}return(l,c)=>(S(),R("span",{class:Ne(["container",{confirming:r.value}])},[r.value?(S(),R("span",au,"Are you sure?")):z("",!0),k("button",{onClick:xn(a,["stop"]),class:"button danger",disabled:e.disabled},[r.value?(S(),R("span",ou,"Yes")):Rt(l.$slots,"default",{key:1},void 0,!0)],8,su),r.value?(S(),R("button",{key:1,class:"button",onClick:xn(u,["stop"])},"No",8,lu)):z("",!0)],2))}});var cu=ve(uu,[["__scopeId","data-v-2f8ef34c"]]);const Yt=e=>(vn("data-v-32313015"),e=e(),hn(),e),du=Yt(()=>k("div",{class:"handle material-icons"},"drag_handle",-1)),pu={key:0,class:"actions"},fu=Yt(()=>k("span",{class:"material-icons"},"content_paste",-1)),gu=Yt(()=>k("span",{class:"material-icons"},"content_copy",-1)),mu=Yt(()=>k("span",{class:"material-icons"},"edit",-1)),vu=Yt(()=>k("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),hu={key:1,class:"actions"},bu=Yt(()=>k("span",{class:"material-icons"},"check",-1)),yu=Yt(()=>k("span",{class:"material-icons"},"close",-1)),wu={key:2,class:"details"},_u={class:"save-version"},Nu=Yt(()=>k("br",null,null,-1)),Cu={key:0},ku={key:3,class:"details"},Mu={key:4,class:"details error"},Su=Yt(()=>k("br",null,null,-1)),Iu=X({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:i}=De(n),r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=G(!1),u=G(!1),l=G("");ht(a,()=>{var f;return l.value=(f=i.value.name)!=null?f:""});const c=C(()=>i.value!=null&&i.value.id===Z.id),p=C(()=>{var f;return c.value?Z.time:(f=i.value!=null&&i.value.time)!=null?f:0});function v(){t("editName",l.value),a.value=!1}return(f,b)=>(S(),R("div",{class:Ne(["save",{active:s(c)}])},[du,a.value?(S(),R("div",hu,[k("button",{onClick:v,class:"button"},[d(Fe,{display:"Save",direction:s(W).Left,class:"info"},{default:Y(()=>[bu]),_:1},8,["direction"])]),k("button",{onClick:b[5]||(b[5]=h=>a.value=!a.value),class:"button"},[d(Fe,{display:"Cancel",direction:s(W).Left,class:"info"},{default:Y(()=>[yu]),_:1},8,["direction"])])])):(S(),R("div",pu,[s(i).error==null&&!u.value?(S(),ne(Vr,{key:0,onClick:b[0]||(b[0]=h=>t("export")),class:"button",left:""},{default:Y(()=>[d(Fe,{display:"Export",direction:s(W).Left,class:"info"},{default:Y(()=>[fu]),_:1},8,["direction"])]),_:1})):z("",!0),s(i).error==null&&!u.value?(S(),R("button",{key:1,onClick:b[1]||(b[1]=h=>t("duplicate")),class:"button"},[d(Fe,{display:"Duplicate",direction:s(W).Left,class:"info"},{default:Y(()=>[gu]),_:1},8,["direction"])])):z("",!0),s(i).error==null&&!u.value?(S(),R("button",{key:2,onClick:b[2]||(b[2]=h=>a.value=!a.value),class:"button"},[d(Fe,{display:"Edit Name",direction:s(W).Left,class:"info"},{default:Y(()=>[mu]),_:1},8,["direction"])])):z("",!0),d(cu,{disabled:s(c),onClick:b[3]||(b[3]=h=>t("delete")),onConfirmingChanged:b[4]||(b[4]=h=>u.value=h)},{default:Y(()=>[d(Fe,{display:"Delete",direction:s(W).Left,class:"info"},{default:Y(()=>[vu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),s(i).error==null&&!a.value?(S(),R("div",wu,[k("button",{class:"button open",onClick:b[6]||(b[6]=h=>t("open"))},[k("h3",null,pe(s(i).name),1)]),k("span",_u,"v"+pe(s(i).modVersion),1),Nu,s(p)?(S(),R("div",Cu,"Last played "+pe(s(r).format(s(p))),1)):z("",!0)])):s(i).error==null&&a.value?(S(),R("div",ku,[d(Br,{modelValue:l.value,"onUpdate:modelValue":b[7]||(b[7]=h=>l.value=h),class:"editname",onSubmit:v},null,8,["modelValue"])])):(S(),R("div",Mu,[_(" Error: Failed to load save with id "+pe(s(i).id),1),Su,_(pe(s(i).error),1)]))],2))}});var xu=ve(Iu,[["__scopeId","data-v-32313015"]]);const Ji=e=>(vn("data-v-2a4275be"),e=e(),hn(),e),$u=Ji(()=>k("h2",null,"Saves Manager",-1)),Eu={class:"modal-footer"},Du={class:"field"},Tu=Ji(()=>k("span",{class:"field-title"},"Create Save",-1)),Pu={class:"field-buttons"},Au={class:"footer"},Ru=Ji(()=>k("div",{style:{"flex-grow":"1"}},null,-1)),Fu=X({__name:"SavesManager",setup(e,{expose:t}){const n=G(!1),i=G(null);t({open(){n.value=!0}});const r=G(!1),a=G(""),u=G(null);ht(a,I=>{I?Gt(()=>{try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Qt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I),r.value=!0;return}const A=JSON.parse(I);if(typeof A!="object"){r.value=!0;return}const B=ui();A.id=B,mt(A),a.value="",r.value=!1,te.saves.push(B)}catch{r.value=!0}}):r.value=!1});let l={},c=G(Object.keys(l).reduce((I,A)=>(I.push({label:A.split("/").slice(-1)[0].slice(0,-4),value:l[A]}),I),[]));const p=Bi({});function v(I){if(p[I]==null){let A=localStorage.getItem(I);if(A==null)p[I]={error:"Save doesn't exist in localStorage",id:I};else if(A==="dW5kZWZpbmVk")p[I]={error:"Save is undefined",id:I};else try{if(A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Qt.decompressFromUTF16(A);else return console.warn("Unable to determine preset encoding",A),r.value=!0,p[I]={error:"Unable to determine preset encoding",id:I},p[I];p[I]={...JSON.parse(A),id:I}}catch(B){p[I]={error:B,id:I},console.warn(`SavesManager: Failed to load info about save with id ${I}: -${B} -${A}`)}}return p[I]}ht(n,I=>{I&&Object.keys(p).forEach(A=>delete p[A])});const f=C(()=>te.saves.reduce((I,A)=>(I[A]=v(A),I),{}));function b(I){let A;switch(Z.id===I?A=xr(Z):A=JSON.stringify(f.value[I]),we.exportEncoding){default:console.warn(`Unknown save encoding: ${we.exportEncoding}. Defaulting to lz`);case"lz":A=Qt.compressToUTF16(A);break;case"base64":A=btoa(unescape(encodeURIComponent(A)));break;case"plain":break}const B=document.createElement("textarea");B.value=A,document.body.appendChild(B),B.select(),B.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(B)}function h(I){Z.id===I&&mt();const A={...f.value[I],id:ui()};mt(A),te.saves.push(A.id)}function y(I){te.saves=te.saves.filter(A=>A!==I),localStorage.removeItem(I),p[I]=void 0}function N(I){f.value[Z.id].time=Z.time,mt(),p[Z.id]=void 0,pn(f.value[I]),p[I]=void 0}function E(I){if(u.value=I,Gt(()=>{u.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Qt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const A=JSON.parse(I);A.id=ui(),mt(A),te.saves.push(A.id),N(A.id)}function P(I,A){const B=f.value[I];B!=null&&(B.name=A,Z.id===I?(Z.name=A,mt()):(mt(B),p[I]=void 0))}return(I,A)=>(S(),ne(Ot,{modelValue:n.value,"onUpdate:modelValue":A[4]||(A[4]=B=>n.value=B),ref_key:"modal",ref:i},{header:Y(()=>[$u]),body:Y(({shown:B})=>[B?(S(),ne(s(ga),{key:0,list:s(te).saves,handle:".handle",itemKey:ce=>ce},{item:Y(({element:ce})=>[d(xu,{save:s(f)[ce],onOpen:le=>N(ce),onExport:le=>b(ce),onEditName:le=>P(ce,le),onDuplicate:le=>h(ce),onDelete:le=>y(ce)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):z("",!0)]),footer:Y(()=>[k("div",Eu,[d(Br,{modelValue:a.value,"onUpdate:modelValue":A[0]||(A[0]=B=>a.value=B),title:"Import Save",placeholder:"Paste your save here!",class:Ne({importingFailed:r.value})},null,8,["modelValue","class"]),k("div",Du,[Tu,k("div",Pu,[k("button",{class:"button",onClick:A[1]||(A[1]=B=>N(s(In)().id))},"New Game"),Object.keys(s(c)).length>0?(S(),ne(Ki,{key:0,options:s(c),modelValue:u.value,"onUpdate:modelValue":A[2]||(A[2]=B=>E(B)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):z("",!0)])]),k("div",Au,[Ru,k("button",{class:"button modal-default-button",onClick:A[3]||(A[3]=B=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Lr=ve(Fu,[["__scopeId","data-v-2a4275be"]]);const _t=e=>(vn("data-v-318a1c31"),e=e(),hn(),e),Ou=["src","alt"],qu={key:1,class:"title"},Vu=_t(()=>k("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Bu={class:"discord"},Lu={class:"discord-links"},ju={key:0},zu=["href"],Gu=_t(()=>k("li",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),Uu=_t(()=>k("li",null,[k("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Wu={href:"https://forums.moddingtree.com/",target:"_blank"},Hu=_t(()=>k("span",{class:"material-icons"},"forum",-1)),Yu=_t(()=>k("span",{class:"material-icons"},"info",-1)),Zu=_t(()=>k("span",{class:"material-icons"},"library_books",-1)),Xu=_t(()=>k("span",{class:"material-icons"},"settings",-1)),Ku=_t(()=>k("span",{class:"material-icons"},"library_books",-1)),Ju=_t(()=>k("span",{class:"material-icons"},"settings",-1)),Qu=_t(()=>k("span",{class:"material-icons"},"info",-1)),ec={href:"https://forums.moddingtree.com/",target:"_blank"},tc=_t(()=>k("span",{class:"material-icons"},"forum",-1)),nc={class:"discord"},ic={class:"discord-links"},rc={key:0},ac=["href"],sc=_t(()=>k("li",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),oc=_t(()=>k("li",null,[k("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),lc=X({__name:"Nav",setup(e){const t=G(null),n=G(null),i=G(null),r=G(null),{useHeader:a,banner:u,title:l,discordName:c,discordLink:p,versionNumber:v}=we;function f(){window.open(p,"mywindow")}return(b,h)=>(S(),R(oe,null,[s(a)?(S(),R("div",Ut({key:0,class:"nav"},b.$attrs),[s(u)?(S(),R("img",{key:0,src:s(u),class:"banner",alt:s(l)},null,8,Ou)):(S(),R("div",qu,pe(s(l)),1)),k("div",{onClick:h[0]||(h[0]=y=>{var N;return(N=r.value)==null?void 0:N.open()}),class:"version-container"},[d(Fe,{display:"Changelog",direction:s(W).Down,class:"version"},{default:Y(()=>[k("span",null,"v"+pe(s(v)),1)]),_:1},8,["direction"])]),Vu,k("div",Bu,[k("span",{onClick:f,class:"material-icons"},"discord"),k("ul",Lu,[s(p)?(S(),R("li",ju,[k("a",{href:s(p),target:"_blank"},pe(s(c)),9,zu)])):z("",!0),Gu,Uu])]),k("div",null,[k("a",Wu,[d(Fe,{display:"Forums",direction:s(W).Down,yoffset:"5px"},{default:Y(()=>[Hu]),_:1},8,["direction"])])]),k("div",{onClick:h[1]||(h[1]=y=>{var N;return(N=t.value)==null?void 0:N.open()})},[d(Fe,{display:"Info",direction:s(W).Down,class:"info"},{default:Y(()=>[Yu]),_:1},8,["direction"])]),k("div",{onClick:h[2]||(h[2]=y=>{var N;return(N=n.value)==null?void 0:N.open()})},[d(Fe,{display:"Saves",direction:s(W).Down,xoffset:"-20px"},{default:Y(()=>[Zu]),_:1},8,["direction"])]),k("div",{onClick:h[3]||(h[3]=y=>{var N;return(N=i.value)==null?void 0:N.open()})},[d(Fe,{display:"Settings",direction:s(W).Down,xoffset:"-66px"},{default:Y(()=>[Xu]),_:1},8,["direction"])])],16)):(S(),R("div",Ut({key:1,class:"overlay-nav"},b.$attrs),[k("div",{onClick:h[4]||(h[4]=y=>{var N;return(N=r.value)==null?void 0:N.open()}),class:"version-container"},[d(Fe,{display:"Changelog",direction:s(W).Right,xoffset:"25%",class:"version"},{default:Y(()=>[k("span",null,"v"+pe(s(v)),1)]),_:1},8,["direction"])]),k("div",{onClick:h[5]||(h[5]=y=>{var N;return(N=n.value)==null?void 0:N.open()})},[d(Fe,{display:"Saves",direction:s(W).Right},{default:Y(()=>[Ku]),_:1},8,["direction"])]),k("div",{onClick:h[6]||(h[6]=y=>{var N;return(N=i.value)==null?void 0:N.open()})},[d(Fe,{display:"Settings",direction:s(W).Right},{default:Y(()=>[Ju]),_:1},8,["direction"])]),k("div",{onClick:h[7]||(h[7]=y=>{var N;return(N=t.value)==null?void 0:N.open()})},[d(Fe,{display:"Info",direction:s(W).Right},{default:Y(()=>[Qu]),_:1},8,["direction"])]),k("div",null,[k("a",ec,[d(Fe,{display:"Forums",direction:s(W).Right,xoffset:"7px"},{default:Y(()=>[tc]),_:1},8,["direction"])])]),k("div",nc,[k("span",{onClick:f,class:"material-icons"},"discord"),k("ul",ic,[s(p)?(S(),R("li",rc,[k("a",{href:s(p),target:"_blank"},pe(s(c)),9,ac)])):z("",!0),sc,oc])])],16)),d(Ll,{ref_key:"info",ref:t,changelog:r.value},null,8,["changelog"]),d(Lr,{ref_key:"savesManager",ref:n},null,512),d(Ql,{ref_key:"options",ref:i},null,512),d(Nl,{ref_key:"changelog",ref:r},null,512)],64))}});var jr=ve(lc,[["__scopeId","data-v-318a1c31"]]);const uc={class:"inner-tab"},cc=X({__name:"Game",setup(e){const t=nn(Z,"tabs"),n=C(()=>Object.keys(ge)),i=we.useHeader;function r(a){const{display:u,minimized:l,name:c,color:p,minimizable:v,nodes:f,minimizedDisplay:b}=a;return{display:u,minimized:l,name:c,color:p,minimizable:v,nodes:f,minimizedDisplay:b}}return(a,u)=>(S(),R("div",{class:Ne(["tabs-container",{useHeader:s(i)}])},[(S(!0),R(oe,null,$n(s(t),(l,c)=>{var p,v;return S(),R("div",{key:c,class:Ne(["tab",s((p=s(ge)[l])==null?void 0:p.classes)]),style:Be(s((v=s(ge)[l])==null?void 0:v.style))},[c===0&&!s(i)?(S(),ne(jr,{key:0})):z("",!0),k("div",uc,[s(n).includes(l)?(S(),ne(bl,Ut({key:0},r(s(ge)[l]),{index:c,onSetMinimized:f=>s(ge)[l].minimized.value=f}),null,16,["index","onSetMinimized"])):(S(),ne(Ke(l),{key:1,index:c},null,8,["index"]))])],6)}),128))],2))}});var dc=ve(cc,[["__scopeId","data-v-dcd207b4"]]);const pc=X({__name:"Sticky",setup(e){const t=G("0"),n=new ResizeObserver(r),i=bt(null);function r(){let a=i.value;if(a==null)return;let u=0;for(;a.previousSibling;){const l=a.previousSibling;l.dataset&&"vSticky"in l.dataset&&(u+=l.offsetHeight),a=l}t.value=u+"px"}return Gt(r),document.fonts.ready.then(r),vi(()=>{var u;const a=(u=i.value)==null?void 0:u.parentElement;a&&n.observe(a)}),(a,u)=>(S(),R("div",{class:"sticky",style:Be({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Rt(a.$slots,"default",{},void 0,!0)],4))}});var gi=ve(pc,[["__scopeId","data-v-cccac690"]]);const fc=["x1","y1","x2","y2"],gc=X({__name:"BoardLink",props:{link:null,dragging:null,dragged:null},setup(e){const n=De(e),i=C(()=>{var u,l,c,p,v,f,b;const a={...n.link.value.startNode.position};return n.link.value.offsetStart&&(a.x+=s(n.link.value.offsetStart).x,a.y+=s(n.link.value.offsetStart).y),((u=n.dragging)==null?void 0:u.value)===n.link.value.startNode&&(a.x+=(p=(c=(l=n.dragged)==null?void 0:l.value)==null?void 0:c.x)!=null?p:0,a.y+=(b=(f=(v=n.dragged)==null?void 0:v.value)==null?void 0:f.y)!=null?b:0),a}),r=C(()=>{var u,l,c,p,v,f,b;const a={...n.link.value.endNode.position};return n.link.value.offsetEnd&&(a.x+=s(n.link.value.offsetEnd).x,a.y+=s(n.link.value.offsetEnd).y),((u=n.dragging)==null?void 0:u.value)===n.link.value.endNode&&(a.x+=(p=(c=(l=n.dragged)==null?void 0:l.value)==null?void 0:c.x)!=null?p:0,a.y+=(b=(f=(v=n.dragged)==null?void 0:v.value)==null?void 0:f.y)!=null?b:0),a});return(a,u)=>(S(),R("line",Ut({class:"link"},e.link,{class:{pulsing:e.link.pulsing},x1:s(i).x,y1:s(i).y,x2:s(r).x,y2:s(r).y}),null,16,fc))}});var mc=ve(gc,[["__scopeId","data-v-58e8d695"]]);const vc={key:0},hc=["transform","onMousedown","onTouchstart","onMouseup","onTouchend"],bc=["fill","stroke-width","stroke"],yc=["fill"],wc=X({__name:"BoardNodeAction",props:{node:null,nodeType:null,actions:null,isSelected:{type:Boolean},selectedAction:null},emits:["clickAction"],setup(e,{emit:t}){const i=De(e),r=C(()=>me(i.nodeType.value.size,s(i.node))),a=C(()=>{var v;return(v=me(i.nodeType.value.outlineColor,s(i.node)))!=null?v:Ct[te.theme].variables["--outline"]}),u=C(()=>{var v;return(v=me(i.nodeType.value.titleColor,s(i.node)))!=null?v:Ct[te.theme].variables["--foreground"]}),l=C(()=>me(i.nodeType.value.actionDistance,s(i.node)));function c(v,f){t("clickAction",f.id),v.preventDefault(),v.stopPropagation()}function p(v,f){var b;((b=s(i.selectedAction))==null?void 0:b.id)===f.id&&(v.preventDefault(),v.stopPropagation())}return(v,f)=>(S(),ne(Gn,{name:"actions",appear:""},{default:Y(()=>[e.isSelected&&e.actions?(S(),R("g",vc,[(S(!0),R(oe,null,$n(e.actions,(b,h)=>{var y,N;return S(),R("g",{key:b.id,class:Ne(["action",{selected:((y=e.selectedAction)==null?void 0:y.id)===b.id}]),transform:`translate( - ${(-s(r)-30)*Math.sin(((e.actions.length-1)/2-h)*s(l))}, - ${(s(r)+30)*Math.cos(((e.actions.length-1)/2-h)*s(l))} - )`,onMousedown:E=>c(E,b),onTouchstart:E=>c(E,b),onMouseup:E=>p(E,b),onTouchend:xn(E=>p(E,b),["stop"])},[k("circle",{fill:s(me)(b.fillColor,e.node),r:"20","stroke-width":((N=e.selectedAction)==null?void 0:N.id)===b.id?4:0,stroke:s(a)},null,8,bc),k("text",{fill:s(u),class:"material-icons"},pe(s(me)(b.icon,e.node)),9,yc)],42,hc)}),128))])):z("",!0)]),_:1}))}});var _c=ve(wc,[["__scopeId","data-v-9efb2a56"]]);const Nc=["transform"],Cc={key:0},kc=["r","fill","stroke"],Mc=["r","fill","stroke"],Sc=["r","fill"],Ic=["r","stroke-dasharray","stroke-dashoffset","stroke"],xc={key:1,transform:"rotate(45, 0, 0)"},$c=["width","height","transform","fill","stroke"],Ec=["width","height","transform","fill","stroke"],Dc=["width","height","transform","fill"],Tc=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],Pc=["fill","y"],Ac=["fill"],Rc=["fill","y"],Fc={key:0},Oc=["fill","y"],qc=["fill","y"],Vc=X({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},isSelected:{type:Boolean},selectedAction:null},emits:["mouseDown","endDragging","clickAction"],setup(e,{emit:t}){const n=e,i=Math.sqrt(2),r=De(n),a=C(()=>me(r.nodeType.value.draggable,s(r.node)));ht(a,U=>{const be=s(r.node);s(r.dragging)===be&&!U&&t("endDragging",be)});const u=C(()=>{var be;const U=s(r.node);return(be=me(r.nodeType.value.actions,U))==null?void 0:be.filter(je=>He(me(je.visibility,U)))}),l=C(()=>{var be;const U=s(r.node);if(me(r.nodeType.value.draggable,U)&&((be=s(r.dragging))==null?void 0:be.id)===U.id&&s(r.dragged)!=null){const{x:je,y:pt}=s(r.dragged);return{x:U.position.x+Math.round(je/25)*25,y:U.position.y+Math.round(pt/25)*25}}return U.position}),c=C(()=>me(r.nodeType.value.shape,s(r.node))),p=C(()=>me(r.nodeType.value.title,s(r.node))),v=C(()=>me(r.nodeType.value.subtitle,s(r.node))),f=C(()=>me(r.nodeType.value.otherSubtitle,s(r.node))),b=C(()=>{var U;return(U=r.isSelected.value?s(r.selectedAction)&&me(s(r.selectedAction).tooltip,s(r.node)):null)!=null?U:me(r.nodeType.value.label,s(r.node))}),h=C(()=>{var U,be;return me((be=(U=s(r.selectedAction))==null?void 0:U.confirmationLabel)!=null?be:{text:"Tap again to confirm"},s(r.node))}),y=C(()=>me(r.nodeType.value.size,s(r.node))),N=C(()=>{var U;return(U=me(r.nodeType.value.progress,s(r.node)))!=null?U:0}),E=C(()=>Ct[te.theme].variables["--background"]),P=C(()=>{var U;return(U=me(r.nodeType.value.outlineColor,s(r.node)))!=null?U:Ct[te.theme].variables["--outline"]}),I=C(()=>{var U;return(U=me(r.nodeType.value.fillColor,s(r.node)))!=null?U:Ct[te.theme].variables["--raised-background"]}),A=C(()=>me(r.nodeType.value.progressColor,s(r.node))),B=C(()=>{var U;return(U=me(r.nodeType.value.titleColor,s(r.node)))!=null?U:Ct[te.theme].variables["--foreground"]}),ce=C(()=>me(r.nodeType.value.progressDisplay,s(r.node))),le=C(()=>r.dragging.value!=null&&s(r.hasDragged)&&me(r.nodeType.value.canAccept,s(r.node),r.dragging.value)),ie=C(()=>me(r.nodeType.value.style,s(r.node))),Q=C(()=>me(r.nodeType.value.classes,s(r.node)));function Ie(U){t("mouseDown",U,r.node.value,a.value)}function he(U){var be,je,pt;(be=r.hasDragged)!=null&&be.value||(t("endDragging",r.node.value),(pt=(je=r.nodeType.value).onClick)==null||pt.call(je,r.node.value),U.stopPropagation())}return(U,be)=>{var je,pt,Lt;return S(),R("g",{class:Ne(["boardnode",{[e.node.type]:!0,isSelected:e.isSelected,isDraggable:s(a),...s(Q)}]),style:Be([{opacity:((je=e.dragging)==null?void 0:je.id)===e.node.id&&e.hasDragged?.5:1},(pt=s(ie))!=null?pt:[]]),transform:`translate(${s(l).x},${s(l).y})${e.isSelected?" scale(1.2)":""}`},[d(_c,{actions:(Lt=s(u))!=null?Lt:[],"is-selected":e.isSelected,node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction,onClickAction:be[0]||(be[0]=ft=>t("clickAction",ft))},null,8,["actions","is-selected","node","node-type","selected-action"]),k("g",{class:"node-container",onMousedown:Ie,onTouchstartPassive:Ie,onMouseup:he,onTouchendPassive:he},[s(c)===s(Le).Circle?(S(),R("g",Cc,[s(le)?(S(),R("circle",{key:0,class:"receiver",r:s(y)+8,fill:s(E),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,kc)):z("",!0),k("circle",{class:"body",r:s(y),fill:s(I),stroke:s(P),"stroke-width":4},null,8,Mc),s(ce)===s(rn).Fill?(S(),R("circle",{key:1,class:"progress progressFill",r:Math.max(s(y)*s(N)-2,0),fill:s(A)},null,8,Sc)):(S(),R("circle",{key:2,r:s(y)+4.5,class:"progress progressRing",fill:"transparent","stroke-dasharray":(s(y)+4.5)*2*Math.PI,"stroke-width":5,"stroke-dashoffset":(s(y)+4.5)*2*Math.PI-s(N)*(s(y)+4.5)*2*Math.PI,stroke:s(A)},null,8,Ic))])):s(c)===s(Le).Diamond?(S(),R("g",xc,[s(le)?(S(),R("rect",{key:0,class:"receiver",width:s(y)*s(i)+16,height:s(y)*s(i)+16,transform:`translate(${-(s(y)*s(i)+16)/2}, ${-(s(y)*s(i)+16)/2})`,fill:s(E),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,$c)):z("",!0),k("rect",{class:"body",width:s(y)*s(i),height:s(y)*s(i),transform:`translate(${-s(y)*s(i)/2}, ${-s(y)*s(i)/2})`,fill:s(I),stroke:s(P),"stroke-width":4},null,8,Ec),s(ce)===s(rn).Fill?(S(),R("rect",{key:1,class:"progress progressFill",width:Math.max(s(y)*s(i)*s(N)-2,0),height:Math.max(s(y)*s(i)*s(N)-2,0),transform:`translate(${-Math.max(s(y)*s(i)*s(N)-2,0)/2}, ${-Math.max(s(y)*s(i)*s(N)-2,0)/2})`,fill:s(A)},null,8,Dc)):(S(),R("rect",{key:2,class:"progress progressDiamond",width:s(y)*s(i)+9,height:s(y)*s(i)+9,transform:`translate(${-(s(y)*s(i)+9)/2}, ${-(s(y)*s(i)+9)/2})`,fill:"transparent","stroke-dasharray":(s(y)*s(i)+9)*4,"stroke-width":5,"stroke-dashoffset":(s(y)*s(i)+9)*4-s(N)*(s(y)*s(i)+9)*4,stroke:s(A)},null,8,Tc))])):z("",!0),k("text",{fill:s(B),class:"node-title",y:s(f)&&!s(v)?-10:0},pe(s(p)),9,Pc),s(v)?(S(),R("text",{key:2,fill:s(B),class:"node-subtitle",y:"-25"},pe(s(v)),9,Ac)):z("",!0),s(f)?(S(),R("text",{key:3,fill:s(B),class:"node-subtitle",y:s(v)?25:15},pe(s(f)),9,Rc)):z("",!0)],32),d(Gn,{name:"fade",appear:""},{default:Y(()=>{var ft;return[s(b)?(S(),R("g",Fc,[k("text",{fill:(ft=s(b).color)!=null?ft:s(B),class:Ne(["node-title",{pulsing:s(b).pulsing}]),y:-s(y)-20},pe(s(b).text),11,Oc)])):z("",!0)]}),_:1}),d(Gn,{name:"fade",appear:""},{default:Y(()=>{var ft;return[e.isSelected&&e.selectedAction?(S(),R("text",{key:0,fill:(ft=s(h).color)!=null?ft:s(B),class:Ne(["node-title",{pulsing:s(h).pulsing}]),y:s(y)+75},pe(s(h).text),11,qc)):z("",!0)]}),_:1})],14,Nc)}}});var Bc=ve(Vc,[["__scopeId","data-v-19cf948c"]]);const Lc={class:"stage",width:"100%",height:"100%"},jc={class:"g1"},zc=X({__name:"Board",props:{nodes:null,types:null,state:null,visibility:null,width:null,height:null,style:null,classes:null,links:null,selectedAction:null,selectedNode:null,draggingNode:null,receivingNode:null,mousePosition:null,setReceivingNode:{type:Function},setDraggingNode:{type:Function}},setup(e){const n=De(e),i=G({x:0,y:0}),r=G({x:0,y:0}),a=G(!1),u=G(null),l=C(()=>{const h=n.nodes.value.slice();if(n.selectedNode.value){const y=h.splice(h.indexOf(n.selectedNode.value),1)[0];h.push(y)}if(n.draggingNode.value){const y=h.splice(h.indexOf(n.draggingNode.value),1)[0];h.push(y)}return h});$t(()=>{const h=n.draggingNode.value;if(h==null)return null;const y={x:h.position.x+r.value.x,y:h.position.y+r.value.y};let N=Number.MAX_VALUE;n.setReceivingNode.value(n.nodes.value.reduce((E,P)=>{if(P.id===h.id)return E;const I=n.types.value[P.type];if(!me(I.canAccept,P,h))return E;const B=Math.pow(y.x-P.position.x,2)+Math.pow(y.y-P.position.y,2);let ce=me(I.size,P);return B>N||B>ce*ce?E:(N=B,P)},null))});function c(h){h.setTransformOrigin(null),h.moveTo(u.value.$el.clientWidth/2,u.value.$el.clientHeight/2)}function p(h,y=null,N=!1){if(n.draggingNode.value==null){h.preventDefault(),h.stopPropagation();let E,P;if("touches"in h)if(h.touches.length===1)E=h.touches[0].clientX,P=h.touches[0].clientY;else return;else E=h.clientX,P=h.clientY;i.value={x:E,y:P},r.value={x:0,y:0},a.value=!1,N&&n.setDraggingNode.value(y)}y!=null&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function v(h){const{x:y,y:N,scale:E}=u.value.panZoomInstance.getTransform();let P,I;if("touches"in h)if(h.touches.length===1)P=h.touches[0].clientX,I=h.touches[0].clientY;else{f(n.draggingNode.value),n.mousePosition.value=null;return}else P=h.clientX,I=h.clientY;n.mousePosition.value={x:(P-y)/E,y:(I-N)/E},r.value={x:r.value.x+(P-i.value.x)/E,y:r.value.y+(I-i.value.y)/E},i.value={x:P,y:I},(Math.abs(r.value.x)>10||Math.abs(r.value.y)>10)&&(a.value=!0),n.draggingNode.value!=null&&(h.preventDefault(),h.stopPropagation())}function f(h,y=!1){var N,E;if(n.draggingNode.value!=null&&n.draggingNode.value===h){n.receivingNode.value==null&&(n.draggingNode.value.position.x+=Math.round(r.value.x/25)*25,n.draggingNode.value.position.y+=Math.round(r.value.y/25)*25);const P=n.nodes.value;P.push(P.splice(P.indexOf(n.draggingNode.value),1)[0]),n.receivingNode.value&&((E=(N=n.types.value[n.receivingNode.value.type]).onDrop)==null||E.call(N,n.receivingNode.value,n.draggingNode.value)),n.setDraggingNode.value(null)}else!a.value&&!y&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function b(h,y){var E,P;const N=n.types.value[h.type];me((P=(E=N.actions)==null?void 0:E.find(I=>I.id===y))==null?void 0:P.confirmationLabel,h)==null&&(n.state.value.selectedAction=y),n.state.value.selectedAction===y?s(n.selectedAction).onClick(s(n.selectedNode)):n.state.value={...n.state.value,selectedAction:y}}return(h,y)=>{const N=kt("panZoom");return s(He)(e.visibility)?(S(),ne(N,{key:0,style:Be([{width:e.width,height:e.height},e.style]),class:Ne(e.classes),selector:".g1",options:{initialZoom:1,minZoom:.1,maxZoom:10,zoomDoubleClickSpeed:1},ref_key:"stage",ref:u,onInit:c,onMousemove:v,onTouchmove:v,onMousedown:y[0]||(y[0]=E=>p(E)),onTouchstart:y[1]||(y[1]=E=>p(E)),onMouseup:y[2]||(y[2]=()=>f(s(e.draggingNode))),onTouchendPassive:y[3]||(y[3]=()=>f(s(e.draggingNode))),onMouseleave:y[4]||(y[4]=()=>f(s(e.draggingNode),!0))},{default:Y(()=>[(S(),R("svg",Lc,[k("g",jc,[d(rr,{name:"link",appear:""},{default:Y(()=>[(S(!0),R(oe,null,$n(s(e.links)||[],E=>(S(),R("g",{key:`${E.startNode.id}-${E.endNode.id}`},[d(mc,{link:E,dragging:s(e.draggingNode),dragged:E.startNode===s(e.draggingNode)||E.endNode===s(e.draggingNode)?r.value:void 0},null,8,["link","dragging","dragged"])]))),128))]),_:1}),d(rr,{name:"grow",duration:500,appear:""},{default:Y(()=>[(S(!0),R(oe,null,$n(s(l),E=>(S(),R("g",{key:E.id,style:{"transition-duration":"0s"}},[d(Bc,{node:E,nodeType:e.types[E.type],dragging:s(e.draggingNode),dragged:s(e.draggingNode)===E?r.value:void 0,hasDragged:s(e.draggingNode)==null?!1:a.value,receivingNode:s(e.receivingNode)===E,isSelected:s(e.selectedNode)===E,selectedAction:s(e.selectedNode)===E?s(e.selectedAction):null,onMouseDown:p,onEndDragging:f,onClickAction:P=>b(E,P)},null,8,["node","nodeType","dragging","dragged","hasDragged","receivingNode","isSelected","selectedAction","onClickAction"])]))),128))]),_:1})])]))]),_:1},8,["style","class","options"])):z("",!0)}}});Je.on("setupVue",e=>va.install(e));const zr=Symbol("Board");var rn=(e=>(e.Outline="Outline",e.Fill="Fill",e))(rn||{}),Le=(e=>(e.Circle="Circle",e.Diamond="Triangle",e))(Le||{});function Gc(e){const t=ot({nodes:[],selectedNode:null,selectedAction:null},!1);return Qe(n=>{const i=e.call(n,n);i.id=Ht("board-"),i.type=zr,i[dt]=zc,i.state?(Or(t),T(i,"state")):(t[Wt]={nodes:i.startNodes().map((l,c)=>(l.id=c,l)),selectedNode:null,selectedAction:null},i.state=t),i.nodes=C(()=>s(u.state).nodes),i.selectedNode=C({get(){return u.nodes.value.find(l=>l.id===s(u.state).selectedNode)||null},set(l){var c,p;Oe(u.state)?u.state.value={...u.state.value,selectedNode:(c=l==null?void 0:l.id)!=null?c:null}:u.state.selectedNode=(p=l==null?void 0:l.id)!=null?p:null}}),i.selectedAction=C({get(){const l=u.selectedNode.value;if(l==null)return null;const c=u.types[l.type];return c.actions==null?null:c.actions.find(p=>p.id===s(u.state).selectedAction)||null},set(l){var c,p;Oe(u.state)?u.state.value={...u.state.value,selectedAction:(c=l==null?void 0:l.id)!=null?c:null}:u.state.selectedAction=(p=l==null?void 0:l.id)!=null?p:null}}),i.mousePosition=G(null),i.links?T(i,"links"):i.links=C(()=>u.selectedAction.value==null?null:u.selectedAction.value.links&&u.selectedNode.value?me(u.selectedAction.value.links,u.selectedNode.value):null),i.draggingNode=G(null),i.receivingNode=G(null),T(i,"visibility"),se(i,"visibility",Me.Visible),T(i,"width"),se(i,"width","100%"),T(i,"height"),se(i,"height","100%"),T(i,"classes"),T(i,"style");for(const l in i.types){const c=i.types[l];if(T(c,"title"),T(c,"subtitle"),T(c,"otherSubtitle"),T(c,"label"),T(c,"size"),se(c,"size",50),T(c,"style"),T(c,"classes"),T(c,"draggable"),se(c,"draggable",!1),T(c,"shape"),se(c,"shape","Circle"),T(c,"canAccept"),se(c,"canAccept",!1),T(c,"progress"),T(c,"progressDisplay"),se(c,"progressDisplay","Fill"),T(c,"progressColor"),se(c,"progressColor","none"),T(c,"fillColor"),T(c,"outlineColor"),T(c,"titleColor"),T(c,"actionDistance"),se(c,"actionDistance",Math.PI/6),c.nodes=C(()=>s(u.state).nodes.filter(p=>p.type===l)),se(c,"onClick",function(p){s(u.state).selectedNode=p.id}),c.actions)for(const p of c.actions)T(p,"visibility"),se(p,"visibility",Me.Visible),T(p,"icon"),T(p,"fillColor"),T(p,"tooltip"),T(p,"confirmationLabel"),se(p,"confirmationLabel",{text:"Tap again to confirm"}),T(p,"links")}function r(l){i.draggingNode.value=l}function a(l){i.receivingNode.value=l}i.placeInAvailableSpace=function(l,c=100,p=W.Right){const v=u.nodes.value.slice().filter(f=>f===l||(p===W.Down||p===W.Up)&&Math.abs(f.position.x-l.position.x)>c||(p===W.Left||p===W.Right)&&Math.abs(f.position.y-l.position.y)>c?!1:!(p===W.Right&&f.position.xl.position.x+c||p===W.Up&&f.position.y>l.position.y+c||p===W.Down&&f.position.yf.position.x-b.position.x:p===W.Left?(f,b)=>b.position.x-f.position.x:p===W.Up?(f,b)=>b.position.y-f.position.y:(f,b)=>f.position.y-b.position.y);for(let f=0;f0&&h>c)break}},i[lt]=function(){const{nodes:l,types:c,state:p,visibility:v,width:f,height:b,style:h,classes:y,links:N,selectedAction:E,selectedNode:P,mousePosition:I,draggingNode:A,receivingNode:B}=this;return{nodes:l,types:c,state:p,visibility:v,width:f,height:b,style:s(h),classes:y,links:N,selectedAction:E,selectedNode:P,mousePosition:I,draggingNode:A,receivingNode:B,setDraggingNode:r,setReceivingNode:a}};const u=i;return u})}function me(e,t,...n){return Wn(e)?e(t,...n):s(e)}function En(e){let t=0;return e.nodes.value.forEach(n=>{n.id>=t&&(t=n.id+1)}),t}const jn={};Je.on("addLayer",e=>{const t=Yn(e,zr);jn[e.id]=e.on("postUpdate",n=>{t.forEach(i=>{Object.values(i.types).forEach(r=>r.nodes.value.forEach(a=>{var u;return(u=r.update)==null?void 0:u.call(r,a,n)}))})})});Je.on("removeLayer",e=>{var t;(t=jn[e.id])==null||t.call(jn),jn[e.id]=void 0});function Mn(e,t="points",n=0,i=void 0){const r=Oe(e)?e:ot(e);if(r.displayName=t,r.precision=n,r.small=i,!Oe(e)){const a=r[At];a.displayName=t,a.precision=n,a.small=i}return r}new o("10^^8");new o("1e100");function mi(e,t){const n=t!=null?t:e.value;return o.eq(e.precision,0)?at(e.small?n:o.floor(n)):xe(n,e.precision,e.small)}Je.on("setupVue",e=>e.use(ha));function Uc(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const Wc=X({props:{visibility:{type:q(Number,Boolean),required:!0},display:{type:q(Object,String,Function),required:!0},style:q(String,Object,Array),classes:q(Object),glowColor:q(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:i,floating:r}=De(e),a=zi(n),u=C(()=>{const c=Ee(i);return c==null||c===""?{}:s(r)?Uc(c):{boxShadow:`0px 9px 5px -6px ${c}`}});function l(){t("selectTab")}return{selectTab:l,component:a,glowColorStyle:u,unref:s,Visibility:Me,isVisible:He,isHidden:bn}}});function Hc(e,t,n,i,r,a){var u;return e.isVisible(e.visibility)?(S(),R("button",{key:0,onClick:t[0]||(t[0]=(...l)=>e.selectTab&&e.selectTab(...l)),class:Ne(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},e.glowColorStyle,(u=e.unref(e.style))!=null?u:{}])},[(S(),ne(Ke(e.component)))],6)):z("",!0)}var Gr=ve(Wc,[["render",Hc],["__scopeId","data-v-21427abb"]]);const Yc=X({props:{visibility:{type:q(Number,Boolean),required:!0},activeTab:{type:q(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:q(Object),required:!0},style:q(String,Object,Array),classes:q(Object),buttonContainerStyle:q(String,Object,Array),buttonContainerClasses:q(Object)},components:{Sticky:gi,TabButton:Gr},setup(e){const{activeTab:t}=De(e),n=C(()=>Ct[te.theme].floatingTabs),i=bt("");$t(()=>{const l=Ee(t);if(l==null){i.value="";return}if(Et(l)){i.value=fe(l);return}i.value=fe(s(l.display))});const r=C(()=>{const l=Ee(t);return Et(l)||!l?void 0:s(l.classes)}),a=C(()=>{const l=Ee(t);return Et(l)||!l?void 0:s(l.style)});function u(l){const{display:c,style:p,classes:v,glowColor:f,visibility:b}=l;return{display:c,style:s(p),classes:v,glowColor:f,visibility:b}}return{floating:n,tabClasses:r,tabStyle:a,Visibility:Me,component:i,gatherButtonProps:u,unref:s,isVisible:He,isHidden:bn}}});function Zc(e,t,n,i,r,a){var c,p;const u=kt("TabButton"),l=kt("Sticky");return e.isVisible(e.visibility)?(S(),R("div",{key:0,class:Ne(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[],(p=e.tabStyle)!=null?p:[]])},[d(l,{class:Ne(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:Be(e.unref(e.buttonContainerStyle))},{default:Y(()=>[k("div",{class:Ne(["tab-buttons",{floating:e.floating}])},[(S(!0),R(oe,null,$n(e.unref(e.tabs),(v,f)=>(S(),ne(u,Ut({onSelectTab:b=>e.selected.value=f,floating:e.floating,key:f,active:e.unref(v.tab)===e.unref(e.activeTab)},e.gatherButtonProps(v)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(S(),ne(Ke(e.unref(e.component)),{key:0})):z("",!0)],6)):z("",!0)}var Xc=ve(Yc,[["render",Zc],["__scopeId","data-v-58dbf83a"]]);const Kc=Symbol("TabButton"),Jc=Symbol("TabFamily");function Ur(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),new Error("Cannot create tab family with 0 tabs");const n=ot(Object.keys(e)[0],!1);return Qe(i=>{var u;const r=(u=t==null?void 0:t.call(i,i))!=null?u:{};r.id=Ht("tabFamily-"),r.type=Jc,r[dt]=Xc,r.tabs=Object.keys(e).reduce((l,c)=>{const p=e[c]();return p.type=Kc,p[dt]=Gr,T(p,"visibility"),se(p,"visibility",Me.Visible),T(p,"tab"),T(p,"display"),T(p,"classes"),T(p,"style"),T(p,"glowColor"),l[c]=p,l},{}),r.selected=n,r.activeTab=C(()=>{const l=s(a.tabs);if(n.value in l&&He(l[n.value].visibility))return s(l[n.value].tab);const c=Object.values(l).find(p=>He(p.visibility));return c?s(c.tab):null}),T(r,"visibility"),se(r,"visibility",Me.Visible),T(r,"classes"),T(r,"style"),T(r,"buttonContainerClasses"),T(r,"buttonContainerStyle"),r[lt]=function(){const{visibility:l,activeTab:c,selected:p,tabs:v,style:f,classes:b,buttonContainerClasses:h,buttonContainerStyle:y}=this;return{visibility:l,activeTab:c,selected:p,tabs:v,style:s(f),classes:b,buttonContainerClasses:h,buttonContainerStyle:y}};const a=r;return a})}function jt(e){return Qe(t=>{const{addend:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=_e(n),l=_e(i),c=r==null?void 0:_e(r);return{apply:p=>o.add(p,s(u)),invert:p=>o.sub(p,s(u)),getFormula:p=>m.add(p,u),enabled:c,description:i==null?void 0:j(()=>d("div",{class:"modifier-container"},[s(l)!=null?d("span",{class:"modifier-description"},[wt(s(l))]):null,d("span",{class:"modifier-amount",style:(a===!0?o.gt(s(u),0):o.lt(s(u),0))?"color: var(--danger)":""},[o.gte(s(u),0)?"+":"",zt(s(u))])]))}})}function Ce(e){return Qe(t=>{const{multiplier:n,description:i,enabled:r,smallerIsBetter:a}=e.call(t,t),u=_e(n),l=_e(i),c=r==null?void 0:_e(r);return{apply:p=>o.times(p,s(u)),invert:p=>o.div(p,s(u)),getFormula:p=>m.times(p,u),enabled:c,description:i==null?void 0:j(()=>d("div",{class:"modifier-container"},[s(l)!=null?d("span",{class:"modifier-description"},[wt(s(l))]):null,d("span",{class:"modifier-amount",style:(a===!0?o.gt(s(u),1):o.lt(s(u),1))?"color: var(--danger)":""},[_("\xD7"),zt(s(u))])]))}})}function Qc(e){return Qe(t=>{const{exponent:n,description:i,enabled:r,supportLowNumbers:a,smallerIsBetter:u}=e.call(t,t),l=_e(n),c=_e(i),p=r==null?void 0:_e(r);return{apply:v=>{let f=v;return a&&(f=o.add(f,1)),f=o.pow(f,s(l)),a&&(f=o.sub(f,1)),f},invert:v=>{let f=v;return a&&(f=o.add(f,1)),f=o.root(f,s(l)),a&&(f=o.sub(f,1)),f},getFormula:v=>a?m.add(v,1).pow(l).sub(1):m.pow(v,l),enabled:p,description:i==null?void 0:j(()=>d("div",{class:"modifier-container"},[s(c)!=null?d("span",{class:"modifier-description"},[wt(s(c)),a?" (+1 effective)":null]):null,d("span",{class:"modifier-amount",style:(u===!0?o.gt(s(l),1):o.lt(s(l),1))?"color: var(--danger)":""},[_("^"),zt(s(l))])]))}})}function Nt(e){return Qe(()=>{const t=e();return{apply:n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.apply(i),n),invert:t.every(n=>n.invert!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduceRight((i,r)=>r.invert(i),n):void 0,getFormula:t.every(n=>n.getFormula!=null)?n=>t.filter(i=>s(i.enabled)!==!1).reduce((i,r)=>r.getFormula(i),n):void 0,enabled:t.some(n=>n.enabled!=null)?C(()=>t.filter(n=>s(n.enabled)!==!1).length>0):void 0,description:t.some(n=>n.description!=null)?j(()=>d(oe,null,[t.filter(n=>s(n.enabled)!==!1).map(n=>s(n.description)).filter(n=>n).map(wt)])):void 0}})}const qi=m.variable(0).step(2e3,e=>e.pow_base(1.02)).step(100,e=>e.pow(1.5)).step(o.pow(900,1.5).add(100),e=>e.pow(1.5)).pow(1.5),an={id:"deselect",icon:"close",tooltip:e=>({text:"portals"in e.state?"Disconnect portals":"tools"in e.state?"Disconnect tools":"Disconnect resources"}),onClick(e){var t;Array.isArray((t=e.state)==null?void 0:t.data)?e.state={...e.state,data:[]}:"portals"in e.state?e.state={...e.state,portals:[]}:"resources"in e.state?e.state={...e.state,resources:[]}:"tools"in e.state&&(e.state={...e.state,tools:[]}),g.board.selectedAction.value=null,g.board.selectedNode.value=null},visibility:e=>{var t;return Array.isArray((t=e.state)==null?void 0:t.data)?e.state.data.length>0:"portals"in e.state?e.state.portals.length>0:"resources"in e.state?e.state.resources.length>0:"tools"in e.state?e.state.tools.length>0:!1}},qt={id:"toggle",icon:"bolt",tooltip:e=>({text:e.state.powered?"Turn Off":`Turn On - Always runs for ${at(g.nextPowerCost.value)} energy/s`}),onClick(e){e.state={...e.state,powered:!e.state.powered},g.board.selectedAction.value=null},fillColor:e=>e.state.powered?"var(--accent1)":"var(--locked)"};function wn(e,t=1/0){const n=e(m.variable(0));return{id:"moreConnections",icon:"hub",formula:n,tooltip(i){return{text:`Increase Connections - ${at(n.evaluate(i.state.maxConnections))} energy`}},fillColor(i){return o.gte(g.energy.value,n.evaluate(i.state.maxConnections))?"var(--bought)":"var(--locked)"},confirmationLabel:i=>o.gte(g.energy.value,n.evaluate(i.state.maxConnections))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(i){const r=n.evaluate(i.state.maxConnections);o.gte(g.energy.value,r)&&(g.energy.value=o.sub(g.energy.value,r),i.state={...i.state,maxConnections:o.add(i.state.maxConnections,1)},g.board.selectedAction.value=null)},visibility:i=>o.add(i.state.maxConnections,g.computedBonusConnectionsModifier.value).lt(t)}}function Wr(e,t){var n,i;if(((n=g.board.draggingNode.value)==null?void 0:n.type)==="resource"){const r=((i=g.board.draggingNode.value)==null?void 0:i.state).type,{maxConnections:a,resources:u}=e.state;return u.includes(r)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,g.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(r),color:"var(--accent2)"}}return null}function ed(e,t){var n,i;if(((n=g.board.draggingNode.value)==null?void 0:n.type)==="passive"){const r=(i=g.board.draggingNode.value)==null?void 0:i.state,{maxConnections:a,tools:u}=e.state;return u.includes(r)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,g.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(r),color:"var(--accent2)"}}return null}function yi(e,t){var n,i;if(((n=g.board.draggingNode.value)==null?void 0:n.type)==="portal"){const r=((i=g.board.draggingNode.value)==null?void 0:i.state).id,{maxConnections:a,portals:u}=e.state;return u.includes(r)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,g.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(r),color:"var(--accent2)"}}return null}function Hr(e,t){if(t.type!=="resource")return!1;const n=t.state.type,{maxConnections:i,resources:r}=e.state;return r.includes(n)?!0:!o.add(i,g.computedBonusConnectionsModifier.value).lte(r.length)}function Yr(e,t){if(t.type!=="resource")return;const n=t.state.type,i=e.state.resources;i.includes(n)?e.state={...e.state,resources:i.filter(r=>r!==n)}:e.state={...e.state,resources:[...i,n]},g.board.selectedNode.value=e}function td(e,t){if(t.type!=="passive")return!1;const n=t.state,{maxConnections:i,tools:r}=e.state;return r.includes(n)?!0:!o.add(i,g.computedBonusConnectionsModifier.value).lte(r.length)}function nd(e,t){if(t.type!=="passive")return;const n=t.state,i=e.state.tools;i.includes(n)?e.state={...e.state,tools:i.filter(r=>r!==n)}:e.state={...e.state,tools:[...i,n]},g.board.selectedNode.value=e}function wi(e,t){if(t.type!=="portal")return!1;const n=t.state.id,{maxConnections:i,portals:r}=e.state;return r.includes(n)?!0:!o.add(i,g.computedBonusConnectionsModifier.value).lte(r.length)}function _i(e,t){if(t.type!=="portal")return;const n=t.state.id,{portals:i}=e.state;i.includes(n)?e.state={...e.state,portals:i.filter(r=>r!==n)}:e.state={...e.state,portals:[...i,n]},g.board.selectedNode.value=e}function ke(e){return e===g.board.selectedNode.value||e.state.powered}function ee(e){return g.empowerer.value!=null&&ke(g.empowerer.value)&&g.empowerer.value.state.tools.includes(e)}function id(e){var a,u,l;const t=(l=(u=(a=g.resourceNodes.value[e])==null?void 0:a.state)==null?void 0:u.amount)!=null?l:0,n=g.resourceLevels.value[e],i=qi.evaluate(n),r=qi.evaluate(o.add(n,1));return o.sub(t,i).max(0).div(o.sub(r,i)).toNumber()}function cn(e,t,n){if(t.value){const i=t.value.state,r=i[n],a=i.maxConnections;o.gt(r.length,o.add(a,e))&&(t.value.state={...t.value.state,[n]:r.slice(0,o.add(a,e).toNumber())})}}function Vt(e){return{id:"help",icon:"question_mark",tooltip:{text:"Help"},onClick(){g.helpModals[e].showModal.value=!0,g.board.selectedAction.value=null},confirmationLabel:null}}function fr(e){return t=>te.lineVisibility||e===g.board.selectedNode.value||e===g.board.draggingNode.value||g.resourceNodes.value[t]===g.board.draggingNode.value}const rd={key:0},ad={key:0,class:"mark star"},sd=["src"],od=X({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(S(),R("div",rd,[e.mark===!0?(S(),R("div",ad)):(S(),R("img",{key:1,class:"mark",src:e.mark},null,8,sd))])):z("",!0)}});var Kn=ve(od,[["__scopeId","data-v-2207999f"]]);const ld=X({__name:"Node",props:{id:null},setup(e){const n=De(e),i=ci(Gi,()=>{}),r=ci(Ui,()=>{}),a=bt(null),u=C(()=>a.value&&a.value.parentElement);return ht([u,n.id],([l,c],[p,v])=>{p&&r(s(v)),l&&i(c,l)}),wr(()=>r(s(n.id))),(l,c)=>(S(),R("div",{class:"node",ref_key:"node",ref:a},null,512))}});var Jn=ve(ld,[["__scopeId","data-v-a48cb382"]]),ud=X({props:{display:{type:q(Object,String,Function),required:!0},visibility:{type:q(Number,Boolean),required:!0},style:q(Object,String,Array),classes:q(Object),onClick:Function,onHold:Function,canClick:{type:q(Boolean),required:!0},small:Boolean,mark:q(Boolean,String),id:{type:String,required:!0}},components:{Node:Jn,MarkNode:Kn},setup(e){const{display:t,onClick:n,onHold:i}=De(e),r=bt("");$t(()=>{var v;const l=Ee(t);if(l==null){r.value="";return}if(Et(l)){r.value=fe(l);return}const c=fe((v=l.title)!=null?v:"","h3"),p=fe(l.description,"div");r.value=fe(j(()=>d("span",null,[l.title!=null?d("div",null,[d(c,null,null)]):null,d(p,null,null)])))});const{start:a,stop:u}=Pr(n,i);return{start:a,stop:u,comp:r,Visibility:Me,isVisible:He,isHidden:bn,unref:s}}});function cd(e,t,n,i,r,a){var c;const u=kt("MarkNode"),l=kt("Node");return e.isVisible(e.visibility)?(S(),R("button",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[]]),onClick:t[0]||(t[0]=(...p)=>e.onClick&&e.onClick(...p)),onMousedown:t[1]||(t[1]=(...p)=>e.start&&e.start(...p)),onMouseleave:t[2]||(t[2]=(...p)=>e.stop&&e.stop(...p)),onMouseup:t[3]||(t[3]=(...p)=>e.stop&&e.stop(...p)),onTouchstartPassive:t[4]||(t[4]=(...p)=>e.start&&e.start(...p)),onTouchendPassive:t[5]||(t[5]=(...p)=>e.stop&&e.stop(...p)),onTouchcancelPassive:t[6]||(t[6]=(...p)=>e.stop&&e.stop(...p)),class:Ne({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(S(),ne(Ke(e.unref(e.comp)),{key:0})):z("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],38)):z("",!0)}var Zr=ve(ud,[["render",cd],["__scopeId","data-v-211328c0"]]);const Xr=Symbol("Clickable");function dd(e,...t){const n=t.reduce((i,r)=>{var a;return Object.assign(i,(a=r.getPersistentData)==null?void 0:a.call(r))},{});return Qe(i=>{var u,l,c;const r=(u=e==null?void 0:e.call(i,i))!=null?u:{};r.id=Ht("clickable-"),r.type=Xr,r[dt]=Zr;for(const p of t)(l=p.preConstruct)==null||l.call(p,r);if(Object.assign(r,n),T(r,"visibility"),se(r,"visibility",Me.Visible),T(r,"canClick"),se(r,"canClick",!0),T(r,"classes"),T(r,"style"),T(r,"mark"),T(r,"display"),r.onClick){const p=r.onClick.bind(r);r.onClick=function(v){s(r.canClick)!==!1&&p(v)}}if(r.onHold){const p=r.onHold.bind(r);r.onHold=function(){s(r.canClick)!==!1&&p()}}for(const p of t)(c=p.postConstruct)==null||c.call(p,r);const a=t.reduce((p,v)=>{var f;return Object.assign(p,(f=v.getGatheredProps)==null?void 0:f.call(v,r))},{});return r[lt]=function(){const{display:p,visibility:v,style:f,classes:b,onClick:h,onHold:y,canClick:N,small:E,mark:P,id:I}=this;return{display:p,visibility:v,style:s(f),classes:b,onClick:h,onHold:y,canClick:N,small:E,mark:P,id:I,...a}},r})}function pd(e,t,n=[]){n=n.length===0?Yn(e,Xr):n;const i=typeof t=="function"?C(t):t;return e.on("update",()=>{s(i)&&n.filter(r=>s(r.canClick)).forEach(r=>{var a;return(a=r.onClick)==null?void 0:a.call(r)})})}const fd=["x1","y1","x2","y2"],gd=X({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=De(e),i=C(()=>{const a=n.startNode.value.rect,u=n.boundingRect.value,l=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetStart&&(l.x+=n.link.value.offsetStart.x,l.y+=n.link.value.offsetStart.y),l}),r=C(()=>{const a=n.endNode.value.rect,u=n.boundingRect.value,l=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetEnd&&(l.x+=n.link.value.offsetEnd.x,l.y+=n.link.value.offsetEnd.y),l});return(a,u)=>(S(),R("line",Ut({"stroke-width":"15px",stroke:"white"},e.link,{x1:s(i).x,y1:s(i).y,x2:s(r).x,y2:s(r).y}),null,16,fd))}});const md=X({__name:"Links",props:{links:null},setup(e){var c;const n=nn(e,"links"),i=G(null),r=ci(Wi,G({})),a=ci(Hi,G(void 0)),u=G((c=i.value)==null?void 0:c.getBoundingClientRect());ht(a,()=>{var p;return u.value=(p=i.value)==null?void 0:p.getBoundingClientRect()}),vi(()=>{var p;return u.value=(p=i.value)==null?void 0:p.getBoundingClientRect()});const l=C(()=>{var v,f;const p=r.value;return(f=(v=n.value)==null?void 0:v.filter(b=>{var h,y;return((h=p[b.startNode.id])==null?void 0:h.rect)&&((y=p[b.startNode.id])==null?void 0:y.rect)}))!=null?f:[]});return(p,v)=>(S(),R(oe,null,[s(l)?(S(),R("svg",ca(Ut({key:0},p.$attrs)),[(S(!0),R(oe,null,$n(s(l),(f,b)=>(S(),ne(gd,{key:b,link:f,boundingRect:u.value,startNode:s(r)[f.startNode.id],endNode:s(r)[f.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):z("",!0),k("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var vd=ve(md,[["__scopeId","data-v-063f6d6b"]]);X({props:{nodes:{type:q(Array),required:!0},leftSideNodes:q(Array),rightSideNodes:q(Array),branches:q(Array)},components:{Links:vd},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:i}=De(e),r=bt();$t(()=>{const l=Ee(t);r.value=fe(j(()=>d(oe,null,[l.map(c=>d("span",{class:"row tree-row",style:"margin: 50px auto;"},[c.map(wt)]))])))});const a=bt();$t(()=>{const l=Ee(n);a.value=l?fe(j(()=>d("span",{class:"left-side-nodes small"},[l.map(wt)]))):""});const u=bt();return $t(()=>{const l=Ee(i);u.value=l?fe(j(()=>d("span",{class:"side-nodes small"},[l.map(wt)]))):""}),{unref:s,nodesComp:r,leftNodesComp:a,rightNodesComp:u}}});X({props:{display:q(Object,String,Function),visibility:{type:q(Number,Boolean),required:!0},style:q(String,Object,Array),classes:q(Object),onClick:Function,onHold:Function,color:q(String),glowColor:q(String),canClick:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Kn,Node:Jn},setup(e){const{onClick:t,onHold:n,display:i}=De(e),r=Dn(i),{start:a,stop:u}=Pr(t,n);return{start:a,stop:u,comp:r,unref:s,Visibility:Me,isCoercableComponent:Et,isVisible:He,isHidden:bn}}});function zn(e){const t=[],n={};let i=!1;function r(){return i||(t.push(...e()),n.base=t.map(l=>_e(l.base)),n.baseText=t.map(l=>_e(l.baseText)),n.visible=t.map(l=>_e(l.visible)),n.title=t.map(l=>_e(l.title)),n.subtitle=t.map(l=>_e(l.subtitle)),i=!0),t}const a=ot({},!1);return[j(()=>{const l=r();let c=!0;const p=l.map((v,f)=>{var P,I,A;if(s(n.visible[f])===!1)return null;const b=d("h3",{onClick:()=>a.value[f]=!a.value[f],style:"cursor: pointer"},[d("span",{class:"modifier-toggle"+(s(a.value[f])?" collapsed":"")},[_("\u25BC")]),s(n.title[f]),s(n.subtitle[f])!=null?d("span",{class:"subtitle"},[_(" ("),s(n.subtitle[f]),_(")")]):null]),h=s(a.value[f])?null:d(oe,null,[d("div",{class:"modifier-container"},[d("span",{class:"modifier-description"},[wt((P=s(n.baseText[f]))!=null?P:"Base")]),d("span",{class:"modifier-amount"},[xe((I=s(n.base[f]))!=null?I:1),v.unit])]),v.modifier.description==null?null:wt(s(v.modifier.description))]),y=!c;c=!1;const N=(A=s(n.base[f]))!=null?A:1,E=v.modifier.apply(N);return d(oe,null,[y?d("br",null,null):null,d("div",{style:{"--unit":te.alignUnits&&v.unit!=null?"'"+v.unit+"'":""}},[b,d("br",null,null),h,d("hr",null,null),d("div",{class:"modifier-container"},[d("span",{class:"modifier-description"},[_("Total")]),d("span",{class:"modifier-amount",style:(v.smallerIsBetter===!0?o.gt(E,N!=null?N:1):o.lt(E,N!=null?N:1))?"color: var(--danger)":""},[zt(E),v.unit])])])])});return d(oe,null,[p])}),a]}function Pi(e,t,n){const i=_e(t),r=_e(n);return C(()=>{const a=s(i),u=s(r);return o.gte(e.value,u)?"Now":o.lte(a,0)?"Never":bi(o.sub(u,e.value).div(a))})}function dn(e,t,n=1){const i=_e(t),r=_e(n);if(!e.hasVariable())throw new Error("Cannot create formula preview if the formula does not have a variable");return j(()=>{var a;if(s(i)){const u=zt(e.evaluate()),l=zt(e.evaluate(o.add(s((a=e.innermostVariable)!=null?a:0),s(r))));return d(oe,null,[d("b",null,[d("i",null,[u,_(" \u2192 "),l])])])}return d(oe,null,[zt(e.evaluate())])})}const xt={dirt:120,sand:60,gravel:40,wood:30,stone:24,coal:20,copper:15,iron:12,silver:10,gold:8,emerald:6,platinum:5,diamond:4,berylium:3,unobtainium:2,ultimatum:1},Tt=Object.keys(xt),Ve={dirt:{cost:1e3,name:"Pickaxe",type:"passive",state:"dirt"},sand:{cost:1e4,name:"Dowsing Rod",type:"dowsing",state:{resources:[],maxConnections:1,powered:!1}},gravel:{cost:1e5,name:"Ore Processor",type:"passive",state:"gravel"},wood:{cost:1e6,name:"Quarry",type:"quarry",state:{resources:[],maxConnections:1,powered:!1,progress:0}},stone:{cost:1e7,name:"Energizer",type:"passive",state:"stone"},coal:{cost:1e8,name:"Tool Empowerer",type:"empowerer",state:{tools:[],maxConnections:1,powered:!1}},copper:{cost:1e9,name:"Book",type:"passive",state:"copper"},iron:{cost:1e10,name:"Portal Generator",type:"portalGenerator",state:{tier:void 0,influences:[]}},silver:{cost:1e12,name:"Robotics",type:"passive",state:"silver"},gold:{cost:1e15,name:"Booster",type:"booster",state:{portals:[],maxConnections:1,powered:!1,level:1}},emerald:{cost:1e19,name:"AI",type:"passive",state:"emerald"},platinum:{cost:1e24,name:"Upgrader",type:"upgrader",state:{portals:[],maxConnections:1,powered:!1}},diamond:{cost:1e30,name:"ML",type:"passive",state:"diamond"},berylium:{cost:1e37,name:"Automator",type:"automator",state:{portals:[],maxConnections:1,powered:!1}},unobtainium:{cost:1e45,name:"National Grid",type:"passive",state:"unobtainium"},ultimatum:{cost:1e54,name:"Investments",type:"investments",state:{portals:[],maxConnections:1,powered:!1}}},Pt={dirt:"BOGO Coupon",sand:"Metal Detector",gravel:"Neural Nets",wood:"Mining Laser",stone:"Replicator",coal:"Planar Intelligence",copper:"Efficient Code",iron:"Trade Agreements",silver:"Machine Synergizer",gold:"XP Market",emerald:"Efficient Portals",platinum:"Time Dilation",diamond:"Paypal",berylium:"Tiered Mining",unobtainium:"OC'ed Portals",ultimatum:"Rebates"},hd={dirt:{description:e=>e?"Quadruples mining speed":"Doubles mining speed"},gravel:{description:e=>e?"Quadruples mine ore drops":"Doubles mine ore drops"},stone:{description:e=>e?"Quadruples energy gain":"Doubles energy gain"},copper:{description:e=>e?"Material level is 40% stronger":"Material level is 20% stronger"},silver:{description:e=>e?"Quadruples each plane's resource gain":"Doubles each plane's resource gain"},diamond:{description:e=>e?"+20% plane's resource gain per upgrade bought":"+10% plane's resource gain per upgrade bought"},emerald:{description:e=>e?"+2% plane's resource gain per minute active":"+1% plane's resource gain per minute active"},unobtainium:{description:e=>e?"+2 max connections per machine":"+1 max connections per machine"},dirtRelic:{description:e=>e?"2 free levels for repeatables":"1 free level for repeatables"},sandRelic:{description:e=>e?"Treasure's 2 tiers stronger":"Treasure's 1 tier stronger"},gravelRelic:{description:e=>e?"+2% plane's resource gain per repeatable purchase (diminishing)":"+1% plane's resource gain per repeatable purchase (diminishing)"},woodRelic:{description:e=>e?"(Relics)^2 boost mine speed":"Relics boost mine speed"},stoneRelic:{description:e=>e?"All upgrades apply twice":"Non-multiplicative upgrades apply twice"},coalRelic:{description:e=>e?"Every treasure boosts planar speed by +20%":"Every treasure boosts planar speed by +10%"},copperRelic:{description:e=>e?"Power 2 machines free":"Power 1 machine free"},ironRelic:{description:e=>e?"Conversions give quadruple output":"Conversions give double output"},silverRelic:{description:e=>e?"(Powered machines)^2 boost quarry speed":"Powered machines boost quarry speed"},goldRelic:{description:e=>e?"Each treasure gives +50% XP gain":"Each treasure gives +25% XP gain"},emeraldRelic:{description:e=>e?"Creating portals costs 20x less energy":"Creating portals costs 10x less energy"},platinumRelic:{description:e=>e?"Quadruple dimensions' tick rate":"Double dimensions' tick rate"},diamondRelic:{description:e=>e?"Repeatables/dimensions buy max at once":"Repeatables buy max at once"},beryliumRelic:{description:e=>e?"log(energy)^0.5 boosts planes' resource gain":"log(energy)^0.25 boosts planes' resource gain"},unobtainiumRelic:{description:e=>e?"Upgrades/repeatables/dimensions/prestige no longer spend on purchase":"Upgrades/repeatables no longer spend on purchase"}},vt={increaseResources:{display:"+resource",description:e=>{const t=e.data;return t.length===0?"Increase resource odds - Drag a resource to me!":t.length===1?`Increase ${t[0]}'s odds`:`Increase ${t.length} resources' odds`},cost:2,initialData:[]},decreaseResources:{display:"-resource",description:e=>{const t=e.data;return t.length===0?"Decrease resource odds - Drag a resource to me!":t.length===1?`Decrease ${t[0]}'s odds`:`Decrease ${t.length} resources' odds`},cost:2,initialData:[]},increaseLength:{display:"+length",description:"Increase length",cost:100,initialData:void 0},increaseCaches:{display:"+caches",description:"Increase caches odds",cost:10,initialData:void 0},increaseGens:{display:"+gens",description:"Increase generators odds",cost:10,initialData:void 0},increaseInfluences:{display:"+influences",description:"Increase influences odds",cost:10,initialData:void 0},increaseEnergyMults:{display:"+energy mults",description:"Increase energy mults odds",cost:10,initialData:void 0},increaseResourceMults:{display:"+resource mults",description:"Increase resource mults odds",cost:10,initialData:void 0},increaseDiff:{display:"+difficulty",description:"Increase difficulty/rewards odds",cost:10,initialData:void 0},decreaseDiff:{display:"-difficulty",description:"Decrease difficulty/rewards odds",cost:10,initialData:void 0},increaseRewards:{display:"+rewards",description:"Increase rewards level",cost:1e4,initialData:void 0},relic:{display:"+relic",description:"Max length/difficulty, add tier-unique relic",cost:1e6,initialData:void 0}},si=m.variable(0).add(8).times(2).pow10(),bd=X({__name:"Tab",props:{display:null},setup(e){const t=e,{display:n}=De(t),i=zi(n);return(r,a)=>(S(),ne(Ke(s(i))))}}),yd=Symbol("Tab");function Ai(e){return Qe(t=>{const n=e.call(t,t);return n.id=Ht("tab-"),n.type=yd,n[dt]=bd,n[lt]=function(){const{display:i}=this;return{display:i}},n})}function Bt(e,t,n={}){const i=ot(!1);return{modal:j(()=>d(Ot,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a},{header:()=>d("h2",null,[e]),body:t})),showModal:i,...n}}function wd(){return Bt("Getting Started",j(()=>d("div",null,[d("p",null,[_(`Welcome to Planar Pioneers! Your job is to gather resources and eventually explore and conquer increasingly difficult "planes", which are like alien worlds. To start you'll use the mine (\u26CF\uFE0F) machine to gather resources.`)]),d("br",null,null),d("p",null,[_(`You'll gain energy every second based on how much of each resource you have. You can check the exact calculation and various other information by clicking the "modifiers" button near the top of the screen.`)]),d("br",null,null),d("p",null,[_("Select the machine by clicking it to make the mine active. You can also drag them around to organize your various machines and other objects. While selected machines will have various actions you can take, such as viewing the help for that machine. There's also an action to power the machine, allowing it to be active even while not selected, at the cost of energy per second (cost increases based on the total number of machines being powered).")])])))}function _d(){return Bt("Forging",j(()=>d("div",null,[d("p",null,[_("You've repaired the forge (\u{1F6E0}\uFE0F)! This is the next main line of progression. Here you'll be able to craft a total of 16 machines and passive bonuses to create - one for each resource!")]),d("br",null,null),d("p",null,[_("Drag a resource onto the forge to select that resource tier. You can then use an action on the forge to create that item, at the cost of energy based on the resource tier. You can only have 1 of each item.")])])))}function Nd(){return Bt("Dowsing",j(()=>d("div",null,[d("p",null,[_("You've created the dowsing rod (\u{1F962})! This machine lets you bias the odds of specified resources from mining. It will double the odds of each specified resource, so keep in mind rare resources will still be fairly rare.")]),d("br",null,null),d("p",null,[_("Specify resources to boost by dragging them to the dowsing rod. You can only select a single resource to start, but that can be increased using an action.")])])))}function Cd(){return Bt("Quarry",j(()=>d("div",null,[d("p",null,[_("You've created the Quarry (\u26F0\uFE0F)! This machine lets you gather specified resources. Unlike the mine, this machine will always output the same resources. However, rarer resources will take longer to gather.")]),d("br",null,null),d("p",null,[_("Specify resources to gather by dragging them to the quarry. You can only select a single resource to start, but that can be increased using an action.")])])))}function kd(){return Bt("Tool Empowerer",j(()=>d("div",null,[d("p",null,[_("You've created the Tool Empowerer (\u{1F50C})! This machine lets you increase the effect of specified passives. Experimenting with which passives to empower can really help you progress!")]),d("br",null,null),d("p",null,[_("Specify passives to empower by dragging them to the empowerer. You can only select a single passive to start, but that can be increased using an action.")])])))}function Md(){const e=Ur({general:()=>({display:"General",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Ai(()=>({display:j(()=>d("div",null,[d("p",null,[_("You've created the Portal Generator (\u26E9\uFE0F)! This machine lets you create portals to other planes, which will have treasures that help you in various ways! To create a portal you need to specify a tier by dragging a resource to the generator - higher tier planes cost more energy to generate portals for, but offer more and better treasures! Keep in mind time in planes will be paused if the portal is inactive (not selected nor powered).")]),d("br",null,null),d("p",null,[_("You've also gained a trash can for portals (\u{1F5D1}\uFE0F). Dragging a portal here will permanently destroy it. Any treasures that require the portal to be active will no longer work. This can be used to keep your workspace clean from old portals you no longer need or want.")]),d("br",null,null),d("p",null,[_("Once you have portals, the lines on the board might getting particularly necessary. Here's a setting (also accessible in the settings modal) to disable resource gain lines unless the node is active.")]),d("br",null,null),d(It,{title:j(()=>d("span",{class:"option-title"},[_("Always show lines to resource nodes")])),modelValue:te.lineVisibility,"onUpdate:modelValue":t=>te.lineVisibility=t},null)]))}))}),treasures:()=>({display:"Treasures",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Ai(()=>({display:j(()=>d("div",null,[_("Types of potential treasures:"),d("ul",{style:"list-style-type: unset"},[d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Caches")]),_(": Gain an amount of a resource based on your current amount.")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Gen")]),_(": Passively gain an amount of a resource while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Resource Mult")]),_(": Increase the amount gained of a resource from all sources (except caches) while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Energy Mult")]),_(": Increase the energy gained per second while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Influences")]),_(": Gain a influence. See the influences tab for details. You can only have 1 of each influence.")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Relic")]),_(": Gain the relic unique to this tier of plane. These are powerful passive boosts that can be empowered. You can only have 1 of each relic. Relics can only appear with the +relic influence, and will always be the last treasure on a plane.")])])]))}))}),influences:()=>({display:"Influences",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Ai(()=>({display:j(()=>d("div",null,[d("p",null,[_("Some treasures will grant you influences that can help the portal generator create portals to planes with specified qualities. Each influence will multiply the energy cost of creating the portal.")]),d("br",null,null),Object.keys(g.influenceNodes.value).length>0?d("div",null,[_("Discovered influences:"),d("ul",{style:"list-style-type: unset"},[g.influenceNodes.value.increaseResources==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+resource")]),_(": Can be connected to resources and will cause any treasures that reference resources (caches, gens, and resource mults) to have increased odds of picking a selected resource.")]),g.influenceNodes.value.decreaseResources==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("-resource")]),_(": Can be connected to resources and will cause any treasures that reference resources (caches, gens, and resource mults) to have decreased odds of picking a selected resource.")]),g.influenceNodes.value.increaseLength==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+length")]),_(": Cause the plane to have 1 extra treasure than it otherwise would have.")]),g.influenceNodes.value.increaseCaches==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+caches")]),_(": Causes treasures to have an increased chance to be caches.")]),g.influenceNodes.value.increaseGens==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+gens")]),_(": Causes treasures to have an increased chance to be gens.")]),g.influenceNodes.value.increaseResourceMults==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+resource mults")]),_(": Causes treasures to have an increased chance to be resource mults.")]),g.influenceNodes.value.increaseEnergyMults==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+energy mults")]),_(": Causes treasures to have an increased chance to be energy mults.")]),g.influenceNodes.value.increaseInfluences==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+influences")]),_(": Causes treasures to have an increased chance to be influences.")]),g.influenceNodes.value.relic==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+relic")]),_(": Maximizes length and difficulty for this tier of plane, and makes the last treasure a relic (unique per tier of plane). Overrides any other difficulty-changing influences.")]),g.influenceNodes.value.increaseDiff==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+difficulty")]),_(": Causes the difficulty and rewards to be in the upper half of what's possible at this tier.")]),g.influenceNodes.value.decreaseDiff==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("-difficulty")]),_(": Causes the difficulty and rewards to be in the lower half of what's possible at this tier.")]),g.influenceNodes.value.increaseRewards==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+rewards")]),_(": Causes the quality of treasures to be 1 tier higher. Does not affect influences or relics treasures.")])])]):d("div",null,[_("Once you discover influences, summaries will appear here describing their effects.")])]))}))})});return Bt("Portal Generator",j(()=>wt(e)),{tabFamily:e})}function Sd(){return Bt("Booster",j(()=>d("div",null,[d("p",null,[_("You've created the Booster (\u231B)! This machine lets you increase the rate of time of planes! This affects its resource gain, gen treasures, and any other effects of time.")]),d("br",null,null),d("p",null,[_("Specify planes to boost by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")]),d("br",null,null),d("p",null,[_("Initially the booster will double the rate of time, but that can be increased using an action.")])])))}function Id(){return Bt("Upgrader",j(()=>d("div",null,[d("p",null,[_("You've created the Upgrader (\u{1F916})! This machine lets you automatically purchase upgrades within planes (includes prestiges but not repeatables or dimensions)!")]),d("br",null,null),d("p",null,[_("Specify planes to auto-purchase upgrades from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}function xd(){return Bt("Automator",j(()=>d("div",null,[d("p",null,[_("You've created the Automator (\u{1F9BE})! This machine lets you automatically purchase repeatables and dimensions within planes!")]),d("br",null,null),d("p",null,[_("Specify planes to auto-purchase repeatables and dimensions from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}function $d(){return Bt("Investments",j(()=>d("div",null,[d("p",null,[_("You've created the Investments machine (\u{1F4B1})! This machine lets you automatically gain the resources from conversions without spending the plane's primary resource!")]),d("br",null,null),d("p",null,[_("Specify planes to gain converted resources from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}const Ed=X({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(S(),R("div",{style:Be({width:e.width,height:e.height})},null,4))}});function qn(e){return Qe(t=>{var i;const n=e.call(t,t);return n.partialDisplay=r=>d("span",{style:s(n.requirementMet)?"":"color: var(--danger)"},[mi(n.resource,n.cost instanceof m?en(n.cost,r!=null?r:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost))," ",n.resource.displayName]),n.display=r=>d("div",null,[s(n.requiresPay)?"Costs: ":"Requires: ",mi(n.resource,n.cost instanceof m?en(n.cost,r!=null?r:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost))," ",n.resource.displayName]),T(n,"visibility"),se(n,"visibility",Me.Visible),T(n,"cost"),T(n,"requiresPay"),se(n,"requiresPay",!0),T(n,"cumulativeCost"),se(n,"cumulativeCost",!0),T(n,"maxBulkAmount"),se(n,"maxBulkAmount",1),T(n,"directSum"),se(n,"pay",function(r){const a=n.cost instanceof m?en(n.cost,r!=null?r:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost);n.resource.value=o.sub(n.resource.value,a).max(0)}),n.canMaximize=C(()=>{var l;if(!(n.cost instanceof m))return!1;const r=s(n.maxBulkAmount);if(o.lte(r,1))return!1;const a=s(n.cumulativeCost),u=(l=s(n.directSum))!=null?l:a?10:0;return o.lte(r,u)?!0:!(!n.cost.isInvertible()||a===!0&&!n.cost.isIntegrable())}),n.cost instanceof m?n.requirementMet=Fr(n.cost,n.resource,(i=n.cumulativeCost)!=null?i:!0,n.directSum,n.maxBulkAmount):n.requirementMet=C(()=>o.gte(n.resource.value,s(n.cost))),n})}function Qi(e){return Qe(()=>({requirementMet:C(()=>He(e.visibility)),visibility:Me.None,requiresPay:!1}))}function Dd(e,t){return Qe(()=>({requirementMet:_e(e),partialDisplay:t==null?void 0:j(()=>wt(t)),display:t==null?void 0:j(()=>d(oe,null,[_("Req: "),wt(t)])),visibility:t==null?Me.None:Me.Visible,requiresPay:!1}))}function Ni(e){if(Ft(e))return e.every(Ni);const t=s(e.requirementMet);return typeof t=="boolean"?t:o.gt(t,0)}function Kr(e){if(Ft(e))return e.map(Kr).reduce(o.min);const t=s(e.requirementMet);return typeof t=="boolean"?t?o.dInf:0:o.gt(t,1)&&s(e.canMaximize)!==!0?1:t}function Ci(e,t=1){var n,i;if(Ft(e)&&(e=e.filter(r=>He(r.visibility)),e.length===1&&(e=e[0])),Ft(e)){e=e.filter(u=>"partialDisplay"in u);const r=e.filter(u=>s(u.requiresPay)),a=e.filter(u=>!s(u.requiresPay));return d(oe,null,[r.length>0?d("div",null,[_("Costs:")," ",cr(r.map(u=>u.partialDisplay(t)),d(oe,null,[_(", ")]))]):null,a.length>0?d("div",null,[_("Requires:")," ",cr(a.map(u=>u.partialDisplay(t)),d(oe,null,[_(", ")]))]):null])}return(i=(n=e.display)==null?void 0:n.call(e))!=null?i:d(oe,null,null)}function Jr(e,t=1){var n;Ft(e)?e.filter(i=>s(i.requiresPay)).forEach(i=>{var r;return(r=i.pay)==null?void 0:r.call(i,t)}):s(e.requiresPay)&&((n=e.pay)==null||n.call(e,t))}var Td=X({props:{visibility:{type:q(Number,Boolean),required:!0},display:q(Object,String,Function),earned:{type:q(Boolean),required:!0},requirements:q(Object,Array),image:q(String),style:q(String,Object,Array),classes:q(Object),mark:q(Boolean,String),small:q(Boolean),id:{type:String,required:!0}},components:{Node:Jn,MarkNode:Kn},setup(e){const{display:t,requirements:n,earned:i}=De(e),r=bt("");return $t(()=>{const a=Ee(t);if(a==null){r.value="";return}if(Et(a)){r.value=fe(a);return}const u=fe(a.requirement?a.requirement:j(()=>{var p;return Ci((p=Ee(n))!=null?p:[])}),"h3"),l=fe(a.effectDisplay||"","b"),c=Ee(i)?fe(a.optionsDisplay||"","span"):"";r.value=fe(j(()=>d("span",null,[d(u,null,null),a.effectDisplay!=null?d("div",null,[d(l,null,null)]):null,a.optionsDisplay!=null?d("div",{class:"equal-spaced"},[d(c,null,null)]):null])))}),{comp:r,unref:s,Visibility:Me,isVisible:He,isHidden:bn}}});function Pd(e,t,n,i,r,a){var c;const u=kt("MarkNode"),l=kt("Node");return e.isVisible(e.visibility)?(S(),R("div",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(c=e.unref(e.style))!=null?c:[]]),class:Ne({feature:!0,achievement:!0,locked:!e.unref(e.earned),done:e.unref(e.earned),small:e.unref(e.small),...e.unref(e.classes)})},[e.comp?(S(),ne(Ke(e.comp),{key:0})):z("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],6)):z("",!0)}var Ad=ve(Td,[["render",Pd],["__scopeId","data-v-5673325a"]]);const Rd=hi(),Fd=Symbol("Achievement");let Sn=function(e){return e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none",e}({});function Od(e,...t){const n=ot(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(r=>{var c,p,v;const a=(c=e==null?void 0:e.call(r,r))!=null?c:{};a.id=Ht("achievement-"),a.type=Fd,a[dt]=Ad;for(const f of t)(p=f.preConstruct)==null||p.call(f,a);a.earned=n,a.complete=function(){var b,h;if(n.value)return;n.value=!0;const f=a;if((b=f.onComplete)==null||b.call(f),f.display!=null&&s(f.showPopups)===!0){const y=s(f.display);let N;Et(y)?N=fe(y):y.requirement!=null?N=fe(y.requirement):N=Ci((h=f.requirements)!=null?h:[]),Rd.info(d("div",null,[d("h3",null,[_("Treasure earned!")]),d("div",null,[d(N,null,null)])]))}},Object.assign(a,i),T(a,"visibility"),se(a,"visibility",Me.Visible);const u=a.visibility;a.visibility=da(()=>{const f=s(a.display);switch(te.msDisplay){default:case Sn.All:return s(u);case Sn.Configurable:return s(a.earned)&&!(f!=null&&typeof f=="object"&&"optionsDisplay"in f)?Me.None:s(u);case Sn.Incomplete:return s(a.earned)?Me.None:s(u);case Sn.None:return Me.None}}),T(a,"display"),T(a,"mark"),T(a,"small"),T(a,"image"),T(a,"style"),T(a,"classes"),T(a,"showPopups"),se(a,"showPopups",!0);for(const f of t)(v=f.postConstruct)==null||v.call(f,a);const l=t.reduce((f,b)=>{var h;return Object.assign(f,(h=b.getGatheredProps)==null?void 0:h.call(b,a))},{});if(a[lt]=function(){const{visibility:f,display:b,requirements:h,earned:y,image:N,style:E,classes:P,mark:I,small:A,id:B}=this;return{visibility:f,display:b,requirements:h,earned:y,image:N,style:s(E),classes:P,mark:I,small:A,id:B,...l}},a.requirements){const f=a,b=[Qi(f),Dd(()=>!f.earned.value),...Ft(a.requirements)?a.requirements:[a.requirements]];$t(()=>{te.active===Z.id&&Ni(b)&&f.complete()})}return a})}Je.on("loadSettings",e=>{se(e,"msDisplay",Sn.All)});const qd=Object.values(Sn).map(e=>({label:it(e),value:e}));Dr(j(()=>d(Ki,{title:j(()=>d("span",{class:"option-title"},[_("Show achievements"),d("desc",null,[_("Select which achievements to display based on criterias.")])])),options:qd,"onUpdate:modelValue":e=>te.msDisplay=e,modelValue:te.msDisplay},null)));const Vd=X({props:{progress:{type:q(String,Object,Number),required:!0},width:{type:q(Number),required:!0},height:{type:q(Number),required:!0},direction:{type:q(String),required:!0},display:q(Object,String,Function),visibility:{type:q(Number,Boolean),required:!0},style:q(Object,String,Array),classes:q(Object),borderStyle:q(Object,String,Array),textStyle:q(Object,String,Array),baseStyle:q(Object,String,Array),fillStyle:q(Object,String,Array),mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Kn,Node:Jn},setup(e){const{progress:t,width:n,height:i,direction:r,display:a}=De(e),u=C(()=>{let p=t.value instanceof o?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(p,0),1))*100}),l=C(()=>{const p={width:Ee(n)+.5+"px",height:Ee(i)+.5+"px"};switch(s(r)){case W.Up:p.clipPath=`inset(${u.value}% 0% 0% 0%)`,p.width=Ee(n)+1+"px";break;case W.Down:p.clipPath=`inset(0% 0% ${u.value}% 0%)`,p.width=Ee(n)+1+"px";break;case W.Right:p.clipPath=`inset(0% ${u.value}% 0% 0%)`;break;case W.Left:p.clipPath=`inset(0% 0% 0% ${u.value} + '%)`;break;case W.Default:p.clipPath="inset(0% 50% 0% 0%)";break}return p}),c=Dn(a);return{normalizedProgress:u,barStyle:l,component:c,unref:s,Visibility:Me,isVisible:He,isHidden:bn}}});function Bd(e,t,n,i,r,a){var c,p,v,f,b,h,y;const u=kt("MarkNode"),l=kt("Node");return e.isVisible(e.visibility)?(S(),R("div",{key:0,style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:Ne({bar:!0,...e.unref(e.classes)})},[k("div",{class:"overlayTextContainer border",style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(p=e.unref(e.borderStyle))!=null?p:{}])},[e.component?(S(),R("span",{key:0,class:"overlayText",style:Be(e.unref(e.textStyle))},[(S(),ne(Ke(e.component)))],4)):z("",!0)],4),k("div",{class:"border",style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(v=e.unref(e.style))!=null?v:{},(f=e.unref(e.baseStyle))!=null?f:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[k("div",{class:"fill",style:Be([e.barStyle,(h=e.unref(e.style))!=null?h:{},(y=e.unref(e.fillStyle))!=null?y:{}])},null,4)],4),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],6)):z("",!0)}var Ld=ve(Vd,[["render",Bd],["__scopeId","data-v-6bd06b56"]]);const jd=Symbol("Bar");function zd(e,...t){const n=t.reduce((i,r)=>{var a;return Object.assign(i,(a=r.getPersistentData)==null?void 0:a.call(r))},{});return Qe(i=>{var u,l;const r=e.call(i,i);r.id=Ht("bar-"),r.type=jd,r[dt]=Ld;for(const c of t)(u=c.preConstruct)==null||u.call(c,r);Object.assign(r,n),T(r,"visibility"),se(r,"visibility",Me.Visible),T(r,"width"),T(r,"height"),T(r,"direction"),T(r,"style"),T(r,"classes"),T(r,"borderStyle"),T(r,"baseStyle"),T(r,"textStyle"),T(r,"fillStyle"),T(r,"progress"),T(r,"display"),T(r,"mark");for(const c of t)(l=c.postConstruct)==null||l.call(c,r);const a=t.reduce((c,p)=>{var v;return Object.assign(c,(v=p.getGatheredProps)==null?void 0:v.call(p,r))},{});return r[lt]=function(){const{progress:c,width:p,height:v,direction:f,display:b,visibility:h,style:y,classes:N,borderStyle:E,textStyle:P,baseStyle:I,fillStyle:A,mark:B,id:ce}=this;return{progress:c,width:p,height:v,direction:f,display:b,visibility:h,style:s(y),classes:N,borderStyle:E,textStyle:P,baseStyle:I,fillStyle:A,mark:B,id:ce,...a}},r})}function Gd(e,...t){return Qe(n=>{var r,a;const i=e.call(n,n);for(const u of t)(r=u.preConstruct)==null||r.call(u,i);i.formula=i.formula(m.variable(i.baseResource)),i.currentGain==null&&(i.currentGain=C(()=>{let u=o.floor(i.formula.evaluate(i.baseResource.value)).max(0);return s(i.buyMax)===!1&&(u=u.min(1)),u})),i.actualGain==null&&(i.actualGain=i.currentGain),i.currentAt==null&&(i.currentAt=C(()=>i.formula.invert(o.floor(s(i.currentGain))))),i.nextAt==null&&(i.nextAt=C(()=>i.formula.invert(o.floor(s(i.currentGain)).add(1)))),i.convert==null&&(i.convert=function(){var l;const u=s(i.currentGain);i.gainResource.value=o.add(i.gainResource.value,u),i.spend(u),(l=i.onConvert)==null||l.call(i,u)}),i.spend==null&&(i.spend=function(){i.baseResource.value=0}),T(i,"currentGain"),T(i,"actualGain"),T(i,"currentAt"),T(i,"nextAt"),T(i,"buyMax"),se(i,"buyMax",!0);for(const u of t)(a=u.postConstruct)==null||a.call(u,i);return i})}function Ud(e){return Gd(e)}function Wd(e,t,n=1,i=o.dInf){const r=_e(n),a=_e(i);e.on("preUpdate",u=>{const l=s(r);o.neq(l,0)&&(t.gainResource.value=o.add(t.gainResource.value,o.times(l,u).times(o.ceil(s(t.actualGain)))).min(s(a)).max(t.gainResource.value))})}const Hd={postConstruct(e){e.amount===void 0&&console.error(`Decorated feature ${e.id} does not contain the required 'amount' property"`),T(e,"bonusAmount"),e.totalAmount===void 0&&(e.totalAmount=C(()=>{var t;return o.add(s((t=e.amount)!=null?t:0),s(e.bonusAmount))}))}},Qr=Symbol("Repeatable");function gr(e,...t){const n=ot(0),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(r=>{var b,h,y;const a=e.call(r,r);a.id=Ht("repeatable-"),a.type=Qr,a[dt]=Zr;for(const N of t)(b=N.preConstruct)==null||b.call(N,a);a.amount=n,a.amount[Wt]=(h=a.initialAmount)!=null?h:0,Object.assign(a,i);const u={requirementMet:C(()=>o.sub(s(a.limit),a.amount.value)),requiresPay:!1,visibility:Me.None,canMaximize:!0},l=Qi(a);Ft(a.requirements)?(a.requirements.unshift(l),a.requirements.push(u)):a.requirements=[l,a.requirements,u],a.maxed=C(()=>o.gte(a.amount.value,s(a.limit))),T(a,"classes");const c=a.classes;a.classes=C(()=>{const N=s(c)||{};return a.maxed.value&&(N.bought=!0),N}),a.amountToIncrease=C(()=>o.clampMin(Kr(a.requirements),1)),a.canClick=C(()=>Ni(a.requirements));const p=a.onClick;a.onClick=function(N){var I;const E=a;if(!s(E.canClick))return;const P=(I=s(a.amountToIncrease))!=null?I:1;Jr(a.requirements,P),E.amount.value=o.add(E.amount.value,P),p==null||p(N)},T(a,"display");const v=a.display;a.display=j(()=>{var E,P,I;const N=s(v);if(Et(N)){const A=fe(N);return d(A,null,null)}if(N!=null){const A=a,B=fe((E=N.title)!=null?E:"","h3"),ce=fe((P=N.description)!=null?P:""),le=fe((I=N.effectDisplay)!=null?I:"");return d("span",null,[N.title==null?null:d("div",null,[d(B,null,null)]),N.description==null?null:d(ce,null,null),N.showAmount===!1?null:d("div",null,[d("br",null,null),d(oe,null,[_("Amount: "),at(A.amount.value)]),o.isFinite(s(A.limit))?d(oe,null,[_(" / "),at(s(A.limit))]):void 0]),N.effectDisplay==null?null:d("div",null,[d("br",null,null),_("Currently: "),d(le,null,null)]),A.maxed.value?null:d("div",null,[d("br",null,null),Ci(A.requirements,s(a.amountToIncrease))])])}return""}),T(a,"visibility"),se(a,"visibility",Me.Visible),T(a,"limit"),se(a,"limit",o.dInf),T(a,"style"),T(a,"mark"),T(a,"small");for(const N of t)(y=N.postConstruct)==null||y.call(N,a);const f=t.reduce((N,E)=>{var P;return Object.assign(N,(P=E.getGatheredProps)==null?void 0:P.call(E,a))},{});return a[lt]=function(){const{display:N,visibility:E,style:P,classes:I,onClick:A,canClick:B,small:ce,mark:le,id:ie}=this;return{display:N,visibility:E,style:s(P),classes:I,onClick:A,canClick:B,small:ce,mark:le,id:ie,...f}},a})}const Yd=Symbol("Reset");function Zd(e){return Qe(t=>{const n=e.call(t,t);return n.id=Ht("reset-"),n.type=Yd,n.reset=function(){var r;const i=a=>{if(a!=null&&typeof a=="object"&&!(a instanceof o)&&!(a instanceof m)){if(Xn in a&&a[Xn]===!0)return;if(Wt in a){const u=a;u.value=u[Wt]}else!(a instanceof o)&&!Oe(a)&&Object.values(a).forEach(u=>i(u))}};s(n.thingsToReset).forEach(i),Je.emit("reset",n),(r=n.onReset)==null||r.call(n)},T(n,"thingsToReset"),n})}const oi={};Je.on("removeLayer",e=>{var t;(t=oi[e.id])==null||t.call(oi),oi[e.id]=void 0});function Ri(e,t){return T(t,"display"),T(t,"classes"),T(t,"style"),T(t,"direction"),se(t,"direction",W.Up),T(t,"xoffset"),T(t,"yoffset"),t.pinnable&&(t.pinned=ot(!1,!1)),Gt(()=>{t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1,Or(t.pinned)):e.pinned=t.pinned);const n=e[dt];e[dt]=Fe;const i=e[lt].bind(e);e[lt]=function(){const{display:a,classes:u,style:l,direction:c,xoffset:p,yoffset:v,pinned:f}=this;return{element:{[dt]:n,[lt]:i},display:a,classes:u,style:s(l),direction:c,xoffset:p,yoffset:v,pinned:f}}.bind(t)}),t}var Xd=X({props:{display:{type:q(String,Object,Function),required:!0},visibility:{type:q(Number,Boolean),required:!0},style:q(String,Object,Array),classes:q(Object),requirements:{type:Object,required:!0},canPurchase:{type:q(Boolean),required:!0},bought:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Jn,MarkNode:Kn},setup(e){const{display:t,requirements:n,bought:i}=De(e),r=bt("");return $t(()=>{const a=Ee(t);if(a==null){r.value="";return}if(Et(a)){r.value=fe(a);return}const u=fe(a.title||"","h3"),l=fe(a.description,"div"),c=fe(a.effectDisplay||"");r.value=fe(j(()=>d("span",null,[a.title!=null?d("div",null,[d(u,null,null)]):null,d(l,null,null),a.effectDisplay!=null?d("div",null,[_("Currently: "),d(c,null,null)]):null,i.value?null:d(oe,null,[d("br",null,null),Ci(n.value)])])))}),{component:r,unref:s,Visibility:Me,isVisible:He,isHidden:bn}}});const Kd=["disabled"];function Jd(e,t,n,i,r,a){var c;const u=kt("MarkNode"),l=kt("Node");return e.isVisible(e.visibility)?(S(),R("button",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),onClick:t[0]||(t[0]=(...p)=>e.purchase&&e.purchase(...p)),class:Ne({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(S(),ne(Ke(e.unref(e.component)),{key:0})):z("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],14,Kd)):z("",!0)}var Qd=ve(Xd,[["render",Jd],["__scopeId","data-v-9be6bac0"]]);const er=Symbol("Upgrade");function mr(e,...t){const n=ot(!1,!1),i=t.reduce((r,a)=>{var u;return Object.assign(r,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(r=>{var c,p;const a=e.call(r,r);a.id=Ht("upgrade-"),a.type=er,a[dt]=Qd;for(const v of t)(c=v.preConstruct)==null||c.call(v,a);a.bought=n,Object.assign(a,i),a.canPurchase=C(()=>!n.value&&Ni(a.requirements)),a.purchase=function(){var f;const v=a;!s(v.canPurchase)||(Jr(a.requirements),n.value=!0,(f=v.onPurchase)==null||f.call(v))};const u=Qi(a);Ft(a.requirements)?a.requirements.unshift(u):a.requirements=[u,a.requirements],T(a,"visibility"),se(a,"visibility",Me.Visible),T(a,"classes"),T(a,"style"),T(a,"display"),T(a,"mark");for(const v of t)(p=v.postConstruct)==null||p.call(v,a);const l=t.reduce((v,f)=>{var b;return Object.assign(v,(b=f.getGatheredProps)==null?void 0:b.call(f,a))},{});return a[lt]=function(){const{display:v,visibility:f,style:b,classes:h,requirements:y,canPurchase:N,bought:E,mark:P,id:I,purchase:A}=this;return{display:v,visibility:f,style:s(b),classes:h,requirements:y,canPurchase:N,bought:E,mark:P,id:I,purchase:A,...l}},a})}function ep(e,t,n=[]){n=n.length===0?Yn(e,er):n;const i=Wn(t)?C(t):t;e.on("update",()=>{s(i)&&n.forEach(r=>r.purchase())})}function tp(e,t,n,i){return function(){e>>>=0,t>>>=0,n>>>=0,i>>>=0;let r=e+t|0;return e=t^t>>>9,t=n+(n<<3)|0,n=n<<21|n>>>11,i=i+1|0,r=r+i|0,n=n+r|0,(r>>>0)/4294967296}}const np={1:["b","c","d","f","g","h","i","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"],2:["a","e","o","u"],3:["br","cr","dr","fr","gr","pr","str","tr","bl","cl","fl","gl","pl","sl","sc","sk","sm","sn","sp","st","sw","ch","sh","th","wh"],4:["ae","ai","ao","au","a","ay","ea","ei","eo","eu","e","ey","ua","ue","ui","uo","u","uy","ia","ie","iu","io","iy","oa","oe","ou","oi","o","oy"],5:["turn","ter","nus","rus","tania","hiri","hines","gawa","nides","carro","rilia","stea","lia","lea","ria","nov","phus","mia","nerth","wei","ruta","tov","zuno","vis","lara","nia","liv","tera","gantu","yama","tune","ter","nus","cury","bos","pra","thea","nope","tis","clite"],6:["una","ion","iea","iri","illes","ides","agua","olla","inda","eshan","oria","ilia","erth","arth","orth","oth","illon","ichi","ov","arvis","ara","ars","yke","yria","onoe","ippe","osie","one","ore","ade","adus","urn","ypso","ora","iuq","orix","apus","ion","eon","eron","ao","omia"]},vr=[[1,2,5],[2,3,6],[3,4,5],[4,3,6],[3,4,2,5],[2,1,3,6],[3,4,2,5],[4,3,1,6],[3,4,1,4,5],[4,1,4,3,6]];function Fi(e){const t=vr[Math.floor(e()*vr.length)];let n="";for(let i=0;in-n*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}const br=hi();function ea(e,t,n,i){return Yi(e,function(){const r=tp(0,n>>0,n>>32,1);for(let V=0;V<12;V++)r();const a=Fi(r),u=Vn([.64,.75,.55],r),l=Vn([.18,.2,.25],r),c=Mn(0,Fi(r)),p=ot(0),v=Tt.indexOf(t);let f=r();const b=i.reduce((V,L)=>(V[L.type]=L.data,V),{});"increaseDiff"in b&&(f=f/2+.5),"decreaseDiff"in b&&(f=f/2),"relic"in b&&(f=1);const h=f+v+1,y=g.toolNodes.value.sandRelic!=null?ee("sandRelic")?2:1:0,N=ot(y),E=C(()=>("increaseRewards"in b?h+1:h)+N.value);let P="relic"in b?v+2:Math.ceil(r()*(v+2));"increaseLength"in b&&P++;const I=[],A=Nt(()=>I),B=C(()=>A.apply(0)),ce=[],le={};function ie({feature:V,canClick:L,modifier:$e,cost:tt,previewModifier:Nn,showETA:ut,previewCost:gt}){L=_e(L),ut=_e(ut);const St=dr(V);ce.push({shouldShowPreview:C(()=>s(L)&&St.value),modifier:Nt(()=>{const Dt=I.slice();return Dt.splice(Dt.indexOf($e),1,Nn),Dt}),cost:gt!=null?gt:tt}),I.push($e);const Xt=Pi(c,B,()=>Se(tt)),Ze=Ri(V,{display:ut==null?Xt:()=>s(ut)?Xt.value:"",direction:W.Down});return{isHovering:St,eta:Xt,tooltip:Ze}}const Q=[],Ie=G(0);let he=m.variable(Ie).times(0),U=0,be=!0;const je=C(()=>o.add(h,r()-.5).pow_base(2).times(10).times(he.evaluate()));for(let V=0;V=P-1?0:4};switch(li(L,r)){case"upgrades":const $=[];for(let x=0;x<4;x++){const H=li({add:1,mult:V===0&&x===0?0:1},r),K=je.value,Ae=kn(r);let ze="",Re,ae;switch(H){case"add":{const de=o.add(K,10).pow(r()/4+1);ze=`Gain ${xe(de)} ${c.displayName}/s`,he=he.add(de),Re=nt=>jt(()=>({addend:de,description:Ae,enabled:nt==null?ye.bought:()=>nt()&&ye.bought.value})),ae=jt(()=>({addend:de}));break}case"mult":{const de=r()*5+1;ze=`Multiply previous ${c.displayName} gain by x${xe(de)}.`;const nt=U;he=he.add(o.sub(de,1).times(nt)),Re=Xe=>Ce(()=>({multiplier:de,description:Ae,enabled:Xe==null?ye.bought:()=>Xe()&&ye.bought.value})),ae=Ce(()=>({multiplier:de}));break}}U=he.evaluate(),Ie.value++;const Pe=be,ye=mr(()=>({requirements:qn(()=>({resource:Cn(c),cost:K,requiresPay:()=>g.toolNodes.value.unobtainiumRelic==null})),display:{title:Ae,description:ze},visibility:Pe}));ie({feature:ye,canClick:()=>ye.canPurchase.value,modifier:Re(),cost:K,previewCost:C(()=>g.toolNodes.value.unobtainiumRelic==null?K:0),showETA:()=>!ye.bought.value,previewModifier:ae}),I.push(Re(()=>H==="add"?g.toolNodes.value.stoneRelic!=null:ee("stoneRelic"))),$.push(ye)}Q.push($);break;case"repeatables":const D=[];for(let x=0;x<3;x++){const H=li({add:1.5,mult:3},r),K=Ie.value,Ae=je.value,ze=kn(r);let Re="",ae,Pe,ye,de;const nt=m.variable(C(()=>ue.amount.value)).times(2);switch(H){case"add":{const Ge=o.add(Ae,10).times(r()+.5);Re=`Gain ${xe(Ge)} ${c.displayName}/s`,de=nt.add(1).times(Ae),he=he.add(C(()=>o.sub(Ie.value,K).times(2).add(1).pow(2).clampMax(100).times(Ge))),ae=C(()=>xe(o.times(Ge,s(ue.totalAmount)))+"/s"),Pe=jt(()=>({addend:()=>o.times(Ge,s(ue.totalAmount)),description:ze,enabled:()=>o.gt(s(ue.totalAmount),0)})),ye=jt(()=>({addend:()=>o.add(s(ue.totalAmount),ue.amountToIncrease.value).times(Ge)}));break}case"mult":{const Ge=r()*.75+1.25;Re=`Multiply previous ${c.displayName} gain by x${xe(Ge)}.`,de=nt.add(1).pow_base(Ge).times(Ae);const rt=U;he=he.add(C(()=>o.sub(Ie.value,K).times(2).add(1).pow(2).clampMax(100).pow_base(Ge).sub(1).times(rt))),ae=C(()=>"x"+xe(o.pow(Ge,s(ue.totalAmount)))),Pe=Ce(()=>({multiplier:()=>o.pow(Ge,s(ue.totalAmount)),description:ze,enabled:()=>o.gt(s(ue.totalAmount),0)})),ye=Ce(()=>({multiplier:()=>o.add(s(ue.totalAmount),ue.amountToIncrease.value).pow_base(Ge)}));break}}U=he.evaluate(),Ie.value++;const Xe=be,ue=gr(()=>({requirements:qn(()=>({resource:Cn(c),cost:de,maxBulkAmount:()=>g.toolNodes.value.diamondRelic!=null?o.dInf:1,requiresPay:()=>g.toolNodes.value.unobtainiumRelic==null})),display:()=>({title:ze,description:`${Re}

Amount: ${at(ue.amount.value)}${o.gt(s(ue.bonusAmount),0)?` [+${at(s(ue.bonusAmount))}]`:""}`,effectDisplay:s(ae),showAmount:!1}),visibility:Xe,limit:100,bonusAmount:()=>o.gt(ue.amount.value,0)?ee("dirtRelic")?2:g.toolNodes.value.dirtRelic!=null?1:0:0}),Hd);ie({feature:ue,canClick:()=>s(ue.canClick),modifier:Pe,cost:de,previewModifier:ye,previewCost:C(()=>g.toolNodes.value.unobtainiumRelic==null?en(de,ue.amountToIncrease.value):0),showETA:()=>!ue.maxed.value}),D.push(ue)}Q.push(D);break;case"conversion":{const x=Mn(0,Fi(r)),O=Vn([.64,.75,.55],r),H=je.value,K=r()/2+.25,Ae=r()/2+.25,ze=Ie.value,Re=U;he=he.add(C(()=>o.sub(Ie.value,ze).add(1).pow10().times(Re)));const ae=Ud(()=>({baseResource:Cn(c),gainResource:x,formula:$i=>$i.div(H).pow(K).times(C(()=>g.toolNodes.value.ironRelic!=null?ee("ironRelic")?4:2:1)),spend(){c.value=0}}));U=he.evaluate(),Ie.value+=2;const Pe=be,ye=kn(r),de=m.variable(x).pow(Ae).add(1),nt=Ce(()=>({multiplier:()=>de.evaluate(),description:ye,enabled:()=>o.gt(x.value,0)})),Xe=Ce(()=>({multiplier:()=>de.evaluate(o.add(x.value,ae.actualGain.value))})),ue=dd(()=>({display:{title:ye,description:j(()=>d("span",null,[_("Reset "),c.displayName,_(" for")," ",mi(x,o.clampMin(ae.actualGain.value,1))," ",x.displayName,d("br",null,null),d("div",null,[_("Next:")," ",mi(c,o.lt(ae.actualGain.value,1)?ae.currentAt.value:ae.nextAt.value)," ",c.displayName])]))},style:{width:"200px",minHeight:"100px"},canClick:()=>o.gte(ae.actualGain.value,1),prestigeResource:x,onClick:ae.convert,visibility:Pe})),{isHovering:Ge}=ie({feature:ue,canClick:()=>s(ue.canClick),modifier:nt,cost:H,previewCost:c,previewModifier:Xe}),rt=C(()=>Ge.value&&ue.canClick.value);Q.push([ue]);const On=dn(m.variable(x),rt,ae.actualGain),et=dn(de,rt,ae.actualGain);le[V*2]=j(()=>d(oe,null,[He(ue.visibility)?d("div",{style:"margin: 10px"},[_("You have")," ",d("h2",{style:{color:O,textShadow:`0px 0px 10px ${O}`}},[On()])," ",x.displayName,_(","),d("br",null,null),_("providing a "),et(),_("x multiplier to previous")," ",c.displayName,_(" gain")]):null,Ti(ue)])),Wd(this,ae,()=>Ye.value.lengthen(ae,Pe.value,!0,10)),de=C(()=>en(ae,o.add(Pe.value,1),!0,10)),nt=C(()=>o.pow(Re,Pe.value)),Xe=Ce(()=>({multiplier:nt,description:K,enabled:()=>He(rt.visibility)})),ue=U;he=he.add(C(()=>o.sub(Ie.value,H).add(1).times(3).pow(Re).times(ue))),U=he.evaluate(),Ie.value+=2;const Ge=Vn([.64,.75,.55],r),rt=zd(()=>({direction:W.Right,width:300,height:20,progress:()=>o.sub(x.value,ye.value).div(o.sub(de.value,ye.value)).toNumber(),visibility:O,xp:x,display:j(()=>d("span",null,[xe(x.value),_("/"),xe(de.value)])),fillStyle:`background-color: ${Ge}`,textStyle:"text-shadow: 5px 0 10px black"}));this.on("preUpdate",On=>{if(Ye.value.lengthet.state.id===e)&&He(rt.visibility)){let et=o.times(Mt.value,On);g.toolNodes.value.goldRelic!=null&&(et=o.times(ee("goldRelic")?.5:.25,Ye.value.length).add(1).times(et)),x.value=o.add(et,x.value)}}),I.push(Xe),Q.push([rt]),le[V*2]=j(()=>d(oe,null,[He(rt.visibility)?d("div",{style:"margin: 10px"},[_("You have "),d("h3",null,[K]),_(" Lv. "),at(Pe.value),_(","),d("br",null,null),_("providing a "),xe(nt.value),_("x multiplier to previous")," ",c.displayName,_(" gain"),d("br",null,null)]):null,Ti(rt)]));break}case"dimensions":{const x=kn(r),O=Mn(0,x+" energy"),H=Vn([.64,.75,.55],r),K=Ie.value,Ae=U;he=he.add(C(()=>o.sub(Ie.value,K).add(1).pow_base(32).add(1).log2().add(1).times(Ae)));const ze=C(()=>o.add(O.value,1).log2().add(1)),Re=Ce(()=>({multiplier:ze,description:x,enabled:()=>o.gt(O.value,0)}));I.push(Re);const ae=be,Pe=[];for(let ye=0;ye<4;ye++){const de=o.add(h,r()-.5).pow_base(2).times(10).recip(),nt=je.value,Xe=m.variable(C(()=>et.amount.value)),ue=Xe.pow_base(o.pow10(ye+1)).times(nt),Ge=["First","Second","Third","Fourth"][ye]+" "+x+" Dimension",rt=Mn(0,Ge),On=Xe.sub(1).pow_base(2).times(de).times(C(()=>o.add(et.amount.value,rt.value))),et=gr(()=>({display:{title:Ge,description:j(()=>d("div",null,[d("div",null,[_("Amount:")," ",xe(o.add(rt.value,et.amount.value))," ",_("["),at(et.amount.value),_("]")])])),effectDisplay:j(()=>d("span",null,[na()," ",ye===0?O.displayName:["First","Second","Third","Fourth"][ye-1]+" "+x+" Dimension",_("/s")])),showAmount:!1},style:{width:"400px"},effect:On,dimensions:rt,limit:100,energy:ye===0?O:void 0,requirements:qn(()=>({resource:Cn(c),cost:ue,maxBulkAmount:()=>ee("diamondRelic")!=null?o.dInf:1,requiresPay:()=>!ee("unobtainiumRelic")})),visibility:ae}));Pe.push(et);const $i=dr(et),nr=C(()=>s(et.canClick)&&$i.value),ta=new m({inputs:[Xe],evaluate(ir){return o.sub(ir,1).pow_base(2).times(de).times(o.add(ir,rt.value))}}),na=dn(ta,nr);ce.push({shouldShowPreview:nr,cost:C(()=>ee("unobtainiumRelic")?0:en(ue,et.amountToIncrease.value))});const ia=Pi(c,B,()=>Se(ue));Ri(et,{display:ia,direction:W.Down}),U=he.evaluate(),Ie.value++}this.on("preUpdate",ye=>{if(Ye.value.lengthde.state.id===e)&&He(ae)){let de=o.times(Mt.value,ye);g.toolNodes.value.platinumRelic!=null&&(de=o.times(ee("platinumRelic")?4:2,de));const nt=Pe[0].effect.evaluate();O.value=o.times(nt,de).add(O.value);for(let Xe=1;Xe<4;Xe++){const ue=Pe[Xe].effect.evaluate();Pe[Xe-1].dimensions.value=o.times(ue,de).add(Pe[Xe-1].dimensions.value)}}}),Q.push(Pe),le[V*2]=j(()=>d(oe,null,[He(ae)?d("div",{style:"margin: 10px"},[_("You have")," ",d("h2",{style:{color:H,textShadow:`0px 0px 10px ${H}`}},[xe(O.value)])," ",O.displayName,_(","),d("br",null,null),_("providing a "),xe(ze.value),_("x multiplier to previous")," ",c.displayName,_(" gain")]):null,Ss(...Pe)]));break}case"prestige":{const x=kn(r),O=be,H=r()/10+1.1,K=je.value;he=he.pow(H);const Ae=Qc(()=>({exponent:H,description:x,enabled:ae.bought}));U=he.evaluate(),Ie.value+=20;const ze=Q.filter((ye,de)=>de%2===0),Re=Zd(()=>({thingsToReset:ze,onReset(){c.value=0}})),ae=mr(()=>({display:{title:x,description:`Reset all previous ${a} content to raise all previous ${c.displayName} gain to the ^${xe(H)}`},style:{width:"200px",minHeight:"100px"},onPurchase:()=>{ee("unobtainiumRelic")||Re.reset()},visibility:O,requirements:qn(()=>({resource:Cn(c),cost:K,requiresPay:!1}))})),Pe=Ce(()=>({multiplier:0}));ie({feature:ae,canClick:()=>s(ae.canPurchase),modifier:Ae,cost:K,previewCost:C(()=>ee("unobtainiumRelic")?0:c.value),previewModifier:Pe,showETA:()=>!s(ae.bought)}),Q.push([ae]);break}}const tt={cache:"increaseCaches"in b?8:.8,generation:"increaseGens"in b?10:1,resourceMulti:"increaseResourceMults"in b?10:1,energyMulti:"increaseEnergyMults"in b?2.5:.25,influences:"increaseInfluences"in b?20:2,relic:0};let Nn=li(tt,r);V===P-1&&"relic"in b&&(Nn="relic");let ut="",gt,St,Xt,Ze,Dt,sn;switch(Nn){case"cache":Ze=Oi(r,i),ut=`Cache: Gain ${xe(o.div(E.value,12))}x your current ${Ze} (no modifiers).`,St=()=>{var x,O,H;return g.grantResource(Ze,o.times((H=(O=(x=g.resourceNodes.value[Ze])==null?void 0:x.state)==null?void 0:O.amount)!=null?H:0,o.div(E.value,12)))};break;case"generation":Ze=Oi(r,i);const $=o.pow(E.value,2).div(40).times(xt[Ze]);ut=`Gen: Gain ${xe($)} ${Ze}/s while plane is active.`,gt=x=>g.grantResource(Ze,o.times(x,$)),Xt=Ze;break;case"resourceMulti":Dt=Ze=Oi(r,i),sn=o.pow(E.value,2).div(10).pow_base(1.5),ut=`Resource Mult: Gain ${xe(sn)}x ${Ze} while plane is active.`;break;case"energyMulti":Dt="energy",sn=o.div(E.value,8).add(1),ut=`Energy Mult: Gain ${xe(sn)}x energy while plane is active.`;break;case"influences":const D=Object.keys(vt)[Math.floor(r()*Object.keys(vt).length)];ut=`Influence: Gain a portal influence (${vt[D].display})`,St=()=>{if(D in g.influenceNodes.value){br.warning(`You already have a ${vt[D].display} influence, skipping treasure`);return}const x={id:En(g.board),position:{...g.board.types.portal.nodes.value.find(O=>O.state.id===e).position},type:"influence",state:{type:D,data:vt[D].initialData}};g.board.placeInAvailableSpace(x),g.board.nodes.value.push(x)};break;case"relic":ut=t==="ultimatum"?"Win the game!":`Relic: Gain the ${t}-tier planar relic (${Pt[t]})`,St=()=>{if(t==="ultimatum"){tr.value=!0;return}if(`${t}Relic`in g.toolNodes.value)br.warning(`You already have a ${Pt[t]} relic, skipping treasure`);else{const x={id:En(g.board),position:{...g.board.types.portal.nodes.value.find(O=>O.state.id===e).position},type:"passive",state:`${t}Relic`};g.board.placeInAvailableSpace(x),g.board.nodes.value.push(x)}}}const ri=be,Fn=je.value,on=Od(()=>({requirements:qn(()=>({resource:Cn(c),cost:Fn})),visibility:ri,display:{requirement:`${xe(Fn)} ${c.displayName}`,effectDisplay:ut},style:"width: 100%",classes:{final:V===P-1},update:gt,onComplete:St,link:Xt,effectedResource:Dt,resourceMulti:sn})),xi=Pi(c,B,Fn);Ri(on,{display:()=>on.earned.value?"":xi.value,direction:W.Down}),Q.push([on]),be=C(()=>on.earned.value)}const pt=Yn(Q,er),Lt=Yn(Q,Qr);I.push(Ce(()=>({multiplier:()=>ee("silver")?4:2,description:()=>(ee("silver")?"Empowered ":"")+Ve.silver.name,enabled:()=>g.toolNodes.value.silver!=null})),Ce(()=>({multiplier:()=>o.add(1,(ee("diamond")?2:1)*pt.filter(V=>V.bought.value).length/10),description:()=>(ee("diamond")?"Empowered ":"")+Ve.diamond.name,enabled:()=>g.toolNodes.value.diamond!=null})),Ce(()=>({multiplier:()=>o.div(p.value,6e3).times(ee("emerald")?2:1).add(1),description:()=>(ee("emerald")?"Empowered ":"")+Ve.emerald.name,enabled:()=>g.toolNodes.value.emerald!=null})),Ce(()=>({multiplier:()=>o.div(Lt.reduce((V,L)=>V.add(s(L.totalAmount)),o.dZero),100).times(ee("gravelRelic")?2:1).add(1).pow(.75),description:()=>(ee("gravelRelic")?"Empowered ":"")+Pt.gravel,enabled:()=>g.toolNodes.value.gravelRelic!=null})),Ce(()=>({multiplier:()=>o.add(g.energy.value,1).log10().add(1).pow(ee("beryliumRelic")?.5:.25),description:()=>(ee("beryliumRelic")?"Empowered ":"")+Pt.berylium,enabled:()=>g.toolNodes.value.beryliumRelic!=null})));const ft=Nt(()=>[Ce(()=>({multiplier:()=>{var V,L,$e;return o.add(($e=(L=(V=g.board.types.booster.nodes.value[0])==null?void 0:V.state)==null?void 0:L.level)!=null?$e:0,1)},description:"Booster",enabled:()=>{var V,L,$e;return($e=(L=(V=g.board.types.booster.nodes.value[0])==null?void 0:V.state)==null?void 0:L.portals.includes(e))!=null?$e:!1}})),Ce(()=>({multiplier:()=>o.times(ee("coalRelic")?.2:.1,Ye.value.length).add(1),description:()=>(ee("coalRelic")?"Empowered ":"")+Pt.coal,enabled:()=>g.toolNodes.value.coalRelic!=null}))]),Mt=C(()=>ft.apply(1)),[ei,Mi]=zn(()=>[{title:`${it(c.displayName)} Gain`,modifier:A,base:0,unit:"/s"},{title:`${it(c.displayName)} Time Speed`,modifier:ft,base:1,visible:()=>o.gt(Mt.value,1)}]),_n=G(!1),ti=j(()=>d(Ot,{modelValue:_n.value,"onUpdate:modelValue":V=>_n.value=V},{header:()=>d("h2",null,[_("Modifiers")]),body:()=>st(ei)}));this.on("preUpdate",V=>{if(!g.activePortals.value.some($e=>$e.state.id===e))return;const L=o.times(Mt.value,V);p.value=o.add(p.value,L),Ye.value.length{var tt;(tt=$e.update)==null||tt.call($e,L)})}),ep(this,()=>Ye.value.lengthYe.value.length{const V=ce.find(L=>L.shouldShowPreview.value);return V?o.neg(Se(V.cost)):0}),An=C(()=>{const V=ce.find(L=>L.shouldShowPreview.value);return V&&V.modifier?o.sub(V.modifier.apply(0),B.value):0}),Zt=dn(m.variable(0).add(c),()=>o.neq(Pn.value,0),Pn),Rn=dn(m.variable(0).add(B),()=>o.neq(An.value,0),An),ni=C(()=>{const V=[];return Ye.value.forEach(L=>{L.link&&V.push(L.link)}),V}),ii=C(()=>{const V={};return Ye.value.forEach(L=>{L.effectedResource!=null&&L.resourceMulti!=null&&(V[L.effectedResource]!=null?V[L.effectedResource]=o.times(V[L.effectedResource],L.resourceMulti):V[L.effectedResource]=L.resourceMulti)}),V}),Ye=C(()=>{const V=[];for(let L=1;Lo.lt(Ye.value.length,P)&&Q.some(V=>V.some(L=>"earned"in L&&s(L.earned)||"bought"in L&&s(L.bought)?!1:("canClick"in L&&s(L.canClick)||"canPurchase"in L&&s(L.canPurchase),!0)))),Ii=C(()=>{const V=Q.findIndex(($e,tt)=>tt>0&&tt%2===0&&!Q[tt-1][0].earned.value);let L;return V===-1?L=Q:L=Q.slice(0,V),L.map(($e,tt)=>tt in le?st(le[tt]):Ti(...$e))});return{tier:ot(t),seed:ot(n),influences:ot(i),name:a,color:u,resource:c,background:l,style:{background:l,"--background":l},features:Q,resourceTabCollapsed:Mi,links:ni,resourceMultis:ii,earnedTreasures:Ye,showNotif:Si,timeActive:p,bonusRewardsLevel:N,display:j(()=>d(oe,null,[d(gi,{class:"nav-container",style:"z-index: 5"},{default:()=>[d("span",{class:"nav-segment"},[d("h2",null,[a])]),d("span",{class:"nav-segment"},[d("h3",null,[t,_("-tier")])]),i.length===0?null:d("span",{class:"nav-segment"},[d(Fe,{display:i.map(V=>{const L=vt[V.type].description;return typeof L=="function"?L(V):L}).join("
"),direction:W.Down,style:"width: 300px"},{default:()=>[d("h3",null,[i.length,_(" influences")])]})]),d("span",{class:"nav-segment"},[d("button",{class:"button",style:"display: inline",onClick:()=>_n.value=!0},[_("modifiers")])])]}),d(gi,{class:"nav-container"},{default:()=>[d("span",{class:"nav-segment"},[d("h3",{style:`color: ${u}; text-shadow: 0px 0px 10px ${u};`},[st(Zt)])," ",c.displayName]),d("span",{class:"nav-segment"},[_("("),d("h3",{style:`color: ${u}; text-shadow: 0px 0px 10px ${u};`},[o.gt(B.value,0)?"+":"",st(Rn)]),_("/s)")]),o.neq(Mt.value,1)?d("span",{class:"nav-segment"},[_("Speed: "),xe(Mt.value),_("x")]):null]}),d(Ed,{height:"60px"},null),Ii.value,Ye.value.length+1d("div",null,[d("span",null,[a]),d("span",{style:"font-size: large; vertical-align: sub;"},[" ",Ye.value.length,_("/"),P,_(" treasures")])]))}})}function Oi(e,t){t=t.filter(l=>l.type==="increaseResources"||l.type==="decreaseResources");const n=Object.keys(xt).reduce((l,c)=>{let p=xt[c];return t.filter(v=>v.data===c).forEach(v=>{v.type==="increaseResources"?p*=1e3:p/=1e3}),l+p},0),i=Object.keys(xt),r=Math.floor(e()*n);let a=0,u;for(let l=0;ll+c),i=Object.keys(e);let r=0,a=null;const u=t()*n;for(let l=0;le===g.board.selectedNode.value?{text:"Mining"}:Object.keys(g.resourceNodes.value).length===0?{text:"Click me!"}:null,actionDistance:Math.PI/4,actions:[qt,Vt("mine")],progress:e=>ke(e)?new o(e.state.progress).toNumber():0,progressDisplay:rn.Outline,progressColor:"var(--accent2)",classes:e=>({running:ke(e)}),draggable:!0},op={shape:Le.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:e=>e===g.board.selectedNode.value?{text:"Broken Forge"}:null,actionDistance:Math.PI/4,actions:[{id:"repair",icon:"build",tooltip:{text:"Repair - 100 energy"},onClick(e){o.gte(g.energy.value,100)&&(e.type="factory",g.energy.value=o.sub(g.energy.value,100),g.helpModals.factory.showModal.value=!0)},confirmationLabel:()=>o.gte(g.energy.value,100)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}}],draggable:!0},lp={shape:Le.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:e=>{var t,n;if(e===g.board.selectedNode.value)return{text:e.state==null?"Forge - Drag a resource to me!":`Forging ${Ve[e.state].name}`};if(((t=g.board.draggingNode.value)==null?void 0:t.type)==="resource"){const i=((n=g.board.draggingNode.value)==null?void 0:n.state).type,r=e.state===i?"Disconnect":g.toolNodes.value[i]==null?Ve[i].name:"Already crafted",a=e.state===i||g.toolNodes.value[i]==null?"var(--accent2)":"var(--danger)";return{text:r,color:a}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect resource"},onClick(e){e.state=void 0,g.board.selectedAction.value=null,g.board.selectedNode.value=null},visibility:e=>e.state!=null},{id:"craft",icon:"done",tooltip:e=>({text:`Forge ${Ve[e.state].name} - ${We(Ve[e.state].cost)} energy`}),onClick(e){const t=Ve[e.state];if(o.gte(g.energy.value,t.cost)&&g.toolNodes.value[e.state]==null){g.energy.value=o.sub(g.energy.value,t.cost);const n={id:En(g.board),position:{...e.position},type:t.type,state:"state"in t?t.state:void 0};if(g.board.placeInAvailableSpace(n),g.board.nodes.value.push(n),e.state==="iron"){const i={id:En(g.board),position:{...e.position},type:"trashCan"};g.board.placeInAvailableSpace(i),g.board.nodes.value.push(i)}g.board.selectedAction.value=null,g.board.selectedNode.value=null,e.state=void 0,t.type in g.helpModals&&(g.helpModals[t.type].showModal.value=!0)}},fillColor:e=>o.gte(g.energy.value,Ve[e.state].cost)&&g.toolNodes.value[e.state]==null?"var(--accent2)":"var(--danger)",visibility:e=>e.state!=null,confirmationLabel:e=>o.gte(g.energy.value,Ve[e.state].cost)?g.toolNodes.value[e.state]==null?{text:"Tap again to confirm"}:{text:"Already crafted",color:"var(--danger)"}:{text:"Cannot afford",color:"var(--danger)"}},Vt("factory")],progress:e=>e.state==null||g.toolNodes.value[e.state]!=null?0:o.div(o.sqrt(g.energy.value),o.sqrt(Ve[e.state].cost)).clampMax(1).toNumber(),progressDisplay:rn.Fill,progressColor:e=>e.state!=null&&o.gte(g.energy.value,Ve[e.state].cost)?"var(--accent2)":"var(--foreground)",canAccept(e,t){var i;if(t.type!=="resource")return!1;const n=((i=g.board.draggingNode.value)==null?void 0:i.state).type;return g.toolNodes.value[n]==null},onDrop(e,t){const n=t.state.type;e.state===n?e.state=void 0:e.state=n,g.board.selectedNode.value=e},draggable:!0},up=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI"],cp={shape:Le.Circle,size:50,title:e=>it(e.state.type),subtitle:e=>We(e.state.amount),otherSubtitle:e=>up[Tt.indexOf(e.state.type)],progress:e=>id(e.state.type),onClick(){},progressDisplay:rn.Outline,progressColor:"var(--accent3)",classes:e=>{var t;return{"affected-node":g.dowsing.value!=null&&ke(g.dowsing.value)&&g.dowsing.value.state.resources.includes(e.state.type)||o.neq((t=g.planarMultis.value[e.state.type])!=null?t:1,1)}},draggable:!0},dp={shape:Le.Circle,size:50,title:e=>{const t=e.state;return t.includes("Relic")?Pt[t.slice(0,-5)]:Ve[t].name},label:e=>e===g.board.selectedNode.value?{text:hd[e.state].description(ee(e.state))}:null,outlineColor:"var(--bought)",classes:e=>({"affected-node":ee(e.state)}),draggable:!0},pp={shape:Le.Diamond,size:50,title:"\u{1F962}",label:e=>e===g.board.selectedNode.value?{text:e.state.resources.length===0?"Dowsing - Drag a resource to me!":`Dowsing (${e.state.resources.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:Wr(e,t=>`Double ${t} odds`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(2).pow_base(100),16),qt,Vt("dowsing")],classes:e=>({running:ke(e)}),canAccept:Hr,onDrop:Yr,draggable:!0},fp={shape:Le.Diamond,size:50,title:"\u26F0\uFE0F",label:e=>e===g.board.selectedNode.value?{text:e.state.resources.length===0?"Quarry - Drag a resource to me!":`Quarrying (${e.state.resources.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:Wr(e,t=>`Gather ${yt(o.div(g.dropRates[t].computedModifier.value,100))} ${t}/s`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(2).pow_base(1e4),16),qt,Vt("quarry")],progress:e=>ke(e)?o.eq(g.quarryProgressRequired.value,0)?0:new o(e.state.progress).div(g.quarryProgressRequired.value).toNumber():0,progressDisplay:rn.Outline,progressColor:"var(--accent2)",canAccept:Hr,onDrop:Yr,classes:e=>({running:ke(e)}),draggable:!0},gp={shape:Le.Diamond,size:50,title:"\u{1F50C}",label:e=>e===g.board.selectedNode.value?{text:e.state.tools.length===0?"Empowerer - Drag a tool to me!":`Empowering (${e.state.tools.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:ed(e,t=>t.includes("Relic")?`Double ${Pt[t.slice(0,-5)]}'s effect`:`Double ${Ve[t].name}'s effect`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(3).pow_base(1e3),24),qt,Vt("empowerer")],canAccept:td,onDrop:nd,classes:e=>({running:ke(e)}),draggable:!0},mp={shape:Le.Diamond,size:50,title:"\u26E9\uFE0F",label:e=>{if(e===g.board.selectedNode.value)return{text:e.state.tier==null?"Portal Spawner - Drag a resource to me!":`Spawning ${e.state.tier}-tier portal`};const t=g.board.draggingNode.value;if((t==null?void 0:t.type)==="resource"){const n=t.state.type;return{text:e.state.tier===n?"Disconnect":`${it(n)}-tier Portal`,color:"var(--accent2)"}}else if((t==null?void 0:t.type)==="influence"){const n=t.state.type;if(e.state.influences.includes(n))return{text:"Disconnect",color:"var(--accent2)"};const r=vt[n].cost;let a;return o.lt(r,1e3)?a=We(r):a=Li(r,0),{text:`Add influence (${a}x cost)`,color:"var(--accent2)"}}else if((t==null?void 0:t.type)==="portal")return{text:`Copy tier/influences from ${ge[t.state.id].name}`};return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect all"},onClick(e){e.state={...e.state,tier:void 0,influences:[]},g.board.selectedAction.value=null,g.board.selectedNode.value=null},visibility:e=>{const{tier:t,influences:n}=e.state;return t!=null||n.length>0}},{id:"makePortal",icon:"done",tooltip:e=>({text:`Spawn ${e.state.tier}-tier portal - ${We(g.computedPortalCost.value)} energy`}),fillColor:()=>o.gte(g.energy.value,g.computedPortalCost.value)?"var(--accent2)":"var(--danger)",confirmationLabel:()=>o.gte(g.energy.value,g.computedPortalCost.value)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(e){if(o.lt(g.energy.value,g.computedPortalCost.value))return;let t=0;for(;`portal-${t}`in ge;)t++;g.energy.value=o.sub(g.energy.value,g.computedPortalCost.value);const{tier:n,influences:i}=e.state;Zi(ea(`portal-${t}`,n,Math.floor(Math.random()*4294967296),i.map(a=>g.influenceNodes.value[a].state)),Z);const r={id:En(g.board),position:{...e.position},type:"portal",state:{id:`portal-${t}`,powered:!1}};g.board.placeInAvailableSpace(r),g.board.nodes.value.push(r),g.board.selectedAction.value=null,g.board.selectedNode.value=null,e.state={tier:void 0,influences:[]}},visibility:e=>e.state.tier!=null},Vt("portalGenerator")],canAccept(e,t){return t.type==="resource"||t.type==="influence"||t.type==="portal"},onDrop(e,t){if(t.type==="resource"){const n=t.state.type,i=e.state.tier;e.state={...e.state,tier:n===i?void 0:n}}else if(t.type==="influence"){const n=t.state.type,i=e.state.influences;i.includes(n)?e.state={...e.state,influences:i.filter(r=>r!==n)}:e.state={...e.state,influences:[...i,n]}}else if(t.type==="portal"){const n=ge[t.state.id];e.state={...e.state,tier:n.tier.value,influences:n.influences.value.map(i=>i.type)}}g.board.selectedNode.value=e},progress:e=>e.state.tier==null?0:o.div(o.sqrt(g.energy.value),o.sqrt(g.computedPortalCost.value)).clampMax(1).toNumber(),progressDisplay:rn.Fill,progressColor:e=>e.state.tier!=null&&o.gte(g.energy.value,g.computedPortalCost.value)?"var(--accent2)":"var(--foreground)",draggable:!0},vp={shape:Le.Diamond,size:50,title:"\u{1F300}",label:e=>e===g.board.selectedNode.value?{text:`Portal to ${ge[e.state.id].name}`,color:ge[e.state.id].color}:null,actionDistance:Math.PI/4,actions:[qt],classes:e=>({running:ke(e),showNotif:ge[e.state.id].showNotif.value,"affected-node":g.booster.value!=null&&ke(g.booster.value)&&g.booster.value.state.portals.includes(e.state.id)}),outlineColor:e=>ge[e.state.id].background,draggable:!0},hp={shape:e=>e.state.type==="increaseResources"||e.state.type==="decreaseResources"?Le.Diamond:Le.Circle,size:50,title:e=>vt[e.state.type].display,otherSubtitle:e=>{const t=vt[e.state.type].cost;return o.lt(t,1e3)?`${We(t)}x cost`:`${Li(t,0)}x cost`},label:e=>{if(e===g.board.selectedNode.value){const n=e.state,i=vt[n.type].description;return{text:typeof i=="function"?i(n):i}}const t=g.board.draggingNode.value;if((t==null?void 0:t.type)==="resource"){const n=t.state.type,{type:i,data:r}=e.state;let a;if(Array.isArray(r)&&r.includes(n))a="Disconnect";else if(i==="increaseResources")a=`Increase ${it(n)} odds`;else if(i==="decreaseResources")a=`Decrease ${it(n)} odds`;else return null;return{text:a,color:"var(--accent2)"}}return null},actionDistance:Math.PI/4,actions:[an],canAccept:(e,t)=>t.type!=="resource"?!1:Array.isArray(e.state.data),onDrop:(e,t)=>{if(t.type!=="resource")return;const n=t.state.type,i=e.state.data;i!=null&&(i.includes(n)?e.state={...e.state,data:i.filter(r=>r!==n)}:e.state={...e.state,data:[...i,n]},g.board.selectedNode.value=e)},outlineColor:"var(--danger)",draggable:!0},bp={shape:Le.Diamond,size:50,title:"\u231B",label:e=>e===g.board.selectedNode.value?{text:e.state.portals.length===0?"Booster - Drag a portal to me!":`Boosting by ${We(o.add(1,e.state.level))}x (${e.state.portals.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:yi(e,t=>`Boost ${ge[t].name}'s speed`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(6).pow_base(1e3)),{id:"increaseBoost",icon:"arrow_upward",tooltip(e){return{text:`Increase boost - ${We(si.evaluate(e.state.level))} energy`}},fillColor(e){return o.gte(g.energy.value,si.evaluate(e.state.level))?"var(--bought)":"var(--locked)"},confirmationLabel(e){return o.gte(g.energy.value,si.evaluate(e.state.level))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}},onClick(e){const t=si.evaluate(e.state.level);o.gte(g.energy.value,t)&&(g.energy.value=o.sub(g.energy.value,t),e.state={...e.state,level:o.add(e.state.level,1)},g.board.selectedAction.value=null)}},qt,Vt("booster")],canAccept:wi,onDrop:_i,classes:e=>({running:ke(e)}),draggable:!0},yp={shape:Le.Diamond,size:50,title:"\u{1F916}",label:e=>e===g.board.selectedNode.value?{text:e.state.portals.length===0?"Upgrader - Drag a portal to me!":`Auto-Upgrading (${e.state.portals.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:yi(e,t=>`Auto-buy ${ge[t].name}'s upgrades and prestiges`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(4).pow_base(1e6)),qt,Vt("upgrader")],canAccept:wi,onDrop:_i,classes:e=>({running:ke(e)}),draggable:!0},wp={shape:Le.Diamond,size:50,title:"\u{1F9BE}",label:e=>e===g.board.selectedNode.value?{text:e.state.portals.length===0?"Automator - Drag a portal to me!":`Automatating (${e.state.portals.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:yi(e,t=>`Auto-buy ${ge[t].name}'s repeatables and dimensions`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(4).pow_base(1e6)),qt,Vt("automator")],canAccept:wi,onDrop:_i,classes:e=>({running:ke(e)}),draggable:!0},_p={shape:Le.Diamond,size:50,title:"\u{1F4B1}",label:e=>e===g.board.selectedNode.value?{text:e.state.portals.length===0?"Investments - Drag a portal to me!":`Investing (${e.state.portals.length}/${o.add(e.state.maxConnections,g.computedBonusConnectionsModifier.value)})`}:yi(e,t=>`Passively generate ${ge[t].name}'s conversions`),actionDistance:Math.PI/4,actions:[an,wn(e=>e.add(3).pow_base(1e8)),qt,Vt("investments")],canAccept:wi,onDrop:_i,classes:e=>({running:ke(e)}),draggable:!0},Np={shape:Le.Diamond,size:50,title:"\u{1F5D1}\uFE0F",label:e=>{var t;if(e===g.board.selectedNode.value)return{text:"Trash Can - Drag a portal to me!"};if(((t=g.board.draggingNode.value)==null?void 0:t.type)==="portal"){const n=g.board.draggingNode.value.state.id;return{text:`Delete ${ge[n].name}!`,color:"var(--danger)"}}return null},canAccept:(e,t)=>t.type==="portal",onDrop:(e,t)=>{const n=t.state.id;Xi(ge[n]),delete Z.layers[n],g.board.state.value.nodes=g.board.state.value.nodes.filter(i=>i!==t),g.booster.value&&(g.booster.value.state={...g.booster.value.state,portals:g.booster.value.state.portals.filter(i=>i!==n)}),g.upgrader.value&&(g.upgrader.value.state={...g.upgrader.value.state,portals:g.upgrader.value.state.portals.filter(i=>i!==n)}),g.automator.value&&(g.automator.value.state={...g.automator.value.state,portals:g.automator.value.state.portals.filter(i=>i!==n)}),g.investments.value&&(g.investments.value.state={...g.investments.value.state,portals:g.investments.value.state.portals.filter(i=>i!==n)}),Z.tabs=Z.tabs.filter(i=>i!==n)},draggable:!0},yr=hi(),Cp={mine:sp,brokenFactory:op,factory:lp,resource:cp,passive:dp,dowsing:pp,quarry:fp,empowerer:gp,portalGenerator:mp,portal:vp,influence:hp,booster:bp,upgrader:yp,automator:wp,investments:_p,trashCan:Np},g=Yi("main",function(){const e=Mn(0,"energy"),t=C(()=>h.types.resource.nodes.value.reduce(($,D)=>($[D.state.type]=D,$),{})),n=C(()=>({...h.types.passive.nodes.value.reduce(($,D)=>($[D.state]=D,$),{}),sand:h.types.dowsing.nodes.value[0],wood:h.types.quarry.nodes.value[0],coal:h.types.empowerer.nodes.value[0],iron:h.types.portalGenerator.nodes.value[0],gold:h.types.booster.nodes.value[0],platinum:h.types.upgrader.nodes.value[0],berylium:h.types.automator.nodes.value[0],ultimatum:h.types.investments.nodes.value[0]})),i=C(()=>Object.keys(Pt).filter($=>`${$}Relic`in n.value).length),r=C(()=>({...h.types.influence.nodes.value.reduce(($,D)=>($[D.state.type]=D,$),{})})),a=C(()=>({...h.types.portal.nodes.value.reduce(($,D)=>($[D.state.id]=D,$),{})})),u=C(()=>Tt.reduce(($,D)=>{var O,H,K;const x=(K=(H=(O=t.value[D])==null?void 0:O.state)==null?void 0:H.amount)!=null?K:0;return $[D]=o.floor(qi.invert(x)),$},{})),l=mn({}),c=mn({});Gt(()=>{Tt.forEach($=>{ht(()=>u.value[$],(D,x)=>{const O=o.sub(D,x);o.gt(O,1)&&te.active===Z.id&&yr.info(d("div",null,[d("h3",null,[o.eq(D,1)?`${it($)} discovered`:`${it($)} is now Level ${at(D)}`,_("!")]),o.gt(O,1)?d("div",null,[_("Gained "),at(O),_(" levels")]):null]))})})});const p=C(()=>Q.filter($=>{var D,x;return(x=(D=$.value)==null?void 0:D.state)==null?void 0:x.powered}).length+h.types.portal.nodes.value.filter($=>$.state.powered).length),v=C(()=>{let $=p.value;return n.value.copperRelic!=null&&($--,ee("copperRelic")&&$--),$}),f=C(()=>{const $=v.value;return o.lt($,0)?0:o.eq($,0)?10:o.add($,1).pow_base(100).div(10).times(.99)}),b=C(()=>{if(P.value==null)return 0;let D=P.value.state.resources.reduce((x,O)=>o.div(100,Zt[O].computedModifier.value).add(x),o.dZero);return n.value.silverRelic!=null&&(D=o.div(D,o.add(p.value,1)),ee("silverRelic")&&(D=o.div(D,o.add(p.value,1)))),D}),h=Gc($=>({startNodes:()=>[{position:{x:0,y:0},type:"mine",state:{progress:0,powered:!1}},{position:{x:0,y:-200},type:"brokenFactory"}],types:Cp,style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},links(){const D=[];if(D.push(...Object.keys(l).filter(fr(y.value)).map(x=>({startNode:y.value,endNode:t.value[x],stroke:"var(--accent3)",strokeWidth:5}))),N.value!=null&&N.value.state!=null&&D.push({startNode:N.value,endNode:t.value[N.value.state],stroke:"var(--foreground)",strokeWidth:4}),E.value!=null&&E.value.state.resources.forEach(x=>{D.push({startNode:E.value,endNode:t.value[x],stroke:ke(E.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),P.value!=null&&P.value.state.resources.forEach(x=>{D.push({startNode:P.value,endNode:t.value[x],stroke:x in c?"var(--accent3)":"var(--foreground)",strokeWidth:4})}),I.value!=null&&I.value.state.tools.forEach(x=>{D.push({startNode:I.value,endNode:n.value[x],stroke:ke(I.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),A.value!=null){const x=A.value.state;x.tier!=null&&D.push({startNode:A.value,endNode:t.value[x.tier],stroke:"var(--foreground)",strokeWidth:4}),x.influences.forEach(O=>{D.push({startNode:A.value,endNode:r.value[O],stroke:"var(--foreground)",strokeWidth:4})}),$.types.portal.nodes.value.forEach(O=>{const H=ge[O.state.id];return Tt.filter(fr(O)).forEach(K=>{let Ae;if(H.links.value.includes(K))Ae="var(--accent3)";else if(K in H.resourceMultis.value)Ae="var(--accent1)";else return;D.push({startNode:O,endNode:t.value[K],stroke:ke(O)?Ae:"var(--foreground)",strokeWidth:4})}),D})}return B.value!=null&&B.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{D.push({startNode:B.value,endNode:a.value[x],stroke:ke(B.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),ce.value!=null&&ce.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{D.push({startNode:ce.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),le.value!=null&&le.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{D.push({startNode:le.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),ie.value!=null&&ie.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{D.push({startNode:ie.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),Object.values(r.value).forEach(x=>{const O=x.state;(O.type==="increaseResources"||O.type==="decreaseResources")&&O.data.forEach(H=>{D.push({startNode:x,endNode:t.value[H],stroke:"var(--foreground)",strokeWidth:4})})}),D}})),y=C(()=>h.types.mine.nodes.value[0]),N=C(()=>h.types.factory.nodes.value[0]),E=C(()=>n.value.sand),P=C(()=>n.value.wood),I=C(()=>n.value.coal),A=C(()=>n.value.iron),B=C(()=>n.value.gold),ce=C(()=>n.value.platinum),le=C(()=>n.value.berylium),ie=C(()=>n.value.ultimatum),Q=[y,E,P,I,B,ce,le,ie];function Ie($,D){let x=t.value[$];if(D=o.times(D,Rn[$].computedModifier.value),x==null)x={id:En(h),position:{...y.value.position},type:"resource",state:{type:$,amount:D}},h.placeInAvailableSpace(x),h.nodes.value.push(x);else{const O=x.state;x.state={...O,amount:o.add(O.amount,D)}}}const he=C(()=>Object.keys(xt).reduce(($,D)=>$+new o(Zt[D].computedModifier.value).toNumber(),0)),U=C(()=>{const $={};return h.types.portal.nodes.value.forEach(D=>{if(!ke(D))return;const O=ge[D.state.id].resourceMultis.value;Object.keys(O).forEach(H=>{$[H]!=null?$[H]=o.times($[H],O[H]):$[H]=O[H]})}),$}),be=Nt(()=>Tt.map($=>jt(()=>({description:()=>it($),addend:()=>u.value[$],enabled:()=>o.gt(u.value[$],0)})))),je=C(()=>be.apply(0)),pt=Nt(()=>[jt(()=>({addend:je,description:"Resource Levels"})),Ce(()=>({multiplier:()=>o.pow(An.value,je.value),description:()=>`${zt(An.value,3)}x per Resource Level`})),Ce(()=>({multiplier:()=>ee("stone")?4:2,description:()=>(ee("stone")?"Empowered ":"")+Ve.stone.name,enabled:()=>n.value.stone!=null})),Ce(()=>({multiplier:()=>{var $;return($=U.value.energy)!=null?$:1},description:"Planar Treasures",enabled:()=>{var $;return o.neq(($=U.value.energy)!=null?$:1,1)}})),jt(()=>({addend:()=>o.pow(100,v.value).div(10).neg(),description:"Powered Machines (100^n/10 energy/s)",enabled:()=>o.gt(v.value,0)}))]),Lt=C(()=>pt.apply(0)),ft=Nt(()=>[jt(()=>({addend:()=>ee("unobtainium")?2:1,description:()=>(ee("unobtainium")?"Empowered ":"")+Ve.unobtainium.name,enabled:()=>n.value.unobtainium!=null}))]),Mt=C(()=>ft.apply(0)),ei=Nt(()=>[Ce(()=>({multiplier:()=>ee("dirt")?4:2,description:()=>(ee("dirt")?"Empowered ":"")+Ve.dirt.name,enabled:()=>n.value.dirt!=null})),Ce(()=>({multiplier:()=>o.pow(i.value,ee("woodRelic")?2:1),description:()=>(ee("woodRelic")?"Empowered ":"")+Pt.wood,enabled:()=>n.value.woodRelic!=null}))]),Mi=C(()=>ei.apply(1)),_n=Nt(()=>[Ce(()=>({multiplier:()=>ee("gravel")?4:2,description:()=>(ee("gravel")?"Empowered ":"")+Ve.gravel.name,enabled:()=>n.value.gravel!=null}))]),ti=C(()=>_n.apply(1)),Pn=Nt(()=>[jt(()=>({addend:()=>ee("copper")?.004:.002,description:()=>(ee("copper")?"Empowered ":"")+Ve.copper.name,enabled:()=>n.value.copper!=null}))]),An=C(()=>Pn.apply(1.01)),Zt=Object.keys(xt).reduce(($,D)=>{const x=Nt(()=>[Ce(()=>({multiplier:2,description:"Dowsing",enabled:()=>E.value!=null&&ke(E.value)&&E.value.state.resources.includes(D)}))]),O=C(()=>x.apply(xt[D])),H={title:`${it(D)} Drop Rate`,modifier:x,base:xt[D]};return $[D]={modifier:x,computedModifier:O,section:H},$},{}),Rn=Object.keys(xt).reduce(($,D)=>{const x=Nt(()=>[Ce(()=>({multiplier:()=>{var K;return(K=U.value[D])!=null?K:1},description:"Planar Treasures",enabled:()=>{var K;return o.neq((K=U.value[D])!=null?K:1,1)}}))]),O=C(()=>x.apply(1)),H={title:`${it(D)} Gain`,modifier:x};return $[D]={modifier:x,computedModifier:O,section:H},$},{}),ni=C(()=>{var D,x,O;const $=Tt.indexOf((O=(x=(D=A.value)==null?void 0:D.state)==null?void 0:x.tier)!=null?O:"dirt");return o.add($,1).times($).div(2).add(9).pow10()}),ii=Nt(()=>[...Object.keys(vt).map($=>Ce(()=>({multiplier:vt[$].cost,description:vt[$].display,enabled:()=>{var D,x,O;return(O=(x=(D=A.value)==null?void 0:D.state)==null?void 0:x.influences.includes($))!=null?O:!1},smallerIsBetter:!0}))),Ce(()=>({multiplier:()=>ee("emeraldRelic")?.05:.1,description:()=>(ee("emeraldRelic")?"Empowered ":"")+Pt.emerald,enabled:()=>n.value.emeraldRelic!=null,smallerIsBetter:!0}))]),Ye=C(()=>ii.apply(ni.value)),[Si,Ii]=zn(()=>[{title:"Resource Levels",modifier:be,base:0},{title:"Energy Gain",modifier:pt,base:0,unit:"/s"},{title:"Portal Cost",modifier:ii,base:ni,unit:" energy",baseText:()=>{var $,D,x;return`${it((x=(D=($=A.value)==null?void 0:$.state)==null?void 0:D.tier)!=null?x:"dirt")}-tier Base Cost`},visible:()=>A.value!=null,smallerIsBetter:!0},{title:"Bonus Connections",modifier:ft,base:0,visible:()=>o.gt(Mt.value,0)}]),[V,L]=zn(()=>[{title:"Mining Speed",modifier:ei,base:1,unit:"/s",visible:()=>n.value.dirt!=null},{title:"Ore Dropped",modifier:_n,base:1,visible:()=>n.value.gravel!=null},{title:"Material Level Effect",modifier:Pn,base:1.01,visible:()=>n.value.copper!=null}]),[$e,tt]=zn(()=>Object.values(Zt).map($=>$.section)),[Nn,ut]=zn(()=>Object.values(Rn).map($=>$.section)),gt=Ur({general:()=>({display:"General",glowColor(){return gt.activeTab.value===this.tab?"white":""},tab:Si,energyTabCollapsed:Ii}),mining:()=>({display:"Mine",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>Object.keys(n.value).length>0,tab:V,miningTabCollapsed:L}),resources:()=>({display:"Ore Rates",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>E.value!=null,tab:$e,resourcesCollapsed:tt}),resourcesGain:()=>({display:"Ore Gain",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>Object.values(Rn).some($=>o.neq($.computedModifier.value,1)),tab:Nn,resourceGainCollapsed:ut})}),St=G(!1),Xt=j(()=>d(Ot,{modelValue:St.value,"onUpdate:modelValue":$=>St.value=$},{header:()=>d("h2",null,[_("Modifiers")]),body:()=>st(gt)})),Ze={mine:wd(),factory:_d(),dowsing:Nd(),quarry:Cd(),empowerer:kd(),portalGenerator:Md(),booster:Sd(),upgrader:Id(),automator:xd(),investments:$d()};Ze.mine.showModal[Wt]=!0,Ze.mine.showModal.value=!0,this.on("preUpdate",$=>{if(Object.keys(l).forEach(D=>{l[D]-=$,l[D]<=0&&delete l[D]}),Object.keys(c).forEach(D=>{c[D]-=$,c[D]<=0&&delete c[D]}),ke(y.value)){const D=o.add(y.value.state.progress,o.times(Mi.value,$)),x=D.floor();y.value.state={...y.value.state,progress:o.sub(D,x)};const O=x.div(he.value).floor();O.gt(0)&&Tt.forEach(K=>{Ie(K,o.times(new o(Zt[K].computedModifier.value).toNumber(),O).times(ti.value)),l[K]=.3});const H=o.sub(x,O).toNumber();for(let K=0;K0){let O=o.add(D,$);const H=o.div(D,b.value).floor();O=o.sub(O,o.times(H,b.value)),P.value.state={...P.value.state,progress:O},o.gt(H,0)&&x.forEach(K=>{Ie(K,H),c[K]=.3})}}e.value=o.add(e.value,o.times(Lt.value,$)),o.lt(e.value,0)&&(e.value=0,Q.forEach(D=>{var x;((x=D.value)==null?void 0:x.state).powered=!1}),Object.values(a.value).forEach(D=>{D.state.powered=!1}),y.value.state={...y.value.state,powered:!1},yr.warning(d("div",null,[d("h3",null,[_("Ran out of energy!")]),d("div",null,[_("All machines have been turned off.")])])))});const Dt=C(()=>{var $,D;return h.selectedAction.value===h.types.brokenFactory.actions[0]?-100:h.selectedAction.value===h.types.factory.actions[1]?o.neg(Ve[h.selectedNode.value.state].cost):(($=h.selectedAction.value)==null?void 0:$.id)==="moreConnections"?o.neg(h.selectedAction.value.formula.evaluate(((D=h.selectedNode.value)==null?void 0:D.state).maxConnections)):0}),sn=dn(m.variable(0).add(e),()=>o.neq(Dt.value,0),Dt),ri=C(()=>{var $;return h.selectedAction.value===qt?(($=h.selectedNode.value)==null?void 0:$.state).powered?o.eq(p.value,1)?10:o.pow(100,p.value).div(10).times(.99):o.neg(f.value):0}),Fn=dn(m.variable(0).add(Lt),()=>o.neq(ri.value,0),ri),on=C(()=>h.types.portal.nodes.value.filter($=>ke($))),xi=C(()=>on.value.sort(($,D)=>{var H,K;const x=(H=ge[$.state.id])!=null&&H.minimized.value?1:0,O=(K=ge[D.state.id])!=null&&K.minimized.value?1:0;return x-O}).map($=>$.state.id));return ht(xi,$=>{Gt(()=>{Z.tabs=["main",...$]})}),ht(Mt,($,D)=>{o.lt($,D)&&(cn($,E,"resources"),cn($,P,"resources"),cn($,I,"tools"),cn($,B,"portals"),cn($,ce,"portals"),cn($,le,"portals"),cn($,ie,"portals"))}),{name:"World",board:h,energy:e,modifierTabs:gt,resourceNodes:t,toolNodes:n,influenceNodes:r,grantResource:Ie,activePortals:on,nextPowerCost:f,computedBonusConnectionsModifier:Mt,quarryProgressRequired:b,dropRates:Zt,dowsing:E,empowerer:I,booster:B,upgrader:ce,automator:le,investments:ie,resourceLevels:u,planarMultis:U,computedPortalCost:Ye,helpModals:Ze,display:j(()=>d(oe,null,[d(gi,{class:"nav-container"},{default:()=>[d("span",{class:"nav-segment"},[d("h2",{style:"color: white; text-shadow: 0px 0px 10px white;"},[st(sn)])," ",_("energy")]),d("span",{class:"nav-segment"},[_("("),d("h3",{style:"color: white; text-shadow: 0px 0px 10px white;"},[o.gt(Lt.value,0)?"+":"",st(Fn)]),_("/s)")]),o.gt(p.value,0)?d("span",{class:"nav-segment"},[d("h3",{style:"color: var(--accent1); text-shadow: 0px 0px 10px var(--accent1);"},[at(p.value)])," ",o.eq(p.value,1)?"machine":"machines"," ",_("powered")]):null,d("span",{class:"nav-segment"},[d("button",{class:"button",style:"display: inline",onClick:()=>St.value=!0},[_("modifiers")])]),Z.devSpeed===0?d("span",{class:"nav-segment"},[_("Game Paused")]):Z.devSpeed!=null&&Z.devSpeed!==1?d("span",{class:"nav-segment"},[_("Dev Speed: "),xe(Z.devSpeed),_("x")]):null]}),st(h),st(Xt),Object.values(Ze).map(({modal:$})=>$())]))}});Je.on("loadSettings",e=>{se(e,"lineVisibility",!0)});Dr(j(()=>d(It,{title:j(()=>d("span",{class:"option-title"},[_("Always show lines to resource nodes"),d("desc",null,[_("Otherwise, will only be visible when either end of the line is selected.")])])),modelValue:te.lineVisibility,"onUpdate:modelValue":e=>te.lineVisibility=e},null)));const kp=e=>{var n,i,r,a,u;const t=[g];return(u=(a=(r=(i=(n=e.layers)==null?void 0:n.main)==null?void 0:i.board)==null?void 0:r.state)==null?void 0:a.nodes)==null||u.filter(l=>(l==null?void 0:l.type)==="portal").map(l=>{var c,p;return(p=(c=l==null?void 0:l.state)==null?void 0:c.id)!=null?p:""}).forEach(l=>{var p,v,f,b;const c=(p=e.layers)==null?void 0:p[l];t.push(ea(l,(v=c.tier)!=null?v:"dirt",(f=c.seed)!=null?f:Math.floor(Math.random()*4294967296),(b=c.influences)!=null?b:[]))}),t},tr=G(!1);function Mp(e,t){}var Sp=Object.freeze(Object.defineProperty({__proto__:null,main:g,getInitialLayers:kp,hasWon:tr,fixOldSave:Mp},Symbol.toStringTag,{value:"Module"}));const Qn=e=>(vn("data-v-4a50ce42"),e=e(),hn(),e),Ip={class:"game-over-modal-header"},xp=["src","alt"],$p={class:"game-over-modal-title"},Ep=Qn(()=>k("h2",null,"Congratulations!",-1)),Dp={key:0},Tp=Qn(()=>k("br",null,null,-1)),Pp=Qn(()=>k("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Ap=Qn(()=>k("br",null,null,-1)),Rp=["href"],Fp=Qn(()=>k("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Op=X({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:i,discordLink:r,versionNumber:a,versionTitle:u}=we,l=C(()=>bi(Z.timePlayed)),c=C(()=>tr.value&&!Z.keepGoing),p=nn(Z,"autosave");function v(){Z.keepGoing=!0}function f(){pn(In())}return(b,h)=>(S(),ne(Ot,{"model-value":s(c)},{header:Y(()=>[k("div",Ip,[s(n)?(S(),R("img",{key:0,class:"game-over-modal-logo",src:s(n),alt:s(t)},null,8,xp)):z("",!0),k("div",$p,[Ep,k("h4",null,"You've beaten "+pe(s(t))+" v"+pe(s(a))+": "+pe(s(u)),1)])])]),body:Y(({shown:y})=>[y?(S(),R("div",Dp,[k("div",null,"It took you "+pe(s(l))+" to beat the game.",1),Tp,Pp,Ap,k("div",null,[k("a",{href:s(r),class:"game-over-modal-discord-link"},[Fp,_(" "+pe(s(i)),1)],8,Rp)]),d(It,{title:"Autosave",modelValue:s(p),"onUpdate:modelValue":h[0]||(h[0]=N=>Oe(p)?p.value=N:null)},null,8,["modelValue"])])):z("",!0)]),footer:Y(()=>[k("div",{class:"game-over-footer"},[k("button",{onClick:v,class:"button"},"Keep Going"),k("button",{onClick:f,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var qp=ve(Op,[["__scopeId","data-v-4a50ce42"]]);const ki=e=>(vn("data-v-2776d67d"),e=e(),hn(),e),Vp=ki(()=>k("div",{class:"nan-modal-header"},[k("h2",null,"NaN value detected!")],-1)),Bp={key:0},Lp=ki(()=>k("br",null,null,-1)),jp=["href"],zp=ki(()=>k("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Gp=ki(()=>k("br",null,null,-1)),Up={class:"nan-footer"},Wp=X({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=we,i=G(!0),r=G(!0),a=nn(Ue,"hasNaN"),u=G(null);ht(a,b=>{b?(i.value=Z.autosave,r.value=Z.devSpeed===0):(Z.autosave=i.value,Z.devSpeed=r.value?0:null)});const l=C(()=>{var b;return(b=Ue.NaNPath)==null?void 0:b.join(".")}),c=C(()=>Ue.NaNPersistent!=null?Ue.NaNPersistent.value:null);function p(){Ue.NaNPersistent!=null&&(Ue.NaNPersistent.value=new o(0),Ue.hasNaN=!1)}function v(){Ue.NaNPersistent&&(Ue.NaNPersistent.value=new o(1),Ue.hasNaN=!1)}function f(){Ue.NaNPersistent&&(Ue.NaNPersistent.value=new o(NaN),Ue.hasNaN=!1)}return(b,h)=>(S(),R(oe,null,[d(Ot,Ut({modelValue:s(a),"onUpdate:modelValue":h[4]||(h[4]=y=>Oe(a)?a.value=y:null)},b.$attrs),{header:Y(()=>[Vp]),body:Y(()=>[k("div",null,[_(' Attempted to assign "'+pe(s(l))+'" to NaN',1),s(c)?(S(),R("span",Bp,pe(" ")+"(previously "+pe(s(xe)(s(c)))+")",1)):z("",!0),_(". Auto-saving has been "+pe(i.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Lp,k("div",null,[k("a",{href:s(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[zp,_(" "+pe(s(t)||"The Paper Pilot Community"),1)],8,jp)]),Gp,d(It,{title:"Autosave",modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=y=>i.value=y)},null,8,["modelValue"]),s(we).enablePausing?(S(),ne(It,{key:0,title:"Pause game",modelValue:r.value,"onUpdate:modelValue":h[1]||(h[1]=y=>r.value=y)},null,8,["modelValue"])):z("",!0)]),footer:Y(()=>[k("div",Up,[k("button",{onClick:h[2]||(h[2]=y=>{var N;return(N=u.value)==null?void 0:N.open()}),class:"button"},"Open Saves Manager"),k("button",{onClick:p,class:"button"},"Set to 0"),k("button",{onClick:v,class:"button"},"Set to 1"),s(c)&&s(o).neq(s(c),0)&&s(o).neq(s(c),1)?(S(),R("button",{key:0,onClick:h[3]||(h[3]=y=>a.value=!1),class:"button"}," Set to previous ")):z("",!0),k("button",{onClick:f,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),d(Lr,{ref_key:"savesManager",ref:u},null,512)],64))}});var Hp=ve(Wp,[["__scopeId","data-v-2776d67d"]]);const Yp={key:0,class:"tpsDisplay"},Zp=X({__name:"TPS",setup(e){const t=C(()=>o.div(Ue.lastTenTicks.length,Ue.lastTenTicks.reduce((n,i)=>n+i,0)));return(n,i)=>s(t).isNan()?z("",!0):(S(),R("div",Yp,"TPS: "+pe(s(at)(s(t))),1))}});var Xp=ve(Zp,[["__scopeId","data-v-89b89152"]]);var Kp=X({__name:"App",setup(e){const t=we.useHeader,n=C(()=>Ct[te.theme].variables),i=nn(te,"showTPS"),r=C(()=>fe(j(()=>d(oe,null,[_s.map(st)]))));return(a,u)=>(S(),R(oe,null,[k("div",{id:"modal-root",style:Be(s(n))},null,4),k("div",{class:Ne(["app",{useHeader:s(t)}]),style:Be(s(n))},[s(t)?(S(),ne(jr,{key:0})):z("",!0),d(dc),s(s(i))?(S(),ne(Xp,{key:1})):z("",!0),d(qp),d(Hp),(S(),ne(Ke(s(r))))],6)],64))}});var Jp=ve(Kp,[["__scopeId","data-v-41d15e5e"]]);function Qp(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e;let l,c,p,v;const f=async(h=!0)=>{await p,h&&(l==null||l.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),await(v==null?void 0:v())};async function b(){if("serviceWorker"in navigator){const{Workbox:h,messageSW:y}=await Un(()=>import("./workbox-window.4a8794bb.js"),[]);v=async()=>{c&&c.waiting&&await y(c.waiting,{type:"SKIP_WAITING"})},l=new h("./sw.js",{scope:"./",type:"classic"}),l.addEventListener("activated",N=>{N.isUpdate||i==null||i()});{const N=()=>{n==null||n()};l.addEventListener("waiting",N),l.addEventListener("externalwaiting",N)}l.register({immediate:t}).then(N=>{c=N,a?a("./sw.js",N):r==null||r(N)}).catch(N=>{u==null||u(N)})}}return p=b(),f}function ef(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:i,onRegistered:r,onRegisteredSW:a,onRegisterError:u}=e,l=G(!1),c=G(!1);return{updateServiceWorker:Qp({immediate:t,onNeedRefresh(){l.value=!0,n==null||n()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:r,onRegisteredSW:a,onRegisterError:u}),offlineReady:c,needRefresh:l}}document.title=we.title;window.projInfo=we;if(we.id==="")throw new Error("Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await vs();const{globalBus:e}=await Un(()=>Promise.resolve().then(function(){return gs}),void 0),{startGameLoop:t}=await Un(()=>import("./gameLoop.737eab91.js"),["assets/gameLoop.737eab91.js","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=pa(Jp);e.emit("setupVue",n),n.mount("#app"),Gt(()=>{const i=hi(),{updateServiceWorker:r}=ef({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(()=>a.update(),60*60*1e3)}})}),t()});export{o as D,Un as _,Ue as a,we as b,Sp as c,Je as g,hs as l,Z as p,te as s}; diff --git a/planar/assets/index.ffd22707.js b/planar/assets/index.ffd22707.js new file mode 100644 index 00000000..1c61f639 --- /dev/null +++ b/planar/assets/index.ffd22707.js @@ -0,0 +1,21 @@ +/* empty css */import"./vue.c16a309b.js";import{q as an,C as s,ab as X,_ as N,az as Jn,aF as M,a1 as T,a2 as k,J as ee,O as ne,aK as xt,a0 as L,I as Be,a8 as _,aI as on,aG as ln,l as qe,u as Vr,t as G,b2 as ht,aL as Ft,G as Ne,aD as wi,w as bt,b3 as Dt,a9 as d,ap as sa,as as Wt,aH as sr,A as Te,$ as re,b7 as Y,b9 as Br,ar as Ot,bv as $n,bt as oa,bc as Gn,T as la,j as ua,bw as qt,ay as ca,aM as _t,aO as Je,z as Ht,bo as da,bs as pa,bd as ii,am as dr,H as fa,bx as ga,bf as ma}from"./@vue.6b211d3c.js";import{c as _i}from"./nanoevents.1080beb7.js";import{L as tn}from"./lz-string.dccec454.js";import{Y as va}from"./vue-next-select.ded54c4a.js";import{D as ha}from"./vuedraggable.1879de79.js";import{p as ba}from"./vue-textarea-autosize.35804eaf.js";import{P as ya}from"./vue-panzoom.8ce6f9b1.js";import{s as wa,u as hr}from"./vue-toastification.9c2dad53.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";const _a=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}};_a();const Na="modulepreload",ai={},Ca="./",Un=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Ca}${r}`,r in ai)return;ai[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":Na,i||(u.as="script",u.crossOrigin=""),u.href=r,document.head.appendChild(u),i)return new Promise((l,c)=>{u.addEventListener("load",l),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},ka="./projInfo-schema.json",Ma="Planar Pioneers",Sa="A game about controlling and exploiting planes!",Ia="planar-pioneers",xa="thepaperpilot",$a="",Da="",Ta="0.0",Pa="Initial Commit",Aa=!1,Ra=!1,Ea=2,Fa=!0,Oa=null,qa="",Va=["main"],Ba=3600,La=0,ja=!0,za="base64";var he={$schema:ka,title:Ma,description:Sa,id:Ia,author:xa,discordName:$a,discordLink:Da,versionNumber:Ta,versionTitle:Pa,allowGoBack:Aa,defaultShowSmall:Ra,defaultDecimalsShown:Ea,useHeader:Fa,banner:Oa,logo:qa,initialTabs:Va,maxTickLength:Ba,offlineLimit:La,enablePausing:ja,exportEncoding:za};const Ga=an({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var Z=window.player=Ga;function Ni(e){return JSON.stringify(e,(t,n)=>s(n))}var ve=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Ci=e=>(on("data-v-1b5356cf"),e=e(),ln(),e),Ua={class:"error"},Wa={class:"error-title"},Ha={class:"error-details",style:{"margin-top":"-10px"}},Ya={key:0},Za={class:"instructions"},Xa=["href"],Ja=Ci(()=>k("br",null,null,-1)),Ka={key:0,style:{"margin-top":"20px"}},Qa=Ci(()=>k("h3",null,"Other errors",-1)),es=[Qa],ts={class:"error-details"},ns={key:0,style:{"margin-top":"10px"}},rs={key:1,style:{"margin-top":"10px"}},is=X({__name:"Error",props:{errors:null},setup(e){const t=e,n=N(()=>t.errors[0]),r=N(()=>t.errors.map(a=>a.stack==null?[]:a.stack.split(` +`))),i=N(()=>t.errors.map(a=>a.cause==null?[]:(typeof a.cause=="string"?a.cause:JSON.stringify(a.cause)).split(` +`)));return Jn(()=>{Z.autosave=!1,Z.devSpeed=0}),(a,u)=>(M(),T("div",Ua,[k("h1",Wa,ee(s(n).name)+": "+ee(s(n).message),1),k("div",Ha,[s(n).cause?(M(),T("div",Ya,[(M(!0),T(ne,null,xt(s(i)[0],l=>(M(),T("div",{key:l},ee(l),1))),128))])):L("",!0),s(n).stack?(M(),T("div",{key:1,style:Be(s(n).cause?"margin-top: 10px":"")},[(M(!0),T(ne,null,xt(s(r)[0],l=>(M(),T("div",{key:l},ee(l),1))),128))],4)):L("",!0)]),k("div",Za,[_(" Check the console for more details, and consider sharing it with the developers on "),k("a",{href:s(he).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,Xa),_("!"),Ja,e.errors.length>1?(M(),T("div",Ka,es)):L("",!0),(M(!0),T(ne,null,xt(e.errors.slice(1),(l,c)=>(M(),T("div",{key:c,style:{"margin-top":"20px"}},[k("details",ts,[k("summary",null,ee(l.name)+": "+ee(l.message),1),l.cause?(M(),T("div",ns,[(M(!0),T(ne,null,xt(s(i)[c+1],p=>(M(),T("div",{key:p},ee(p),1))),128))])):L("",!0),l.stack?(M(),T("div",rs,[(M(!0),T(ne,null,xt(s(r)[c+1],p=>(M(),T("div",{key:p},ee(p),1))),128))])):L("",!0)])]))),128))])]))}});var ki=ve(is,[["__scopeId","data-v-1b5356cf"]]);class as{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const r=new ss(t,n);for(this.first===void 0?(this.first=r,this.last=r):(r.next=this.first,this.first.prev=r,this.first=r),this.map.set(t,r);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class ss{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const Dr=17,os=9e15,ls=Math.log10(9e15),us=1/9e15,cs=308,ds=-324,si=5,ps=(1<<10)-1,fs=function(){const e=[];for(let n=ds+1;n<=cs;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),pn=[2,Math.E,3,4,5,6,7,8,9,10],gs=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],ms=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]];let S=function(t){return o.fromValue_noAlloc(t)},K=function(e,t,n){return o.fromComponents(e,t,n)},se=function(t,n,r){return o.fromComponents_noNormalize(t,n,r)};const Qt=function(t,n){const r=n+1,i=Math.ceil(Math.log10(Math.abs(t))),a=Math.round(t*Math.pow(10,r-i))*Math.pow(10,i-r);return parseFloat(a.toFixed(Math.max(r-i,0)))},Tr=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},vs=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const r=e*e;let i=e;return n=n+1/(12*i),i=i*r,n=n+1/(360*i),i=i*r,n=n+1/(1260*i),i=i*r,n=n+1/(1680*i),i=i*r,n=n+1/(1188*i),i=i*r,n=n+691/(360360*i),i=i*r,n=n+7/(1092*i),i=i*r,n=n+3617/(122400*i),Math.exp(n)/t},Mi=.5671432904097838,oi=function(e,t=1e-10){let n,r;if(!Number.isFinite(e)||e===0)return e;if(e===1)return Mi;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(r=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(r-n).5?1:-1;if(Math.random()*20<1)return se(t,0,1);const n=Math.floor(Math.random()*(e+1));let r=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(r=Math.trunc(r));let i=Math.pow(10,r);return Math.random()>.9&&(i=Math.trunc(i)),K(t,n,i)}static affordGeometricSeries_core(e,t,n,r){const i=t.mul(n.pow(r));return w.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,r){return t.mul(n.pow(r)).mul(w.sub(1,n.pow(e))).div(w.sub(1,n))}static affordArithmeticSeries_core(e,t,n,r){const a=t.add(r.mul(n)).sub(n.div(2)),u=a.pow(2);return a.neg().add(u.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,r){const i=t.add(r.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=os)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){const t=e,n=w.fromStringCache.get(t);if(n!==void 0)return this.fromDecimal(n);e=e.replace(",","");const r=e.split("^^^");if(r.length===2){const y=parseFloat(r[0]),C=parseFloat(r[1]),D=r[1].split(";");let R=1;if(D.length===2&&(R=parseFloat(D[1]),isFinite(R)||(R=1)),isFinite(y)&&isFinite(C)){const I=w.pentate(y,C,R);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const i=e.split("^^");if(i.length===2){const y=parseFloat(i[0]),C=parseFloat(i[1]),D=i[1].split(";");let R=1;if(D.length===2&&(R=parseFloat(D[1]),isFinite(R)||(R=1)),isFinite(y)&&isFinite(C)){const I=w.tetrate(y,C,R);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const a=e.split("^");if(a.length===2){const y=parseFloat(a[0]),C=parseFloat(a[1]);if(isFinite(y)&&isFinite(C)){const D=w.pow(y,C);return this.sign=D.sign,this.layer=D.layer,this.mag=D.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}e=e.trim().toLowerCase();let u,l,c=e.split("pt");if(c.length===2){u=10,l=parseFloat(c[0]),c[1]=c[1].replace("(",""),c[1]=c[1].replace(")","");let y=parseFloat(c[1]);if(isFinite(y)||(y=1),isFinite(u)&&isFinite(l)){const C=w.tetrate(u,l,y);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}if(c=e.split("p"),c.length===2){u=10,l=parseFloat(c[0]),c[1]=c[1].replace("(",""),c[1]=c[1].replace(")","");let y=parseFloat(c[1]);if(isFinite(y)||(y=1),isFinite(u)&&isFinite(l)){const C=w.tetrate(u,l,y);return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}const p=e.split("e"),v=p.length-1;if(v===0){const y=parseFloat(e);if(isFinite(y))return this.fromNumber(y),w.fromStringCache.size>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}else if(v===1){const y=parseFloat(e);if(isFinite(y)&&y!==0)return this.fromNumber(y),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}const g=e.split("e^");if(g.length===2){this.sign=1,g[0].charAt(0)=="-"&&(this.sign=-1);let y="";for(let C=0;C=43&&D<=57||D===101)y+=g[1].charAt(C);else return this.layer=parseFloat(y),this.mag=parseFloat(g[1].substr(C+1)),this.normalize(),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}}if(v<1)return this.sign=0,this.layer=0,this.mag=0,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this;const b=parseFloat(p[0]);if(b===0)return this.sign=0,this.layer=0,this.mag=0,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this;let h=parseFloat(p[p.length-1]);if(v>=2){const y=parseFloat(p[p.length-2]);isFinite(y)&&(h*=Math.sign(y),h+=Tr(y))}if(!isFinite(b))this.sign=p[0]==="-"?-1:1,this.layer=v,this.mag=h;else if(v===1)this.sign=Math.sign(b),this.layer=1,this.mag=h+Math.log10(Math.abs(b));else if(this.sign=Math.sign(b),this.layer=v,v===2){const y=w.mul(K(1,2,h),S(b));return this.sign=y.sign,this.layer=y.layer,this.mag=y.mag,w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}else this.mag=h;return this.normalize(),w.fromStringCache.maxSize>=1&&w.fromStringCache.set(t,w.fromDecimal(this)),this}fromValue(e){return e instanceof w?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Qt(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Qt(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=si?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Qt(this.m,e)+"e"+Qt(this.e,e):this.layer===1?Qt(this.m,e)+"e"+Qt(this.e,e):this.layer<=si?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Qt(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Qt(this.mag,e)}abs(){return se(this.sign===0?0:1,this.layer,this.mag)}neg(){return se(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?w.dZero:this.layer===0?K(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?w.dZero:this.layer===0?K(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?w.dZero:this.layer===0?K(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?w.dZero:this.layer===0?K(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=S(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return se(0,0,0);let n,r;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(w.cmpabs(this,t)>0?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return w.fromNumber(n.sign*n.mag+r.sign*r.mag);const i=n.layer*Math.sign(n.mag),a=r.layer*Math.sign(r.mag);if(i-a>=2)return n;if(i===0&&a===-1){if(Math.abs(r.mag-Math.log10(n.mag))>Dr)return n;{const u=Math.pow(10,Math.log10(n.mag)-r.mag),l=r.sign+n.sign*u;return K(Math.sign(l),1,r.mag+Math.log10(Math.abs(l)))}}if(i===1&&a===0){if(Math.abs(n.mag-Math.log10(r.mag))>Dr)return n;{const u=Math.pow(10,n.mag-Math.log10(r.mag)),l=r.sign+n.sign*u;return K(Math.sign(l),1,Math.log10(r.mag)+Math.log10(Math.abs(l)))}}if(Math.abs(n.mag-r.mag)>Dr)return n;{const u=Math.pow(10,n.mag-r.mag),l=r.sign+n.sign*u;return K(Math.sign(l),1,r.mag+Math.log10(Math.abs(l)))}}plus(e){return this.add(e)}sub(e){return this.add(S(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=S(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return se(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return se(this.sign*t.sign,0,1);let n,r;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return w.fromNumber(n.sign*r.sign*n.mag*r.mag);if(n.layer>=3||n.layer-r.layer>=2)return K(n.sign*r.sign,n.layer,n.mag);if(n.layer===1&&r.layer===0)return K(n.sign*r.sign,1,n.mag+Math.log10(r.mag));if(n.layer===1&&r.layer===1)return K(n.sign*r.sign,1,n.mag+r.mag);if(n.layer===2&&r.layer===1){const i=K(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(K(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return K(n.sign*r.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&r.layer===2){const i=K(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(K(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return K(n.sign*r.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=S(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?w.dNaN:this.layer===0?K(this.sign,0,1/this.mag):K(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=S(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,r=t.mag>0?t.layer:-t.layer;return n>r?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=S(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=S(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let r=this.mag,i=n.mag;return this.layer>n.layer&&(i=Tr(i)),this.layer0?K(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):K(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?w.dNaN:this.layer>0?K(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):K(this.sign,0,Math.log10(this.mag))}log(e){return e=S(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?w.dNaN:this.layer===0&&e.layer===0?K(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):w.div(this.log10(),e.log10())}log2(){return this.sign<=0?w.dNaN:this.layer===0?K(this.sign,0,Math.log2(this.mag)):this.layer===1?K(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?K(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):K(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?w.dNaN:this.layer===0?K(this.sign,0,Math.log(this.mag)):this.layer===1?K(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?K(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):K(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=S(e),n=this,r=t;if(n.sign===0)return r.eq(0)?se(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(r.sign===0)return se(1,0,1);if(r.sign===1&&r.layer===0&&r.mag===1)return n;const i=n.absLog10().mul(r).pow10();return this.sign===-1?Math.abs(r.toNumber()%2)%2===1?i.neg():Math.abs(r.toNumber()%2)%2===0?i:w.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return w.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return K(1,0,t);if(e.sign===0)return w.dOne;e=se(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?K(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?K(-e.sign,e.layer+1,-e.mag):w.dOne}pow_base(e){return S(e).pow(this)}root(e){const t=S(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?w.exp(w.mul(this,w.ln(this).sub(1))):w.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(se(1,0,24)))return w.fromNumber(vs(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let r=e,i=12*r,a=1/i,u=t+a;if(u===t||(t=u,r=r*n,i=360*r,a=1/i,u=t-a,u===t))return w.exp(t);t=u,r=r*n,i=1260*r;let l=1/i;return t=t+l,r=r*n,i=1680*r,l=1/i,t=t-l,w.exp(t)}else return this.layer===1?w.exp(w.mul(this,w.ln(this).sub(1))):w.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?w.dOne:this.layer===0&&this.mag<=709.7?w.fromNumber(Math.exp(this.sign*this.mag)):this.layer===0?K(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?K(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):K(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return w.fromNumber(Math.sqrt(this.sign*this.mag));if(this.layer===1)return K(1,2,Math.log10(this.mag)-.3010299956639812);{const e=w.div(se(this.sign,this.layer-1,this.mag),se(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=se(1,0,1)){if(e===1)return w.pow(this,t);if(e===0)return new w(t);if(this.eq(w.dOne))return w.dOne;if(this.eq(-1))return w.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return w.fromNumber(Math.E);const a=w.ln(this).neg();return a.lambertw().div(a)}else return i>1.444667861009766?w.fromNumber(Number.POSITIVE_INFINITY):w.dNaN}if(this.eq(w.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),w.fromNumber(i)}if(e<0)return w.iteratedlog(t,this,-e);t=S(t);const n=e;e=Math.trunc(e);const r=n-e;if(this.gt(w.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i3)return se(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=se(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return w.tetrate(e,-t,this);e=S(e);let n=w.fromDecimal(this);const r=t;t=Math.trunc(t);const i=r-t;if(n.layer-e.layer>3){const a=Math.min(t,n.layer-e.layer-3);t-=a,n.layer-=a}for(let a=0;a1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10,t=100){let n=.001,r=!1,i=!1,a=this.slog_internal(e).toNumber();for(let u=1;u1&&i!=c&&(r=!0),i=c,r?n/=2:n*=2,n=Math.abs(n)*(c?-1:1),a+=n,n===0)break}return w.fromNumber(a)}slog_internal(e=10){if(e=S(e),e.lte(w.dZero)||e.eq(w.dOne))return w.dNaN;if(e.lt(w.dOne))return this.eq(w.dOne)?w.dZero:this.eq(w.dZero)?w.dNegOne:w.dNaN;if(this.mag<0||this.eq(w.dZero))return w.dNegOne;let t=0,n=w.fromDecimal(this);if(n.layer-e.layer>3){const r=n.layer-e.layer-3;t+=r,n.layer-=r}for(let r=0;r<100;++r)if(n.lt(w.dZero))n=w.pow(e,n),t-=1;else{if(n.lte(w.dOne))return w.fromNumber(t+w.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=w.log(n,e)}return w.fromNumber(t)}static slog_critical(e,t){return e>10?t-1:w.critical_section(e,t,ms)}static tetrate_critical(e,t){return w.critical_section(e,t,gs)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let r=0,i=0;for(let u=0;ue){const l=(e-pn[u])/(pn[u+1]-pn[u]);r=n[u][Math.floor(t)]*(1-l)+n[u+1][Math.floor(t)]*l,i=n[u][Math.ceil(t)]*(1-l)+n[u+1][Math.ceil(t)]*l;break}const a=t-Math.floor(t);return r<=0||i<=0?r*(1-a)+i*a:Math.pow(e,Math.log(r)/Math.log(e)*(1-a)+Math.log(i)/Math.log(e)*a)}layeradd10(e){e=w.fromValue_noAlloc(e).toNumber();const t=w.fromDecimal(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let r=0;r<100;++r){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const r=this.slog(t).toNumber()+e;return r>=0?w.tetrate(t,r):Number.isFinite(r)?r>=-1?w.log(w.tetrate(t,r+1),t):w.log(w.log(w.tetrate(t,r+2),t),t):w.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return w.fromNumber(oi(this.toNumber()));if(this.layer===0)return w.fromNumber(oi(this.sign*this.mag));if(this.layer===1)return li(this);if(this.layer===2)return li(this);if(this.layer>=3)return se(this.sign,this.layer-1,this.mag);throw new Error("Unhandled behavior in lambertw()")}ssqrt(){if(this.sign==1&&this.layer>=3)return se(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=se(1,0,1)){t=S(t);const n=e;e=Math.trunc(e);const r=n-e;r!==0&&(t.eq(w.dOne)?(++e,t=w.fromNumber(r)):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let i=0;i10)return t}return t}sin(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.sin(this.sign*this.mag)):se(0,0,0)}cos(){return this.mag<0?w.dOne:this.layer===0?w.fromNumber(Math.cos(this.sign*this.mag)):se(0,0,0)}tan(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.tan(this.sign*this.mag)):se(0,0,0)}asin(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.asin(this.sign*this.mag)):se(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?w.fromNumber(Math.acos(this.toNumber())):this.layer===0?w.fromNumber(Math.acos(this.sign*this.mag)):se(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?w.fromNumber(Math.atan(this.sign*this.mag)):w.fromNumber(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return w.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return w.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?se(Number.NaN,Number.NaN,Number.NaN):w.ln(this.add(1).div(w.fromNumber(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(w.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let o=w;o.fromStringCache=new as(ps);o.dZero=se(0,0,0);o.dOne=se(1,0,1);o.dNegOne=se(-1,0,1);o.dTwo=se(1,0,2);o.dTen=se(1,0,10);o.dNaN=se(Number.NaN,Number.NaN,Number.NaN);o.dInf=se(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);o.dNegInf=se(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);o.dNumberMax=K(1,0,Number.MAX_VALUE);o.dNumberMin=K(1,0,Number.MIN_VALUE);S=o.fromValue_noAlloc;K=o.fromComponents;se=o.fromComponents_noNormalize;o.fromMantissaExponent;o.fromMantissaExponent_noNormalize;const hs=new o(1);function Bn(e,t,n=!0){let r=o.log10(e).floor(),i=o.div(e,o.pow(10,r));i.toStringWithDecimalPlaces(t)==="10"&&(i=hs,r=r.add(1));const a=r.gte(1e9)?yt(r,Math.max(Math.max(t,3),he.defaultDecimalsShown)):r.gte(1e4)?pr(r,0):r.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+a:"e"+a}function pr(e,t){if(e==null)return"NaN";if(e=new o(e),e.mag<.001)return 0 .toFixed(t);const r=e.toStringWithDecimalPlaces(t).split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),r.length==1?r[0]:r[0]+"."+r[1]}function Si(e,t){return e==null?"NaN":(e=new o(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),he.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const bs=new o("eeee1000"),ys=new o("e100000"),ui=new o("e1000"),Ii=new o(1e9),ws=new o(1e6),_s=new o(1e3),Ns=new o(.98),Cs=new o(.001),xi=new o(0);function yt(e,t,n){if(t==null&&(t=he.defaultDecimalsShown),n=n!=null?n:he.defaultShowSmall,e=new o(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+yt(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(bs)){const r=e.slog();return r.gte(ws)?"F"+yt(r.floor()):o.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+pr(r.floor(),0)}else{if(e.gte(ys))return Bn(e,0,!1);if(e.gte(ui))return Bn(e,0);if(e.gte(Ii))return Bn(e,t);if(e.gte(_s))return pr(e,0);if(e.gte(Cs)||!n)return Si(e,t);if(e.eq(xi))return 0 .toFixed(t)}return e=Di(e),e.lt(ui)?Bn(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):yt(e,t)+"\u207B\xB9"}function We(e){return e=new o(e),e.sign<0?"-"+We(e.neg()):e.gte(Ii)||e.lte(Ns)&&!e.eq(xi)?yt(e):yt(e,0)}function $i(e){return o.lt(e,0)?"-"+$i(o.neg(e)):o.gt(e,2**51)?yt(o.div(e,31536e3))+"y":(e=new o(e).toNumber(),e<60?yt(e)+"s":e<3600?We(Math.floor(e/60))+"m "+yt(e%60)+"s":e<86400?We(Math.floor(e/3600))+"h "+We(Math.floor(e/60)%60)+"m "+We(e%60)+"s":e<31536e3?We(Math.floor(e/84600)%365)+"d "+We(Math.floor(e/3600)%24)+"h "+We(Math.floor(e/60)%60)+"m":We(Math.floor(e/31536e3))+"y "+We(Math.floor(e/84600)%365)+"d "+We(Math.floor(e/3600)%24)+"h")}function ks(e,t,n){e=new o(e);let r=e.toStringWithDecimalPlaces(t);return new o(r).gte(n)&&(r=o.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),r}function Ms(e,t){return yt(e,t,!0)}function Di(e){let t=o.log10(e).ceil();const n=o.div(e,o.pow(10,t));return t=t.neg(),e=new o(10).pow(t).times(n),e}var Ss=Object.freeze(Object.defineProperty({__proto__:null,default:o,exponentialFormat:Bn,commaFormat:pr,regularFormat:Si,format:yt,formatWhole:We,formatTime:$i,toPlaces:ks,formatSmall:Ms,invertOOM:Di},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:Lr,commaFormat:Is,regularFormat:xs,format:xe,formatWhole:at,formatTime:br,toPlaces:$s,formatSmall:Ut,invertOOM:Ds}=Ss;window.Decimal=o;window.exponentialFormat=Lr;window.commaFormat=Is;window.regularFormat=xs;window.format=xe;window.formatWhole=at;window.formatTime=br;window.toPlaces=$s;window.formatSmall=Ut;window.invertOOM=Ds;function rt(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function Wn(e){return typeof e=="function"}var W=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(W||{});const Hn=Symbol("DoNotCache");function A(e,t){const n=e[t];Wn(n)&&n.length===0&&!n[Hn]?e[t]=N(n.bind(e)):Wn(n)&&(e[t]=n.bind(e),e[t][Hn]=!0)}function _e(e){return Wn(e)&&!e[Hn]&&(e=N(e)),e}const dt=Symbol("Component"),lt=Symbol("GatherProps");let Ts=0;function Zt(e="feature-"){return e+Ts++}var Me=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Me||{});function He(e){const t=s(e);return t!==2&&t!==!1}function yn(e){return s(e)===1}function z(e){return e[Hn]=!0,e}function le(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Yn(e,...t){const n=[],r=i=>{Object.keys(i).forEach(a=>{const u=i[a];u!=null&&typeof u=="object"&&(t.includes(u.type)?n.push(u):!(u instanceof o)&&!qe(u)&&r(u))})};return r(e),n}var Re=window.state=Vr({lastTenTicks:[],hasNaN:!1,NaNPath:[],errors:an([])});const fn={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var jr=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(jr||{}),kt={classic:fn,paper:{...fn,variables:{...fn.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...fn,variables:{...fn.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...fn,variables:{...fn.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Ke=_i();"fonts"in document&&(document.fonts.onloadingdone=()=>Ke.emit("fontsLoaded"));var Ps=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Ke},Symbol.toStringTag,{value:"Module"}));function Ti(e={}){return Object.assign({id:`${he.id}-0`,name:"Default Save",tabs:he.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:he.id,modVersion:he.versionNumber,layers:{}},e)}function mt(e){const t=tn.compressToUTF16(Ni(e!=null?e:Z));return localStorage.setItem((e!=null?e:Z).id,t),t}async function As(){Fs();try{let e=localStorage.getItem(ie.active);if(e==null){await vn(xn());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=tn.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==he.id){await vn(xn());return}t.id=ie.active,await vn(t)}catch(e){console.error(`Failed to load save. Falling back to new save. +`,e),await vn(xn())}}function xn(){const e=cr(),t=Ti({id:e});return mt(t),ie.saves.push(e),t}function cr(){let e,t=0;do e=`${he.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const Rs=G(!1);async function vn(e){console.info("Loading save",e),Rs.value=!0;const{layers:t,removeLayer:n,addLayer:r}=await Un(()=>Promise.resolve().then(function(){return Tl}),void 0),{fixOldSave:i,getInitialLayers:a}=await Un(()=>Promise.resolve().then(function(){return zp}),void 0);for(const u in t){const l=t[u];l&&n(l)}a(e).forEach(u=>r(u,e)),e=Ti(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,he.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==he.versionNumber&&(i(e.modVersion,e),e.modVersion=he.versionNumber),Object.assign(Z,e),ie.active=Z.id,Ke.emit("onLoad")}setInterval(()=>{Z.autosave&&mt()},1e3);window.onbeforeunload=()=>{Z.autosave&&mt()};window.save=mt;const Es=window.hardReset=async()=>{await vn(xn())};window.deleteLowerSaves=()=>{const e=Object.values(ie.saves).indexOf(Z.id)+1;Object.values(ie.saves).slice(e).forEach(t=>localStorage.removeItem(t)),ie.saves=ie.saves.slice(0,e)};const Zn=an({active:"",saves:[],showTPS:!0,theme:jr.Nordic,unthrottled:!1,alignUnits:!1});ht(Zn,e=>{const t=tn.compressToUTF16(JSON.stringify(e));localStorage.setItem(he.id,t)},{deep:!0});var ie=window.settings=Zn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:jr.Nordic,alignUnits:!1};Ke.emit("loadSettings",e),Object.assign(Zn,e),Es()};function Fs(){try{let e=localStorage.getItem(he.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=tn.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Zn,t)}Ke.emit("loadSettings",Zn)}catch{}}const Pi=an([]);function Ai(e){Pi.push(e)}const Os=an([]),qs=an([]),Vs={class:"table"},Bs=X({__name:"Column",setup(e){const t=N(()=>kt[ie.theme].mergeAdjacent);return(n,r)=>(M(),T("div",Vs,[k("div",{class:Ne(["col",{mergeAdjacent:s(t)}])},[Ft(n.$slots,"default")],2)]))}}),Ls={class:"table"},js=X({__name:"Row",setup(e){const t=N(()=>kt[ie.theme].mergeAdjacent);return(n,r)=>(M(),T("div",Ls,[k("div",{class:Ne(["row",{mergeAdjacent:s(t)}])},[Ft(n.$slots,"default")],2)]))}});function Ri(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!sa(e)}function fe(e,t="span"){return typeof e=="function"?X({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),X({template:e})):X({render:()=>({})}):e}function st(e){if(Tt(e))return typeof e=="function"?e():fe(e);const t=e[dt];return d(t,e[lt](),null)}function Pr(...e){let t;return d(js,null,Ri(t=e.map(st))?t:{default:()=>[t]})}function zs(...e){let t;return d(Bs,null,Ri(t=e.map(st))?t:{default:()=>[t]})}function wt(e){if(Tt(e))return typeof e=="function"?e():typeof e=="string"?d(ne,null,[e]):d(e,null,null);const t=e[dt];return d(t,e[lt](),null)}function ci(e,t){return e.reduce((n,r)=>d(ne,null,[n,t,r]))}function Tt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Hn]===!0}function Ei(e,t){const n=G(null),r=G(void 0);function i(l){n.value||(n.value=setInterval(u,250)),r.value=l}function a(){n.value&&(clearInterval(n.value),n.value=null)}function u(){t&&t.value?t.value():e&&e.value&&e.value(r.value)}return wi(a),{start:i,stop:a,handleHolding:u}}function zr(e,t="div"){const n=bt();return Dt(()=>{n.value=fe(De(e),t)}),n}function Tn(e,t="div"){const n=bt(null);return Dt(()=>{const r=De(e);n.value=r==""||r==null?null:fe(r,t)}),n}function De(e){return s(s(e))}function q(...e){return e.includes(Object)||e.push(Object),e}function di(e){const t=G(!1),n=e[lt].bind(e);return e[lt]=()=>({...n(),onPointerenter:()=>t.value=!0,onPointerleave:()=>t.value=!1}),t}const Gs=X({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var v;const n=G({}),r=new ResizeObserver(l),i=G(null);Jn(()=>{const g=i.value;g!=null&&r.observe(g)});let a=!0,u=G((v=i.value)==null?void 0:v.getBoundingClientRect());function l(){a&&(a=!1,Wt(()=>{var g;u.value=(g=i.value)==null?void 0:g.getBoundingClientRect(),Object.values(n.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",n.value),a=!0}))}Ke.on("fontsLoaded",l);const c={attributes:!1,childList:!0,subtree:!1};sr(Gr,(g,b)=>{const h=new MutationObserver(()=>p(g));h.observe(b,c),n.value[g]={element:b,observer:h,rect:b.getBoundingClientRect()},l()}),sr(Ur,g=>{var b;(b=n.value[g])==null||b.observer.disconnect(),n.value[g]=void 0,l()}),sr(Wr,n),sr(Hr,u);function p(g){const b=n.value[g];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",n.value))}return(g,b)=>(M(),T(ne,null,[Ft(g.$slots,"default",{},void 0,!0),k("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var Fi=ve(Gs,[["__scopeId","data-v-2b1dc1bc"]]);const Us=["onPointerdown"],Ws={class:"modal-wrapper"},Hs={class:"modal-container"},Ys={class:"modal-header"},Zs={class:"modal-body"},Xs={class:"modal-footer"},Js=k("div",{class:"modal-default-flex-grow"},null,-1),Vt=X({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Te(e),a=N(()=>s(i.modelValue)||l.value);function u(){n("update:modelValue",!1)}const l=G(!1),c=G(null),p=N(()=>{var v,g;return(g=(v=c.value)==null?void 0:v.nodes)!=null?g:null});return t({isOpen:a,nodes:p}),(v,g)=>(M(),re(la,{to:"#modal-root"},[d(Gn,{name:"modal",onBeforeEnter:g[0]||(g[0]=b=>l.value=!0),onAfterLeave:g[1]||(g[1]=b=>l.value=!1)},{default:Y(()=>[Br(k("div",Ot({class:"modal-mask",onPointerdown:$n(u,["self"])},v.$attrs),[k("div",Ws,[k("div",Hs,[k("div",Ys,[Ft(v.$slots,"header",{shown:s(a)},()=>[_(" default header ")])]),k("div",Zs,[d(Fi,{ref_key:"contextRef",ref:c},{default:Y(()=>[Ft(v.$slots,"body",{shown:s(a)},()=>[_(" default body ")])]),_:3},512)]),k("div",Xs,[Ft(v.$slots,"footer",{shown:s(a)},()=>[k("div",{class:"modal-default-footer"},[Js,k("button",{class:"button modal-default-button",onClick:u}," Close ")])])])])])],16,Us),[[oa,e.modelValue]])]),_:3})]))}}),en=Symbol("ProxyState");function Qe(e,t={}){const n=t;let r=!1,i=!1;function a(){return r||(i&&console.error("Cyclical dependency detected. Cannot evaluate lazy proxy."),i=!0,Object.assign(n,e.call(n,n)),r=!0),n}return new Proxy(n,{get(u,l){if(l===en)return a();const c=a()[l];return c!=null&&typeof c=="object"&&Et in c?c[Et]:c},set(u,l,c){return a()[l]=c,!0},has(u,l){return l===en?!0:Reflect.has(a(),l)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(u,l){return r||(Object.assign(n,e.call(n,n)),r=!0),Object.getOwnPropertyDescriptor(u,l)}})}const Oi=o.ln(10);function Ln(e){return e}function Ks(e,t){return F(t)?t.invert(o.neg(e)):(console.error("Could not invert due to no input being a variable"),0)}function Qs(e,t){return F(t)?t.isIntegrable()?f.neg(t.getIntegralFormula(e)):(console.error("Could not integrate due to variable not being integrable"),f.constant(0)):(console.error("Could not integrate due to no input being a variable"),f.constant(0))}function eo(e){return f.neg(e)}function to(e,t,n){return F(t)?t.invert(o.sub(e,Se(n))):F(n)?n.invert(o.sub(e,Se(t))):(console.error("Could not invert due to no input being a variable"),0)}function no(e,t,n){var r,i;if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const a=t.getIntegralFormula(e);return f.times(n,(r=t.innermostVariable)!=null?r:0).add(a)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const a=n.getIntegralFormula(e);return f.times(t,(i=n.innermostVariable)!=null?i:0).add(a)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function ro(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.add(r,n)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e);return f.add(r,t)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function io(e,t,n){return F(t)?t.invert(o.add(e,Se(n))):F(n)?n.invert(o.sub(Se(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function ao(e,t,n){var r,i;if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const a=t.getIntegralFormula(e);return f.sub(a,f.times(n,(r=t.innermostVariable)!=null?r:0))}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const a=n.getIntegralFormula(e);return f.times(t,(i=n.innermostVariable)!=null?i:0).sub(a)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function so(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.sub(r,n)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e);return f.sub(r,t)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function oo(e,t,n){return F(t)?t.invert(o.div(e,Se(n))):F(n)?n.invert(o.div(e,Se(t))):(console.error("Could not invert due to no input being a variable"),0)}function lo(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.times(r,n)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e);return f.times(r,t)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function uo(e,t,n){return F(t)?f.div(e,n):F(n)?f.div(e,t):(console.error("Could not apply substitution due to no input being a variable"),f.constant(0))}function co(e,t,n){return F(t)?t.invert(o.mul(e,Se(n))):F(n)?n.invert(o.div(Se(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function po(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.div(r,n)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e);return f.div(t,r)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function fo(e,t,n){return F(t)?f.mul(e,n):F(n)?f.mul(e,t):(console.error("Could not apply substitution due to no input being a variable"),f.constant(0))}function go(e,t){return F(t)?t.invert(o.recip(e)):(console.error("Could not invert due to no input being a variable"),0)}function mo(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.ln(n)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function vo(e,t){return F(t)?t.invert(o.pow10(e)):(console.error("Could not invert due to no input being a variable"),0)}function ho(e){return o.ln(e).sub(1).times(e).div(Oi)}function bo(e,t){if(F(t)){const n=Oi.times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function yo(e,t){return F(t)?t.isIntegrable()?new f({inputs:[t.getIntegralFormula(e)],evaluate:ho,invert:bo}):(console.error("Could not integrate due to variable not being integrable"),f.constant(0)):(console.error("Could not integrate due to no input being a variable"),f.constant(0))}function wo(e,t,n){return F(t)?t.invert(o.pow(Se(n),e)):F(n)?n.invert(o.root(Se(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function _o(e,t){return o.ln(e).sub(1).times(e).div(o.ln(t))}function No(e,t,n){if(F(t)){const r=o.ln(Se(n)).times(e);return t.invert(r.div(r.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Co(e,t,n){return F(t)?t.isIntegrable()?new f({inputs:[t.getIntegralFormula(e),n],evaluate:_o,invert:No}):(console.error("Could not integrate due to variable not being integrable"),f.constant(0)):(console.error("Could not integrate due to no input being a variable"),f.constant(0))}function ko(e,t){return F(t)?t.invert(o.pow(2,e)):(console.error("Could not invert due to no input being a variable"),0)}function Mo(e){return o.ln(e).sub(1).times(e).div(o.ln(2))}function So(e,t){if(F(t)){const n=o.ln(2).times(e);return t.invert(n.div(n.div(Math.E).lambertw()))}return console.error("Could not invert due to no input being a variable"),0}function Io(e,t){return F(t)?t.isIntegrable()?new f({inputs:[t.getIntegralFormula(e)],evaluate:Mo,invert:So}):(console.error("Could not integrate due to variable not being integrable"),f.constant(0)):(console.error("Could not integrate due to no input being a variable"),f.constant(0))}function xo(e,t){return F(t)?t.invert(o.exp(e)):(console.error("Could not invert due to no input being a variable"),0)}function $o(e){return o.ln(e).sub(1).times(e)}function Do(e,t){return F(t)?t.invert(o.div(e,o.div(e,Math.E).lambertw())):(console.error("Could not invert due to no input being a variable"),0)}function To(e,t){return F(t)?t.isIntegrable()?new f({inputs:[t.getIntegralFormula(e)],evaluate:$o,invert:Do}):(console.error("Could not integrate due to variable not being integrable"),f.constant(0)):(console.error("Could not integrate due to no input being a variable"),f.constant(0))}function Po(e,t,n){return F(t)?t.invert(o.root(e,Se(n))):F(n)?n.invert(o.ln(e).div(o.ln(Se(t)))):(console.error("Could not invert due to no input being a variable"),0)}function Ao(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e),i=f.add(n,1);return f.pow(r,i).div(i)}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e);return f.pow(t,r).div(f.ln(t))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function Ro(e,t){return F(t)?t.invert(o.root(e,10)):(console.error("Could not invert due to no input being a variable"),0)}function Eo(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.pow10(n).div(f.ln(10))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function Fo(e,t,n){return F(t)?t.invert(o.ln(e).div(o.ln(Se(n)))):F(n)?n.invert(o.root(Se(t),e)):(console.error("Could not invert due to no input being a variable"),0)}function Oo(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.pow(n,r).div(f.ln(n))}else if(F(n)){if(!n.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=n.getIntegralFormula(e),i=f.add(t,1);return f.pow(r,i).div(i)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function qo(e,t,n){return F(t)?t.invert(o.root(e,o.recip(Se(n)))):F(n)?n.invert(o.ln(Se(t)).div(o.ln(e))):(console.error("Could not invert due to no input being a variable"),0)}function Vo(e,t,n){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const r=t.getIntegralFormula(e);return f.pow(r,f.recip(n).add(1)).times(n).div(f.add(n,1))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function Bo(e,t){return F(t)?t.invert(o.ln(e)):(console.error("Could not invert due to no input being a variable"),0)}function Lo(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.exp(n)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function jo(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){const r=o.minabs(t,1e308).toNumber();return o.tetrate(e,r,n)}function zo(e,t,n,r){return F(t)?t.invert(o.ssqrt(e)):(console.error("Could not invert due to no input being a variable"),0)}function Go(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){const r=o.minabs(t,1e308).toNumber();return o.iteratedexp(e,r,new o(n))}function Uo(e,t,n,r){return F(t)?t.invert(o.iteratedlog(e,Math.E,o.minabs(1e308,Se(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Wo(e,t=10,n=2){const r=o.minabs(n,1e308).toNumber();return o.iteratedlog(e,t,r)}function Ho(e,t=10){const n=o.minabs(t,1e308).toNumber();return o.slog(e,n)}function Yo(e,t,n){return F(t)?t.invert(o.tetrate(e,o.minabs(1e308,Se(n)).toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Zo(e,t,n){const r=o.minabs(t,1e308).toNumber();return o.layeradd(e,r,n)}function Xo(e,t,n,r){return F(t)?t.invert(o.layeradd(e,o.minabs(1e308,Se(n)).negate().toNumber())):(console.error("Could not invert due to no input being a variable"),0)}function Jo(e,t){return F(t)?t.invert(o.pow(Math.E,e).times(e)):(console.error("Could not invert due to no input being a variable"),0)}function Ko(e,t){return F(t)?t.invert(o.tetrate(e,2)):(console.error("Could not invert due to no input being a variable"),0)}function Qo(e,t,n){const r=o.minabs(t,1e308).toNumber();return o.pentate(e,r,n)}function el(e,t){return F(t)?t.invert(o.asin(e)):(console.error("Could not invert due to no input being a variable"),0)}function tl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.cos(n).neg()}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function nl(e,t){return F(t)?t.invert(o.acos(e)):(console.error("Could not invert due to no input being a variable"),0)}function rl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.sin(n)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function il(e,t){return F(t)?t.invert(o.atan(e)):(console.error("Could not invert due to no input being a variable"),0)}function al(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.cos(n).ln().neg()}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function sl(e,t){return F(t)?t.invert(o.sin(e)):(console.error("Could not invert due to no input being a variable"),0)}function ol(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.asin(n).times(n).add(f.sqrt(f.sub(1,f.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function ll(e,t){return F(t)?t.invert(o.cos(e)):(console.error("Could not invert due to no input being a variable"),0)}function ul(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.acos(n).times(n).sub(f.sqrt(f.sub(1,f.pow(n,2))))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function cl(e,t){return F(t)?t.invert(o.tan(e)):(console.error("Could not invert due to no input being a variable"),0)}function dl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.atan(n).times(n).sub(f.ln(f.pow(n,2).add(1)).div(2))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function pl(e,t){return F(t)?t.invert(o.asinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function fl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.cosh(n)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function gl(e,t){return F(t)?t.invert(o.acosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function ml(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.sinh(n)}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function vl(e,t){return F(t)?t.invert(o.atanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function hl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.cosh(n).ln()}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function bl(e,t){return F(t)?t.invert(o.sinh(e)):(console.error("Could not invert due to no input being a variable"),0)}function yl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.asinh(n).times(n).sub(f.pow(n,2).add(1).sqrt())}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function wl(e,t){return F(t)?t.invert(o.cosh(e)):(console.error("Could not invert due to no input being a variable"),0)}function _l(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.acosh(n).times(n).sub(f.add(n,1).sqrt().times(f.sub(n,1).sqrt()))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function Nl(e,t){return F(t)?t.invert(o.tanh(e)):(console.error("Could not invert due to no input being a variable"),0)}function Cl(e,t){if(F(t)){if(!t.isIntegrable())return console.error("Could not integrate due to variable not being integrable"),f.constant(0);const n=t.getIntegralFormula(e);return f.atanh(n).times(n).add(f.sub(1,f.pow(n,2)).ln().div(2))}return console.error("Could not integrate due to no input being a variable"),f.constant(0)}function Pn(e){return(t,n)=>new f({inputs:[t,n],evaluate:e,invert:Ln})}function F(e){return e instanceof Pe&&e.hasVariable()}function Se(e,t){return e instanceof Pe?e.evaluate(t):s(e)}function kl(){return f.pow(this,2).div(2)}function Ml(){return this}const Ve=class{constructor(e){this.negate=this.neg,this.negated=this.neg,this.sgn=this.sign,this.plus=this.add,this.subtract=this.sub,this.minus=this.sub,this.multiply=this.mul,this.times=this.mul,this.divide=this.div,this.divideBy=this.div,this.dividedBy=this.div,this.reciprocal=this.recip,this.reciprocate=this.recip,this.logarithm=this.log;let t;"inputs"in e&&(e.inputs=e.inputs.map(n=>typeof n=="object"&&Et in n?n[Et]:n)),"variable"in e?(typeof e.variable=="object"&&Et in e.variable&&(e.variable=e.variable[Et]),t=this.setupVariable(e)):"evaluate"in e?t=this.setupFormula(e):t=this.setupConstant(e),this.inputs=t.inputs,this.internalVariables=t.internalVariables,this.innermostVariable=t.innermostVariable,this.internalEvaluate=t.internalEvaluate,this.internalInvert=t.internalInvert,this.internalIntegrate=t.internalIntegrate,this.internalIntegrateInner=t.internalIntegrateInner,this.applySubstitution=t.applySubstitution}setupVariable({variable:e}){return{inputs:[e],internalVariables:1,innermostVariable:e,internalIntegrate:kl,internalIntegrateInner:Ml,applySubstitution:Ln}}setupConstant({inputs:e}){return e.length!==1&&console.error("Evaluate function is required if inputs is not length 1"),{inputs:e,internalVariables:0}}setupFormula(e){var b,h;const{inputs:t,evaluate:n,invert:r,integrate:i,integrateInner:a,applySubstitution:u}=e,l=t.reduce((y,C)=>y+(C instanceof Ve?C.internalVariables:0),0),c=t.find(y=>y instanceof Ve&&y.hasVariable()),p=l===1?c==null?void 0:c.innermostVariable:void 0,v=(b=c==null?void 0:c.isInvertible())!=null?b:!1,g=(h=c==null?void 0:c.isIntegrable())!=null?h:!1;return{inputs:t,internalEvaluate:n,internalInvert:v?r:void 0,internalIntegrate:g?i:void 0,internalIntegrateInner:a,applySubstitution:u,innermostVariable:p,internalVariables:l}}isInvertible(){return this.hasVariable()&&(this.internalInvert!=null||this.internalEvaluate==null)}isIntegrable(){return this.hasVariable()&&this.internalIntegrate!=null}isIntegralInvertible(){return this.isIntegrable()?this.getIntegralFormula().isInvertible():!1}hasVariable(){return this.internalVariables===1}evaluate(e){var t,n,r;return(r=(n=(t=this.internalEvaluate)==null?void 0:t.call(this,...this.inputs.map(i=>Se(i,e))))!=null?n:this.hasVariable()?e:null)!=null?r:Se(this.inputs[0])}equals(e){return this.inputs.length===e.inputs.length&&this.inputs.every((t,n)=>t instanceof Ve&&e.inputs[n]instanceof Ve?t.equals(e.inputs[n]):!(t instanceof Ve)&&!(e.inputs[n]instanceof Ve)&&o.eq(s(t),s(e.inputs[n])))&&this.internalEvaluate===e.internalEvaluate&&this.internalInvert===e.internalInvert&&this.internalIntegrate===e.internalIntegrate&&this.internalVariables===e.internalVariables}static constant(e){return new f({inputs:[e]})}static variable(e){return new f({variable:e})}static step(e,t,n){const r=n(f.variable(0)),i=_e(t);function a(l){return o.lt(l,s(i))?l:o.add(r.evaluate(o.sub(l,s(i))),s(i))}function u(l,c){return F(c)&&r.isInvertible()?(o.gt(l,s(i))&&(l=o.add(r.invert(o.sub(l,s(i))),s(i))),c.invert(l)):(console.error("Could not invert due to no input being a variable"),0)}return new f({inputs:[e],evaluate:a,invert:r.isInvertible()&&r.hasVariable()?u:void 0})}static if(e,t,n,r){const i=G(0),a=f.variable(i),u=n(a),l=r==null?void 0:r(a),c=_e(t);function p(g){return s(c)?(i.value=g,u.evaluate()):l?(i.value=g,l.evaluate()):g}function v(g,b){return!F(b)||!u.isInvertible()||l!=null&&!l.isInvertible()?(console.error("Could not invert due to no input being a variable"),0):s(c)?b.invert(u.invert(g)):l?b.invert(l.invert(g)):b.invert(g)}return new f({inputs:[e],evaluate:p,invert:u.isInvertible()&&u.hasVariable()?v:void 0})}static conditional(e,t,n,r){return f.if(e,t,n,r)}static abs(e){return new f({inputs:[e],evaluate:o.abs})}static neg(e){return new f({inputs:[e],evaluate:o.neg,invert:Ks,applySubstitution:eo,integrate:Qs})}static sign(e){return new f({inputs:[e],evaluate:o.sign})}static round(e){return new f({inputs:[e],evaluate:o.round})}static floor(e){return new f({inputs:[e],evaluate:o.floor})}static ceil(e){return new f({inputs:[e],evaluate:o.ceil})}static trunc(e){return new f({inputs:[e],evaluate:o.trunc})}static add(e,t){return new f({inputs:[e,t],evaluate:o.add,invert:to,integrate:no,integrateInner:ro,applySubstitution:Ln})}static sub(e,t){return new f({inputs:[e,t],evaluate:o.sub,invert:io,integrate:ao,integrateInner:so,applySubstitution:Ln})}static mul(e,t){return new f({inputs:[e,t],evaluate:o.mul,invert:oo,integrate:lo,applySubstitution:uo})}static div(e,t){return new f({inputs:[e,t],evaluate:o.div,invert:co,integrate:po,applySubstitution:fo})}static recip(e){return new f({inputs:[e],evaluate:o.recip,invert:go,integrate:mo})}static clamp(e,t,n){return new f({inputs:[e,t,n],evaluate:o.clamp,invert:Ln})}static pLog10(e){return new f({inputs:[e],evaluate:o.pLog10})}static absLog10(e){return new f({inputs:[e],evaluate:o.absLog10})}static log10(e){return new f({inputs:[e],evaluate:o.log10,invert:vo,integrate:yo})}static log(e,t){return new f({inputs:[e,t],evaluate:o.log,invert:wo,integrate:Co})}static log2(e){return new f({inputs:[e],evaluate:o.log2,invert:ko,integrate:Io})}static ln(e){return new f({inputs:[e],evaluate:o.ln,invert:xo,integrate:To})}static pow(e,t){return new f({inputs:[e,t],evaluate:o.pow,invert:Po,integrate:Ao})}static pow10(e){return new f({inputs:[e],evaluate:o.pow10,invert:Ro,integrate:Eo})}static pow_base(e,t){return new f({inputs:[e,t],evaluate:o.pow_base,invert:Fo,integrate:Oo})}static root(e,t){return new f({inputs:[e,t],evaluate:o.root,invert:qo,integrate:Vo})}static factorial(e){return new f({inputs:[e],evaluate:o.factorial})}static gamma(e){return new f({inputs:[e],evaluate:o.gamma})}static lngamma(e){return new f({inputs:[e],evaluate:o.lngamma})}static exp(e){return new f({inputs:[e],evaluate:o.exp,invert:Bo,integrate:Lo})}static sqr(e){return f.pow(e,2)}static sqrt(e){return f.root(e,2)}static cube(e){return f.pow(e,3)}static cbrt(e){return f.root(e,3)}static tetrate(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new f({inputs:[e,t,n],evaluate:jo,invert:zo})}static iteratedexp(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new f({inputs:[e,t,n],evaluate:Go,invert:Uo})}static iteratedlog(e,t=10,n=1){return new f({inputs:[e,t,n],evaluate:Wo})}static slog(e,t=10){return new f({inputs:[e,t],evaluate:Ho,invert:Yo})}static layeradd10(e,t){return new f({inputs:[e,t],evaluate:o.layeradd10})}static layeradd(e,t,n=10){return new f({inputs:[e,t,n],evaluate:Zo,invert:Xo})}static lambertw(e){return new f({inputs:[e],evaluate:o.lambertw,invert:Jo})}static ssqrt(e){return new f({inputs:[e],evaluate:o.ssqrt,invert:Ko})}static pentate(e,t=2,n=o.fromComponents_noNormalize(1,0,1)){return new f({inputs:[e,t,n],evaluate:Qo})}static sin(e){return new f({inputs:[e],evaluate:o.sin,invert:sl,integrate:tl})}static cos(e){return new f({inputs:[e],evaluate:o.cos,invert:ll,integrate:rl})}static tan(e){return new f({inputs:[e],evaluate:o.tan,invert:cl,integrate:al})}static asin(e){return new f({inputs:[e],evaluate:o.asin,invert:el,integrate:ol})}static acos(e){return new f({inputs:[e],evaluate:o.acos,invert:nl,integrate:ul})}static atan(e){return new f({inputs:[e],evaluate:o.atan,invert:il,integrate:dl})}static sinh(e){return new f({inputs:[e],evaluate:o.sinh,invert:bl,integrate:fl})}static cosh(e){return new f({inputs:[e],evaluate:o.cosh,invert:wl,integrate:ml})}static tanh(e){return new f({inputs:[e],evaluate:o.tanh,invert:Nl,integrate:hl})}static asinh(e){return new f({inputs:[e],evaluate:o.asinh,invert:pl,integrate:yl})}static acosh(e){return new f({inputs:[e],evaluate:o.acosh,invert:gl,integrate:_l})}static atanh(e){return new f({inputs:[e],evaluate:o.atanh,invert:vl,integrate:Cl})}step(e,t){return f.step(this,e,t)}if(e,t){return f.if(this,e,t)}conditional(e,t){return f.if(this,e,t)}abs(){return f.abs(this)}neg(){return f.neg(this)}sign(){return f.sign(this)}round(){return f.round(this)}floor(){return f.floor(this)}ceil(){return f.ceil(this)}trunc(){return f.trunc(this)}add(e){return f.add(this,e)}sub(e){return f.sub(this,e)}mul(e){return f.mul(this,e)}div(e){return f.div(this,e)}recip(){return f.recip(this)}max(e){return f.max(this,e)}min(e){return f.min(this,e)}maxabs(e){return f.maxabs(this,e)}minabs(e){return f.minabs(this,e)}clamp(e,t){return f.clamp(this,e,t)}clampMin(e){return f.clampMin(this,e)}clampMax(e){return f.clampMax(this,e)}pLog10(){return f.pLog10(this)}absLog10(){return f.absLog10(this)}log10(){return f.log10(this)}log(e){return f.log(this,e)}log2(){return f.log2(this)}ln(){return f.ln(this)}pow(e){return f.pow(this,e)}pow10(){return f.pow10(this)}pow_base(e){return f.pow_base(this,e)}root(e){return f.root(this,e)}factorial(){return f.factorial(this)}gamma(){return f.gamma(this)}lngamma(){return f.lngamma(this)}exp(){return f.exp(this)}sqr(){return f.pow(this,2)}sqrt(){return f.root(this,2)}cube(){return f.pow(this,3)}cbrt(){return f.root(this,3)}tetrate(e=2,t=o.fromComponents_noNormalize(1,0,1)){return f.tetrate(this,e,t)}iteratedexp(e=2,t=o.fromComponents_noNormalize(1,0,1)){return f.iteratedexp(this,e,t)}iteratedlog(e=10,t=1){return f.iteratedlog(this,e,t)}slog(e=10){return f.slog(this,e)}layeradd10(e){return f.layeradd10(this,e)}layeradd(e,t){return f.layeradd(this,e,t)}lambertw(){return f.lambertw(this)}ssqrt(){return f.ssqrt(this)}pentate(e=2,t=o.fromComponents_noNormalize(1,0,1)){return f.pentate(this,e,t)}sin(){return f.sin(this)}cos(){return f.cos(this)}tan(){return f.tan(this)}asin(){return f.asin(this)}acos(){return f.acos(this)}atan(){return f.atan(this)}sinh(){return f.sinh(this)}cosh(){return f.cosh(this)}tanh(){return f.tanh(this)}asinh(){return f.asinh(this)}acosh(){return f.acosh(this)}atanh(){return f.atanh(this)}};let Pe=Ve;Pe.negate=Ve.neg;Pe.negated=Ve.neg;Pe.sgn=Ve.sign;Pe.plus=Ve.add;Pe.subtract=Ve.sub;Pe.minus=Ve.sub;Pe.multiply=Ve.mul;Pe.times=Ve.mul;Pe.divide=Ve.div;Pe.divideBy=Ve.div;Pe.dividedBy=Ve.div;Pe.reciprocal=Ve.recip;Pe.reciprocate=Ve.recip;Pe.max=Pn(o.max);Pe.min=Pn(o.min);Pe.minabs=Pn(o.minabs);Pe.maxabs=Pn(o.maxabs);Pe.clampMin=Pn(o.clampMin);Pe.clampMax=Pn(o.clampMax);Pe.logarithm=Ve.log;class f extends Pe{invert(t){return this.internalInvert&&this.hasVariable()?this.internalInvert.call(this,t,...this.inputs):this.inputs.length===1&&this.hasVariable()?t:(console.error("Cannot invert non-invertible formula"),0)}evaluateIntegral(t){return this.isIntegrable()?this.getIntegralFormula().evaluate(t):(console.error("Cannot evaluate integral of formula without integral"),0)}invertIntegral(t){return!this.isIntegrable()||!this.getIntegralFormula().isInvertible()?(console.error("Cannot invert integral of formula without invertible integral"),0):this.getIntegralFormula().invert(t)}calculateConstantOfIntegration(){const t=this.getIntegralFormula().evaluate(1),n=o.add(this.evaluate(0),this.evaluate(1)).div(2);return o.sub(n,t)}getIntegralFormula(t){if(this.integralFormula!=null&&t==null)return this.integralFormula;if(t==null){if(this.applySubstitution==null){if(t=[],this.internalIntegrate==null)return console.error("Cannot integrate formula with non-integrable operation"),f.constant(0);let n=this.internalIntegrate.call(this,t,...this.inputs);t.forEach(r=>n=r(n)),this.integralFormula=n}else if(this.internalIntegrate)this.integralFormula=this.internalIntegrate.call(this,void 0,...this.inputs);else if(this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable())this.integralFormula=this;else return console.error("Cannot integrate formula without variable"),f.constant(0);return this.integralFormula}else return this.applySubstitution==null?(console.error("Cannot have two complex operations in an integrable formula"),f.constant(0)):(t.push(n=>this.applySubstitution.call(this,n,...this.inputs)),this.internalIntegrateInner?this.internalIntegrateInner.call(this,t,...this.inputs):this.internalIntegrate?this.internalIntegrate.call(this,t,...this.inputs):this.inputs.length===1&&this.internalEvaluate==null&&this.hasVariable()?this:(console.error("Cannot integrate formula without variable"),f.constant(0)))}}function qi(e,t,n=!0,r,i=o.dInf){const a=_e(n),u=_e(r),l=_e(i);return N(()=>{var b,h,y,C;const c=s(l);if(o.eq(c,1))return o.gte(t.value,e.evaluate())?o.dOne:o.dZero;const p=s(a),v=(b=s(u))!=null?b:p?10:0;let g=0;if(o.gt(c,v)){if(!e.isInvertible())return console.error("Cannot calculate max affordable of non-invertible formula with more maxBulkAmount than directSum"),0;if(p){if(!e.isIntegralInvertible())return console.error("Cannot calculate max affordable of formula with non-invertible integral"),0;g=o.floor(e.invertIntegral(o.add(t.value,e.evaluateIntegral()))).sub((h=s(e.innermostVariable))!=null?h:0)}else g=o.floor(e.invert(t.value))}if(g=o.clampMax(g,c),v>0){const D=g;g=o.sub(g,v).clampMin(0);let R;for(p?R=nn(e,g,!0,0):R=e.evaluate(o.add((y=s(e.innermostVariable))!=null?y:0,g));o.lt(g,c)&&o.lt(g,Number.MAX_SAFE_INTEGER)&&o.add(D,1).gte(g);){const I=e.evaluate(g.add((C=s(e.innermostVariable))!=null?C:0));if(o.add(R,I).lte(t.value))g=g.add(1),R=o.add(R,I);else break}}return g})}function nn(e,t,n=!0,r){var c;if(o.eq(t,1))return e.evaluate();const i=(c=s(e.innermostVariable))!=null?c:0;let a=o.add(t,i);const u=a;r!=null||(r=n?10:0),a=a.sub(r).clampMin(i);let l=0;if(o.gt(t,r)){if(!e.isInvertible())return console.error("Cannot calculate cost with indirect sum of non-invertible formula"),0;if(n){if(!e.isIntegrable())return console.error("Cannot calculate cost with cumulative cost of non-integrable formula"),0;if(l=o.sub(e.evaluateIntegral(a),e.evaluateIntegral()),u.gt(1e308))return o.add(l,o.sub(u,a).times(e.evaluate(a)))}else if(l=e.evaluate(a),a=a.add(1),u.gt(1e308))return o.sub(u,a).add(1).times(l)}for(let p=a.toNumber();pn.trim()).join(` +`))!=null?t:""}function pi(e,t){var n;o.isNaN(t)&&(Re.hasNaN||(Z.autosave=!1,Re.hasNaN=!0,Re.NaNPath=e[hn],Re.NaNPersistent=e),console.error(`Attempted to save NaN value to ${(n=e[hn])==null?void 0:n.join(".")}`)),e[rn].value=t}function ot(e,t=!0){const n=qe(e)?e:G(e);qe(e)&&(e=e.value);const r=N({get(){return n.value},set(a){t?pi(i,a):i[rn].value=a}});r[Yt]=e;const i={get value(){return n.value},set value(a){t?pi(i,a):i[rn].value=a},__v_isRef:!0,[rn]:n,[Yt]:e,[fr]:Sl(),[gr]:!1,[Et]:r,[hn]:void 0};return ct.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,` +Created at: +`+i[fr]):bn[ct[ct.length-1]].add(i),i}function Il(e){return e!=null&&typeof e=="object"&&rn in e}function kn(e){return!(en in e)&&Et in e?e[Et]:new Proxy(e,{get(t,n){if(n!==rn)return n===Xn?!0:t[n]},set(t,n,r){return t[n]=r,!0},has(t,n){return n===rn?!1:n==Xn?!0:Reflect.has(t,n)}})}function Vi(e){ct.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):bn[ct[ct.length-1]].delete(e),e[gr]=!0}Ke.on("addLayer",(e,t)=>{const n=[],r=(i,a=[])=>{let u=!1;return Object.keys(i).forEach(l=>{let c=i[l];if(c!=null&&typeof c=="object"){if(c[Xn]===!0)return;if(en in c&&(c=c[en]),Il(c)){if(u=!0,c[gr]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,` +Created at: +`+c[fr]);return}bn[e.id].delete(c);const p=[e.id,...a,l];c[hn]!=null&&JSON.stringify(p)!==JSON.stringify(c[hn])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${c[hn].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),c[hn]=p;const v=a.reduce((b,h)=>(h in b||(b[h]={}),b[h]),t),g=v[l];v[l]=c[rn],ua(v)?g!=null?v[l]=g:v[l]=c[Yt]:g!=null?v[l].value=g:v[l].value=c[Yt]}else!(c instanceof o)&&!(c instanceof f)&&!qe(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),r(c,[...a,l])&&(qt(c)&&!qt(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",en in i?i[en]:i,l):u=!0))}}),u};r(e[en]),bn[e.id].forEach(i=>{i[gr]||console.error(`Created persistent ref in ${e.id} without registering it to the layer!`,`Make sure to include everything persistent in the returned object. + +Created at: +`+i[fr])}),bn[e.id].clear()});const Gr=Symbol("RegisterNode"),Ur=Symbol("UnregisterNode"),Wr=Symbol("Nodes"),Hr=Symbol("Bounds"),ge=Vr({});window.layers=ge;const bn={},ct=[];function Yr(e,t){return Qe(()=>{const n={},r=n.emitter=_i();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=G({}),n.id=e,ct.push(e),bn[e]=new Set,n.minimized=ot(!1,!1),Object.assign(n,t.call(n,n)),ct[ct.length-1]==null||ct[ct.length-1]!==e)throw new Error(`Adding layers stack in invalid state. This should not happen +Stack: ${ct} +Trying to pop ${n.id}`);ct.pop(),A(n,"color"),A(n,"display"),A(n,"classes"),A(n,"style"),A(n,"name"),le(n,"name",n.id),A(n,"minWidth"),le(n,"minWidth",600),A(n,"minimizable"),le(n,"minimizable",!0),A(n,"minimizedDisplay");const i=n.style;return n.style=N(()=>{var u,l;let a=s(n.minWidth);return(typeof a=="number"||!Number.isNaN(parseInt(a)))&&(a=a+"px"),[(u=s(i))!=null?u:"",(l=n.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:a,flexBasis:a,margin:""}]}),n})}function Zr(e,t){if(console.info("Adding layer",e.id),ge[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ge[e.id]);return}le(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ge[e.id]=e,Ke.emit("addLayer",e,t.layers[e.id])}function xl(e){return ge[e]}function Xr(e){console.info("Removing layer",e.id),Ke.emit("removeLayer",e),ge[e.id]=void 0}function $l(e){Xr(e),Zr(e,Z)}function Dl(e){const t=G(!1);return{openModal:()=>t.value=!0,modal:z(()=>d(Vt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>d("h2",null,[s(e.name)]),body:s(e.display)}))}}Ke.on("update",function(t){Object.values(ge).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ge).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Tl=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Gr,UnregisterNodeInjectionKey:Ur,NodesInjectionKey:Wr,BoundsInjectionKey:Hr,layers:ge,persistentRefs:bn,addingLayers:ct,createLayer:Yr,addLayer:Zr,getLayer:xl,removeLayer:Xr,reloadLayer:$l,setupLayerModal:Dl},Symbol.toStringTag,{value:"Module"}));const Pl=X({components:{Context:Fi,ErrorVue:ki},props:{index:{type:Number,required:!0},display:{type:q(Object,String,Function),required:!0},minimizedDisplay:q(Object,String,Function),minimized:{type:Object,required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:r,minimizedDisplay:i}=Te(e),a=zr(t),u=Tn(i),l=N(()=>he.allowGoBack&&n.value>0&&!De(r));function c(){Z.tabs.splice(s(e.index),1/0)}function p(g){e.nodes.value=g}const v=G([]);return ca((g,b,h)=>(console.warn(`Error caught in "${e.name}" layer`,g,b,h),v.value.push(g instanceof Error?g:new Error(JSON.stringify(g))),!1)),{component:a,minimizedComponent:u,showGoBack:l,updateNodes:p,unref:s,goBack:c,errors:v}}}),Al={key:1};function Rl(e,t,n,r,i,a){const u=_t("ErrorVue"),l=_t("Context");return e.errors.length>0?(M(),re(u,{key:0,errors:e.errors},null,8,["errors"])):(M(),T("div",Ot({key:1,class:"layer-container",style:{"--layer-color":e.unref(e.color)}},e.$attrs),[e.showGoBack?(M(),T("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):L("",!0),e.unref(e.minimized)?(M(),T("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(M(),re(Je(e.minimizedComponent),{key:0})):(M(),T("div",Al,ee(e.unref(e.name)),1))])):(M(),T("div",{key:2,class:Ne(["layer-tab",{showGoBack:e.showGoBack}])},[d(l,{onUpdateNodes:e.updateNodes},{default:Y(()=>[(M(),re(Je(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(M(),T("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.$emit("setMinimized",!0))}," \u25BC ")):L("",!0)],16))}var El=ve(Pl,[["render",Rl],["__scopeId","data-v-a9f5b1da"]]);const Bi=e=>(on("data-v-4b4bda40"),e=e(),ln(),e),Fl=Bi(()=>k("h2",null,"Changelog",-1)),Ol=Bi(()=>k("details",{open:""},[k("summary",null,[_("v0.0 Initial Commit - "),k("time",null,"2021-09-04")]),_(" This is the first release :D "),k("ul",null,[k("li",{class:"feature"},"Did everything"),k("li",{class:"fix"},"Had some fun"),k("li",{class:"breaking"},"Removed everything"),k("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),ql=X({__name:"Changelog",setup(e,{expose:t}){const n=G(!1);return t({open(){n.value=!0}}),(r,i)=>(M(),re(Vt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a)},{header:Y(()=>[Fl]),body:Y(()=>[Ol]),_:1},8,["modelValue"]))}});var Vl=ve(ql,[["__scopeId","data-v-4b4bda40"]]),Bl=X({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:n,pinned:r}=Te(e),i=G(!1),a=N(()=>(De(r)||i.value)&&u.value),u=Tn(n),l=bt(fe(z(()=>{const v=De(t);return v==null?"":wt(v)})));function c(v){const g=r;v.shiftKey&&g&&(g.value=!g.value,v.stopPropagation(),v.preventDefault())}const p=N(()=>De(r)&&kt[ie.theme].showPin);return{Direction:W,isHovered:i,isShown:a,comp:u,elementComp:l,unref:s,togglePinned:c,showPin:p}}});const Ll={key:0,class:"material-icons pinned"};function jl(e,t,n,r,i,a){return M(),T("div",{class:Ne(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=u=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=u=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...u)=>e.togglePinned&&e.togglePinned(...u))},[Ft(e.$slots,"default",{},void 0,!0),e.elementComp?(M(),re(Je(e.elementComp),{key:0})):L("",!0),d(Gn,{name:"fade"},{default:Y(()=>{var u;return[e.isShown?(M(),T("div",{key:0,class:Ne(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Be([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(u=e.unref(e.style))!=null?u:{}])},[e.showPin?(M(),T("span",Ll,"push_pin")):L("",!0),e.comp?(M(),re(Je(e.comp),{key:1})):L("",!0)],6)):L("",!0)]}),_:1})],34)}var Oe=ve(Bl,[["render",jl],["__scopeId","data-v-6102fa3a"]]);const wn=e=>(on("data-v-4f97aa40"),e=e(),ln(),e),zl={class:"info-modal-header"},Gl=["src","alt"],Ul={class:"info-modal-title"},Wl={key:0},Hl={key:0},Yl={key:0},Zl=wn(()=>k("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),Xl=wn(()=>k("br",null,null,-1)),Jl=wn(()=>k("br",null,null,-1)),Kl=["href"],Ql=wn(()=>k("span",{class:"material-icons info-modal-discord"},"discord",-1)),eu=wn(()=>k("div",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[k("span",{class:"material-icons info-modal-discord"},"discord"),_(" The Paper Pilot Community ")])],-1)),tu=wn(()=>k("div",null,[k("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[k("span",{class:"material-icons info-modal-discord"},"discord"),_(" The Modding Tree ")])],-1)),nu=wn(()=>k("br",null,null,-1));var ru=X({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:r,logo:i,author:a,discordName:u,discordLink:l,versionNumber:c,versionTitle:p}=he,v=Te(n),g=G(!1),b=N(()=>br(Z.timePlayed)),h=N(()=>fe(z(()=>d(ne,null,[Os.map(st)]))));t({open(){g.value=!0}});function y(){var C;(C=s(v.changelog))==null||C.open()}return(C,D)=>(M(),re(Vt,{modelValue:g.value,"onUpdate:modelValue":D[0]||(D[0]=R=>g.value=R)},{header:Y(()=>[k("div",zl,[s(i)?(M(),T("img",{key:0,class:"info-modal-logo",src:s(i),alt:s(r)},null,8,Gl)):L("",!0),k("div",Ul,[k("h2",null,ee(s(r)),1),k("h4",null,[_(" v"+ee(s(c)),1),s(p)?(M(),T("span",Wl,": "+ee(s(p)),1)):L("",!0)])])])]),body:Y(({shown:R})=>[R?(M(),T("div",Hl,[s(a)?(M(),T("div",Yl,"By "+ee(s(a)),1)):L("",!0),Zl,Xl,k("div",{class:"link",onClick:y},"Changelog"),Jl,k("div",null,[s(l)?(M(),T("a",{key:0,href:s(l),class:"info-modal-discord-link",target:"_blank"},[Ql,_(" "+ee(s(u)),1)],8,Kl)):L("",!0)]),eu,tu,nu,k("div",null,"Time Played: "+ee(s(b)),1),(M(),re(Je(s(h))))])):L("",!0)]),_:1},8,["modelValue"]))}});var iu=ve(ru,[["__scopeId","data-v-4f97aa40"]]);const au={class:"field"},su={key:0,class:"field-title"},Jr=X({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const n=e,r=Tn(Ht(n,"title"),"span"),i=G((u=n.options.find(l=>l.value===n.modelValue))!=null?u:null);ht(Ht(n,"modelValue"),l=>{var c;De(i)!==l&&(i.value=(c=n.options.find(p=>p.value===l))!=null?c:null)});function a(l){t("update:modelValue",l.value)}return(l,c)=>(M(),T("div",au,[s(r)?(M(),T("span",su,[(M(),re(Je(s(r))))])):L("",!0),d(s(va),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[c[0]||(c[0]=p=>i.value=p),a],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const ou={class:"field"},lu=X({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=N(()=>{var a;return fe((a=s(n.title))!=null?a:"","span")}),i=N({get(){return!!n.modelValue},set(a){t("update:modelValue",a)}});return(a,u)=>(M(),T("label",ou,[Br(k("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=l=>qe(i)?i.value=l:null)},null,512),[[da,s(i)]]),(M(),re(Je(s(r))))]))}});var It=ve(lu,[["__scopeId","data-v-11046116"]]);const uu=["onClick"],cu=X({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=G(!1),r=G(null);function i(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,Wt(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(a,u)=>(M(),T("button",{onClick:$n(i,["stop"]),class:Ne(["feedback",{activated:n.value,left:e.left}])},[Ft(a.$slots,"default",{},void 0,!0)],10,uu))}});var Li=ve(cu,[["__scopeId","data-v-01a1b95c"]]);const du={class:"header"},pu=k("h2",null,"Settings",-1),fu={class:"option-tabs"},gu={key:0},mu={key:1};var vu=X({__name:"Options",setup(e,{expose:t}){const n=G(!1),r=G("behaviour");function i(ue){return ue==r.value}function a(ue){r.value=ue}t({isTab:i,setTab:a,save:mt,open(){n.value=!0}});const u=Object.keys(kt).map(ue=>({label:rt(ue),value:ue})),l=N(()=>fe(z(()=>d(ne,null,[Pi.map(st)])))),{showTPS:c,theme:p,unthrottled:v,alignUnits:g}=Te(ie),{autosave:b,offlineProd:h}=Te(Z),y=N({get(){return Z.devSpeed===0},set(ue){Z.devSpeed=ue?0:null}}),C=z(()=>d("span",{class:"option-title"},[_("Unthrottled"),d("desc",null,[_("Allow the game to run as fast as possible. Not battery friendly.")])])),D=z(()=>d("span",{class:"option-title"},[_("Offline Production"),d(Oe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Simulate production that occurs while the game is closed.")])])),R=z(()=>d("span",{class:"option-title"},[_("Autosave"),d(Oe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Automatically save the game every second or when the game is closed.")])])),I=z(()=>d("span",{class:"option-title"},[_("Pause game"),d(Oe,{display:"Save-specific",direction:W.Right},{default:()=>[_("*")]}),d("desc",null,[_("Stop everything from moving.")])])),E=z(()=>d("span",{class:"option-title"},[_("Theme"),d("desc",null,[_("How the game looks.")])])),B=z(()=>d("span",{class:"option-title"},[_("Show TPS"),d("desc",null,[_("Show TPS meter at the bottom-left corner of the page.")])])),de=z(()=>d("span",{class:"option-title"},[_("Align modifier units"),d("desc",null,[_("Align numbers to the beginning of the unit in modifier view.")])]));return(ue,ae)=>(M(),re(Vt,{modelValue:n.value,"onUpdate:modelValue":ae[10]||(ae[10]=Q=>n.value=Q)},{header:Y(()=>[k("div",du,[pu,k("div",fu,[k("button",{class:Ne({selected:i("behaviour")}),onClick:ae[0]||(ae[0]=Q=>a("behaviour"))},"Behaviour",2),k("button",{class:Ne({selected:i("appearance")}),onClick:ae[1]||(ae[1]=Q=>a("appearance"))},"Appearance",2)])])]),body:Y(()=>[i("behaviour")?(M(),T("div",gu,[d(It,{title:s(C),modelValue:s(v),"onUpdate:modelValue":ae[2]||(ae[2]=Q=>qe(v)?v.value=Q:null)},null,8,["title","modelValue"]),s(he).enablePausing?(M(),re(It,{key:0,title:s(I),modelValue:s(y),"onUpdate:modelValue":ae[3]||(ae[3]=Q=>qe(y)?y.value=Q:null)},null,8,["title","modelValue"])):L("",!0),d(It,{title:s(D),modelValue:s(h),"onUpdate:modelValue":ae[4]||(ae[4]=Q=>qe(h)?h.value=Q:null)},null,8,["title","modelValue"]),d(It,{title:s(R),modelValue:s(b),"onUpdate:modelValue":ae[5]||(ae[5]=Q=>qe(b)?b.value=Q:null)},null,8,["title","modelValue"]),s(b)?L("",!0):(M(),re(Li,{key:1,class:"button save-button",onClick:ae[6]||(ae[6]=Q=>s(mt)())},{default:Y(()=>[_("Manually save")]),_:1}))])):L("",!0),i("appearance")?(M(),T("div",mu,[d(Jr,{title:s(E),options:s(u),modelValue:s(p),"onUpdate:modelValue":ae[7]||(ae[7]=Q=>qe(p)?p.value=Q:null)},null,8,["title","options","modelValue"]),(M(),re(Je(s(l)))),d(It,{title:s(B),modelValue:s(c),"onUpdate:modelValue":ae[8]||(ae[8]=Q=>qe(c)?c.value=Q:null)},null,8,["title","modelValue"]),d(It,{title:s(de),modelValue:s(g),"onUpdate:modelValue":ae[9]||(ae[9]=Q=>qe(g)?g.value=Q:null)},null,8,["title","modelValue"])])):L("",!0)]),_:1},8,["modelValue"]))}});const hu=["onSubmit"],bu={class:"field"},yu={key:0,class:"field-title"},wu=["placeholder"],_u=X({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,r=Tn(Ht(n,"title"),"span"),i=bt(null);Jn(()=>{var c;(c=i.value)==null||c.focus()});const a=N({get(){var c;return(c=s(n.modelValue))!=null?c:""},set(c){t("update:modelValue",c)}});function u(){t("submit")}function l(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(c,p)=>(M(),T("form",{onSubmit:$n(u,["prevent"])},[k("div",bu,[s(r)?(M(),T("span",yu,[(M(),re(Je(s(r))))])):L("",!0),e.textArea?(M(),re(s(ba),{key:1,modelValue:s(a),"onUpdate:modelValue":p[0]||(p[0]=v=>qe(a)?a.value=v:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:l,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Br((M(),T("input",{key:2,type:"text","onUpdate:modelValue":p[1]||(p[1]=v=>qe(a)?a.value=v:null),placeholder:e.placeholder,class:Ne({fullWidth:!e.title}),onBlur:l,ref_key:"field",ref:i},null,42,wu)),[[pa,s(a)]])])],40,hu))}});var ji=ve(_u,[["__scopeId","data-v-90bd4994"]]);const Nu={key:0},Cu=["onClick","disabled"],ku={key:0},Mu=["onClick"],Su=X({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const r=Te(e),i=G(!1);ht(i,l=>{t("confirmingChanged",l)});function a(){if(s(r.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function u(){i.value=!1}return(l,c)=>(M(),T("span",{class:Ne(["container",{confirming:i.value}])},[i.value?(M(),T("span",Nu,"Are you sure?")):L("",!0),k("button",{onClick:$n(a,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(M(),T("span",ku,"Yes")):Ft(l.$slots,"default",{key:1},void 0,!0)],8,Cu),i.value?(M(),T("button",{key:1,class:"button",onClick:$n(u,["stop"])},"No",8,Mu)):L("",!0)],2))}});var Iu=ve(Su,[["__scopeId","data-v-2f8ef34c"]]);const Xt=e=>(on("data-v-32313015"),e=e(),ln(),e),xu=Xt(()=>k("div",{class:"handle material-icons"},"drag_handle",-1)),$u={key:0,class:"actions"},Du=Xt(()=>k("span",{class:"material-icons"},"content_paste",-1)),Tu=Xt(()=>k("span",{class:"material-icons"},"content_copy",-1)),Pu=Xt(()=>k("span",{class:"material-icons"},"edit",-1)),Au=Xt(()=>k("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ru={key:1,class:"actions"},Eu=Xt(()=>k("span",{class:"material-icons"},"check",-1)),Fu=Xt(()=>k("span",{class:"material-icons"},"close",-1)),Ou={key:2,class:"details"},qu={class:"save-version"},Vu=Xt(()=>k("br",null,null,-1)),Bu={key:0},Lu={key:3,class:"details"},ju={key:4,class:"details error"},zu=Xt(()=>k("br",null,null,-1)),Gu=X({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:r}=Te(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=G(!1),u=G(!1),l=G("");ht(a,()=>{var g;return l.value=(g=r.value.name)!=null?g:""});const c=N(()=>r.value!=null&&r.value.id===Z.id),p=N(()=>{var g;return c.value?Z.time:(g=r.value!=null&&r.value.time)!=null?g:0});function v(){t("editName",l.value),a.value=!1}return(g,b)=>(M(),T("div",{class:Ne(["save",{active:s(c)}])},[xu,a.value?(M(),T("div",Ru,[k("button",{onClick:v,class:"button"},[d(Oe,{display:"Save",direction:s(W).Left,class:"info"},{default:Y(()=>[Eu]),_:1},8,["direction"])]),k("button",{onClick:b[5]||(b[5]=h=>a.value=!a.value),class:"button"},[d(Oe,{display:"Cancel",direction:s(W).Left,class:"info"},{default:Y(()=>[Fu]),_:1},8,["direction"])])])):(M(),T("div",$u,[s(r).error==null&&!u.value?(M(),re(Li,{key:0,onClick:b[0]||(b[0]=h=>t("export")),class:"button",left:""},{default:Y(()=>[d(Oe,{display:"Export",direction:s(W).Left,class:"info"},{default:Y(()=>[Du]),_:1},8,["direction"])]),_:1})):L("",!0),s(r).error==null&&!u.value?(M(),T("button",{key:1,onClick:b[1]||(b[1]=h=>t("duplicate")),class:"button"},[d(Oe,{display:"Duplicate",direction:s(W).Left,class:"info"},{default:Y(()=>[Tu]),_:1},8,["direction"])])):L("",!0),s(r).error==null&&!u.value?(M(),T("button",{key:2,onClick:b[2]||(b[2]=h=>a.value=!a.value),class:"button"},[d(Oe,{display:"Edit Name",direction:s(W).Left,class:"info"},{default:Y(()=>[Pu]),_:1},8,["direction"])])):L("",!0),d(Iu,{disabled:s(c),onClick:b[3]||(b[3]=h=>t("delete")),onConfirmingChanged:b[4]||(b[4]=h=>u.value=h)},{default:Y(()=>[d(Oe,{display:"Delete",direction:s(W).Left,class:"info"},{default:Y(()=>[Au]),_:1},8,["direction"])]),_:1},8,["disabled"])])),s(r).error==null&&!a.value?(M(),T("div",Ou,[k("button",{class:"button open",onClick:b[6]||(b[6]=h=>t("open"))},[k("h3",null,ee(s(r).name),1)]),k("span",qu,"v"+ee(s(r).modVersion),1),Vu,s(p)?(M(),T("div",Bu,"Last played "+ee(s(i).format(s(p))),1)):L("",!0)])):s(r).error==null&&a.value?(M(),T("div",Lu,[d(ji,{modelValue:l.value,"onUpdate:modelValue":b[7]||(b[7]=h=>l.value=h),class:"editname",onSubmit:v},null,8,["modelValue"])])):(M(),T("div",ju,[_(" Error: Failed to load save with id "+ee(s(r).id),1),zu,_(ee(s(r).error),1)]))],2))}});var Uu=ve(Gu,[["__scopeId","data-v-32313015"]]);const Kr=e=>(on("data-v-2a4275be"),e=e(),ln(),e),Wu=Kr(()=>k("h2",null,"Saves Manager",-1)),Hu={class:"modal-footer"},Yu={class:"field"},Zu=Kr(()=>k("span",{class:"field-title"},"Create Save",-1)),Xu={class:"field-buttons"},Ju={class:"footer"},Ku=Kr(()=>k("div",{style:{"flex-grow":"1"}},null,-1)),Qu=X({__name:"SavesManager",setup(e,{expose:t}){const n=G(!1),r=G(null);t({open(){n.value=!0}});const i=G(!1),a=G(""),u=G(null);ht(a,I=>{I?Wt(()=>{try{if(I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=tn.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I),i.value=!0;return}const E=JSON.parse(I);if(typeof E!="object"){i.value=!0;return}const B=cr();E.id=B,mt(E),a.value="",i.value=!1,ie.saves.push(B)}catch{i.value=!0}}):i.value=!1});let l={},c=G(Object.keys(l).reduce((I,E)=>(I.push({label:E.split("/").slice(-1)[0].slice(0,-4),value:l[E]}),I),[]));const p=Vr({});function v(I){if(p[I]==null){let E=localStorage.getItem(I);if(E==null)p[I]={error:"Save doesn't exist in localStorage",id:I};else if(E==="dW5kZWZpbmVk")p[I]={error:"Save is undefined",id:I};else try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=tn.decompressFromUTF16(E);else return console.warn("Unable to determine preset encoding",E),i.value=!0,p[I]={error:"Unable to determine preset encoding",id:I},p[I];p[I]={...JSON.parse(E),id:I}}catch(B){p[I]={error:B,id:I},console.warn(`SavesManager: Failed to load info about save with id ${I}: +${B} +${E}`)}}return p[I]}ht(n,I=>{I&&Object.keys(p).forEach(E=>delete p[E])});const g=N(()=>ie.saves.reduce((I,E)=>(I[E]=v(E),I),{}));function b(I){let E;switch(Z.id===I?E=Ni(Z):E=JSON.stringify(g.value[I]),he.exportEncoding){default:console.warn(`Unknown save encoding: ${he.exportEncoding}. Defaulting to lz`);case"lz":E=tn.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const B=document.createElement("textarea");B.value=E,document.body.appendChild(B),B.select(),B.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(B)}function h(I){Z.id===I&&mt();const E={...g.value[I],id:cr()};mt(E),ie.saves.push(E.id)}function y(I){ie.saves=ie.saves.filter(E=>E!==I),localStorage.removeItem(I),p[I]=void 0}function C(I){g.value[Z.id].time=Z.time,mt(),p[Z.id]=void 0,vn(g.value[I]),p[I]=void 0}function D(I){if(u.value=I,Wt(()=>{u.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=tn.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const E=JSON.parse(I);E.id=cr(),mt(E),ie.saves.push(E.id),C(E.id)}function R(I,E){const B=g.value[I];B!=null&&(B.name=E,Z.id===I?(Z.name=E,mt()):(mt(B),p[I]=void 0))}return(I,E)=>(M(),re(Vt,{modelValue:n.value,"onUpdate:modelValue":E[4]||(E[4]=B=>n.value=B),ref_key:"modal",ref:r},{header:Y(()=>[Wu]),body:Y(({shown:B})=>[B?(M(),re(s(ha),{key:0,list:s(ie).saves,handle:".handle",itemKey:de=>de},{item:Y(({element:de})=>[d(Uu,{save:s(g)[de],onOpen:ue=>C(de),onExport:ue=>b(de),onEditName:ue=>R(de,ue),onDuplicate:ue=>h(de),onDelete:ue=>y(de)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):L("",!0)]),footer:Y(()=>[k("div",Hu,[d(ji,{modelValue:a.value,"onUpdate:modelValue":E[0]||(E[0]=B=>a.value=B),title:"Import Save",placeholder:"Paste your save here!",class:Ne({importingFailed:i.value})},null,8,["modelValue","class"]),k("div",Yu,[Zu,k("div",Xu,[k("button",{class:"button",onClick:E[1]||(E[1]=B=>C(s(xn)().id))},"New Game"),Object.keys(s(c)).length>0?(M(),re(Jr,{key:0,options:s(c),modelValue:u.value,"onUpdate:modelValue":E[2]||(E[2]=B=>D(B)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):L("",!0)])]),k("div",Ju,[Ku,k("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=B=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var zi=ve(Qu,[["__scopeId","data-v-2a4275be"]]);const Nt=e=>(on("data-v-318a1c31"),e=e(),ln(),e),ec=["src","alt"],tc={key:1,class:"title"},nc=Nt(()=>k("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),rc={class:"discord"},ic={class:"discord-links"},ac={key:0},sc=["href"],oc=Nt(()=>k("li",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),lc=Nt(()=>k("li",null,[k("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),uc={href:"https://forums.moddingtree.com/",target:"_blank"},cc=Nt(()=>k("span",{class:"material-icons"},"forum",-1)),dc=Nt(()=>k("span",{class:"material-icons"},"info",-1)),pc=Nt(()=>k("span",{class:"material-icons"},"library_books",-1)),fc=Nt(()=>k("span",{class:"material-icons"},"settings",-1)),gc=Nt(()=>k("span",{class:"material-icons"},"library_books",-1)),mc=Nt(()=>k("span",{class:"material-icons"},"settings",-1)),vc=Nt(()=>k("span",{class:"material-icons"},"info",-1)),hc={href:"https://forums.moddingtree.com/",target:"_blank"},bc=Nt(()=>k("span",{class:"material-icons"},"forum",-1)),yc={class:"discord"},wc={class:"discord-links"},_c={key:0},Nc=["href"],Cc=Nt(()=>k("li",null,[k("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),kc=Nt(()=>k("li",null,[k("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Mc=X({__name:"Nav",setup(e){const t=G(null),n=G(null),r=G(null),i=G(null),{useHeader:a,banner:u,title:l,discordName:c,discordLink:p,versionNumber:v}=he;function g(){window.open(p,"mywindow")}return(b,h)=>(M(),T(ne,null,[s(a)?(M(),T("div",Ot({key:0,class:"nav"},b.$attrs),[s(u)?(M(),T("img",{key:0,src:s(u),class:"banner",alt:s(l)},null,8,ec)):(M(),T("div",tc,ee(s(l)),1)),k("div",{onClick:h[0]||(h[0]=y=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[d(Oe,{display:"Changelog",direction:s(W).Down,class:"version"},{default:Y(()=>[k("span",null,"v"+ee(s(v)),1)]),_:1},8,["direction"])]),nc,k("div",rc,[k("span",{onClick:g,class:"material-icons"},"discord"),k("ul",ic,[s(p)?(M(),T("li",ac,[k("a",{href:s(p),target:"_blank"},ee(s(c)),9,sc)])):L("",!0),oc,lc])]),k("div",null,[k("a",uc,[d(Oe,{display:"Forums",direction:s(W).Down,yoffset:"5px"},{default:Y(()=>[cc]),_:1},8,["direction"])])]),k("div",{onClick:h[1]||(h[1]=y=>{var C;return(C=t.value)==null?void 0:C.open()})},[d(Oe,{display:"Info",direction:s(W).Down,class:"info"},{default:Y(()=>[dc]),_:1},8,["direction"])]),k("div",{onClick:h[2]||(h[2]=y=>{var C;return(C=n.value)==null?void 0:C.open()})},[d(Oe,{display:"Saves",direction:s(W).Down,xoffset:"-20px"},{default:Y(()=>[pc]),_:1},8,["direction"])]),k("div",{onClick:h[3]||(h[3]=y=>{var C;return(C=r.value)==null?void 0:C.open()})},[d(Oe,{display:"Settings",direction:s(W).Down,xoffset:"-66px"},{default:Y(()=>[fc]),_:1},8,["direction"])])],16)):(M(),T("div",Ot({key:1,class:"overlay-nav"},b.$attrs),[k("div",{onClick:h[4]||(h[4]=y=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[d(Oe,{display:"Changelog",direction:s(W).Right,xoffset:"25%",class:"version"},{default:Y(()=>[k("span",null,"v"+ee(s(v)),1)]),_:1},8,["direction"])]),k("div",{onClick:h[5]||(h[5]=y=>{var C;return(C=n.value)==null?void 0:C.open()})},[d(Oe,{display:"Saves",direction:s(W).Right},{default:Y(()=>[gc]),_:1},8,["direction"])]),k("div",{onClick:h[6]||(h[6]=y=>{var C;return(C=r.value)==null?void 0:C.open()})},[d(Oe,{display:"Settings",direction:s(W).Right},{default:Y(()=>[mc]),_:1},8,["direction"])]),k("div",{onClick:h[7]||(h[7]=y=>{var C;return(C=t.value)==null?void 0:C.open()})},[d(Oe,{display:"Info",direction:s(W).Right},{default:Y(()=>[vc]),_:1},8,["direction"])]),k("div",null,[k("a",hc,[d(Oe,{display:"Forums",direction:s(W).Right,xoffset:"7px"},{default:Y(()=>[bc]),_:1},8,["direction"])])]),k("div",yc,[k("span",{onClick:g,class:"material-icons"},"discord"),k("ul",wc,[s(p)?(M(),T("li",_c,[k("a",{href:s(p),target:"_blank"},ee(s(c)),9,Nc)])):L("",!0),Cc,kc])])],16)),d(iu,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),d(zi,{ref_key:"savesManager",ref:n},null,512),d(vu,{ref_key:"options",ref:r},null,512),d(Vl,{ref_key:"changelog",ref:i},null,512)],64))}});var Gi=ve(Mc,[["__scopeId","data-v-318a1c31"]]);const Sc={class:"inner-tab"},Ic=X({__name:"Game",setup(e){const t=Ht(Z,"tabs"),n=N(()=>Object.keys(ge)),r=he.useHeader;function i(a){const{display:u,minimized:l,name:c,color:p,minimizable:v,nodes:g,minimizedDisplay:b}=a;return{display:u,minimized:l,name:c,color:p,minimizable:v,nodes:g,minimizedDisplay:b}}return(a,u)=>(M(),T("div",{class:Ne(["tabs-container",{useHeader:s(r)}])},[(M(!0),T(ne,null,xt(s(t),(l,c)=>{var p,v;return M(),T("div",{key:c,class:Ne(["tab",s((p=s(ge)[l])==null?void 0:p.classes)]),style:Be(s((v=s(ge)[l])==null?void 0:v.style))},[c===0&&!s(r)?(M(),re(Gi,{key:0})):L("",!0),k("div",Sc,[s(n).includes(l)?(M(),re(El,Ot({key:0},i(s(ge)[l]),{index:c,onSetMinimized:g=>s(ge)[l].minimized.value=g}),null,16,["index","onSetMinimized"])):(M(),re(Je(l),{key:1,index:c},null,8,["index"]))])],6)}),128))],2))}});var xc=ve(Ic,[["__scopeId","data-v-dcd207b4"]]);const $c=X({__name:"Sticky",setup(e){const t=G("0"),n=new ResizeObserver(i),r=bt(null);function i(){let a=r.value;if(a==null)return;let u=0;for(;a.previousSibling;){const l=a.previousSibling;l.dataset&&"vSticky"in l.dataset&&(u+=l.offsetHeight),a=l}t.value=u+"px"}return Wt(i),document.fonts.ready.then(i),Jn(()=>{var u;const a=(u=r.value)==null?void 0:u.parentElement;a&&n.observe(a)}),(a,u)=>(M(),T("div",{class:"sticky",style:Be({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Ft(a.$slots,"default",{},void 0,!0)],4))}});var mr=ve($c,[["__scopeId","data-v-cccac690"]]);const Dc=["x1","y1","x2","y2"],Tc=X({__name:"BoardLink",props:{link:null,dragging:null,dragged:null},setup(e){const n=Te(e),r=N(()=>{var u,l,c,p,v,g,b;const a={...n.link.value.startNode.position};return n.link.value.offsetStart&&(a.x+=s(n.link.value.offsetStart).x,a.y+=s(n.link.value.offsetStart).y),((u=n.dragging)==null?void 0:u.value)===n.link.value.startNode&&(a.x+=(p=(c=(l=n.dragged)==null?void 0:l.value)==null?void 0:c.x)!=null?p:0,a.y+=(b=(g=(v=n.dragged)==null?void 0:v.value)==null?void 0:g.y)!=null?b:0),a}),i=N(()=>{var u,l,c,p,v,g,b;const a={...n.link.value.endNode.position};return n.link.value.offsetEnd&&(a.x+=s(n.link.value.offsetEnd).x,a.y+=s(n.link.value.offsetEnd).y),((u=n.dragging)==null?void 0:u.value)===n.link.value.endNode&&(a.x+=(p=(c=(l=n.dragged)==null?void 0:l.value)==null?void 0:c.x)!=null?p:0,a.y+=(b=(g=(v=n.dragged)==null?void 0:v.value)==null?void 0:g.y)!=null?b:0),a});return(a,u)=>(M(),T("line",Ot({class:"link"},e.link,{class:{pulsing:e.link.pulsing},x1:s(r).x,y1:s(r).y,x2:s(i).x,y2:s(i).y}),null,16,Dc))}});var Pc=ve(Tc,[["__scopeId","data-v-58e8d695"]]);const Ac={key:0},Rc=["transform","onMousedown","onTouchstart","onMouseup","onTouchend"],Ec=["fill","stroke-width","stroke"],Fc=["fill"],Oc=X({__name:"BoardNodeAction",props:{node:null,nodeType:null,actions:null,isSelected:{type:Boolean},selectedAction:null},emits:["clickAction"],setup(e,{emit:t}){const r=Te(e),i=N(()=>me(r.nodeType.value.size,s(r.node))),a=N(()=>{var v;return(v=me(r.nodeType.value.outlineColor,s(r.node)))!=null?v:kt[ie.theme].variables["--outline"]}),u=N(()=>{var v;return(v=me(r.nodeType.value.titleColor,s(r.node)))!=null?v:kt[ie.theme].variables["--foreground"]}),l=N(()=>me(r.nodeType.value.actionDistance,s(r.node)));function c(v,g){t("clickAction",g.id),v.preventDefault(),v.stopPropagation()}function p(v,g){var b;((b=s(r.selectedAction))==null?void 0:b.id)===g.id&&(v.preventDefault(),v.stopPropagation())}return(v,g)=>(M(),re(Gn,{name:"actions",appear:""},{default:Y(()=>[e.isSelected&&e.actions?(M(),T("g",Ac,[(M(!0),T(ne,null,xt(e.actions,(b,h)=>{var y,C;return M(),T("g",{key:b.id,class:Ne(["action",{selected:((y=e.selectedAction)==null?void 0:y.id)===b.id}]),transform:`translate( + ${(-s(i)-30)*Math.sin(((e.actions.length-1)/2-h)*s(l))}, + ${(s(i)+30)*Math.cos(((e.actions.length-1)/2-h)*s(l))} + )`,onMousedown:D=>c(D,b),onTouchstart:D=>c(D,b),onMouseup:D=>p(D,b),onTouchend:$n(D=>p(D,b),["stop"])},[k("circle",{fill:s(me)(b.fillColor,e.node),r:"20","stroke-width":((C=e.selectedAction)==null?void 0:C.id)===b.id?4:0,stroke:s(a)},null,8,Ec),k("text",{fill:s(u),class:"material-icons"},ee(s(me)(b.icon,e.node)),9,Fc)],42,Rc)}),128))])):L("",!0)]),_:1}))}});var qc=ve(Oc,[["__scopeId","data-v-9efb2a56"]]);const Vc=["transform"],Bc={key:0},Lc=["r","fill","stroke"],jc=["r","fill","stroke"],zc=["r","fill"],Gc=["r","stroke-dasharray","stroke-dashoffset","stroke"],Uc={key:1,transform:"rotate(45, 0, 0)"},Wc=["width","height","transform","fill","stroke"],Hc=["width","height","transform","fill","stroke"],Yc=["width","height","transform","fill"],Zc=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],Xc=["fill","y"],Jc=["fill"],Kc=["fill","y"],Qc={key:0},ed=["fill","y"],td=["fill","y"],nd=X({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},isSelected:{type:Boolean},selectedAction:null},emits:["mouseDown","endDragging","clickAction"],setup(e,{emit:t}){const n=e,r=Math.sqrt(2),i=Te(n),a=N(()=>me(i.nodeType.value.draggable,s(i.node)));ht(a,U=>{const ye=s(i.node);s(i.dragging)===ye&&!U&&t("endDragging",ye)});const u=N(()=>{var ye;const U=s(i.node);return(ye=me(i.nodeType.value.actions,U))==null?void 0:ye.filter(ze=>He(me(ze.visibility,U)))}),l=N(()=>{var ye;const U=s(i.node);if(me(i.nodeType.value.draggable,U)&&((ye=s(i.dragging))==null?void 0:ye.id)===U.id&&s(i.dragged)!=null){const{x:ze,y:pt}=s(i.dragged);return{x:U.position.x+Math.round(ze/25)*25,y:U.position.y+Math.round(pt/25)*25}}return U.position}),c=N(()=>me(i.nodeType.value.shape,s(i.node))),p=N(()=>me(i.nodeType.value.title,s(i.node))),v=N(()=>me(i.nodeType.value.subtitle,s(i.node))),g=N(()=>me(i.nodeType.value.otherSubtitle,s(i.node))),b=N(()=>{var U;return(U=i.isSelected.value?s(i.selectedAction)&&me(s(i.selectedAction).tooltip,s(i.node)):null)!=null?U:me(i.nodeType.value.label,s(i.node))}),h=N(()=>{var U,ye;return me((ye=(U=s(i.selectedAction))==null?void 0:U.confirmationLabel)!=null?ye:{text:"Tap again to confirm"},s(i.node))}),y=N(()=>me(i.nodeType.value.size,s(i.node))),C=N(()=>{var U;return(U=me(i.nodeType.value.progress,s(i.node)))!=null?U:0}),D=N(()=>kt[ie.theme].variables["--background"]),R=N(()=>{var U;return(U=me(i.nodeType.value.outlineColor,s(i.node)))!=null?U:kt[ie.theme].variables["--outline"]}),I=N(()=>{var U;return(U=me(i.nodeType.value.fillColor,s(i.node)))!=null?U:kt[ie.theme].variables["--raised-background"]}),E=N(()=>me(i.nodeType.value.progressColor,s(i.node))),B=N(()=>{var U;return(U=me(i.nodeType.value.titleColor,s(i.node)))!=null?U:kt[ie.theme].variables["--foreground"]}),de=N(()=>me(i.nodeType.value.progressDisplay,s(i.node))),ue=N(()=>i.dragging.value!=null&&s(i.hasDragged)&&me(i.nodeType.value.canAccept,s(i.node),i.dragging.value)),ae=N(()=>me(i.nodeType.value.style,s(i.node))),Q=N(()=>me(i.nodeType.value.classes,s(i.node)));function Ie(U){t("mouseDown",U,i.node.value,a.value)}function be(U){var ye,ze,pt;(ye=i.hasDragged)!=null&&ye.value||(t("endDragging",i.node.value),(pt=(ze=i.nodeType.value).onClick)==null||pt.call(ze,i.node.value),U.stopPropagation())}return(U,ye)=>{var ze,pt,zt;return M(),T("g",{class:Ne(["boardnode",{[e.node.type]:!0,isSelected:e.isSelected,isDraggable:s(a),...s(Q)}]),style:Be([{opacity:((ze=e.dragging)==null?void 0:ze.id)===e.node.id&&e.hasDragged?.5:1},(pt=s(ae))!=null?pt:[]]),transform:`translate(${s(l).x},${s(l).y})${e.isSelected?" scale(1.2)":""}`},[d(qc,{actions:(zt=s(u))!=null?zt:[],"is-selected":e.isSelected,node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction,onClickAction:ye[0]||(ye[0]=ft=>t("clickAction",ft))},null,8,["actions","is-selected","node","node-type","selected-action"]),k("g",{class:"node-container",onMousedown:Ie,onTouchstartPassive:Ie,onMouseup:be,onTouchendPassive:be},[s(c)===s(je).Circle?(M(),T("g",Bc,[s(ue)?(M(),T("circle",{key:0,class:"receiver",r:s(y)+8,fill:s(D),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,Lc)):L("",!0),k("circle",{class:"body",r:s(y),fill:s(I),stroke:s(R),"stroke-width":4},null,8,jc),s(de)===s(sn).Fill?(M(),T("circle",{key:1,class:"progress progressFill",r:Math.max(s(y)*s(C)-2,0),fill:s(E)},null,8,zc)):(M(),T("circle",{key:2,r:s(y)+4.5,class:"progress progressRing",fill:"transparent","stroke-dasharray":(s(y)+4.5)*2*Math.PI,"stroke-width":5,"stroke-dashoffset":(s(y)+4.5)*2*Math.PI-s(C)*(s(y)+4.5)*2*Math.PI,stroke:s(E)},null,8,Gc))])):s(c)===s(je).Diamond?(M(),T("g",Uc,[s(ue)?(M(),T("rect",{key:0,class:"receiver",width:s(y)*s(r)+16,height:s(y)*s(r)+16,transform:`translate(${-(s(y)*s(r)+16)/2}, ${-(s(y)*s(r)+16)/2})`,fill:s(D),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,Wc)):L("",!0),k("rect",{class:"body",width:s(y)*s(r),height:s(y)*s(r),transform:`translate(${-s(y)*s(r)/2}, ${-s(y)*s(r)/2})`,fill:s(I),stroke:s(R),"stroke-width":4},null,8,Hc),s(de)===s(sn).Fill?(M(),T("rect",{key:1,class:"progress progressFill",width:Math.max(s(y)*s(r)*s(C)-2,0),height:Math.max(s(y)*s(r)*s(C)-2,0),transform:`translate(${-Math.max(s(y)*s(r)*s(C)-2,0)/2}, ${-Math.max(s(y)*s(r)*s(C)-2,0)/2})`,fill:s(E)},null,8,Yc)):(M(),T("rect",{key:2,class:"progress progressDiamond",width:s(y)*s(r)+9,height:s(y)*s(r)+9,transform:`translate(${-(s(y)*s(r)+9)/2}, ${-(s(y)*s(r)+9)/2})`,fill:"transparent","stroke-dasharray":(s(y)*s(r)+9)*4,"stroke-width":5,"stroke-dashoffset":(s(y)*s(r)+9)*4-s(C)*(s(y)*s(r)+9)*4,stroke:s(E)},null,8,Zc))])):L("",!0),k("text",{fill:s(B),class:"node-title",y:s(g)&&!s(v)?-10:0},ee(s(p)),9,Xc),s(v)?(M(),T("text",{key:2,fill:s(B),class:"node-subtitle",y:"-25"},ee(s(v)),9,Jc)):L("",!0),s(g)?(M(),T("text",{key:3,fill:s(B),class:"node-subtitle",y:s(v)?25:15},ee(s(g)),9,Kc)):L("",!0)],32),d(Gn,{name:"fade",appear:""},{default:Y(()=>{var ft;return[s(b)?(M(),T("g",Qc,[k("text",{fill:(ft=s(b).color)!=null?ft:s(B),class:Ne(["node-title",{pulsing:s(b).pulsing}]),y:-s(y)-20},ee(s(b).text),11,ed)])):L("",!0)]}),_:1}),d(Gn,{name:"fade",appear:""},{default:Y(()=>{var ft;return[e.isSelected&&e.selectedAction?(M(),T("text",{key:0,fill:(ft=s(h).color)!=null?ft:s(B),class:Ne(["node-title",{pulsing:s(h).pulsing}]),y:s(y)+75},ee(s(h).text),11,td)):L("",!0)]}),_:1})],14,Vc)}}});var rd=ve(nd,[["__scopeId","data-v-19cf948c"]]);const id={class:"stage",width:"100%",height:"100%"},ad={class:"g1"},sd=X({__name:"Board",props:{nodes:null,types:null,state:null,visibility:null,width:null,height:null,style:null,classes:null,links:null,selectedAction:null,selectedNode:null,draggingNode:null,receivingNode:null,mousePosition:null,setReceivingNode:{type:Function},setDraggingNode:{type:Function}},setup(e){const n=Te(e),r=G({x:0,y:0}),i=G({x:0,y:0}),a=G(!1),u=G(null),l=N(()=>{const h=n.nodes.value.slice();if(n.selectedNode.value){const y=h.splice(h.indexOf(n.selectedNode.value),1)[0];h.push(y)}if(n.draggingNode.value){const y=h.splice(h.indexOf(n.draggingNode.value),1)[0];h.push(y)}return h});Dt(()=>{const h=n.draggingNode.value;if(h==null)return null;const y={x:h.position.x+i.value.x,y:h.position.y+i.value.y};let C=Number.MAX_VALUE;n.setReceivingNode.value(n.nodes.value.reduce((D,R)=>{if(R.id===h.id)return D;const I=n.types.value[R.type];if(!me(I.canAccept,R,h))return D;const B=Math.pow(y.x-R.position.x,2)+Math.pow(y.y-R.position.y,2);let de=me(I.size,R);return B>C||B>de*de?D:(C=B,R)},null))});function c(h){h.setTransformOrigin(null),h.moveTo(u.value.$el.clientWidth/2,u.value.$el.clientHeight/2)}function p(h,y=null,C=!1){if(n.draggingNode.value==null){h.preventDefault(),h.stopPropagation();let D,R;if("touches"in h)if(h.touches.length===1)D=h.touches[0].clientX,R=h.touches[0].clientY;else return;else D=h.clientX,R=h.clientY;r.value={x:D,y:R},i.value={x:0,y:0},a.value=!1,C&&n.setDraggingNode.value(y)}y!=null&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function v(h){const{x:y,y:C,scale:D}=u.value.panZoomInstance.getTransform();let R,I;if("touches"in h)if(h.touches.length===1)R=h.touches[0].clientX,I=h.touches[0].clientY;else{g(n.draggingNode.value),n.mousePosition.value=null;return}else R=h.clientX,I=h.clientY;n.mousePosition.value={x:(R-y)/D,y:(I-C)/D},i.value={x:i.value.x+(R-r.value.x)/D,y:i.value.y+(I-r.value.y)/D},r.value={x:R,y:I},(Math.abs(i.value.x)>10||Math.abs(i.value.y)>10)&&(a.value=!0),n.draggingNode.value!=null&&(h.preventDefault(),h.stopPropagation())}function g(h,y=!1){var C,D;if(n.draggingNode.value!=null&&n.draggingNode.value===h){n.receivingNode.value==null&&(n.draggingNode.value.position.x+=Math.round(i.value.x/25)*25,n.draggingNode.value.position.y+=Math.round(i.value.y/25)*25);const R=n.nodes.value;R.push(R.splice(R.indexOf(n.draggingNode.value),1)[0]),n.receivingNode.value&&((D=(C=n.types.value[n.receivingNode.value.type]).onDrop)==null||D.call(C,n.receivingNode.value,n.draggingNode.value)),n.setDraggingNode.value(null)}else!a.value&&!y&&(n.state.value.selectedNode=null,n.state.value.selectedAction=null)}function b(h,y){var D,R;const C=n.types.value[h.type];me((R=(D=C.actions)==null?void 0:D.find(I=>I.id===y))==null?void 0:R.confirmationLabel,h)==null&&(n.state.value.selectedAction=y),n.state.value.selectedAction===y?s(n.selectedAction).onClick(s(n.selectedNode)):n.state.value={...n.state.value,selectedAction:y}}return(h,y)=>{const C=_t("panZoom");return s(He)(e.visibility)?(M(),re(C,{key:0,style:Be([{width:e.width,height:e.height},e.style]),class:Ne(e.classes),selector:".g1",options:{initialZoom:1,minZoom:.1,maxZoom:10,zoomDoubleClickSpeed:1},ref_key:"stage",ref:u,onInit:c,onMousemove:v,onTouchmove:v,onMousedown:y[0]||(y[0]=D=>p(D)),onTouchstart:y[1]||(y[1]=D=>p(D)),onMouseup:y[2]||(y[2]=()=>g(s(e.draggingNode))),onTouchendPassive:y[3]||(y[3]=()=>g(s(e.draggingNode))),onMouseleave:y[4]||(y[4]=()=>g(s(e.draggingNode),!0))},{default:Y(()=>[(M(),T("svg",id,[k("g",ad,[d(ii,{name:"link",appear:""},{default:Y(()=>[(M(!0),T(ne,null,xt(s(e.links)||[],D=>(M(),T("g",{key:`${D.startNode.id}-${D.endNode.id}`},[d(Pc,{link:D,dragging:s(e.draggingNode),dragged:D.startNode===s(e.draggingNode)||D.endNode===s(e.draggingNode)?i.value:void 0},null,8,["link","dragging","dragged"])]))),128))]),_:1}),d(ii,{name:"grow",duration:500,appear:""},{default:Y(()=>[(M(!0),T(ne,null,xt(s(l),D=>(M(),T("g",{key:D.id,style:{"transition-duration":"0s"}},[d(rd,{node:D,nodeType:e.types[D.type],dragging:s(e.draggingNode),dragged:s(e.draggingNode)===D?i.value:void 0,hasDragged:s(e.draggingNode)==null?!1:a.value,receivingNode:s(e.receivingNode)===D,isSelected:s(e.selectedNode)===D,selectedAction:s(e.selectedNode)===D?s(e.selectedAction):null,onMouseDown:p,onEndDragging:g,onClickAction:R=>b(D,R)},null,8,["node","nodeType","dragging","dragged","hasDragged","receivingNode","isSelected","selectedAction","onClickAction"])]))),128))]),_:1})])]))]),_:1},8,["style","class","options"])):L("",!0)}}});Ke.on("setupVue",e=>ya.install(e));const Ui=Symbol("Board");var sn=(e=>(e.Outline="Outline",e.Fill="Fill",e))(sn||{}),je=(e=>(e.Circle="Circle",e.Diamond="Triangle",e))(je||{});function od(e){const t=ot({nodes:[],selectedNode:null,selectedAction:null},!1);return Qe(n=>{const r=e.call(n,n);r.id=Zt("board-"),r.type=Ui,r[dt]=sd,r.state?(Vi(t),A(r,"state")):(t[Yt]={nodes:r.startNodes().map((l,c)=>(l.id=c,l)),selectedNode:null,selectedAction:null},r.state=t),r.nodes=N(()=>s(u.state).nodes),r.selectedNode=N({get(){return u.nodes.value.find(l=>l.id===s(u.state).selectedNode)||null},set(l){var c,p;qe(u.state)?u.state.value={...u.state.value,selectedNode:(c=l==null?void 0:l.id)!=null?c:null}:u.state.selectedNode=(p=l==null?void 0:l.id)!=null?p:null}}),r.selectedAction=N({get(){const l=u.selectedNode.value;if(l==null)return null;const c=u.types[l.type];return c.actions==null?null:c.actions.find(p=>p.id===s(u.state).selectedAction)||null},set(l){var c,p;qe(u.state)?u.state.value={...u.state.value,selectedAction:(c=l==null?void 0:l.id)!=null?c:null}:u.state.selectedAction=(p=l==null?void 0:l.id)!=null?p:null}}),r.mousePosition=G(null),r.links?A(r,"links"):r.links=N(()=>u.selectedAction.value==null?null:u.selectedAction.value.links&&u.selectedNode.value?me(u.selectedAction.value.links,u.selectedNode.value):null),r.draggingNode=G(null),r.receivingNode=G(null),A(r,"visibility"),le(r,"visibility",Me.Visible),A(r,"width"),le(r,"width","100%"),A(r,"height"),le(r,"height","100%"),A(r,"classes"),A(r,"style");for(const l in r.types){const c=r.types[l];if(A(c,"title"),A(c,"subtitle"),A(c,"otherSubtitle"),A(c,"label"),A(c,"size"),le(c,"size",50),A(c,"style"),A(c,"classes"),A(c,"draggable"),le(c,"draggable",!1),A(c,"shape"),le(c,"shape","Circle"),A(c,"canAccept"),le(c,"canAccept",!1),A(c,"progress"),A(c,"progressDisplay"),le(c,"progressDisplay","Fill"),A(c,"progressColor"),le(c,"progressColor","none"),A(c,"fillColor"),A(c,"outlineColor"),A(c,"titleColor"),A(c,"actionDistance"),le(c,"actionDistance",Math.PI/6),c.nodes=N(()=>s(u.state).nodes.filter(p=>p.type===l)),le(c,"onClick",function(p){s(u.state).selectedNode=p.id}),c.actions)for(const p of c.actions)A(p,"visibility"),le(p,"visibility",Me.Visible),A(p,"icon"),A(p,"fillColor"),A(p,"tooltip"),A(p,"confirmationLabel"),le(p,"confirmationLabel",{text:"Tap again to confirm"}),A(p,"links")}function i(l){r.draggingNode.value=l}function a(l){r.receivingNode.value=l}r.placeInAvailableSpace=function(l,c=100,p=W.Right){const v=u.nodes.value.slice().filter(g=>g===l||(p===W.Down||p===W.Up)&&Math.abs(g.position.x-l.position.x)>c||(p===W.Left||p===W.Right)&&Math.abs(g.position.y-l.position.y)>c?!1:!(p===W.Right&&g.position.xl.position.x+c||p===W.Up&&g.position.y>l.position.y+c||p===W.Down&&g.position.yg.position.x-b.position.x:p===W.Left?(g,b)=>b.position.x-g.position.x:p===W.Up?(g,b)=>b.position.y-g.position.y:(g,b)=>g.position.y-b.position.y);for(let g=0;g0&&h>c)break}},r[lt]=function(){const{nodes:l,types:c,state:p,visibility:v,width:g,height:b,style:h,classes:y,links:C,selectedAction:D,selectedNode:R,mousePosition:I,draggingNode:E,receivingNode:B}=this;return{nodes:l,types:c,state:p,visibility:v,width:g,height:b,style:s(h),classes:y,links:C,selectedAction:D,selectedNode:R,mousePosition:I,draggingNode:E,receivingNode:B,setDraggingNode:i,setReceivingNode:a}};const u=r;return u})}function me(e,t,...n){return Wn(e)?e(t,...n):s(e)}function Dn(e){let t=0;return e.nodes.value.forEach(n=>{n.id>=t&&(t=n.id+1)}),t}const jn={};Ke.on("addLayer",e=>{const t=Yn(e,Ui);jn[e.id]=e.on("postUpdate",n=>{t.forEach(r=>{Object.values(r.types).forEach(i=>i.nodes.value.forEach(a=>{var u;return(u=i.update)==null?void 0:u.call(i,a,n)}))})})});Ke.on("removeLayer",e=>{var t;(t=jn[e.id])==null||t.call(jn),jn[e.id]=void 0});function Sn(e,t="points",n=0,r=void 0){const i=qe(e)?e:ot(e);if(i.displayName=t,i.precision=n,i.small=r,!qe(e)){const a=i[Et];a.displayName=t,a.precision=n,a.small=r}return i}new o("10^^8");new o("1e100");function vr(e,t){const n=t!=null?t:e.value;return o.eq(e.precision,0)?at(e.small?n:o.floor(n)):xe(n,e.precision,e.small)}Ke.on("setupVue",e=>e.use(wa));function ld(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const ud=X({props:{visibility:{type:q(Number,Boolean),required:!0},display:{type:q(Object,String,Function),required:!0},style:q(String,Object,Array),classes:q(Object),glowColor:q(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:r,floating:i}=Te(e),a=zr(n),u=N(()=>{const c=De(r);return c==null||c===""?{}:s(i)?ld(c):{boxShadow:`0px 9px 5px -6px ${c}`}});function l(){t("selectTab")}return{selectTab:l,component:a,glowColorStyle:u,unref:s,Visibility:Me,isVisible:He,isHidden:yn}}});function cd(e,t,n,r,i,a){var u;return e.isVisible(e.visibility)?(M(),T("button",{key:0,onClick:t[0]||(t[0]=(...l)=>e.selectTab&&e.selectTab(...l)),class:Ne(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},e.glowColorStyle,(u=e.unref(e.style))!=null?u:{}])},[(M(),re(Je(e.component)))],6)):L("",!0)}var Wi=ve(ud,[["render",cd],["__scopeId","data-v-21427abb"]]);const dd=X({props:{visibility:{type:q(Number,Boolean),required:!0},activeTab:{type:q(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:q(Object),required:!0},style:q(String,Object,Array),classes:q(Object),buttonContainerStyle:q(String,Object,Array),buttonContainerClasses:q(Object)},components:{Sticky:mr,TabButton:Wi},setup(e){const{activeTab:t}=Te(e),n=N(()=>kt[ie.theme].floatingTabs),r=bt("");Dt(()=>{const l=De(t);if(l==null){r.value="";return}if(Tt(l)){r.value=fe(l);return}r.value=fe(s(l.display))});const i=N(()=>{const l=De(t);return Tt(l)||!l?void 0:s(l.classes)}),a=N(()=>{const l=De(t);return Tt(l)||!l?void 0:s(l.style)});function u(l){const{display:c,style:p,classes:v,glowColor:g,visibility:b}=l;return{display:c,style:s(p),classes:v,glowColor:g,visibility:b}}return{floating:n,tabClasses:i,tabStyle:a,Visibility:Me,component:r,gatherButtonProps:u,unref:s,isVisible:He,isHidden:yn}}});function pd(e,t,n,r,i,a){var c,p;const u=_t("TabButton"),l=_t("Sticky");return e.isVisible(e.visibility)?(M(),T("div",{key:0,class:Ne(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[],(p=e.tabStyle)!=null?p:[]])},[d(l,{class:Ne(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:Be(e.unref(e.buttonContainerStyle))},{default:Y(()=>[k("div",{class:Ne(["tab-buttons",{floating:e.floating}])},[(M(!0),T(ne,null,xt(e.unref(e.tabs),(v,g)=>(M(),re(u,Ot({onSelectTab:b=>e.selected.value=g,floating:e.floating,key:g,active:e.unref(v.tab)===e.unref(e.activeTab)},e.gatherButtonProps(v)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(M(),re(Je(e.unref(e.component)),{key:0})):L("",!0)],6)):L("",!0)}var fd=ve(dd,[["render",pd],["__scopeId","data-v-58dbf83a"]]);const gd=Symbol("TabButton"),md=Symbol("TabFamily");function Hi(e,t){Object.keys(e).length===0&&console.error("Cannot create tab family with 0 tabs");const n=ot(Object.keys(e)[0],!1);return Qe(r=>{var u;const i=(u=t==null?void 0:t.call(r,r))!=null?u:{};i.id=Zt("tabFamily-"),i.type=md,i[dt]=fd,i.tabs=Object.keys(e).reduce((l,c)=>{const p=e[c]();return p.type=gd,p[dt]=Wi,A(p,"visibility"),le(p,"visibility",Me.Visible),A(p,"tab"),A(p,"display"),A(p,"classes"),A(p,"style"),A(p,"glowColor"),l[c]=p,l},{}),i.selected=n,i.activeTab=N(()=>{const l=s(a.tabs);if(n.value in l&&He(l[n.value].visibility))return s(l[n.value].tab);const c=Object.values(l).find(p=>He(p.visibility));return c?s(c.tab):null}),A(i,"visibility"),le(i,"visibility",Me.Visible),A(i,"classes"),A(i,"style"),A(i,"buttonContainerClasses"),A(i,"buttonContainerStyle"),i[lt]=function(){const{visibility:l,activeTab:c,selected:p,tabs:v,style:g,classes:b,buttonContainerClasses:h,buttonContainerStyle:y}=this;return{visibility:l,activeTab:c,selected:p,tabs:v,style:s(g),classes:b,buttonContainerClasses:h,buttonContainerStyle:y}};const a=i;return a})}function Gt(e){return Qe(t=>{const{addend:n,description:r,enabled:i,smallerIsBetter:a}=e.call(t,t),u=_e(n),l=_e(r),c=i==null?void 0:_e(i);return{apply:p=>o.add(p,s(u)),invert:p=>o.sub(p,s(u)),getFormula:p=>f.add(p,u),enabled:c,description:r==null?void 0:z(()=>d("div",{class:"modifier-container"},[s(l)!=null?d("span",{class:"modifier-description"},[wt(s(l))]):null,d("span",{class:"modifier-amount",style:(a===!0?o.gt(s(u),0):o.lt(s(u),0))?"color: var(--danger)":""},[o.gte(s(u),0)?"+":"",Ut(s(u))])]))}})}function Ce(e){return Qe(t=>{const{multiplier:n,description:r,enabled:i,smallerIsBetter:a}=e.call(t,t),u=_e(n),l=_e(r),c=i==null?void 0:_e(i);return{apply:p=>o.times(p,s(u)),invert:p=>o.div(p,s(u)),getFormula:p=>f.times(p,u),enabled:c,description:r==null?void 0:z(()=>d("div",{class:"modifier-container"},[s(l)!=null?d("span",{class:"modifier-description"},[wt(s(l))]):null,d("span",{class:"modifier-amount",style:(a===!0?o.gt(s(u),1):o.lt(s(u),1))?"color: var(--danger)":""},[_("\xD7"),Ut(s(u))])]))}})}function vd(e){return Qe(t=>{const{exponent:n,description:r,enabled:i,supportLowNumbers:a,smallerIsBetter:u}=e.call(t,t),l=_e(n),c=_e(r),p=i==null?void 0:_e(i);return{apply:v=>{let g=v;return a&&(g=o.add(g,1)),g=o.pow(g,s(l)),a&&(g=o.sub(g,1)),g},invert:v=>{let g=v;return a&&(g=o.add(g,1)),g=o.root(g,s(l)),a&&(g=o.sub(g,1)),g},getFormula:v=>a?f.add(v,1).pow(l).sub(1):f.pow(v,l),enabled:p,description:r==null?void 0:z(()=>d("div",{class:"modifier-container"},[s(c)!=null?d("span",{class:"modifier-description"},[wt(s(c)),a?" (+1 effective)":null]):null,d("span",{class:"modifier-amount",style:(u===!0?o.gt(s(l),1):o.lt(s(l),1))?"color: var(--danger)":""},[_("^"),Ut(s(l))])]))}})}function Ct(e){return Qe(()=>{const t=e();return{apply:n=>t.filter(r=>s(r.enabled)!==!1).reduce((r,i)=>i.apply(r),n),invert:t.every(n=>n.invert!=null)?n=>t.filter(r=>s(r.enabled)!==!1).reduceRight((r,i)=>i.invert(r),n):void 0,getFormula:t.every(n=>n.getFormula!=null)?n=>t.filter(r=>s(r.enabled)!==!1).reduce((r,i)=>i.getFormula(r),n):void 0,enabled:t.some(n=>n.enabled!=null)?N(()=>t.filter(n=>s(n.enabled)!==!1).length>0):void 0,description:t.some(n=>n.description!=null)?z(()=>d(ne,null,[t.filter(n=>s(n.enabled)!==!1).map(n=>s(n.description)).filter(n=>n).map(wt)])):void 0}})}const qr=f.variable(0).step(2e3,e=>e.pow_base(1.02)).step(100,e=>e.pow(1.5)).step(o.pow(900,1.5).add(100),e=>e.pow(1.5)).pow(1.5),un={id:"deselect",icon:"close",tooltip:e=>({text:"portals"in e.state?"Disconnect portals":"tools"in e.state?"Disconnect tools":"Disconnect resources"}),onClick(e){var t;Array.isArray((t=e.state)==null?void 0:t.data)?e.state={...e.state,data:[]}:"portals"in e.state?e.state={...e.state,portals:[]}:"resources"in e.state?e.state={...e.state,resources:[]}:"tools"in e.state&&(e.state={...e.state,tools:[]}),m.board.selectedAction.value=null,m.board.selectedNode.value=null},visibility:e=>{var t;return Array.isArray((t=e.state)==null?void 0:t.data)?e.state.data.length>0:"portals"in e.state?e.state.portals.length>0:"resources"in e.state?e.state.resources.length>0:"tools"in e.state?e.state.tools.length>0:!1}},Bt={id:"toggle",icon:"bolt",tooltip:e=>({text:e.state.powered?"Turn Off":`Turn On - Always runs for ${at(m.nextPowerCost.value)} energy/s`}),onClick(e){e.state={...e.state,powered:!e.state.powered},m.board.selectedAction.value=null},fillColor:e=>e.state.powered?"var(--accent1)":"var(--locked)"};function _n(e,t=1/0){const n=e(f.variable(0));return{id:"moreConnections",icon:"hub",formula:n,tooltip(r){return{text:`Increase Connections - ${at(n.evaluate(r.state.maxConnections))} energy`}},fillColor(r){return o.gte(m.energy.value,n.evaluate(r.state.maxConnections))?"var(--bought)":"var(--locked)"},confirmationLabel:r=>o.gte(m.energy.value,n.evaluate(r.state.maxConnections))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(r){const i=n.evaluate(r.state.maxConnections);o.gte(m.energy.value,i)&&(m.energy.value=o.sub(m.energy.value,i),r.state={...r.state,maxConnections:o.add(r.state.maxConnections,1)},m.board.selectedAction.value=null)},visibility:r=>o.add(r.state.maxConnections,m.computedBonusConnectionsModifier.value).lt(t)}}function Yi(e,t){var n,r;if(((n=m.board.draggingNode.value)==null?void 0:n.type)==="resource"){const i=((r=m.board.draggingNode.value)==null?void 0:r.state).type,{maxConnections:a,resources:u}=e.state;return u.includes(i)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,m.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(i),color:"var(--accent2)"}}return null}function hd(e,t){var n,r;if(((n=m.board.draggingNode.value)==null?void 0:n.type)==="passive"){const i=(r=m.board.draggingNode.value)==null?void 0:r.state,{maxConnections:a,tools:u}=e.state;return u.includes(i)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,m.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(i),color:"var(--accent2)"}}return null}function yr(e,t){var n,r;if(((n=m.board.draggingNode.value)==null?void 0:n.type)==="portal"){const i=((r=m.board.draggingNode.value)==null?void 0:r.state).id,{maxConnections:a,portals:u}=e.state;return u.includes(i)?{text:"Disconnect",color:"var(--accent2)"}:o.add(a,m.computedBonusConnectionsModifier.value).lte(u.length)?{text:"Max connections",color:"var(--danger)"}:{text:t(i),color:"var(--accent2)"}}return null}function Zi(e,t){if(t.type!=="resource")return!1;const n=t.state.type,{maxConnections:r,resources:i}=e.state;return i.includes(n)?!0:!o.add(r,m.computedBonusConnectionsModifier.value).lte(i.length)}function Xi(e,t){if(t.type!=="resource")return;const n=t.state.type,r=e.state.resources;r.includes(n)?e.state={...e.state,resources:r.filter(i=>i!==n)}:e.state={...e.state,resources:[...r,n]},m.board.selectedNode.value=e}function bd(e,t){if(t.type!=="passive")return!1;const n=t.state,{maxConnections:r,tools:i}=e.state;return i.includes(n)?!0:!o.add(r,m.computedBonusConnectionsModifier.value).lte(i.length)}function yd(e,t){if(t.type!=="passive")return;const n=t.state,r=e.state.tools;r.includes(n)?e.state={...e.state,tools:r.filter(i=>i!==n)}:e.state={...e.state,tools:[...r,n]},m.board.selectedNode.value=e}function wr(e,t){if(t.type!=="portal")return!1;const n=t.state.id,{maxConnections:r,portals:i}=e.state;return i.includes(n)?!0:!o.add(r,m.computedBonusConnectionsModifier.value).lte(i.length)}function _r(e,t){if(t.type!=="portal")return;const n=t.state.id,{portals:r}=e.state;r.includes(n)?e.state={...e.state,portals:r.filter(i=>i!==n)}:e.state={...e.state,portals:[...r,n]},m.board.selectedNode.value=e}function ke(e){return e===m.board.selectedNode.value||e.state.powered}function te(e){return m.empowerer.value!=null&&ke(m.empowerer.value)&&m.empowerer.value.state.tools.includes(e)}function wd(e){var a,u,l;const t=(l=(u=(a=m.resourceNodes.value[e])==null?void 0:a.state)==null?void 0:u.amount)!=null?l:0,n=m.resourceLevels.value[e],r=qr.evaluate(n),i=qr.evaluate(o.add(n,1));return o.sub(t,r).max(0).div(o.sub(i,r)).toNumber()}function gn(e,t,n){if(t.value){const r=t.value.state,i=r[n],a=r.maxConnections;o.gt(i.length,o.add(a,e))&&(t.value.state={...t.value.state,[n]:i.slice(0,o.add(a,e).toNumber())})}}function Lt(e){return{id:"help",icon:"question_mark",tooltip:{text:"Help"},onClick(){m.helpModals[e].showModal.value=!0,m.board.selectedAction.value=null},confirmationLabel:null}}function fi(e){return t=>ie.lineVisibility||e===m.board.selectedNode.value||e===m.board.draggingNode.value||m.resourceNodes.value[t]===m.board.draggingNode.value}const _d={key:0},Nd={key:0,class:"mark star"},Cd=["src"],kd=X({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(M(),T("div",_d,[e.mark===!0?(M(),T("div",Nd)):(M(),T("img",{key:1,class:"mark",src:e.mark},null,8,Cd))])):L("",!0)}});var Kn=ve(kd,[["__scopeId","data-v-2207999f"]]);const Md=X({__name:"Node",props:{id:null},setup(e){const n=Te(e),r=dr(Gr,()=>{}),i=dr(Ur,()=>{}),a=bt(null),u=N(()=>a.value&&a.value.parentElement);return ht([u,n.id],([l,c],[p,v])=>{p&&i(s(v)),l&&r(c,l)}),wi(()=>i(s(n.id))),(l,c)=>(M(),T("div",{class:"node",ref_key:"node",ref:a},null,512))}});var Qn=ve(Md,[["__scopeId","data-v-a48cb382"]]),Sd=X({props:{display:{type:q(Object,String,Function),required:!0},visibility:{type:q(Number,Boolean),required:!0},style:q(Object,String,Array),classes:q(Object),onClick:Function,onHold:Function,canClick:{type:q(Boolean),required:!0},small:Boolean,mark:q(Boolean,String),id:{type:String,required:!0}},components:{Node:Qn,MarkNode:Kn},setup(e){const{display:t,onClick:n,onHold:r}=Te(e),i=bt("");Dt(()=>{var v;const l=De(t);if(l==null){i.value="";return}if(Tt(l)){i.value=fe(l);return}const c=fe((v=l.title)!=null?v:"","h3"),p=fe(l.description,"div");i.value=fe(z(()=>d("span",null,[l.title!=null?d("div",null,[d(c,null,null)]):null,d(p,null,null)])))});const{start:a,stop:u}=Ei(n,r);return{start:a,stop:u,comp:i,Visibility:Me,isVisible:He,isHidden:yn,unref:s}}});function Id(e,t,n,r,i,a){var c;const u=_t("MarkNode"),l=_t("Node");return e.isVisible(e.visibility)?(M(),T("button",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[]]),onClick:t[0]||(t[0]=(...p)=>e.onClick&&e.onClick(...p)),onMousedown:t[1]||(t[1]=(...p)=>e.start&&e.start(...p)),onMouseleave:t[2]||(t[2]=(...p)=>e.stop&&e.stop(...p)),onMouseup:t[3]||(t[3]=(...p)=>e.stop&&e.stop(...p)),onTouchstartPassive:t[4]||(t[4]=(...p)=>e.start&&e.start(...p)),onTouchendPassive:t[5]||(t[5]=(...p)=>e.stop&&e.stop(...p)),onTouchcancelPassive:t[6]||(t[6]=(...p)=>e.stop&&e.stop(...p)),class:Ne({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(M(),re(Je(e.unref(e.comp)),{key:0})):L("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],38)):L("",!0)}var Ji=ve(Sd,[["render",Id],["__scopeId","data-v-211328c0"]]);const Ki=Symbol("Clickable");function xd(e,...t){const n=t.reduce((r,i)=>{var a;return Object.assign(r,(a=i.getPersistentData)==null?void 0:a.call(i))},{});return Qe(r=>{var u,l,c;const i=(u=e==null?void 0:e.call(r,r))!=null?u:{};i.id=Zt("clickable-"),i.type=Ki,i[dt]=Ji;for(const p of t)(l=p.preConstruct)==null||l.call(p,i);if(Object.assign(i,n),A(i,"visibility"),le(i,"visibility",Me.Visible),A(i,"canClick"),le(i,"canClick",!0),A(i,"classes"),A(i,"style"),A(i,"mark"),A(i,"display"),i.onClick){const p=i.onClick.bind(i);i.onClick=function(v){s(i.canClick)!==!1&&p(v)}}if(i.onHold){const p=i.onHold.bind(i);i.onHold=function(){s(i.canClick)!==!1&&p()}}for(const p of t)(c=p.postConstruct)==null||c.call(p,i);const a=t.reduce((p,v)=>{var g;return Object.assign(p,(g=v.getGatheredProps)==null?void 0:g.call(v,i))},{});return i[lt]=function(){const{display:p,visibility:v,style:g,classes:b,onClick:h,onHold:y,canClick:C,small:D,mark:R,id:I}=this;return{display:p,visibility:v,style:s(g),classes:b,onClick:h,onHold:y,canClick:C,small:D,mark:R,id:I,...a}},i})}function $d(e,t,n=[]){n=n.length===0?Yn(e,Ki):n;const r=typeof t=="function"?N(t):t;return e.on("update",()=>{s(r)&&n.filter(i=>s(i.canClick)).forEach(i=>{var a;return(a=i.onClick)==null?void 0:a.call(i)})})}const Dd=["x1","y1","x2","y2"],Td=X({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=Te(e),r=N(()=>{const a=n.startNode.value.rect,u=n.boundingRect.value,l=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetStart&&(l.x+=n.link.value.offsetStart.x,l.y+=n.link.value.offsetStart.y),l}),i=N(()=>{const a=n.endNode.value.rect,u=n.boundingRect.value,l=u?{x:a.x+a.width/2-u.x,y:a.y+a.height/2-u.y}:{x:0,y:0};return n.link.value.offsetEnd&&(l.x+=n.link.value.offsetEnd.x,l.y+=n.link.value.offsetEnd.y),l});return(a,u)=>(M(),T("line",Ot({"stroke-width":"15px",stroke:"white"},e.link,{x1:s(r).x,y1:s(r).y,x2:s(i).x,y2:s(i).y}),null,16,Dd))}});const Pd=X({__name:"Links",props:{links:null},setup(e){var c;const n=Ht(e,"links"),r=G(null),i=dr(Wr,G({})),a=dr(Hr,G(void 0)),u=G((c=r.value)==null?void 0:c.getBoundingClientRect());ht(a,()=>{var p;return u.value=(p=r.value)==null?void 0:p.getBoundingClientRect()}),Jn(()=>{var p;return u.value=(p=r.value)==null?void 0:p.getBoundingClientRect()});const l=N(()=>{var v,g;const p=i.value;return(g=(v=n.value)==null?void 0:v.filter(b=>{var h,y;return((h=p[b.startNode.id])==null?void 0:h.rect)&&((y=p[b.startNode.id])==null?void 0:y.rect)}))!=null?g:[]});return(p,v)=>(M(),T(ne,null,[s(l)?(M(),T("svg",fa(Ot({key:0},p.$attrs)),[(M(!0),T(ne,null,xt(s(l),(g,b)=>(M(),re(Td,{key:b,link:g,boundingRect:u.value,startNode:s(i)[g.startNode.id],endNode:s(i)[g.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):L("",!0),k("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var Ad=ve(Pd,[["__scopeId","data-v-063f6d6b"]]);X({props:{nodes:{type:q(Array),required:!0},leftSideNodes:q(Array),rightSideNodes:q(Array),branches:q(Array)},components:{Links:Ad},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=Te(e),i=bt();Dt(()=>{const l=De(t);i.value=fe(z(()=>d(ne,null,[l.map(c=>d("span",{class:"row tree-row",style:"margin: 50px auto;"},[c.map(wt)]))])))});const a=bt();Dt(()=>{const l=De(n);a.value=l?fe(z(()=>d("span",{class:"left-side-nodes small"},[l.map(wt)]))):""});const u=bt();return Dt(()=>{const l=De(r);u.value=l?fe(z(()=>d("span",{class:"side-nodes small"},[l.map(wt)]))):""}),{unref:s,nodesComp:i,leftNodesComp:a,rightNodesComp:u}}});X({props:{display:q(Object,String,Function),visibility:{type:q(Number,Boolean),required:!0},style:q(String,Object,Array),classes:q(Object),onClick:Function,onHold:Function,color:q(String),glowColor:q(String),canClick:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Kn,Node:Qn},setup(e){const{onClick:t,onHold:n,display:r}=Te(e),i=Tn(r),{start:a,stop:u}=Ei(t,n);return{start:a,stop:u,comp:i,unref:s,Visibility:Me,isCoercableComponent:Tt,isVisible:He,isHidden:yn}}});function zn(e){const t=[],n={};let r=!1;function i(){return r||(t.push(...e()),n.base=t.map(l=>_e(l.base)),n.baseText=t.map(l=>_e(l.baseText)),n.visible=t.map(l=>_e(l.visible)),n.title=t.map(l=>_e(l.title)),n.subtitle=t.map(l=>_e(l.subtitle)),r=!0),t}const a=ot({},!1);return[z(()=>{const l=i();let c=!0;const p=l.map((v,g)=>{var R,I,E;if(s(n.visible[g])===!1)return null;const b=d("h3",{onClick:()=>a.value[g]=!a.value[g],style:"cursor: pointer"},[d("span",{class:"modifier-toggle"+(s(a.value[g])?" collapsed":"")},[_("\u25BC")]),s(n.title[g]),s(n.subtitle[g])!=null?d("span",{class:"subtitle"},[_(" ("),s(n.subtitle[g]),_(")")]):null]),h=s(a.value[g])?null:d(ne,null,[d("div",{class:"modifier-container"},[d("span",{class:"modifier-description"},[wt((R=s(n.baseText[g]))!=null?R:"Base")]),d("span",{class:"modifier-amount"},[xe((I=s(n.base[g]))!=null?I:1),v.unit])]),v.modifier.description==null?null:wt(s(v.modifier.description))]),y=!c;c=!1;const C=(E=s(n.base[g]))!=null?E:1,D=v.modifier.apply(C);return d(ne,null,[y?d("br",null,null):null,d("div",{style:{"--unit":ie.alignUnits&&v.unit!=null?"'"+v.unit+"'":""}},[b,d("br",null,null),h,d("hr",null,null),d("div",{class:"modifier-container"},[d("span",{class:"modifier-description"},[_("Total")]),d("span",{class:"modifier-amount",style:(v.smallerIsBetter===!0?o.gt(D,C!=null?C:1):o.lt(D,C!=null?C:1))?"color: var(--danger)":""},[Ut(D),v.unit])])])])});return d(ne,null,[p])}),a]}function Ar(e,t,n){const r=_e(t),i=_e(n);return N(()=>{const a=s(r),u=s(i);return o.gte(e.value,u)?"Now":o.lte(a,0)?"Never":br(o.sub(u,e.value).div(a))})}function mn(e,t,n=1){const r=_e(t),i=_e(n);return e.hasVariable()||console.error("Cannot create formula preview if the formula does not have a variable"),z(()=>{var a;if(s(r)){const u=Ut(e.evaluate()),l=Ut(e.evaluate(o.add(s((a=e.innermostVariable)!=null?a:0),s(i))));return d(ne,null,[d("b",null,[d("i",null,[u,_(" \u2192 "),l])])])}return d(ne,null,[Ut(e.evaluate())])})}const $t={dirt:120,sand:60,gravel:40,wood:30,stone:24,coal:20,copper:15,iron:12,silver:10,gold:8,emerald:6,platinum:5,diamond:4,berylium:3,unobtainium:2,ultimatum:1},At=Object.keys($t),Le={dirt:{cost:1e3,name:"Pickaxe",type:"passive",state:"dirt"},sand:{cost:1e4,name:"Dowsing Rod",type:"dowsing",state:{resources:[],maxConnections:1,powered:!1}},gravel:{cost:1e5,name:"Ore Processor",type:"passive",state:"gravel"},wood:{cost:1e6,name:"Quarry",type:"quarry",state:{resources:[],maxConnections:1,powered:!1,progress:0}},stone:{cost:1e7,name:"Energizer",type:"passive",state:"stone"},coal:{cost:1e8,name:"Tool Empowerer",type:"empowerer",state:{tools:[],maxConnections:1,powered:!1}},copper:{cost:1e9,name:"Book",type:"passive",state:"copper"},iron:{cost:1e10,name:"Portal Generator",type:"portalGenerator",state:{tier:void 0,influences:[]}},silver:{cost:1e12,name:"Robotics",type:"passive",state:"silver"},gold:{cost:1e15,name:"Booster",type:"booster",state:{portals:[],maxConnections:1,powered:!1,level:1}},emerald:{cost:1e19,name:"AI",type:"passive",state:"emerald"},platinum:{cost:1e24,name:"Upgrader",type:"upgrader",state:{portals:[],maxConnections:1,powered:!1}},diamond:{cost:1e30,name:"ML",type:"passive",state:"diamond"},berylium:{cost:1e37,name:"Automator",type:"automator",state:{portals:[],maxConnections:1,powered:!1}},unobtainium:{cost:1e45,name:"National Grid",type:"passive",state:"unobtainium"},ultimatum:{cost:1e54,name:"Investments",type:"investments",state:{portals:[],maxConnections:1,powered:!1}}},Rt={dirt:"BOGO Coupon",sand:"Metal Detector",gravel:"Neural Nets",wood:"Mining Laser",stone:"Replicator",coal:"Planar Intelligence",copper:"Efficient Code",iron:"Trade Agreements",silver:"Machine Synergizer",gold:"XP Market",emerald:"Efficient Portals",platinum:"Time Dilation",diamond:"Paypal",berylium:"Tiered Mining",unobtainium:"OC'ed Portals",ultimatum:"Rebates"},Rd={dirt:{description:e=>e?"Quadruples mining speed":"Doubles mining speed"},gravel:{description:e=>e?"Quadruples mine ore drops":"Doubles mine ore drops"},stone:{description:e=>e?"Quadruples energy gain":"Doubles energy gain"},copper:{description:e=>e?"Material level is 40% stronger":"Material level is 20% stronger"},silver:{description:e=>e?"Quadruples each plane's resource gain":"Doubles each plane's resource gain"},diamond:{description:e=>e?"+20% plane's resource gain per upgrade bought":"+10% plane's resource gain per upgrade bought"},emerald:{description:e=>e?"+2% plane's resource gain per minute active":"+1% plane's resource gain per minute active"},unobtainium:{description:e=>e?"+2 max connections per machine":"+1 max connections per machine"},dirtRelic:{description:e=>e?"2 free levels for repeatables":"1 free level for repeatables"},sandRelic:{description:e=>e?"Treasure's 2 tiers stronger":"Treasure's 1 tier stronger"},gravelRelic:{description:e=>e?"+2% plane's resource gain per repeatable purchase (diminishing)":"+1% plane's resource gain per repeatable purchase (diminishing)"},woodRelic:{description:e=>e?"(Relics)^2 boost mine speed":"Relics boost mine speed"},stoneRelic:{description:e=>e?"All upgrades apply twice":"Non-multiplicative upgrades apply twice"},coalRelic:{description:e=>e?"Every treasure boosts planar speed by +20%":"Every treasure boosts planar speed by +10%"},copperRelic:{description:e=>e?"Power 2 machines free":"Power 1 machine free"},ironRelic:{description:e=>e?"Conversions give quadruple output":"Conversions give double output"},silverRelic:{description:e=>e?"(Powered machines)^2 boost quarry speed":"Powered machines boost quarry speed"},goldRelic:{description:e=>e?"Each treasure gives +50% XP gain":"Each treasure gives +25% XP gain"},emeraldRelic:{description:e=>e?"Creating portals costs 20x less energy":"Creating portals costs 10x less energy"},platinumRelic:{description:e=>e?"Quadruple dimensions' tick rate":"Double dimensions' tick rate"},diamondRelic:{description:e=>e?"Repeatables/dimensions buy max at once":"Repeatables buy max at once"},beryliumRelic:{description:e=>e?"log(energy)^0.5 boosts planes' resource gain":"log(energy)^0.25 boosts planes' resource gain"},unobtainiumRelic:{description:e=>e?"Upgrades/repeatables/dimensions/prestige no longer spend on purchase":"Upgrades/repeatables no longer spend on purchase"}},vt={increaseResources:{display:"+resource",description:e=>{const t=e.data;return t.length===0?"Increase resource odds - Drag a resource to me!":t.length===1?`Increase ${t[0]}'s odds`:`Increase ${t.length} resources' odds`},cost:2,initialData:[]},decreaseResources:{display:"-resource",description:e=>{const t=e.data;return t.length===0?"Decrease resource odds - Drag a resource to me!":t.length===1?`Decrease ${t[0]}'s odds`:`Decrease ${t.length} resources' odds`},cost:2,initialData:[]},increaseLength:{display:"+length",description:"Increase length",cost:100,initialData:void 0},increaseCaches:{display:"+caches",description:"Increase caches odds",cost:10,initialData:void 0},increaseGens:{display:"+gens",description:"Increase generators odds",cost:10,initialData:void 0},increaseInfluences:{display:"+influences",description:"Increase influences odds",cost:10,initialData:void 0},increaseEnergyMults:{display:"+energy mults",description:"Increase energy mults odds",cost:10,initialData:void 0},increaseResourceMults:{display:"+resource mults",description:"Increase resource mults odds",cost:10,initialData:void 0},increaseDiff:{display:"+difficulty",description:"Increase difficulty/rewards odds",cost:10,initialData:void 0},decreaseDiff:{display:"-difficulty",description:"Decrease difficulty/rewards odds",cost:10,initialData:void 0},increaseRewards:{display:"+rewards",description:"Increase rewards level",cost:1e4,initialData:void 0},relic:{display:"+relic",description:"Max length/difficulty, add tier-unique relic",cost:1e6,initialData:void 0}},or=f.variable(0).add(8).times(2).pow10(),Ed=X({__name:"Tab",props:{display:null},setup(e){const t=e,{display:n}=Te(t),r=zr(n);return(i,a)=>(M(),re(Je(s(r))))}}),Fd=Symbol("Tab");function Rr(e){return Qe(t=>{const n=e.call(t,t);return n.id=Zt("tab-"),n.type=Fd,n[dt]=Ed,n[lt]=function(){const{display:r}=this;return{display:r}},n})}function jt(e,t,n={}){const r=ot(!1);return{modal:z(()=>d(Vt,{modelValue:r.value,"onUpdate:modelValue":a=>r.value=a},{header:()=>d("h2",null,[e]),body:t})),showModal:r,...n}}function Od(){return jt("Getting Started",z(()=>d("div",null,[d("p",null,[_(`Welcome to Planar Pioneers! Your job is to gather resources and eventually explore and conquer increasingly difficult "planes", which are like alien worlds. To start you'll use the mine (\u26CF\uFE0F) machine to gather resources.`)]),d("br",null,null),d("p",null,[_(`You'll gain energy every second based on how much of each resource you have. You can check the exact calculation and various other information by clicking the "modifiers" button near the top of the screen.`)]),d("br",null,null),d("p",null,[_("Select the machine by clicking it to make the mine active. You can also drag them around to organize your various machines and other objects. While selected machines will have various actions you can take, such as viewing the help for that machine. There's also an action to power the machine, allowing it to be active even while not selected, at the cost of energy per second (cost increases based on the total number of machines being powered).")])])))}function qd(){return jt("Forging",z(()=>d("div",null,[d("p",null,[_("You've repaired the forge (\u{1F6E0}\uFE0F)! This is the next main line of progression. Here you'll be able to craft a total of 16 machines and passive bonuses to create - one for each resource!")]),d("br",null,null),d("p",null,[_("Drag a resource onto the forge to select that resource tier. You can then use an action on the forge to create that item, at the cost of energy based on the resource tier. You can only have 1 of each item.")])])))}function Vd(){return jt("Dowsing",z(()=>d("div",null,[d("p",null,[_("You've created the dowsing rod (\u{1F962})! This machine lets you bias the odds of specified resources from mining. It will double the odds of each specified resource, so keep in mind rare resources will still be fairly rare.")]),d("br",null,null),d("p",null,[_("Specify resources to boost by dragging them to the dowsing rod. You can only select a single resource to start, but that can be increased using an action.")])])))}function Bd(){return jt("Quarry",z(()=>d("div",null,[d("p",null,[_("You've created the Quarry (\u26F0\uFE0F)! This machine lets you gather specified resources. Unlike the mine, this machine will always output the same resources. However, rarer resources will take longer to gather.")]),d("br",null,null),d("p",null,[_("Specify resources to gather by dragging them to the quarry. You can only select a single resource to start, but that can be increased using an action.")])])))}function Ld(){return jt("Tool Empowerer",z(()=>d("div",null,[d("p",null,[_("You've created the Tool Empowerer (\u{1F50C})! This machine lets you increase the effect of specified passives. Experimenting with which passives to empower can really help you progress!")]),d("br",null,null),d("p",null,[_("Specify passives to empower by dragging them to the empowerer. You can only select a single passive to start, but that can be increased using an action.")])])))}function jd(){const e=Hi({general:()=>({display:"General",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Rr(()=>({display:z(()=>d("div",null,[d("p",null,[_("You've created the Portal Generator (\u26E9\uFE0F)! This machine lets you create portals to other planes, which will have treasures that help you in various ways! To create a portal you need to specify a tier by dragging a resource to the generator - higher tier planes cost more energy to generate portals for, but offer more and better treasures! Keep in mind time in planes will be paused if the portal is inactive (not selected nor powered).")]),d("br",null,null),d("p",null,[_("You've also gained a trash can for portals (\u{1F5D1}\uFE0F). Dragging a portal here will permanently destroy it. Any treasures that require the portal to be active will no longer work. This can be used to keep your workspace clean from old portals you no longer need or want.")]),d("br",null,null),d("p",null,[_("Once you have portals, the lines on the board might getting particularly necessary. Here's a setting (also accessible in the settings modal) to disable resource gain lines unless the node is active.")]),d("br",null,null),d(It,{title:z(()=>d("span",{class:"option-title"},[_("Always show lines to resource nodes")])),modelValue:ie.lineVisibility,"onUpdate:modelValue":t=>ie.lineVisibility=t},null)]))}))}),treasures:()=>({display:"Treasures",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Rr(()=>({display:z(()=>d("div",null,[_("Types of potential treasures:"),d("ul",{style:"list-style-type: unset"},[d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Caches")]),_(": Gain an amount of a resource based on your current amount.")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Gen")]),_(": Passively gain an amount of a resource while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Resource Mult")]),_(": Increase the amount gained of a resource from all sources (except caches) while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Energy Mult")]),_(": Increase the energy gained per second while the portal is active (selected or powered).")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Influences")]),_(": Gain a influence. See the influences tab for details. You can only have 1 of each influence.")]),d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("Relic")]),_(": Gain the relic unique to this tier of plane. These are powerful passive boosts that can be empowered. You can only have 1 of each relic. Relics can only appear with the +relic influence, and will always be the last treasure on a plane.")])])]))}))}),influences:()=>({display:"Influences",glowColor(){return e.activeTab.value===this.tab?"white":""},tab:Rr(()=>({display:z(()=>d("div",null,[d("p",null,[_("Some treasures will grant you influences that can help the portal generator create portals to planes with specified qualities. Each influence will multiply the energy cost of creating the portal.")]),d("br",null,null),Object.keys(m.influenceNodes.value).length>0?d("div",null,[_("Discovered influences:"),d("ul",{style:"list-style-type: unset"},[m.influenceNodes.value.increaseResources==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+resource")]),_(": Can be connected to resources and will cause any treasures that reference resources (caches, gens, and resource mults) to have increased odds of picking a selected resource.")]),m.influenceNodes.value.decreaseResources==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("-resource")]),_(": Can be connected to resources and will cause any treasures that reference resources (caches, gens, and resource mults) to have decreased odds of picking a selected resource.")]),m.influenceNodes.value.increaseLength==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+length")]),_(": Cause the plane to have 1 extra treasure than it otherwise would have.")]),m.influenceNodes.value.increaseCaches==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+caches")]),_(": Causes treasures to have an increased chance to be caches.")]),m.influenceNodes.value.increaseGens==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+gens")]),_(": Causes treasures to have an increased chance to be gens.")]),m.influenceNodes.value.increaseResourceMults==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+resource mults")]),_(": Causes treasures to have an increased chance to be resource mults.")]),m.influenceNodes.value.increaseEnergyMults==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+energy mults")]),_(": Causes treasures to have an increased chance to be energy mults.")]),m.influenceNodes.value.increaseInfluences==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+influences")]),_(": Causes treasures to have an increased chance to be influences.")]),m.influenceNodes.value.relic==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+relic")]),_(": Maximizes length and difficulty for this tier of plane, and makes the last treasure a relic (unique per tier of plane). Overrides any other difficulty-changing influences.")]),m.influenceNodes.value.increaseDiff==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+difficulty")]),_(": Causes the difficulty and rewards to be in the upper half of what's possible at this tier.")]),m.influenceNodes.value.decreaseDiff==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("-difficulty")]),_(": Causes the difficulty and rewards to be in the lower half of what's possible at this tier.")]),m.influenceNodes.value.increaseRewards==null?null:d("li",{style:"margin-top: var(--feature-margin)"},[d("b",{style:"color: var(--bought)"},[_("+rewards")]),_(": Causes the quality of treasures to be 1 tier higher. Does not affect influences or relics treasures.")])])]):d("div",null,[_("Once you discover influences, summaries will appear here describing their effects.")])]))}))})});return jt("Portal Generator",z(()=>wt(e)),{tabFamily:e})}function zd(){return jt("Booster",z(()=>d("div",null,[d("p",null,[_("You've created the Booster (\u231B)! This machine lets you increase the rate of time of planes! This affects its resource gain, gen treasures, and any other effects of time.")]),d("br",null,null),d("p",null,[_("Specify planes to boost by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")]),d("br",null,null),d("p",null,[_("Initially the booster will double the rate of time, but that can be increased using an action.")])])))}function Gd(){return jt("Upgrader",z(()=>d("div",null,[d("p",null,[_("You've created the Upgrader (\u{1F916})! This machine lets you automatically purchase upgrades within planes (includes prestiges but not repeatables or dimensions)!")]),d("br",null,null),d("p",null,[_("Specify planes to auto-purchase upgrades from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}function Ud(){return jt("Automator",z(()=>d("div",null,[d("p",null,[_("You've created the Automator (\u{1F9BE})! This machine lets you automatically purchase repeatables and dimensions within planes!")]),d("br",null,null),d("p",null,[_("Specify planes to auto-purchase repeatables and dimensions from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}function Wd(){return jt("Investments",z(()=>d("div",null,[d("p",null,[_("You've created the Investments machine (\u{1F4B1})! This machine lets you automatically gain the resources from conversions without spending the plane's primary resource!")]),d("br",null,null),d("p",null,[_("Specify planes to gain converted resources from by dragging their portals to the booster. You can only select a single plane to start, but that can be increased using an action.")])])))}const Hd=X({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(M(),T("div",{style:Be({width:e.width,height:e.height})},null,4))}});function qn(e){return Qe(t=>{var r;const n=e.call(t,t);return n.partialDisplay=i=>d("span",{style:s(n.requirementMet)?"":"color: var(--danger)"},[vr(n.resource,n.cost instanceof f?nn(n.cost,i!=null?i:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost))," ",n.resource.displayName]),n.display=i=>d("div",null,[s(n.requiresPay)?"Costs: ":"Requires: ",vr(n.resource,n.cost instanceof f?nn(n.cost,i!=null?i:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost))," ",n.resource.displayName]),A(n,"visibility"),le(n,"visibility",Me.Visible),A(n,"cost"),A(n,"requiresPay"),le(n,"requiresPay",!0),A(n,"cumulativeCost"),le(n,"cumulativeCost",!0),A(n,"maxBulkAmount"),le(n,"maxBulkAmount",1),A(n,"directSum"),le(n,"pay",function(i){const a=n.cost instanceof f?nn(n.cost,i!=null?i:1,s(n.cumulativeCost),s(n.directSum)):s(n.cost);n.resource.value=o.sub(n.resource.value,a).max(0)}),n.canMaximize=N(()=>{var l;if(!(n.cost instanceof f))return!1;const i=s(n.maxBulkAmount);if(o.lte(i,1))return!1;const a=s(n.cumulativeCost),u=(l=s(n.directSum))!=null?l:a?10:0;return o.lte(i,u)?!0:!(!n.cost.isInvertible()||a===!0&&!n.cost.isIntegrable())}),n.cost instanceof f?n.requirementMet=qi(n.cost,n.resource,(r=n.cumulativeCost)!=null?r:!0,n.directSum,n.maxBulkAmount):n.requirementMet=N(()=>o.gte(n.resource.value,s(n.cost))),n})}function Qr(e){return Qe(()=>({requirementMet:N(()=>He(e.visibility)),visibility:Me.None,requiresPay:!1}))}function Yd(e,t){return Qe(()=>({requirementMet:_e(e),partialDisplay:t==null?void 0:z(()=>wt(t)),display:t==null?void 0:z(()=>d(ne,null,[_("Req: "),wt(t)])),visibility:t==null?Me.None:Me.Visible,requiresPay:!1}))}function Nr(e){if(qt(e))return e.every(Nr);const t=s(e.requirementMet);return typeof t=="boolean"?t:o.gt(t,0)}function Qi(e){if(qt(e))return e.map(Qi).reduce(o.min);const t=s(e.requirementMet);return typeof t=="boolean"?t?o.dInf:0:o.gt(t,1)&&s(e.canMaximize)!==!0?1:t}function Cr(e,t=1){var n,r;if(qt(e)&&(e=e.filter(i=>He(i.visibility)),e.length===1&&(e=e[0])),qt(e)){e=e.filter(u=>"partialDisplay"in u);const i=e.filter(u=>s(u.requiresPay)),a=e.filter(u=>!s(u.requiresPay));return d(ne,null,[i.length>0?d("div",null,[_("Costs:")," ",ci(i.map(u=>u.partialDisplay(t)),d(ne,null,[_(", ")]))]):null,a.length>0?d("div",null,[_("Requires:")," ",ci(a.map(u=>u.partialDisplay(t)),d(ne,null,[_(", ")]))]):null])}return(r=(n=e.display)==null?void 0:n.call(e))!=null?r:d(ne,null,null)}function ea(e,t=1){var n;qt(e)?e.filter(r=>s(r.requiresPay)).forEach(r=>{var i;return(i=r.pay)==null?void 0:i.call(r,t)}):s(e.requiresPay)&&((n=e.pay)==null||n.call(e,t))}var Zd=X({props:{visibility:{type:q(Number,Boolean),required:!0},display:q(Object,String,Function),earned:{type:q(Boolean),required:!0},requirements:q(Object,Array),image:q(String),style:q(String,Object,Array),classes:q(Object),mark:q(Boolean,String),small:q(Boolean),id:{type:String,required:!0}},components:{Node:Qn,MarkNode:Kn},setup(e){const{display:t,requirements:n,earned:r}=Te(e),i=bt("");return Dt(()=>{const a=De(t);if(a==null){i.value="";return}if(Tt(a)){i.value=fe(a);return}const u=fe(a.requirement?a.requirement:z(()=>{var p;return Cr((p=De(n))!=null?p:[])}),"h3"),l=fe(a.effectDisplay||"","b"),c=De(r)?fe(a.optionsDisplay||"","span"):"";i.value=fe(z(()=>d("span",null,[d(u,null,null),a.effectDisplay!=null?d("div",null,[d(l,null,null)]):null,a.optionsDisplay!=null?d("div",{class:"equal-spaced"},[d(c,null,null)]):null])))}),{comp:i,unref:s,Visibility:Me,isVisible:He,isHidden:yn}}});function Xd(e,t,n,r,i,a){var c;const u=_t("MarkNode"),l=_t("Node");return e.isVisible(e.visibility)?(M(),T("div",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(c=e.unref(e.style))!=null?c:[]]),class:Ne({feature:!0,achievement:!0,locked:!e.unref(e.earned),done:e.unref(e.earned),small:e.unref(e.small),...e.unref(e.classes)})},[e.comp?(M(),re(Je(e.comp),{key:0})):L("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],6)):L("",!0)}var Jd=ve(Zd,[["render",Xd],["__scopeId","data-v-5673325a"]]);const Kd=hr(),Qd=Symbol("Achievement");let In=function(e){return e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none",e}({});function ep(e,...t){const n=ot(!1,!1),r=t.reduce((i,a)=>{var u;return Object.assign(i,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(i=>{var c,p,v;const a=(c=e==null?void 0:e.call(i,i))!=null?c:{};a.id=Zt("achievement-"),a.type=Qd,a[dt]=Jd;for(const g of t)(p=g.preConstruct)==null||p.call(g,a);a.earned=n,a.complete=function(){var b,h;if(n.value)return;n.value=!0;const g=a;if((b=g.onComplete)==null||b.call(g),g.display!=null&&s(g.showPopups)===!0){const y=s(g.display);let C;Tt(y)?C=fe(y):y.requirement!=null?C=fe(y.requirement):C=Cr((h=g.requirements)!=null?h:[]),Kd.info(d("div",null,[d("h3",null,[_("Treasure earned!")]),d("div",null,[d(C,null,null)])]))}},Object.assign(a,r),A(a,"visibility"),le(a,"visibility",Me.Visible);const u=a.visibility;a.visibility=ga(()=>{const g=s(a.display);switch(ie.msDisplay){default:case In.All:return s(u);case In.Configurable:return s(a.earned)&&!(g!=null&&typeof g=="object"&&"optionsDisplay"in g)?Me.None:s(u);case In.Incomplete:return s(a.earned)?Me.None:s(u);case In.None:return Me.None}}),A(a,"display"),A(a,"mark"),A(a,"small"),A(a,"image"),A(a,"style"),A(a,"classes"),A(a,"showPopups"),le(a,"showPopups",!0);for(const g of t)(v=g.postConstruct)==null||v.call(g,a);const l=t.reduce((g,b)=>{var h;return Object.assign(g,(h=b.getGatheredProps)==null?void 0:h.call(b,a))},{});if(a[lt]=function(){const{visibility:g,display:b,requirements:h,earned:y,image:C,style:D,classes:R,mark:I,small:E,id:B}=this;return{visibility:g,display:b,requirements:h,earned:y,image:C,style:s(D),classes:R,mark:I,small:E,id:B,...l}},a.requirements){const g=a,b=[Qr(g),Yd(()=>!g.earned.value),...qt(a.requirements)?a.requirements:[a.requirements]];Dt(()=>{ie.active===Z.id&&Nr(b)&&g.complete()})}return a})}Ke.on("loadSettings",e=>{le(e,"msDisplay",In.All)});const tp=Object.values(In).map(e=>({label:rt(e),value:e}));Ai(z(()=>d(Jr,{title:z(()=>d("span",{class:"option-title"},[_("Show achievements"),d("desc",null,[_("Select which achievements to display based on criterias.")])])),options:tp,"onUpdate:modelValue":e=>ie.msDisplay=e,modelValue:ie.msDisplay},null)));const np=X({props:{progress:{type:q(String,Object,Number),required:!0},width:{type:q(Number),required:!0},height:{type:q(Number),required:!0},direction:{type:q(String),required:!0},display:q(Object,String,Function),visibility:{type:q(Number,Boolean),required:!0},style:q(Object,String,Array),classes:q(Object),borderStyle:q(Object,String,Array),textStyle:q(Object,String,Array),baseStyle:q(Object,String,Array),fillStyle:q(Object,String,Array),mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Kn,Node:Qn},setup(e){const{progress:t,width:n,height:r,direction:i,display:a}=Te(e),u=N(()=>{let p=t.value instanceof o?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(p,0),1))*100}),l=N(()=>{const p={width:De(n)+.5+"px",height:De(r)+.5+"px"};switch(s(i)){case W.Up:p.clipPath=`inset(${u.value}% 0% 0% 0%)`,p.width=De(n)+1+"px";break;case W.Down:p.clipPath=`inset(0% 0% ${u.value}% 0%)`,p.width=De(n)+1+"px";break;case W.Right:p.clipPath=`inset(0% ${u.value}% 0% 0%)`;break;case W.Left:p.clipPath=`inset(0% 0% 0% ${u.value} + '%)`;break;case W.Default:p.clipPath="inset(0% 50% 0% 0%)";break}return p}),c=Tn(a);return{normalizedProgress:u,barStyle:l,component:c,unref:s,Visibility:Me,isVisible:He,isHidden:yn}}});function rp(e,t,n,r,i,a){var c,p,v,g,b,h,y;const u=_t("MarkNode"),l=_t("Node");return e.isVisible(e.visibility)?(M(),T("div",{key:0,style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:Ne({bar:!0,...e.unref(e.classes)})},[k("div",{class:"overlayTextContainer border",style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(p=e.unref(e.borderStyle))!=null?p:{}])},[e.component?(M(),T("span",{key:0,class:"overlayText",style:Be(e.unref(e.textStyle))},[(M(),re(Je(e.component)))],4)):L("",!0)],4),k("div",{class:"border",style:Be([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(v=e.unref(e.style))!=null?v:{},(g=e.unref(e.baseStyle))!=null?g:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[k("div",{class:"fill",style:Be([e.barStyle,(h=e.unref(e.style))!=null?h:{},(y=e.unref(e.fillStyle))!=null?y:{}])},null,4)],4),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],6)):L("",!0)}var ip=ve(np,[["render",rp],["__scopeId","data-v-6bd06b56"]]);const ap=Symbol("Bar");function sp(e,...t){const n=t.reduce((r,i)=>{var a;return Object.assign(r,(a=i.getPersistentData)==null?void 0:a.call(i))},{});return Qe(r=>{var u,l;const i=e.call(r,r);i.id=Zt("bar-"),i.type=ap,i[dt]=ip;for(const c of t)(u=c.preConstruct)==null||u.call(c,i);Object.assign(i,n),A(i,"visibility"),le(i,"visibility",Me.Visible),A(i,"width"),A(i,"height"),A(i,"direction"),A(i,"style"),A(i,"classes"),A(i,"borderStyle"),A(i,"baseStyle"),A(i,"textStyle"),A(i,"fillStyle"),A(i,"progress"),A(i,"display"),A(i,"mark");for(const c of t)(l=c.postConstruct)==null||l.call(c,i);const a=t.reduce((c,p)=>{var v;return Object.assign(c,(v=p.getGatheredProps)==null?void 0:v.call(p,i))},{});return i[lt]=function(){const{progress:c,width:p,height:v,direction:g,display:b,visibility:h,style:y,classes:C,borderStyle:D,textStyle:R,baseStyle:I,fillStyle:E,mark:B,id:de}=this;return{progress:c,width:p,height:v,direction:g,display:b,visibility:h,style:s(y),classes:C,borderStyle:D,textStyle:R,baseStyle:I,fillStyle:E,mark:B,id:de,...a}},i})}function op(e,...t){return Qe(n=>{var i,a;const r=e.call(n,n);for(const u of t)(i=u.preConstruct)==null||i.call(u,r);r.formula=r.formula(f.variable(r.baseResource)),r.currentGain==null&&(r.currentGain=N(()=>{let u=o.floor(r.formula.evaluate(r.baseResource.value)).max(0);return s(r.buyMax)===!1&&(u=u.min(1)),u})),r.actualGain==null&&(r.actualGain=r.currentGain),r.currentAt==null&&(r.currentAt=N(()=>r.formula.invert(o.floor(s(r.currentGain))))),r.nextAt==null&&(r.nextAt=N(()=>r.formula.invert(o.floor(s(r.currentGain)).add(1)))),r.convert==null&&(r.convert=function(){var l;const u=s(r.currentGain);r.gainResource.value=o.add(r.gainResource.value,u),r.spend(u),(l=r.onConvert)==null||l.call(r,u)}),r.spend==null&&(r.spend=function(){r.baseResource.value=0}),A(r,"currentGain"),A(r,"actualGain"),A(r,"currentAt"),A(r,"nextAt"),A(r,"buyMax"),le(r,"buyMax",!0);for(const u of t)(a=u.postConstruct)==null||a.call(u,r);return r})}function lp(e){return op(e)}function up(e,t,n=1,r=o.dInf){const i=_e(n),a=_e(r);e.on("preUpdate",u=>{const l=s(i);o.neq(l,0)&&(t.gainResource.value=o.add(t.gainResource.value,o.times(l,u).times(o.ceil(s(t.actualGain)))).min(s(a)).max(t.gainResource.value))})}const cp={postConstruct(e){e.amount===void 0&&console.error(`Decorated feature ${e.id} does not contain the required 'amount' property"`),A(e,"bonusAmount"),e.totalAmount===void 0&&(e.totalAmount=N(()=>{var t;return o.add(s((t=e.amount)!=null?t:0),s(e.bonusAmount))}))}},ta=Symbol("Repeatable");function gi(e,...t){const n=ot(0),r=t.reduce((i,a)=>{var u;return Object.assign(i,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(i=>{var b,h,y;const a=e.call(i,i);a.id=Zt("repeatable-"),a.type=ta,a[dt]=Ji;for(const C of t)(b=C.preConstruct)==null||b.call(C,a);a.amount=n,a.amount[Yt]=(h=a.initialAmount)!=null?h:0,Object.assign(a,r);const u={requirementMet:N(()=>o.sub(s(a.limit),a.amount.value)),requiresPay:!1,visibility:Me.None,canMaximize:!0},l=Qr(a);qt(a.requirements)?(a.requirements.unshift(l),a.requirements.push(u)):a.requirements=[l,a.requirements,u],a.maxed=N(()=>o.gte(a.amount.value,s(a.limit))),A(a,"classes");const c=a.classes;a.classes=N(()=>{const C=s(c)||{};return a.maxed.value&&(C.bought=!0),C}),a.amountToIncrease=N(()=>o.clampMin(Qi(a.requirements),1)),a.canClick=N(()=>Nr(a.requirements));const p=a.onClick;a.onClick=function(C){var I;const D=a;if(!s(D.canClick))return;const R=(I=s(a.amountToIncrease))!=null?I:1;ea(a.requirements,R),D.amount.value=o.add(D.amount.value,R),p==null||p(C)},A(a,"display");const v=a.display;a.display=z(()=>{var D,R,I;const C=s(v);if(Tt(C)){const E=fe(C);return d(E,null,null)}if(C!=null){const E=a,B=fe((D=C.title)!=null?D:"","h3"),de=fe((R=C.description)!=null?R:""),ue=fe((I=C.effectDisplay)!=null?I:"");return d("span",null,[C.title==null?null:d("div",null,[d(B,null,null)]),C.description==null?null:d(de,null,null),C.showAmount===!1?null:d("div",null,[d("br",null,null),d(ne,null,[_("Amount: "),at(E.amount.value)]),o.isFinite(s(E.limit))?d(ne,null,[_(" / "),at(s(E.limit))]):void 0]),C.effectDisplay==null?null:d("div",null,[d("br",null,null),_("Currently: "),d(ue,null,null)]),E.maxed.value?null:d("div",null,[d("br",null,null),Cr(E.requirements,s(a.amountToIncrease))])])}return""}),A(a,"visibility"),le(a,"visibility",Me.Visible),A(a,"limit"),le(a,"limit",o.dInf),A(a,"style"),A(a,"mark"),A(a,"small");for(const C of t)(y=C.postConstruct)==null||y.call(C,a);const g=t.reduce((C,D)=>{var R;return Object.assign(C,(R=D.getGatheredProps)==null?void 0:R.call(D,a))},{});return a[lt]=function(){const{display:C,visibility:D,style:R,classes:I,onClick:E,canClick:B,small:de,mark:ue,id:ae}=this;return{display:C,visibility:D,style:s(R),classes:I,onClick:E,canClick:B,small:de,mark:ue,id:ae,...g}},a})}const dp=Symbol("Reset");function pp(e){return Qe(t=>{const n=e.call(t,t);return n.id=Zt("reset-"),n.type=dp,n.reset=function(){var i;const r=a=>{if(a!=null&&typeof a=="object"&&!(a instanceof o)&&!(a instanceof f)){if(Xn in a&&a[Xn]===!0)return;if(Yt in a){const u=a;u.value=u[Yt]}else!(a instanceof o)&&!qe(a)&&Object.values(a).forEach(u=>r(u))}};s(n.thingsToReset).forEach(r),Ke.emit("reset",n),(i=n.onReset)==null||i.call(n)},A(n,"thingsToReset"),n})}const lr={};Ke.on("removeLayer",e=>{var t;(t=lr[e.id])==null||t.call(lr),lr[e.id]=void 0});function Er(e,t){return A(t,"display"),A(t,"classes"),A(t,"style"),A(t,"direction"),le(t,"direction",W.Up),A(t,"xoffset"),A(t,"yoffset"),t.pinnable&&(t.pinned=ot(!1,!1)),Wt(()=>{t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1,Vi(t.pinned)):e.pinned=t.pinned);const n=e[dt];e[dt]=Oe;const r=e[lt].bind(e);e[lt]=function(){const{display:a,classes:u,style:l,direction:c,xoffset:p,yoffset:v,pinned:g}=this;return{element:{[dt]:n,[lt]:r},display:a,classes:u,style:s(l),direction:c,xoffset:p,yoffset:v,pinned:g}}.bind(t)}),t}var fp=X({props:{display:{type:q(String,Object,Function),required:!0},visibility:{type:q(Number,Boolean),required:!0},style:q(String,Object,Array),classes:q(Object),requirements:{type:Object,required:!0},canPurchase:{type:q(Boolean),required:!0},bought:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Qn,MarkNode:Kn},setup(e){const{display:t,requirements:n,bought:r}=Te(e),i=bt("");return Dt(()=>{const a=De(t);if(a==null){i.value="";return}if(Tt(a)){i.value=fe(a);return}const u=fe(a.title||"","h3"),l=fe(a.description,"div"),c=fe(a.effectDisplay||"");i.value=fe(z(()=>d("span",null,[a.title!=null?d("div",null,[d(u,null,null)]):null,d(l,null,null),a.effectDisplay!=null?d("div",null,[_("Currently: "),d(c,null,null)]):null,r.value?null:d(ne,null,[d("br",null,null),Cr(n.value)])])))}),{component:i,unref:s,Visibility:Me,isVisible:He,isHidden:yn}}});const gp=["disabled"];function mp(e,t,n,r,i,a){var c;const u=_t("MarkNode"),l=_t("Node");return e.isVisible(e.visibility)?(M(),T("button",{key:0,style:Be([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),onClick:t[0]||(t[0]=(...p)=>e.purchase&&e.purchase(...p)),class:Ne({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(M(),re(Je(e.unref(e.component)),{key:0})):L("",!0),d(u,{mark:e.unref(e.mark)},null,8,["mark"]),d(l,{id:e.id},null,8,["id"])],14,gp)):L("",!0)}var vp=ve(fp,[["render",mp],["__scopeId","data-v-9be6bac0"]]);const ei=Symbol("Upgrade");function mi(e,...t){const n=ot(!1,!1),r=t.reduce((i,a)=>{var u;return Object.assign(i,(u=a.getPersistentData)==null?void 0:u.call(a))},{});return Qe(i=>{var c,p;const a=e.call(i,i);a.id=Zt("upgrade-"),a.type=ei,a[dt]=vp;for(const v of t)(c=v.preConstruct)==null||c.call(v,a);a.bought=n,Object.assign(a,r),a.canPurchase=N(()=>!n.value&&Nr(a.requirements)),a.purchase=function(){var g;const v=a;!s(v.canPurchase)||(ea(a.requirements),n.value=!0,(g=v.onPurchase)==null||g.call(v))};const u=Qr(a);qt(a.requirements)?a.requirements.unshift(u):a.requirements=[u,a.requirements],A(a,"visibility"),le(a,"visibility",Me.Visible),A(a,"classes"),A(a,"style"),A(a,"display"),A(a,"mark");for(const v of t)(p=v.postConstruct)==null||p.call(v,a);const l=t.reduce((v,g)=>{var b;return Object.assign(v,(b=g.getGatheredProps)==null?void 0:b.call(g,a))},{});return a[lt]=function(){const{display:v,visibility:g,style:b,classes:h,requirements:y,canPurchase:C,bought:D,mark:R,id:I,purchase:E}=this;return{display:v,visibility:g,style:s(b),classes:h,requirements:y,canPurchase:C,bought:D,mark:R,id:I,purchase:E,...l}},a})}function hp(e,t,n=[]){n=n.length===0?Yn(e,ei):n;const r=Wn(t)?N(t):t;e.on("update",()=>{s(r)&&n.forEach(i=>i.purchase())})}function bp(e,t,n,r){return function(){e>>>=0,t>>>=0,n>>>=0,r>>>=0;let i=e+t|0;return e=t^t>>>9,t=n+(n<<3)|0,n=n<<21|n>>>11,r=r+1|0,i=i+r|0,n=n+i|0,(i>>>0)/4294967296}}const yp={1:["b","c","d","f","g","h","i","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"],2:["a","e","o","u"],3:["br","cr","dr","fr","gr","pr","str","tr","bl","cl","fl","gl","pl","sl","sc","sk","sm","sn","sp","st","sw","ch","sh","th","wh"],4:["ae","ai","ao","au","a","ay","ea","ei","eo","eu","e","ey","ua","ue","ui","uo","u","uy","ia","ie","iu","io","iy","oa","oe","ou","oi","o","oy"],5:["turn","ter","nus","rus","tania","hiri","hines","gawa","nides","carro","rilia","stea","lia","lea","ria","nov","phus","mia","nerth","wei","ruta","tov","zuno","vis","lara","nia","liv","tera","gantu","yama","tune","ter","nus","cury","bos","pra","thea","nope","tis","clite"],6:["una","ion","iea","iri","illes","ides","agua","olla","inda","eshan","oria","ilia","erth","arth","orth","oth","illon","ichi","ov","arvis","ara","ars","yke","yria","onoe","ippe","osie","one","ore","ade","adus","urn","ypso","ora","iuq","orix","apus","ion","eon","eron","ao","omia"]},vi=[[1,2,5],[2,3,6],[3,4,5],[4,3,6],[3,4,2,5],[2,1,3,6],[3,4,2,5],[4,3,1,6],[3,4,1,4,5],[4,1,4,3,6]];function Fr(e){const t=vi[Math.floor(e()*vi.length)];let n="";for(let r=0;rn-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}const bi=hr();function na(e,t,n,r){return Yr(e,function(){const i=bp(0,n>>0,n>>32,1);for(let V=0;V<12;V++)i();const a=Fr(i),u=Vn([.64,.75,.55],i),l=Vn([.18,.2,.25],i),c=Sn(0,Fr(i)),p=ot(0),v=At.indexOf(t);let g=i();const b=r.reduce((V,j)=>(V[j.type]=j.data,V),{});"increaseDiff"in b&&(g=g/2+.5),"decreaseDiff"in b&&(g=g/2),"relic"in b&&(g=1);const h=g+v+1,y=m.toolNodes.value.sandRelic!=null?te("sandRelic")?2:1:0,C=ot(y),D=N(()=>("increaseRewards"in b?h+1:h)+C.value);let R="relic"in b?v+2:Math.ceil(i()*(v+2));"increaseLength"in b&&R++;const I=[],E=Ct(()=>I),B=N(()=>E.apply(0)),de=[],ue={};function ae({feature:V,canClick:j,modifier:$e,cost:tt,previewModifier:Cn,showETA:ut,previewCost:gt}){j=_e(j),ut=_e(ut);const St=di(V);de.push({shouldShowPreview:N(()=>s(j)&&St.value),modifier:Ct(()=>{const Pt=I.slice();return Pt.splice(Pt.indexOf($e),1,Cn),Pt}),cost:gt!=null?gt:tt}),I.push($e);const Kt=Ar(c,B,()=>Se(tt)),Ze=Er(V,{display:ut==null?Kt:()=>s(ut)?Kt.value:"",direction:W.Down});return{isHovering:St,eta:Kt,tooltip:Ze}}const Q=[],Ie=G(0);let be=f.variable(Ie).times(0),U=0,ye=!0;const ze=N(()=>o.add(h,i()-.5).pow_base(2).times(10).times(be.evaluate()));for(let V=0;V=R-1?0:4};switch(ur(j,i)){case"upgrades":const $=[];for(let x=0;x<4;x++){const H=ur({add:1,mult:V===0&&x===0?0:1},i),J=ze.value,Ee=Mn(i);let Ge="",Fe,oe;switch(H){case"add":{const pe=o.add(J,10).pow(i()/4+1);Ge=`Gain ${xe(pe)} ${c.displayName}/s`,be=be.add(pe),Fe=nt=>Gt(()=>({addend:pe,description:Ee,enabled:nt==null?we.bought:()=>nt()&&we.bought.value})),oe=Gt(()=>({addend:pe}));break}case"mult":{const pe=i()*5+1;Ge=`Multiply previous ${c.displayName} gain by x${xe(pe)}.`;const nt=U;be=be.add(o.sub(pe,1).times(nt)),Fe=Xe=>Ce(()=>({multiplier:pe,description:Ee,enabled:Xe==null?we.bought:()=>Xe()&&we.bought.value})),oe=Ce(()=>({multiplier:pe}));break}}U=be.evaluate(),Ie.value++;const Ae=ye,we=mi(()=>({requirements:qn(()=>({resource:kn(c),cost:J,requiresPay:()=>m.toolNodes.value.unobtainiumRelic==null})),display:{title:Ee,description:Ge},visibility:Ae}));ae({feature:we,canClick:()=>we.canPurchase.value,modifier:Fe(),cost:J,previewCost:N(()=>m.toolNodes.value.unobtainiumRelic==null?J:0),showETA:()=>!we.bought.value,previewModifier:oe}),I.push(Fe(()=>H==="add"?m.toolNodes.value.stoneRelic!=null:te("stoneRelic"))),$.push(we)}Q.push($);break;case"repeatables":const P=[];for(let x=0;x<3;x++){const H=ur({add:1.5,mult:3},i),J=Ie.value,Ee=ze.value,Ge=Mn(i);let Fe="",oe,Ae,we,pe;const nt=f.variable(N(()=>ce.amount.value)).times(2);switch(H){case"add":{const Ue=o.add(Ee,10).times(i()+.5);Fe=`Gain ${xe(Ue)} ${c.displayName}/s`,pe=nt.add(1).times(Ee),be=be.add(N(()=>o.sub(Ie.value,J).times(2).add(1).pow(2).clampMax(100).times(Ue))),oe=N(()=>xe(o.times(Ue,s(ce.totalAmount)))+"/s"),Ae=Gt(()=>({addend:()=>o.times(Ue,s(ce.totalAmount)),description:Ge,enabled:()=>o.gt(s(ce.totalAmount),0)})),we=Gt(()=>({addend:()=>o.add(s(ce.totalAmount),ce.amountToIncrease.value).times(Ue)}));break}case"mult":{const Ue=i()*.75+1.25;Fe=`Multiply previous ${c.displayName} gain by x${xe(Ue)}.`,pe=nt.add(1).pow_base(Ue).times(Ee);const it=U;be=be.add(N(()=>o.sub(Ie.value,J).times(2).add(1).pow(2).clampMax(100).pow_base(Ue).sub(1).times(it))),oe=N(()=>"x"+xe(o.pow(Ue,s(ce.totalAmount)))),Ae=Ce(()=>({multiplier:()=>o.pow(Ue,s(ce.totalAmount)),description:Ge,enabled:()=>o.gt(s(ce.totalAmount),0)})),we=Ce(()=>({multiplier:()=>o.add(s(ce.totalAmount),ce.amountToIncrease.value).pow_base(Ue)}));break}}U=be.evaluate(),Ie.value++;const Xe=ye,ce=gi(()=>({requirements:qn(()=>({resource:kn(c),cost:pe,maxBulkAmount:()=>m.toolNodes.value.diamondRelic!=null?o.dInf:1,requiresPay:()=>m.toolNodes.value.unobtainiumRelic==null})),display:()=>({title:Ge,description:`${Fe}

Amount: ${at(ce.amount.value)}${o.gt(s(ce.bonusAmount),0)?` [+${at(s(ce.bonusAmount))}]`:""}`,effectDisplay:s(oe),showAmount:!1}),visibility:Xe,limit:100,bonusAmount:()=>o.gt(ce.amount.value,0)?te("dirtRelic")?2:m.toolNodes.value.dirtRelic!=null?1:0:0}),cp);ae({feature:ce,canClick:()=>s(ce.canClick),modifier:Ae,cost:pe,previewModifier:we,previewCost:N(()=>m.toolNodes.value.unobtainiumRelic==null?nn(pe,ce.amountToIncrease.value):0),showETA:()=>!ce.maxed.value}),P.push(ce)}Q.push(P);break;case"conversion":{const x=Sn(0,Fr(i)),O=Vn([.64,.75,.55],i),H=ze.value,J=i()/2+.25,Ee=i()/2+.25,Ge=Ie.value,Fe=U;be=be.add(N(()=>o.sub(Ie.value,Ge).add(1).pow10().times(Fe)));const oe=lp(()=>({baseResource:kn(c),gainResource:x,formula:$r=>$r.div(H).pow(J).times(N(()=>m.toolNodes.value.ironRelic!=null?te("ironRelic")?4:2:1)),spend(){c.value=0}}));U=be.evaluate(),Ie.value+=2;const Ae=ye,we=Mn(i),pe=f.variable(x).pow(Ee).add(1),nt=Ce(()=>({multiplier:()=>pe.evaluate(),description:we,enabled:()=>o.gt(x.value,0)})),Xe=Ce(()=>({multiplier:()=>pe.evaluate(o.add(x.value,oe.actualGain.value))})),ce=xd(()=>({display:{title:we,description:z(()=>d("span",null,[_("Reset "),c.displayName,_(" for")," ",vr(x,o.clampMin(oe.actualGain.value,1))," ",x.displayName,d("br",null,null),d("div",null,[_("Next:")," ",vr(c,o.lt(oe.actualGain.value,1)?oe.currentAt.value:oe.nextAt.value)," ",c.displayName])]))},style:{width:"200px",minHeight:"100px"},canClick:()=>o.gte(oe.actualGain.value,1),prestigeResource:x,onClick:oe.convert,visibility:Ae})),{isHovering:Ue}=ae({feature:ce,canClick:()=>s(ce.canClick),modifier:nt,cost:H,previewCost:c,previewModifier:Xe}),it=N(()=>Ue.value&&ce.canClick.value);Q.push([ce]);const On=mn(f.variable(x),it,oe.actualGain),et=mn(pe,it,oe.actualGain);ue[V*2]=z(()=>d(ne,null,[He(ce.visibility)?d("div",{style:"margin: 10px"},[_("You have")," ",d("h2",{style:{color:O,textShadow:`0px 0px 10px ${O}`}},[On()])," ",x.displayName,_(","),d("br",null,null),_("providing a "),et(),_("x multiplier to previous")," ",c.displayName,_(" gain")]):null,Pr(ce)])),up(this,oe,()=>Ye.value.lengthnn(oe,Ae.value,!0,10)),pe=N(()=>nn(oe,o.add(Ae.value,1),!0,10)),nt=N(()=>o.pow(Fe,Ae.value)),Xe=Ce(()=>({multiplier:nt,description:J,enabled:()=>He(it.visibility)})),ce=U;be=be.add(N(()=>o.sub(Ie.value,H).add(1).times(3).pow(Fe).times(ce))),U=be.evaluate(),Ie.value+=2;const Ue=Vn([.64,.75,.55],i),it=sp(()=>({direction:W.Right,width:300,height:20,progress:()=>o.sub(x.value,we.value).div(o.sub(pe.value,we.value)).toNumber(),visibility:O,xp:x,display:z(()=>d("span",null,[xe(x.value),_("/"),xe(pe.value)])),fillStyle:`background-color: ${Ue}`,textStyle:"text-shadow: 5px 0 10px black"}));this.on("preUpdate",On=>{if(Ye.value.lengthet.state.id===e)&&He(it.visibility)){let et=o.times(Mt.value,On);m.toolNodes.value.goldRelic!=null&&(et=o.times(te("goldRelic")?.5:.25,Ye.value.length).add(1).times(et)),x.value=o.add(et,x.value)}}),I.push(Xe),Q.push([it]),ue[V*2]=z(()=>d(ne,null,[He(it.visibility)?d("div",{style:"margin: 10px"},[_("You have "),d("h3",null,[J]),_(" Lv. "),at(Ae.value),_(","),d("br",null,null),_("providing a "),xe(nt.value),_("x multiplier to previous")," ",c.displayName,_(" gain"),d("br",null,null)]):null,Pr(it)]));break}case"dimensions":{const x=Mn(i),O=Sn(0,x+" energy"),H=Vn([.64,.75,.55],i),J=Ie.value,Ee=U;be=be.add(N(()=>o.sub(Ie.value,J).add(1).pow_base(32).add(1).log2().add(1).times(Ee)));const Ge=N(()=>o.add(O.value,1).log2().add(1)),Fe=Ce(()=>({multiplier:Ge,description:x,enabled:()=>o.gt(O.value,0)}));I.push(Fe);const oe=ye,Ae=[];for(let we=0;we<4;we++){const pe=o.add(h,i()-.5).pow_base(2).times(10).recip(),nt=ze.value,Xe=f.variable(N(()=>et.amount.value)),ce=Xe.pow_base(o.pow10(we+1)).times(nt),Ue=["First","Second","Third","Fourth"][we]+" "+x+" Dimension",it=Sn(0,Ue),On=Xe.sub(1).pow_base(2).times(pe).times(N(()=>o.add(et.amount.value,it.value))),et=gi(()=>({display:{title:Ue,description:z(()=>d("div",null,[d("div",null,[_("Amount:")," ",xe(o.add(it.value,et.amount.value))," ",_("["),at(et.amount.value),_("]")])])),effectDisplay:z(()=>d("span",null,[ia()," ",we===0?O.displayName:["First","Second","Third","Fourth"][we-1]+" "+x+" Dimension",_("/s")])),showAmount:!1},style:{width:"400px"},effect:On,dimensions:it,limit:100,energy:we===0?O:void 0,requirements:qn(()=>({resource:kn(c),cost:ce,maxBulkAmount:()=>te("diamondRelic")!=null?o.dInf:1,requiresPay:()=>!te("unobtainiumRelic")})),visibility:oe}));Ae.push(et);const $r=di(et),ni=N(()=>s(et.canClick)&&$r.value),ra=new f({inputs:[Xe],evaluate(ri){return o.sub(ri,1).pow_base(2).times(pe).times(o.add(ri,it.value))}}),ia=mn(ra,ni);de.push({shouldShowPreview:ni,cost:N(()=>te("unobtainiumRelic")?0:nn(ce,et.amountToIncrease.value))});const aa=Ar(c,B,()=>Se(ce));Er(et,{display:aa,direction:W.Down}),U=be.evaluate(),Ie.value++}this.on("preUpdate",we=>{if(Ye.value.lengthpe.state.id===e)&&He(oe)){let pe=o.times(Mt.value,we);m.toolNodes.value.platinumRelic!=null&&(pe=o.times(te("platinumRelic")?4:2,pe));const nt=Ae[0].effect.evaluate();O.value=o.times(nt,pe).add(O.value);for(let Xe=1;Xe<4;Xe++){const ce=Ae[Xe].effect.evaluate();Ae[Xe-1].dimensions.value=o.times(ce,pe).add(Ae[Xe-1].dimensions.value)}}}),Q.push(Ae),ue[V*2]=z(()=>d(ne,null,[He(oe)?d("div",{style:"margin: 10px"},[_("You have")," ",d("h2",{style:{color:H,textShadow:`0px 0px 10px ${H}`}},[xe(O.value)])," ",O.displayName,_(","),d("br",null,null),_("providing a "),xe(Ge.value),_("x multiplier to previous")," ",c.displayName,_(" gain")]):null,zs(...Ae)]));break}case"prestige":{const x=Mn(i),O=ye,H=i()/10+1.1,J=ze.value;be=be.pow(H);const Ee=vd(()=>({exponent:H,description:x,enabled:oe.bought}));U=be.evaluate(),Ie.value+=20;const Ge=Q.filter((we,pe)=>pe%2===0),Fe=pp(()=>({thingsToReset:Ge,onReset(){c.value=0}})),oe=mi(()=>({display:{title:x,description:`Reset all previous ${a} content to raise all previous ${c.displayName} gain to the ^${xe(H)}`},style:{width:"200px",minHeight:"100px"},onPurchase:()=>{te("unobtainiumRelic")||Fe.reset()},visibility:O,requirements:qn(()=>({resource:kn(c),cost:J,requiresPay:!1}))})),Ae=Ce(()=>({multiplier:0}));ae({feature:oe,canClick:()=>s(oe.canPurchase),modifier:Ee,cost:J,previewCost:N(()=>te("unobtainiumRelic")?0:c.value),previewModifier:Ae,showETA:()=>!s(oe.bought)}),Q.push([oe]);break}}const tt={cache:"increaseCaches"in b?8:.8,generation:"increaseGens"in b?10:1,resourceMulti:"increaseResourceMults"in b?10:1,energyMulti:"increaseEnergyMults"in b?2.5:.25,influences:"increaseInfluences"in b?20:2,relic:0};let Cn=ur(tt,i);V===R-1&&"relic"in b&&(Cn="relic");let ut="",gt,St,Kt,Ze,Pt,cn;switch(Cn){case"cache":Ze=Or(i,r),ut=`Cache: Gain ${xe(o.div(D.value,12))}x your current ${Ze} (no modifiers).`,St=()=>{var x,O,H;return m.grantResource(Ze,o.times((H=(O=(x=m.resourceNodes.value[Ze])==null?void 0:x.state)==null?void 0:O.amount)!=null?H:0,o.div(D.value,12)))};break;case"generation":Ze=Or(i,r);const $=o.pow(D.value,2).div(40).times($t[Ze]);ut=`Gen: Gain ${xe($)} ${Ze}/s while plane is active.`,gt=x=>m.grantResource(Ze,o.times(x,$)),Kt=Ze;break;case"resourceMulti":Pt=Ze=Or(i,r),cn=o.pow(D.value,2).div(10).pow_base(1.5),ut=`Resource Mult: Gain ${xe(cn)}x ${Ze} while plane is active.`;break;case"energyMulti":Pt="energy",cn=o.div(D.value,8).add(1),ut=`Energy Mult: Gain ${xe(cn)}x energy while plane is active.`;break;case"influences":const P=Object.keys(vt)[Math.floor(i()*Object.keys(vt).length)];ut=`Influence: Gain a portal influence (${vt[P].display})`,St=()=>{if(P in m.influenceNodes.value){bi.warning(`You already have a ${vt[P].display} influence, skipping treasure`);return}const x={id:Dn(m.board),position:{...m.board.types.portal.nodes.value.find(O=>O.state.id===e).position},type:"influence",state:{type:P,data:vt[P].initialData}};m.board.placeInAvailableSpace(x),m.board.nodes.value.push(x)};break;case"relic":ut=t==="ultimatum"?"Win the game!":`Relic: Gain the ${t}-tier planar relic (${Rt[t]})`,St=()=>{if(t==="ultimatum"){ti.value=!0;return}if(`${t}Relic`in m.toolNodes.value)bi.warning(`You already have a ${Rt[t]} relic, skipping treasure`);else{const x={id:Dn(m.board),position:{...m.board.types.portal.nodes.value.find(O=>O.state.id===e).position},type:"passive",state:`${t}Relic`};m.board.placeInAvailableSpace(x),m.board.nodes.value.push(x)}}}const ar=ye,Fn=ze.value,dn=ep(()=>({requirements:qn(()=>({resource:kn(c),cost:Fn})),visibility:ar,display:{requirement:`${xe(Fn)} ${c.displayName}`,effectDisplay:ut},style:"width: 100%",classes:{final:V===R-1},update:gt,onComplete:St,link:Kt,effectedResource:Pt,resourceMulti:cn})),xr=Ar(c,B,Fn);Er(dn,{display:()=>dn.earned.value?"":xr.value,direction:W.Down}),Q.push([dn]),ye=N(()=>dn.earned.value)}const pt=Yn(Q,ei),zt=Yn(Q,ta);I.push(Ce(()=>({multiplier:()=>te("silver")?4:2,description:()=>(te("silver")?"Empowered ":"")+Le.silver.name,enabled:()=>m.toolNodes.value.silver!=null})),Ce(()=>({multiplier:()=>o.add(1,(te("diamond")?2:1)*pt.filter(V=>V.bought.value).length/10),description:()=>(te("diamond")?"Empowered ":"")+Le.diamond.name,enabled:()=>m.toolNodes.value.diamond!=null})),Ce(()=>({multiplier:()=>o.div(p.value,6e3).times(te("emerald")?2:1).add(1),description:()=>(te("emerald")?"Empowered ":"")+Le.emerald.name,enabled:()=>m.toolNodes.value.emerald!=null})),Ce(()=>({multiplier:()=>o.div(zt.reduce((V,j)=>V.add(s(j.totalAmount)),o.dZero),100).times(te("gravelRelic")?2:1).add(1).pow(.75),description:()=>(te("gravelRelic")?"Empowered ":"")+Rt.gravel,enabled:()=>m.toolNodes.value.gravelRelic!=null})),Ce(()=>({multiplier:()=>o.add(m.energy.value,1).log10().add(1).pow(te("beryliumRelic")?.5:.25),description:()=>(te("beryliumRelic")?"Empowered ":"")+Rt.berylium,enabled:()=>m.toolNodes.value.beryliumRelic!=null})));const ft=Ct(()=>[Ce(()=>({multiplier:()=>{var V,j,$e;return o.add(($e=(j=(V=m.board.types.booster.nodes.value[0])==null?void 0:V.state)==null?void 0:j.level)!=null?$e:0,1)},description:"Booster",enabled:()=>{var V,j,$e;return($e=(j=(V=m.board.types.booster.nodes.value[0])==null?void 0:V.state)==null?void 0:j.portals.includes(e))!=null?$e:!1}})),Ce(()=>({multiplier:()=>o.times(te("coalRelic")?.2:.1,Ye.value.length).add(1),description:()=>(te("coalRelic")?"Empowered ":"")+Rt.coal,enabled:()=>m.toolNodes.value.coalRelic!=null}))]),Mt=N(()=>ft.apply(1)),[tr,Mr]=zn(()=>[{title:`${rt(c.displayName)} Gain`,modifier:E,base:0,unit:"/s"},{title:`${rt(c.displayName)} Time Speed`,modifier:ft,base:1,visible:()=>o.gt(Mt.value,1)}]),Nn=G(!1),nr=z(()=>d(Vt,{modelValue:Nn.value,"onUpdate:modelValue":V=>Nn.value=V},{header:()=>d("h2",null,[_("Modifiers")]),body:()=>st(tr)}));this.on("preUpdate",V=>{if(!m.activePortals.value.some($e=>$e.state.id===e))return;const j=o.times(Mt.value,V);p.value=o.add(p.value,j),Ye.value.length{var tt;(tt=$e.update)==null||tt.call($e,j)})}),hp(this,()=>Ye.value.lengthYe.value.length{const V=de.find(j=>j.shouldShowPreview.value);return V?o.neg(Se(V.cost)):0}),Rn=N(()=>{const V=de.find(j=>j.shouldShowPreview.value);return V&&V.modifier?o.sub(V.modifier.apply(0),B.value):0}),Jt=mn(f.variable(0).add(c),()=>o.neq(An.value,0),An),En=mn(f.variable(0).add(B),()=>o.neq(Rn.value,0),Rn),rr=N(()=>{const V=[];return Ye.value.forEach(j=>{j.link&&V.push(j.link)}),V}),ir=N(()=>{const V={};return Ye.value.forEach(j=>{j.effectedResource!=null&&j.resourceMulti!=null&&(V[j.effectedResource]!=null?V[j.effectedResource]=o.times(V[j.effectedResource],j.resourceMulti):V[j.effectedResource]=j.resourceMulti)}),V}),Ye=N(()=>{const V=[];for(let j=1;jo.lt(Ye.value.length,R)&&Q.some(V=>V.some(j=>"earned"in j&&s(j.earned)||"bought"in j&&s(j.bought)?!1:("canClick"in j&&s(j.canClick)||"canPurchase"in j&&s(j.canPurchase),!0)))),Ir=N(()=>{const V=Q.findIndex(($e,tt)=>tt>0&&tt%2===0&&!Q[tt-1][0].earned.value);let j;return V===-1?j=Q:j=Q.slice(0,V),j.map(($e,tt)=>tt in ue?st(ue[tt]):Pr(...$e))});return{tier:ot(t),seed:ot(n),influences:ot(r),name:a,color:u,resource:c,background:l,style:{background:l,"--background":l},features:Q,resourceTabCollapsed:Mr,links:rr,resourceMultis:ir,earnedTreasures:Ye,showNotif:Sr,timeActive:p,bonusRewardsLevel:C,display:z(()=>d(ne,null,[d(mr,{class:"nav-container",style:"z-index: 5"},{default:()=>[d("span",{class:"nav-segment"},[d("h2",null,[a])]),d("span",{class:"nav-segment"},[d("h3",null,[t,_("-tier")])]),r.length===0?null:d("span",{class:"nav-segment"},[d(Oe,{display:r.map(V=>{const j=vt[V.type].description;return typeof j=="function"?j(V):j}).join("
"),direction:W.Down,style:"width: 300px"},{default:()=>[d("h3",null,[r.length,_(" influences")])]})]),d("span",{class:"nav-segment"},[d("button",{class:"button",style:"display: inline",onClick:()=>Nn.value=!0},[_("modifiers")])])]}),d(mr,{class:"nav-container"},{default:()=>[d("span",{class:"nav-segment"},[d("h3",{style:`color: ${u}; text-shadow: 0px 0px 10px ${u};`},[st(Jt)])," ",c.displayName]),d("span",{class:"nav-segment"},[_("("),d("h3",{style:`color: ${u}; text-shadow: 0px 0px 10px ${u};`},[o.gt(B.value,0)?"+":"",st(En)]),_("/s)")]),o.neq(Mt.value,1)?d("span",{class:"nav-segment"},[_("Speed: "),xe(Mt.value),_("x")]):null]}),d(Hd,{height:"60px"},null),Ir.value,Ye.value.length+1d("div",null,[d("span",null,[a]),d("span",{style:"font-size: large; vertical-align: sub;"},[" ",Ye.value.length,_("/"),R,_(" treasures")])]))}})}function Or(e,t){t=t.filter(l=>l.type==="increaseResources"||l.type==="decreaseResources");const n=Object.keys($t).reduce((l,c)=>{let p=$t[c];return t.filter(v=>v.data===c).forEach(v=>{v.type==="increaseResources"?p*=1e3:p/=1e3}),l+p},0),r=Object.keys($t),i=Math.floor(e()*n);let a=0,u;for(let l=0;ll+c),r=Object.keys(e);let i=0,a=null;const u=t()*n;for(let l=0;le===m.board.selectedNode.value?{text:"Mining"}:Object.keys(m.resourceNodes.value).length===0?{text:"Click me!"}:null,actionDistance:Math.PI/4,actions:[Bt,Lt("mine")],progress:e=>ke(e)?new o(e.state.progress).toNumber():0,progressDisplay:sn.Outline,progressColor:"var(--accent2)",classes:e=>({running:ke(e)}),draggable:!0},kp={shape:je.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:e=>e===m.board.selectedNode.value?{text:"Broken Forge"}:null,actionDistance:Math.PI/4,actions:[{id:"repair",icon:"build",tooltip:{text:"Repair - 100 energy"},onClick(e){o.gte(m.energy.value,100)&&(e.type="factory",m.energy.value=o.sub(m.energy.value,100),m.helpModals.factory.showModal.value=!0)},confirmationLabel:()=>o.gte(m.energy.value,100)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}}],draggable:!0},Mp={shape:je.Diamond,size:50,title:"\u{1F6E0}\uFE0F",label:e=>{var t,n;if(e===m.board.selectedNode.value)return{text:e.state==null?"Forge - Drag a resource to me!":`Forging ${Le[e.state].name}`};if(((t=m.board.draggingNode.value)==null?void 0:t.type)==="resource"){const r=((n=m.board.draggingNode.value)==null?void 0:n.state).type,i=e.state===r?"Disconnect":m.toolNodes.value[r]==null?Le[r].name:"Already crafted",a=e.state===r||m.toolNodes.value[r]==null?"var(--accent2)":"var(--danger)";return{text:i,color:a}}return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect resource"},onClick(e){e.state=void 0,m.board.selectedAction.value=null,m.board.selectedNode.value=null},visibility:e=>e.state!=null},{id:"craft",icon:"done",tooltip:e=>({text:`Forge ${Le[e.state].name} - ${We(Le[e.state].cost)} energy`}),onClick(e){const t=Le[e.state];if(o.gte(m.energy.value,t.cost)&&m.toolNodes.value[e.state]==null){m.energy.value=o.sub(m.energy.value,t.cost);const n={id:Dn(m.board),position:{...e.position},type:t.type,state:"state"in t?t.state:void 0};if(m.board.placeInAvailableSpace(n),m.board.nodes.value.push(n),e.state==="iron"){const r={id:Dn(m.board),position:{...e.position},type:"trashCan"};m.board.placeInAvailableSpace(r),m.board.nodes.value.push(r)}m.board.selectedAction.value=null,m.board.selectedNode.value=null,e.state=void 0,t.type in m.helpModals&&(m.helpModals[t.type].showModal.value=!0)}},fillColor:e=>o.gte(m.energy.value,Le[e.state].cost)&&m.toolNodes.value[e.state]==null?"var(--accent2)":"var(--danger)",visibility:e=>e.state!=null,confirmationLabel:e=>o.gte(m.energy.value,Le[e.state].cost)?m.toolNodes.value[e.state]==null?{text:"Tap again to confirm"}:{text:"Already crafted",color:"var(--danger)"}:{text:"Cannot afford",color:"var(--danger)"}},Lt("factory")],progress:e=>e.state==null||m.toolNodes.value[e.state]!=null?0:o.div(o.sqrt(m.energy.value),o.sqrt(Le[e.state].cost)).clampMax(1).toNumber(),progressDisplay:sn.Fill,progressColor:e=>e.state!=null&&o.gte(m.energy.value,Le[e.state].cost)?"var(--accent2)":"var(--foreground)",canAccept(e,t){var r;if(t.type!=="resource")return!1;const n=((r=m.board.draggingNode.value)==null?void 0:r.state).type;return m.toolNodes.value[n]==null},onDrop(e,t){const n=t.state.type;e.state===n?e.state=void 0:e.state=n,m.board.selectedNode.value=e},draggable:!0},Sp=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI"],Ip={shape:je.Circle,size:50,title:e=>rt(e.state.type),subtitle:e=>We(e.state.amount),otherSubtitle:e=>Sp[At.indexOf(e.state.type)],progress:e=>wd(e.state.type),onClick(){},progressDisplay:sn.Outline,progressColor:"var(--accent3)",classes:e=>{var t;return{"affected-node":m.dowsing.value!=null&&ke(m.dowsing.value)&&m.dowsing.value.state.resources.includes(e.state.type)||o.neq((t=m.planarMultis.value[e.state.type])!=null?t:1,1)}},draggable:!0},xp={shape:je.Circle,size:50,title:e=>{const t=e.state;return t.includes("Relic")?Rt[t.slice(0,-5)]:Le[t].name},label:e=>e===m.board.selectedNode.value?{text:Rd[e.state].description(te(e.state))}:null,outlineColor:"var(--bought)",classes:e=>({"affected-node":te(e.state)}),draggable:!0},$p={shape:je.Diamond,size:50,title:"\u{1F962}",label:e=>e===m.board.selectedNode.value?{text:e.state.resources.length===0?"Dowsing - Drag a resource to me!":`Dowsing (${e.state.resources.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:Yi(e,t=>`Double ${t} odds`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(2).pow_base(100),16),Bt,Lt("dowsing")],classes:e=>({running:ke(e)}),canAccept:Zi,onDrop:Xi,draggable:!0},Dp={shape:je.Diamond,size:50,title:"\u26F0\uFE0F",label:e=>e===m.board.selectedNode.value?{text:e.state.resources.length===0?"Quarry - Drag a resource to me!":`Quarrying (${e.state.resources.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:Yi(e,t=>`Gather ${yt(o.div(m.dropRates[t].computedModifier.value,100))} ${t}/s`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(2).pow_base(1e4),16),Bt,Lt("quarry")],progress:e=>ke(e)?o.eq(m.quarryProgressRequired.value,0)?0:new o(e.state.progress).div(m.quarryProgressRequired.value).toNumber():0,progressDisplay:sn.Outline,progressColor:"var(--accent2)",canAccept:Zi,onDrop:Xi,classes:e=>({running:ke(e)}),draggable:!0},Tp={shape:je.Diamond,size:50,title:"\u{1F50C}",label:e=>e===m.board.selectedNode.value?{text:e.state.tools.length===0?"Empowerer - Drag a tool to me!":`Empowering (${e.state.tools.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:hd(e,t=>t.includes("Relic")?`Double ${Rt[t.slice(0,-5)]}'s effect`:`Double ${Le[t].name}'s effect`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(3).pow_base(1e3),24),Bt,Lt("empowerer")],canAccept:bd,onDrop:yd,classes:e=>({running:ke(e)}),draggable:!0},Pp={shape:je.Diamond,size:50,title:"\u26E9\uFE0F",label:e=>{if(e===m.board.selectedNode.value)return{text:e.state.tier==null?"Portal Spawner - Drag a resource to me!":`Spawning ${e.state.tier}-tier portal`};const t=m.board.draggingNode.value;if((t==null?void 0:t.type)==="resource"){const n=t.state.type;return{text:e.state.tier===n?"Disconnect":`${rt(n)}-tier Portal`,color:"var(--accent2)"}}else if((t==null?void 0:t.type)==="influence"){const n=t.state.type;if(e.state.influences.includes(n))return{text:"Disconnect",color:"var(--accent2)"};const i=vt[n].cost;let a;return o.lt(i,1e3)?a=We(i):a=Lr(i,0),{text:`Add influence (${a}x cost)`,color:"var(--accent2)"}}else if((t==null?void 0:t.type)==="portal")return{text:`Copy tier/influences from ${ge[t.state.id].name}`};return null},actionDistance:Math.PI/4,actions:[{id:"deselect",icon:"close",tooltip:{text:"Disconnect all"},onClick(e){e.state={...e.state,tier:void 0,influences:[]},m.board.selectedAction.value=null,m.board.selectedNode.value=null},visibility:e=>{const{tier:t,influences:n}=e.state;return t!=null||n.length>0}},{id:"makePortal",icon:"done",tooltip:e=>({text:`Spawn ${e.state.tier}-tier portal - ${We(m.computedPortalCost.value)} energy`}),fillColor:()=>o.gte(m.energy.value,m.computedPortalCost.value)?"var(--accent2)":"var(--danger)",confirmationLabel:()=>o.gte(m.energy.value,m.computedPortalCost.value)?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"},onClick(e){if(o.lt(m.energy.value,m.computedPortalCost.value))return;let t=0;for(;`portal-${t}`in ge;)t++;m.energy.value=o.sub(m.energy.value,m.computedPortalCost.value);const{tier:n,influences:r}=e.state;Zr(na(`portal-${t}`,n,Math.floor(Math.random()*4294967296),r.map(a=>m.influenceNodes.value[a].state)),Z);const i={id:Dn(m.board),position:{...e.position},type:"portal",state:{id:`portal-${t}`,powered:!1}};m.board.placeInAvailableSpace(i),m.board.nodes.value.push(i),m.board.selectedAction.value=null,m.board.selectedNode.value=null,e.state={tier:void 0,influences:[]}},visibility:e=>e.state.tier!=null},Lt("portalGenerator")],canAccept(e,t){return t.type==="resource"||t.type==="influence"||t.type==="portal"},onDrop(e,t){if(t.type==="resource"){const n=t.state.type,r=e.state.tier;e.state={...e.state,tier:n===r?void 0:n}}else if(t.type==="influence"){const n=t.state.type,r=e.state.influences;r.includes(n)?e.state={...e.state,influences:r.filter(i=>i!==n)}:e.state={...e.state,influences:[...r,n]}}else if(t.type==="portal"){const n=ge[t.state.id];e.state={...e.state,tier:n.tier.value,influences:n.influences.value.map(r=>r.type)}}m.board.selectedNode.value=e},progress:e=>e.state.tier==null?0:o.div(o.sqrt(m.energy.value),o.sqrt(m.computedPortalCost.value)).clampMax(1).toNumber(),progressDisplay:sn.Fill,progressColor:e=>e.state.tier!=null&&o.gte(m.energy.value,m.computedPortalCost.value)?"var(--accent2)":"var(--foreground)",draggable:!0},Ap={shape:je.Diamond,size:50,title:"\u{1F300}",label:e=>e===m.board.selectedNode.value?{text:`Portal to ${ge[e.state.id].name}`,color:ge[e.state.id].color}:null,actionDistance:Math.PI/4,actions:[Bt],classes:e=>({running:ke(e),showNotif:ge[e.state.id].showNotif.value,"affected-node":m.booster.value!=null&&ke(m.booster.value)&&m.booster.value.state.portals.includes(e.state.id)}),outlineColor:e=>ge[e.state.id].background,draggable:!0},Rp={shape:e=>e.state.type==="increaseResources"||e.state.type==="decreaseResources"?je.Diamond:je.Circle,size:50,title:e=>vt[e.state.type].display,otherSubtitle:e=>{const t=vt[e.state.type].cost;return o.lt(t,1e3)?`${We(t)}x cost`:`${Lr(t,0)}x cost`},label:e=>{if(e===m.board.selectedNode.value){const n=e.state,r=vt[n.type].description;return{text:typeof r=="function"?r(n):r}}const t=m.board.draggingNode.value;if((t==null?void 0:t.type)==="resource"){const n=t.state.type,{type:r,data:i}=e.state;let a;if(Array.isArray(i)&&i.includes(n))a="Disconnect";else if(r==="increaseResources")a=`Increase ${rt(n)} odds`;else if(r==="decreaseResources")a=`Decrease ${rt(n)} odds`;else return null;return{text:a,color:"var(--accent2)"}}return null},actionDistance:Math.PI/4,actions:[un],canAccept:(e,t)=>t.type!=="resource"?!1:Array.isArray(e.state.data),onDrop:(e,t)=>{if(t.type!=="resource")return;const n=t.state.type,r=e.state.data;r!=null&&(r.includes(n)?e.state={...e.state,data:r.filter(i=>i!==n)}:e.state={...e.state,data:[...r,n]},m.board.selectedNode.value=e)},outlineColor:"var(--danger)",draggable:!0},Ep={shape:je.Diamond,size:50,title:"\u231B",label:e=>e===m.board.selectedNode.value?{text:e.state.portals.length===0?"Booster - Drag a portal to me!":`Boosting by ${We(o.add(1,e.state.level))}x (${e.state.portals.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:yr(e,t=>`Boost ${ge[t].name}'s speed`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(6).pow_base(1e3)),{id:"increaseBoost",icon:"arrow_upward",tooltip(e){return{text:`Increase boost - ${We(or.evaluate(e.state.level))} energy`}},fillColor(e){return o.gte(m.energy.value,or.evaluate(e.state.level))?"var(--bought)":"var(--locked)"},confirmationLabel(e){return o.gte(m.energy.value,or.evaluate(e.state.level))?{text:"Tap again to confirm"}:{text:"Cannot afford",color:"var(--danger)"}},onClick(e){const t=or.evaluate(e.state.level);o.gte(m.energy.value,t)&&(m.energy.value=o.sub(m.energy.value,t),e.state={...e.state,level:o.add(e.state.level,1)},m.board.selectedAction.value=null)}},Bt,Lt("booster")],canAccept:wr,onDrop:_r,classes:e=>({running:ke(e)}),draggable:!0},Fp={shape:je.Diamond,size:50,title:"\u{1F916}",label:e=>e===m.board.selectedNode.value?{text:e.state.portals.length===0?"Upgrader - Drag a portal to me!":`Auto-Upgrading (${e.state.portals.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:yr(e,t=>`Auto-buy ${ge[t].name}'s upgrades and prestiges`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(4).pow_base(1e6)),Bt,Lt("upgrader")],canAccept:wr,onDrop:_r,classes:e=>({running:ke(e)}),draggable:!0},Op={shape:je.Diamond,size:50,title:"\u{1F9BE}",label:e=>e===m.board.selectedNode.value?{text:e.state.portals.length===0?"Automator - Drag a portal to me!":`Automatating (${e.state.portals.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:yr(e,t=>`Auto-buy ${ge[t].name}'s repeatables and dimensions`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(4).pow_base(1e6)),Bt,Lt("automator")],canAccept:wr,onDrop:_r,classes:e=>({running:ke(e)}),draggable:!0},qp={shape:je.Diamond,size:50,title:"\u{1F4B1}",label:e=>e===m.board.selectedNode.value?{text:e.state.portals.length===0?"Investments - Drag a portal to me!":`Investing (${e.state.portals.length}/${o.add(e.state.maxConnections,m.computedBonusConnectionsModifier.value)})`}:yr(e,t=>`Passively generate ${ge[t].name}'s conversions`),actionDistance:Math.PI/4,actions:[un,_n(e=>e.add(3).pow_base(1e8)),Bt,Lt("investments")],canAccept:wr,onDrop:_r,classes:e=>({running:ke(e)}),draggable:!0},Vp={shape:je.Diamond,size:50,title:"\u{1F5D1}\uFE0F",label:e=>{var t;if(e===m.board.selectedNode.value)return{text:"Trash Can - Drag a portal to me!"};if(((t=m.board.draggingNode.value)==null?void 0:t.type)==="portal"){const n=m.board.draggingNode.value.state.id;return{text:`Delete ${ge[n].name}!`,color:"var(--danger)"}}return null},canAccept:(e,t)=>t.type==="portal",onDrop:(e,t)=>{const n=t.state.id;Xr(ge[n]),delete Z.layers[n],m.board.state.value.nodes=m.board.state.value.nodes.filter(r=>r!==t),m.booster.value&&(m.booster.value.state={...m.booster.value.state,portals:m.booster.value.state.portals.filter(r=>r!==n)}),m.upgrader.value&&(m.upgrader.value.state={...m.upgrader.value.state,portals:m.upgrader.value.state.portals.filter(r=>r!==n)}),m.automator.value&&(m.automator.value.state={...m.automator.value.state,portals:m.automator.value.state.portals.filter(r=>r!==n)}),m.investments.value&&(m.investments.value.state={...m.investments.value.state,portals:m.investments.value.state.portals.filter(r=>r!==n)}),Z.tabs=Z.tabs.filter(r=>r!==n)},draggable:!0},yi=hr(),Bp={mine:Cp,brokenFactory:kp,factory:Mp,resource:Ip,passive:xp,dowsing:$p,quarry:Dp,empowerer:Tp,portalGenerator:Pp,portal:Ap,influence:Rp,booster:Ep,upgrader:Fp,automator:Op,investments:qp,trashCan:Vp},m=Yr("main",function(){const e=Sn(0,"energy"),t=N(()=>h.types.resource.nodes.value.reduce(($,P)=>($[P.state.type]=P,$),{})),n=N(()=>({...h.types.passive.nodes.value.reduce(($,P)=>($[P.state]=P,$),{}),sand:h.types.dowsing.nodes.value[0],wood:h.types.quarry.nodes.value[0],coal:h.types.empowerer.nodes.value[0],iron:h.types.portalGenerator.nodes.value[0],gold:h.types.booster.nodes.value[0],platinum:h.types.upgrader.nodes.value[0],berylium:h.types.automator.nodes.value[0],ultimatum:h.types.investments.nodes.value[0]})),r=N(()=>Object.keys(Rt).filter($=>`${$}Relic`in n.value).length),i=N(()=>({...h.types.influence.nodes.value.reduce(($,P)=>($[P.state.type]=P,$),{})})),a=N(()=>({...h.types.portal.nodes.value.reduce(($,P)=>($[P.state.id]=P,$),{})})),u=N(()=>At.reduce(($,P)=>{var O,H,J;const x=(J=(H=(O=t.value[P])==null?void 0:O.state)==null?void 0:H.amount)!=null?J:0;return $[P]=o.floor(qr.invert(x)),$},{})),l=an({}),c=an({});Wt(()=>{At.forEach($=>{ht(()=>u.value[$],(P,x)=>{const O=o.sub(P,x);o.gt(O,1)&&ie.active===Z.id&&yi.info(d("div",null,[d("h3",null,[o.eq(P,1)?`${rt($)} discovered`:`${rt($)} is now Level ${at(P)}`,_("!")]),o.gt(O,1)?d("div",null,[_("Gained "),at(O),_(" levels")]):null]))})})});const p=N(()=>Q.filter($=>{var P,x;return(x=(P=$.value)==null?void 0:P.state)==null?void 0:x.powered}).length+h.types.portal.nodes.value.filter($=>$.state.powered).length),v=N(()=>{let $=p.value;return n.value.copperRelic!=null&&($--,te("copperRelic")&&$--),$}),g=N(()=>{const $=v.value;return o.lt($,0)?0:o.eq($,0)?10:o.add($,1).pow_base(100).div(10).times(.99)}),b=N(()=>{if(R.value==null)return 0;let P=R.value.state.resources.reduce((x,O)=>o.div(100,Jt[O].computedModifier.value).add(x),o.dZero);return n.value.silverRelic!=null&&(P=o.div(P,o.add(p.value,1)),te("silverRelic")&&(P=o.div(P,o.add(p.value,1)))),P}),h=od($=>({startNodes:()=>[{position:{x:0,y:0},type:"mine",state:{progress:0,powered:!1}},{position:{x:0,y:-200},type:"brokenFactory"}],types:Bp,style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},links(){const P=[];if(P.push(...Object.keys(l).filter(fi(y.value)).map(x=>({startNode:y.value,endNode:t.value[x],stroke:"var(--accent3)",strokeWidth:5}))),C.value!=null&&C.value.state!=null&&P.push({startNode:C.value,endNode:t.value[C.value.state],stroke:"var(--foreground)",strokeWidth:4}),D.value!=null&&D.value.state.resources.forEach(x=>{P.push({startNode:D.value,endNode:t.value[x],stroke:ke(D.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),R.value!=null&&R.value.state.resources.forEach(x=>{P.push({startNode:R.value,endNode:t.value[x],stroke:x in c?"var(--accent3)":"var(--foreground)",strokeWidth:4})}),I.value!=null&&I.value.state.tools.forEach(x=>{P.push({startNode:I.value,endNode:n.value[x],stroke:ke(I.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),E.value!=null){const x=E.value.state;x.tier!=null&&P.push({startNode:E.value,endNode:t.value[x.tier],stroke:"var(--foreground)",strokeWidth:4}),x.influences.forEach(O=>{P.push({startNode:E.value,endNode:i.value[O],stroke:"var(--foreground)",strokeWidth:4})}),$.types.portal.nodes.value.forEach(O=>{const H=ge[O.state.id];return At.filter(fi(O)).forEach(J=>{let Ee;if(H.links.value.includes(J))Ee="var(--accent3)";else if(J in H.resourceMultis.value)Ee="var(--accent1)";else return;P.push({startNode:O,endNode:t.value[J],stroke:ke(O)?Ee:"var(--foreground)",strokeWidth:4})}),P})}return B.value!=null&&B.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{P.push({startNode:B.value,endNode:a.value[x],stroke:ke(B.value)?"var(--accent1)":"var(--foreground)",strokeWidth:4})}),de.value!=null&&de.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{P.push({startNode:de.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),ue.value!=null&&ue.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{P.push({startNode:ue.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),ae.value!=null&&ae.value.state.portals.filter(x=>a.value[x]!=null).forEach(x=>{P.push({startNode:ae.value,endNode:a.value[x],stroke:"var(--foreground)",strokeWidth:4})}),Object.values(i.value).forEach(x=>{const O=x.state;(O.type==="increaseResources"||O.type==="decreaseResources")&&O.data.forEach(H=>{P.push({startNode:x,endNode:t.value[H],stroke:"var(--foreground)",strokeWidth:4})})}),P}})),y=N(()=>h.types.mine.nodes.value[0]),C=N(()=>h.types.factory.nodes.value[0]),D=N(()=>n.value.sand),R=N(()=>n.value.wood),I=N(()=>n.value.coal),E=N(()=>n.value.iron),B=N(()=>n.value.gold),de=N(()=>n.value.platinum),ue=N(()=>n.value.berylium),ae=N(()=>n.value.ultimatum),Q=[y,D,R,I,B,de,ue,ae];function Ie($,P){let x=t.value[$];if(P=o.times(P,En[$].computedModifier.value),x==null)x={id:Dn(h),position:{...y.value.position},type:"resource",state:{type:$,amount:P}},h.placeInAvailableSpace(x),h.nodes.value.push(x);else{const O=x.state;x.state={...O,amount:o.add(O.amount,P)}}}const be=N(()=>Object.keys($t).reduce(($,P)=>$+new o(Jt[P].computedModifier.value).toNumber(),0)),U=N(()=>{const $={};return h.types.portal.nodes.value.forEach(P=>{if(!ke(P))return;const O=ge[P.state.id].resourceMultis.value;Object.keys(O).forEach(H=>{$[H]!=null?$[H]=o.times($[H],O[H]):$[H]=O[H]})}),$}),ye=Ct(()=>At.map($=>Gt(()=>({description:()=>rt($),addend:()=>u.value[$],enabled:()=>o.gt(u.value[$],0)})))),ze=N(()=>ye.apply(0)),pt=Ct(()=>[Gt(()=>({addend:ze,description:"Resource Levels"})),Ce(()=>({multiplier:()=>o.pow(Rn.value,ze.value),description:()=>`${Ut(Rn.value,3)}x per Resource Level`})),Ce(()=>({multiplier:()=>te("stone")?4:2,description:()=>(te("stone")?"Empowered ":"")+Le.stone.name,enabled:()=>n.value.stone!=null})),Ce(()=>({multiplier:()=>{var $;return($=U.value.energy)!=null?$:1},description:"Planar Treasures",enabled:()=>{var $;return o.neq(($=U.value.energy)!=null?$:1,1)}})),Gt(()=>({addend:()=>o.pow(100,v.value).div(10).neg(),description:"Powered Machines (100^n/10 energy/s)",enabled:()=>o.gt(v.value,0)}))]),zt=N(()=>pt.apply(0)),ft=Ct(()=>[Gt(()=>({addend:()=>te("unobtainium")?2:1,description:()=>(te("unobtainium")?"Empowered ":"")+Le.unobtainium.name,enabled:()=>n.value.unobtainium!=null}))]),Mt=N(()=>ft.apply(0)),tr=Ct(()=>[Ce(()=>({multiplier:()=>te("dirt")?4:2,description:()=>(te("dirt")?"Empowered ":"")+Le.dirt.name,enabled:()=>n.value.dirt!=null})),Ce(()=>({multiplier:()=>o.pow(r.value,te("woodRelic")?2:1),description:()=>(te("woodRelic")?"Empowered ":"")+Rt.wood,enabled:()=>n.value.woodRelic!=null}))]),Mr=N(()=>tr.apply(1)),Nn=Ct(()=>[Ce(()=>({multiplier:()=>te("gravel")?4:2,description:()=>(te("gravel")?"Empowered ":"")+Le.gravel.name,enabled:()=>n.value.gravel!=null}))]),nr=N(()=>Nn.apply(1)),An=Ct(()=>[Gt(()=>({addend:()=>te("copper")?.004:.002,description:()=>(te("copper")?"Empowered ":"")+Le.copper.name,enabled:()=>n.value.copper!=null}))]),Rn=N(()=>An.apply(1.01)),Jt=Object.keys($t).reduce(($,P)=>{const x=Ct(()=>[Ce(()=>({multiplier:2,description:"Dowsing",enabled:()=>D.value!=null&&ke(D.value)&&D.value.state.resources.includes(P)}))]),O=N(()=>x.apply($t[P])),H={title:`${rt(P)} Drop Rate`,modifier:x,base:$t[P]};return $[P]={modifier:x,computedModifier:O,section:H},$},{}),En=Object.keys($t).reduce(($,P)=>{const x=Ct(()=>[Ce(()=>({multiplier:()=>{var J;return(J=U.value[P])!=null?J:1},description:"Planar Treasures",enabled:()=>{var J;return o.neq((J=U.value[P])!=null?J:1,1)}}))]),O=N(()=>x.apply(1)),H={title:`${rt(P)} Gain`,modifier:x};return $[P]={modifier:x,computedModifier:O,section:H},$},{}),rr=N(()=>{var P,x,O;const $=At.indexOf((O=(x=(P=E.value)==null?void 0:P.state)==null?void 0:x.tier)!=null?O:"dirt");return o.add($,1).times($).div(2).add(9).pow10()}),ir=Ct(()=>[...Object.keys(vt).map($=>Ce(()=>({multiplier:vt[$].cost,description:vt[$].display,enabled:()=>{var P,x,O;return(O=(x=(P=E.value)==null?void 0:P.state)==null?void 0:x.influences.includes($))!=null?O:!1},smallerIsBetter:!0}))),Ce(()=>({multiplier:()=>te("emeraldRelic")?.05:.1,description:()=>(te("emeraldRelic")?"Empowered ":"")+Rt.emerald,enabled:()=>n.value.emeraldRelic!=null,smallerIsBetter:!0}))]),Ye=N(()=>ir.apply(rr.value)),[Sr,Ir]=zn(()=>[{title:"Resource Levels",modifier:ye,base:0},{title:"Energy Gain",modifier:pt,base:0,unit:"/s"},{title:"Portal Cost",modifier:ir,base:rr,unit:" energy",baseText:()=>{var $,P,x;return`${rt((x=(P=($=E.value)==null?void 0:$.state)==null?void 0:P.tier)!=null?x:"dirt")}-tier Base Cost`},visible:()=>E.value!=null,smallerIsBetter:!0},{title:"Bonus Connections",modifier:ft,base:0,visible:()=>o.gt(Mt.value,0)}]),[V,j]=zn(()=>[{title:"Mining Speed",modifier:tr,base:1,unit:"/s",visible:()=>n.value.dirt!=null},{title:"Ore Dropped",modifier:Nn,base:1,visible:()=>n.value.gravel!=null},{title:"Material Level Effect",modifier:An,base:1.01,visible:()=>n.value.copper!=null}]),[$e,tt]=zn(()=>Object.values(Jt).map($=>$.section)),[Cn,ut]=zn(()=>Object.values(En).map($=>$.section)),gt=Hi({general:()=>({display:"General",glowColor(){return gt.activeTab.value===this.tab?"white":""},tab:Sr,energyTabCollapsed:Ir}),mining:()=>({display:"Mine",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>Object.keys(n.value).length>0,tab:V,miningTabCollapsed:j}),resources:()=>({display:"Ore Rates",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>D.value!=null,tab:$e,resourcesCollapsed:tt}),resourcesGain:()=>({display:"Ore Gain",glowColor(){return gt.activeTab.value===this.tab?"white":""},visibility:()=>Object.values(En).some($=>o.neq($.computedModifier.value,1)),tab:Cn,resourceGainCollapsed:ut})}),St=G(!1),Kt=z(()=>d(Vt,{modelValue:St.value,"onUpdate:modelValue":$=>St.value=$},{header:()=>d("h2",null,[_("Modifiers")]),body:()=>st(gt)})),Ze={mine:Od(),factory:qd(),dowsing:Vd(),quarry:Bd(),empowerer:Ld(),portalGenerator:jd(),booster:zd(),upgrader:Gd(),automator:Ud(),investments:Wd()};Ze.mine.showModal[Yt]=!0,Ze.mine.showModal.value=!0,this.on("preUpdate",$=>{if(Object.keys(l).forEach(P=>{l[P]-=$,l[P]<=0&&delete l[P]}),Object.keys(c).forEach(P=>{c[P]-=$,c[P]<=0&&delete c[P]}),ke(y.value)){const P=o.add(y.value.state.progress,o.times(Mr.value,$)),x=P.floor();y.value.state={...y.value.state,progress:o.sub(P,x)};const O=x.div(be.value).floor();O.gt(0)&&At.forEach(J=>{Ie(J,o.times(new o(Jt[J].computedModifier.value).toNumber(),O).times(nr.value)),l[J]=.3});const H=o.sub(x,O).toNumber();for(let J=0;J0){let O=o.add(P,$);const H=o.div(P,b.value).floor();O=o.sub(O,o.times(H,b.value)),R.value.state={...R.value.state,progress:O},o.gt(H,0)&&x.forEach(J=>{Ie(J,H),c[J]=.3})}}e.value=o.add(e.value,o.times(zt.value,$)),o.lt(e.value,0)&&(e.value=0,Q.forEach(P=>{var x;((x=P.value)==null?void 0:x.state).powered=!1}),Object.values(a.value).forEach(P=>{P.state.powered=!1}),y.value.state={...y.value.state,powered:!1},yi.warning(d("div",null,[d("h3",null,[_("Ran out of energy!")]),d("div",null,[_("All machines have been turned off.")])])))});const Pt=N(()=>{var $,P;return h.selectedAction.value===h.types.brokenFactory.actions[0]?-100:h.selectedAction.value===h.types.factory.actions[1]?o.neg(Le[h.selectedNode.value.state].cost):(($=h.selectedAction.value)==null?void 0:$.id)==="moreConnections"?o.neg(h.selectedAction.value.formula.evaluate(((P=h.selectedNode.value)==null?void 0:P.state).maxConnections)):0}),cn=mn(f.variable(0).add(e),()=>o.neq(Pt.value,0),Pt),ar=N(()=>{var $;return h.selectedAction.value===Bt?(($=h.selectedNode.value)==null?void 0:$.state).powered?o.eq(p.value,1)?10:o.pow(100,p.value).div(10).times(.99):o.neg(g.value):0}),Fn=mn(f.variable(0).add(zt),()=>o.neq(ar.value,0),ar),dn=N(()=>h.types.portal.nodes.value.filter($=>ke($))),xr=N(()=>dn.value.sort(($,P)=>{var H,J;const x=(H=ge[$.state.id])!=null&&H.minimized.value?1:0,O=(J=ge[P.state.id])!=null&&J.minimized.value?1:0;return x-O}).map($=>$.state.id));return ht(xr,$=>{Wt(()=>{Z.tabs=["main",...$]})}),ht(Mt,($,P)=>{o.lt($,P)&&(gn($,D,"resources"),gn($,R,"resources"),gn($,I,"tools"),gn($,B,"portals"),gn($,de,"portals"),gn($,ue,"portals"),gn($,ae,"portals"))}),{name:"World",board:h,energy:e,modifierTabs:gt,resourceNodes:t,toolNodes:n,influenceNodes:i,grantResource:Ie,activePortals:dn,nextPowerCost:g,computedBonusConnectionsModifier:Mt,quarryProgressRequired:b,dropRates:Jt,dowsing:D,empowerer:I,booster:B,upgrader:de,automator:ue,investments:ae,resourceLevels:u,planarMultis:U,computedPortalCost:Ye,helpModals:Ze,display:z(()=>d(ne,null,[d(mr,{class:"nav-container"},{default:()=>[d("span",{class:"nav-segment"},[d("h2",{style:"color: white; text-shadow: 0px 0px 10px white;"},[st(cn)])," ",_("energy")]),d("span",{class:"nav-segment"},[_("("),d("h3",{style:"color: white; text-shadow: 0px 0px 10px white;"},[o.gt(zt.value,0)?"+":"",st(Fn)]),_("/s)")]),o.gt(p.value,0)?d("span",{class:"nav-segment"},[d("h3",{style:"color: var(--accent1); text-shadow: 0px 0px 10px var(--accent1);"},[at(p.value)])," ",o.eq(p.value,1)?"machine":"machines"," ",_("powered")]):null,d("span",{class:"nav-segment"},[d("button",{class:"button",style:"display: inline",onClick:()=>St.value=!0},[_("modifiers")])]),Z.devSpeed===0?d("span",{class:"nav-segment"},[_("Game Paused")]):Z.devSpeed!=null&&Z.devSpeed!==1?d("span",{class:"nav-segment"},[_("Dev Speed: "),xe(Z.devSpeed),_("x")]):null]}),st(h),st(Kt),Object.values(Ze).map(({modal:$})=>$())]))}});Ke.on("loadSettings",e=>{le(e,"lineVisibility",!0)});Ai(z(()=>d(It,{title:z(()=>d("span",{class:"option-title"},[_("Always show lines to resource nodes"),d("desc",null,[_("Otherwise, will only be visible when either end of the line is selected.")])])),modelValue:ie.lineVisibility,"onUpdate:modelValue":e=>ie.lineVisibility=e},null)));const Lp=e=>{var n,r,i,a,u;const t=[m];return(u=(a=(i=(r=(n=e.layers)==null?void 0:n.main)==null?void 0:r.board)==null?void 0:i.state)==null?void 0:a.nodes)==null||u.filter(l=>(l==null?void 0:l.type)==="portal").map(l=>{var c,p;return(p=(c=l==null?void 0:l.state)==null?void 0:c.id)!=null?p:""}).forEach(l=>{var p,v,g,b;const c=(p=e.layers)==null?void 0:p[l];t.push(na(l,(v=c.tier)!=null?v:"dirt",(g=c.seed)!=null?g:Math.floor(Math.random()*4294967296),(b=c.influences)!=null?b:[]))}),t},ti=G(!1);function jp(e,t){}var zp=Object.freeze(Object.defineProperty({__proto__:null,main:m,getInitialLayers:Lp,hasWon:ti,fixOldSave:jp},Symbol.toStringTag,{value:"Module"}));const er=e=>(on("data-v-4a50ce42"),e=e(),ln(),e),Gp={class:"game-over-modal-header"},Up=["src","alt"],Wp={class:"game-over-modal-title"},Hp=er(()=>k("h2",null,"Congratulations!",-1)),Yp={key:0},Zp=er(()=>k("br",null,null,-1)),Xp=er(()=>k("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Jp=er(()=>k("br",null,null,-1)),Kp=["href"],Qp=er(()=>k("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),ef=X({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:a,versionTitle:u}=he,l=N(()=>br(Z.timePlayed)),c=N(()=>ti.value&&!Z.keepGoing),p=Ht(Z,"autosave");function v(){Z.keepGoing=!0}function g(){vn(xn())}return(b,h)=>(M(),re(Vt,{"model-value":s(c)},{header:Y(()=>[k("div",Gp,[s(n)?(M(),T("img",{key:0,class:"game-over-modal-logo",src:s(n),alt:s(t)},null,8,Up)):L("",!0),k("div",Wp,[Hp,k("h4",null,"You've beaten "+ee(s(t))+" v"+ee(s(a))+": "+ee(s(u)),1)])])]),body:Y(({shown:y})=>[y?(M(),T("div",Yp,[k("div",null,"It took you "+ee(s(l))+" to beat the game.",1),Zp,Xp,Jp,k("div",null,[k("a",{href:s(i),class:"game-over-modal-discord-link"},[Qp,_(" "+ee(s(r)),1)],8,Kp)]),d(It,{title:"Autosave",modelValue:s(p),"onUpdate:modelValue":h[0]||(h[0]=C=>qe(p)?p.value=C:null)},null,8,["modelValue"])])):L("",!0)]),footer:Y(()=>[k("div",{class:"game-over-footer"},[k("button",{onClick:v,class:"button"},"Keep Going"),k("button",{onClick:g,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var tf=ve(ef,[["__scopeId","data-v-4a50ce42"]]);const kr=e=>(on("data-v-2776d67d"),e=e(),ln(),e),nf=kr(()=>k("div",{class:"nan-modal-header"},[k("h2",null,"NaN value detected!")],-1)),rf={key:0},af=kr(()=>k("br",null,null,-1)),sf=["href"],of=kr(()=>k("span",{class:"material-icons nan-modal-discord"},"discord",-1)),lf=kr(()=>k("br",null,null,-1)),uf={class:"nan-footer"},cf=X({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=he,r=G(!0),i=G(!0),a=Ht(Re,"hasNaN"),u=G(null);ht(a,b=>{b?(r.value=Z.autosave,i.value=Z.devSpeed===0):(Z.autosave=r.value,Z.devSpeed=i.value?0:null)});const l=N(()=>{var b;return(b=Re.NaNPath)==null?void 0:b.join(".")}),c=N(()=>Re.NaNPersistent!=null?Re.NaNPersistent.value:null);function p(){Re.NaNPersistent!=null&&(Re.NaNPersistent.value=new o(0),Re.hasNaN=!1)}function v(){Re.NaNPersistent&&(Re.NaNPersistent.value=new o(1),Re.hasNaN=!1)}function g(){Re.NaNPersistent&&(Re.NaNPersistent.value=new o(NaN),Re.hasNaN=!1)}return(b,h)=>(M(),T(ne,null,[d(Vt,Ot({modelValue:s(a),"onUpdate:modelValue":h[4]||(h[4]=y=>qe(a)?a.value=y:null)},b.$attrs),{header:Y(()=>[nf]),body:Y(()=>[k("div",null,[_(' Attempted to assign "'+ee(s(l))+'" to NaN',1),s(c)?(M(),T("span",rf,ee(" ")+"(previously "+ee(s(xe)(s(c)))+")",1)):L("",!0),_(". Auto-saving has been "+ee(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),af,k("div",null,[k("a",{href:s(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[of,_(" "+ee(s(t)||"The Paper Pilot Community"),1)],8,sf)]),lf,d(It,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=y=>r.value=y)},null,8,["modelValue"]),s(he).enablePausing?(M(),re(It,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=y=>i.value=y)},null,8,["modelValue"])):L("",!0)]),footer:Y(()=>[k("div",uf,[k("button",{onClick:h[2]||(h[2]=y=>{var C;return(C=u.value)==null?void 0:C.open()}),class:"button"},"Open Saves Manager"),k("button",{onClick:p,class:"button"},"Set to 0"),k("button",{onClick:v,class:"button"},"Set to 1"),s(c)&&s(o).neq(s(c),0)&&s(o).neq(s(c),1)?(M(),T("button",{key:0,onClick:h[3]||(h[3]=y=>a.value=!1),class:"button"}," Set to previous ")):L("",!0),k("button",{onClick:g,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),d(zi,{ref_key:"savesManager",ref:u},null,512)],64))}});var df=ve(cf,[["__scopeId","data-v-2776d67d"]]);const pf={key:0,class:"tpsDisplay"},ff=X({__name:"TPS",setup(e){const t=N(()=>o.div(Re.lastTenTicks.length,Re.lastTenTicks.reduce((n,r)=>n+r,0)));return(n,r)=>s(t).isNan()?L("",!0):(M(),T("div",pf,"TPS: "+ee(s(at)(s(t))),1))}});var gf=ve(ff,[["__scopeId","data-v-89b89152"]]);var mf=X({__name:"App",setup(e){const t=he.useHeader,n=N(()=>kt[ie.theme].variables),r=Ht(ie,"showTPS"),i=Ht(Re,"errors"),a=N(()=>fe(z(()=>d(ne,null,[qs.map(st)]))));return(u,l)=>s(i).length>0?(M(),T("div",{key:0,class:"error-container",style:Be(s(n))},[d(ki,{errors:s(i)},null,8,["errors"])],4)):(M(),T(ne,{key:1},[k("div",{id:"modal-root",style:Be(s(n))},null,4),k("div",{class:Ne(["app",{useHeader:s(t)}]),style:Be(s(n))},[s(t)?(M(),re(Gi,{key:0})):L("",!0),d(xc),s(s(r))?(M(),re(gf,{key:1})):L("",!0),d(tf),d(df),(M(),re(Je(s(a))))],6)],64))}});var vf=ve(mf,[["__scopeId","data-v-bf4e22ac"]]);function hf(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:a,onRegisterError:u}=e;let l,c,p,v;const g=async(h=!0)=>{await p,h&&(l==null||l.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),await(v==null?void 0:v())};async function b(){if("serviceWorker"in navigator){const{Workbox:h,messageSW:y}=await Un(()=>import("./workbox-window.4a8794bb.js"),[]);v=async()=>{c&&c.waiting&&await y(c.waiting,{type:"SKIP_WAITING"})},l=new h("./sw.js",{scope:"./",type:"classic"}),l.addEventListener("activated",C=>{C.isUpdate||r==null||r()});{const C=()=>{n==null||n()};l.addEventListener("waiting",C),l.addEventListener("externalwaiting",C)}l.register({immediate:t}).then(C=>{c=C,a?a("./sw.js",C):i==null||i(C)}).catch(C=>{u==null||u(C)})}}return p=b(),g}function bf(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:a,onRegisterError:u}=e,l=G(!1),c=G(!1);return{updateServiceWorker:hf({immediate:t,onNeedRefresh(){l.value=!0,n==null||n()},onOfflineReady(){c.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:a,onRegisterError:u}),offlineReady:c,needRefresh:l}}const yf=console.error;console.error=function(...e){yf(...e)};window.onerror=function(e,t,n,r,i){return Re.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),!0};window.onunhandledrejection=function(e){Re.errors.push(e.reason instanceof Error?e.reason:new Error(JSON.stringify(e.reason)))};document.title=he.title;window.projInfo=he;he.id===""&&console.error("Project ID is empty!","Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c +Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await As();const{globalBus:e}=await Un(()=>Promise.resolve().then(function(){return Ps}),void 0),{startGameLoop:t}=await Un(()=>import("./gameLoop.f63e9d55.js"),["assets/gameLoop.f63e9d55.js","assets/@fontsource.f66d05e7.css","assets/vue.c16a309b.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6b211d3c.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.ded54c4a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.1879de79.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.8ce6f9b1.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.9c2dad53.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=ma(vf);n.config.errorHandler=function(r,i,a){console.error(r,a,i)},e.emit("setupVue",n),n.mount("#app"),Wt(()=>{const r=hr(),{updateServiceWorker:i}=bf({onNeedRefresh(){r.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(()=>a.update(),60*60*1e3)}})}),t()});export{o as D,Un as _,Re as a,he as b,zp as c,Ke as g,Rs as l,Z as p,ie as s}; diff --git a/planar/index.html b/planar/index.html index 11ac6274..ffc101a1 100644 --- a/planar/index.html +++ b/planar/index.html @@ -10,10 +10,10 @@ - Profectus - - - + Planar Pioneers + + + @@ -31,7 +31,7 @@ - + diff --git a/planar/sw.js b/planar/sw.js index a8dec9c5..09c8b368 100644 --- a/planar/sw.js +++ b/planar/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let a={};const o=e=>i(e,r),u={module:{uri:r},exports:a,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6b211d3c.js",revision:null},{url:"assets/amator.1e5a40c8.js",revision:null},{url:"assets/bezier-easing.a990b400.js",revision:null},{url:"assets/gameLoop.737eab91.js",revision:null},{url:"assets/index.85fc03ab.css",revision:null},{url:"assets/index.cfd83ced.js",revision:null},{url:"assets/lz-string.dccec454.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/ngraph.events.083734c6.js",revision:null},{url:"assets/panzoom.30c56ba6.js",revision:null},{url:"assets/sortablejs.a0f68e5e.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.ded54c4a.js",revision:null},{url:"assets/vue-panzoom.8ce6f9b1.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.9c2dad53.js",revision:null},{url:"assets/vue.c16a309b.js",revision:null},{url:"assets/vuedraggable.1879de79.js",revision:null},{url:"assets/wheel.f2ae740f.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"793cf0933c2cb7d79e00a407c9d8c9fe"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"e1e419fec40e2d042566c11fe4bce322"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let o={};const a=e=>i(e,r),u={module:{uri:r},exports:o,require:a};s[r]=Promise.all(n.map((e=>u[e]||a(e)))).then((e=>(l(...e),o)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6b211d3c.js",revision:null},{url:"assets/amator.1e5a40c8.js",revision:null},{url:"assets/bezier-easing.a990b400.js",revision:null},{url:"assets/gameLoop.f63e9d55.js",revision:null},{url:"assets/index.bebdc1b9.css",revision:null},{url:"assets/index.ffd22707.js",revision:null},{url:"assets/lz-string.dccec454.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/ngraph.events.083734c6.js",revision:null},{url:"assets/panzoom.30c56ba6.js",revision:null},{url:"assets/sortablejs.a0f68e5e.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.ded54c4a.js",revision:null},{url:"assets/vue-panzoom.8ce6f9b1.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.9c2dad53.js",revision:null},{url:"assets/vue.c16a309b.js",revision:null},{url:"assets/vuedraggable.1879de79.js",revision:null},{url:"assets/wheel.f2ae740f.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"32ab91c21f1271718e66404f9148b8b4"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"e1e419fec40e2d042566c11fe4bce322"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); diff --git a/projects/babble/index.html b/projects/babble/index.html index 6545b2a3..f9ad6703 100644 --- a/projects/babble/index.html +++ b/projects/babble/index.html @@ -7,7 +7,7 @@ - + @@ -21,8 +21,8 @@
On this page

Babble Buds

Babble Buds Homepage

Source Code:

Babble buds is a free, open-source virtual puppet show software. It is heavily based on the non-public software called "Puppet Pals", used in URealms Live. The software is written in javascript using React, a rendering library called PIXI.js, and electron.

Users can create puppets with different faces for different emotions, and then use the puppet on a stage where you and other users can each make your respective puppets move, change emotions, and "babble" at each other. The stage has a green screen feature and can be popped out, which gives the users tons of possibilities in terms of using the program for a role-playing live stream, faux video chatting with friends, game development, or whatever else you want!

Users can connect to the public server and create private rooms so that they and their friends can see each other's puppets and use the software however they please. For the security conscious, you can also use the server's source code to self-host your private server.

Babble Buds Screenshot

Engine

The engine originally made to make the Babble Buds program was separated into a separate engine called babble.js, so that projects created in Babble Buds can be used in other projects. For example, a game can create puppets in Babble Buds and then use them for cutscenes or player agency inside of the game. Additionally, it has been ported to C# (called babble.cs) for use with Unity, for the same kinds of purposes. You can check out Tower Offense for a pixi.js game using Babble Buds puppets for the cutscenes, or Dice Armor for a unity game using Babble Buds puppets for the cutscenes.

Babble Movie Maker

Babble Movie Maker is a cutscene editor for Babble Buds puppets. You open a babble buds project in it, and you can add actors to a stage and have them move and change expressions, etc., on a timeline. You can then use the cutscene in a game using babble.js or babble.cs, or export the cutscene into a video file. There is even support for defining custom commands with custom fields, so that if you've expanded upon the default actions provided in babble.js or babble.cs, you can still use Movie Maker to create your cutscenes.

Babble MM Screenshot

- +
On this page

Babble Buds

Babble Buds Homepage

Source Code:

Babble buds is a free, open-source virtual puppet show software. It is heavily based on the non-public software called "Puppet Pals", used in URealms Live. The software is written in javascript using React, a rendering library called PIXI.js, and electron.

Users can create puppets with different faces for different emotions, and then use the puppet on a stage where you and other users can each make your respective puppets move, change emotions, and "babble" at each other. The stage has a green screen feature and can be popped out, which gives the users tons of possibilities in terms of using the program for a role-playing live stream, faux video chatting with friends, game development, or whatever else you want!

Users can connect to the public server and create private rooms so that they and their friends can see each other's puppets and use the software however they please. For the security conscious, you can also use the server's source code to self-host your private server.

Babble Buds Screenshot

Engine

The engine originally made to make the Babble Buds program was separated into a separate engine called babble.js, so that projects created in Babble Buds can be used in other projects. For example, a game can create puppets in Babble Buds and then use them for cutscenes or player agency inside of the game. Additionally, it has been ported to C# (called babble.cs) for use with Unity, for the same kinds of purposes. You can check out Tower Offense for a pixi.js game using Babble Buds puppets for the cutscenes, or Dice Armor for a unity game using Babble Buds puppets for the cutscenes.

Babble Movie Maker

Babble Movie Maker is a cutscene editor for Babble Buds puppets. You open a babble buds project in it, and you can add actors to a stage and have them move and change expressions, etc., on a timeline. You can then use the cutscene in a game using babble.js or babble.cs, or export the cutscene into a video file. There is even support for defining custom commands with custom fields, so that if you've expanded upon the default actions provided in babble.js or babble.cs, you can still use Movie Maker to create your cutscenes.

Babble MM Screenshot

+ diff --git a/projects/citadel/index.html b/projects/citadel/index.html index abe51aae..285d0aaf 100644 --- a/projects/citadel/index.html +++ b/projects/citadel/index.html @@ -7,7 +7,7 @@ - + @@ -21,8 +21,8 @@
On this page

Capture the Citadel

A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.

For more details, visit Grant's page on the game.

Screenshot

- +
On this page

Capture the Citadel

A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee for their VR class in college's final project.

For more details, visit Grant's page on the game.

Screenshot

+ diff --git a/projects/dice/index.html b/projects/dice/index.html index 06082dc1..37144ae8 100644 --- a/projects/dice/index.html +++ b/projects/dice/index.html @@ -7,7 +7,7 @@ - + @@ -21,8 +21,8 @@
On this page

Dice Armor

Download Here

Dice Armor is a game that started development as a semester-long project by a team of nine: a producer, a creative director, a narrative writer, an artist, two programmers, and 3 game designers. The information here is about my contributions as the lead programmer over the semester because I can show off stuff like the editor scripts I wrote. I was doing everything from interface coding, editor scripts, integrating Babble Buds, and of course, everything related to the gameplay itself. To date I'm still the lead programmer for the game; for more up-to-date information on the current state of the game please visit the official site.

The build available here was created for showing off at the end of the semester, and as such has some buttons present to make the game easier to skip parts of the game to see all the content: You start with all the dice in the game already in the shop, there's a button to give yourself free money to buy these dice with, and in the duel, there are buttons to force a win or a loss, which can be used to skip the tutorial (not recommended for first-time players).

Tutorial

Dice Armor is a dice dueling game. Players can use abilities, flip dice, and attack each other to win in a dice game that puts chance into the hands of the players. This is what the dueling scene looks like, with a tutorial cutscene happening on top to guide the player through the basics. Also, all the dice are constructed dynamically, using quaternion math to figure out the placement of each component relative to the face it is going on. The die in the middle has one of the player' and opponents' portraits on each of its sides.

Editors

For many of the objects I've created, I've made scriptable objects so that game designers can add and modify them easily. Additionally, I would create custom inspectors for the objects to help make them as easy to understand and edit as possible. The opponent's artificial intelligence is made up of many strategies, in a prioritized list. When it is the opponents' turn they go through each strategy and check if they can be run, and if so then the opponent performs the strategy and starts back over at the top of the list of strategies. The + sign under the list of strategies opens an organized dropdown of all the various strategies.

Simulator

In addition to custom inspector code, I've created new tools for the editor for our game designers to use. This is a duel simulator that will take two opponents and simulate an arbitrary number of duels between them, and output the results and summarize them for you, much much quicker than manually going through the duels, even with an absurdly high timeScale. This will become incredibly useful in making balance changes and testing new dice against existing sets. This is a screenshot of it in edit mode, but in play mode it removes the "Dueling Managers" field and will use whatever the current duel balance settings are, allowing for the GDs to test freely in play mode without worrying about undoing all their changes afterward.

Cutscene

I created the Babble Buds puppet editor and ported the rendering library I wrote for it to C# so it could be used in Unity. Dice Armor has a full campaign using cutscenes made using the Babble Buds cutscene editor, taking advantage of its support for custom commands and fields to control things like talking, giving the player dice and money, starting duels, and controlling player progression through the story.

Action Wheel

When a cutscene ends, its final command is to either start a duel or set the next cutscene in the story. In the latter case, there is an additional field for what to call the next cutscene, and what location it takes place. The cutscene is then added to the player's save file, and when they visit the city locations are greyed out until they have at least one action to do there. Each location has a dynamically populated action wheel with a custom range of acceptable angles.

Shop

The dice shop is dynamically populated by a list of dice available to the player, which can be changed during cutscenes, and is checked against the dice owned by the player to generate sold-out indicators. On the left, the player can choose to filter the options down to a single dice effect, which also updates the "Buy All" button to buy only all the dice in the current filter.

Inventory

The inventory works most the same as the shop, but for equipping dice. It also allows you to drag individual dice or entire sets to the equipped dice glyph. While dragging it will highlight all the slots the new dice will be equipped into.

Dice Rolling

The dice rolling uses the physics engine and detects once the dice have stopped moving, then determines which side is face up based on which of the normals is closest to straight up. It flags the die as cocked if that smallest angle is above a threshold. The dice sink into the table when not rolling to not interfere with any dice that are rolling.

Missile Storm

During certain events like winning the game or having the face of a die broken, the players' portraits will flash an emotion for a second. After winning, a random living die from the winning player is chosen to play their "finisher move", a flashy and dramatic effect to end the game. Shown is the arcane mechana's finisher, "Missile Storm".

- +
On this page

Dice Armor

Download Here

Dice Armor is a game that started development as a semester-long project by a team of nine: a producer, a creative director, a narrative writer, an artist, two programmers, and 3 game designers. The information here is about my contributions as the lead programmer over the semester because I can show off stuff like the editor scripts I wrote. I was doing everything from interface coding, editor scripts, integrating Babble Buds, and of course, everything related to the gameplay itself. To date I'm still the lead programmer for the game; for more up-to-date information on the current state of the game please visit the official site.

The build available here was created for showing off at the end of the semester, and as such has some buttons present to make the game easier to skip parts of the game to see all the content: You start with all the dice in the game already in the shop, there's a button to give yourself free money to buy these dice with, and in the duel, there are buttons to force a win or a loss, which can be used to skip the tutorial (not recommended for first-time players).

Tutorial

Dice Armor is a dice dueling game. Players can use abilities, flip dice, and attack each other to win in a dice game that puts chance into the hands of the players. This is what the dueling scene looks like, with a tutorial cutscene happening on top to guide the player through the basics. Also, all the dice are constructed dynamically, using quaternion math to figure out the placement of each component relative to the face it is going on. The die in the middle has one of the player' and opponents' portraits on each of its sides.

Editors

For many of the objects I've created, I've made scriptable objects so that game designers can add and modify them easily. Additionally, I would create custom inspectors for the objects to help make them as easy to understand and edit as possible. The opponent's artificial intelligence is made up of many strategies, in a prioritized list. When it is the opponents' turn they go through each strategy and check if they can be run, and if so then the opponent performs the strategy and starts back over at the top of the list of strategies. The + sign under the list of strategies opens an organized dropdown of all the various strategies.

Simulator

In addition to custom inspector code, I've created new tools for the editor for our game designers to use. This is a duel simulator that will take two opponents and simulate an arbitrary number of duels between them, and output the results and summarize them for you, much much quicker than manually going through the duels, even with an absurdly high timeScale. This will become incredibly useful in making balance changes and testing new dice against existing sets. This is a screenshot of it in edit mode, but in play mode it removes the "Dueling Managers" field and will use whatever the current duel balance settings are, allowing for the GDs to test freely in play mode without worrying about undoing all their changes afterward.

Cutscene

I created the Babble Buds puppet editor and ported the rendering library I wrote for it to C# so it could be used in Unity. Dice Armor has a full campaign using cutscenes made using the Babble Buds cutscene editor, taking advantage of its support for custom commands and fields to control things like talking, giving the player dice and money, starting duels, and controlling player progression through the story.

Action Wheel

When a cutscene ends, its final command is to either start a duel or set the next cutscene in the story. In the latter case, there is an additional field for what to call the next cutscene, and what location it takes place. The cutscene is then added to the player's save file, and when they visit the city locations are greyed out until they have at least one action to do there. Each location has a dynamically populated action wheel with a custom range of acceptable angles.

Shop

The dice shop is dynamically populated by a list of dice available to the player, which can be changed during cutscenes, and is checked against the dice owned by the player to generate sold-out indicators. On the left, the player can choose to filter the options down to a single dice effect, which also updates the "Buy All" button to buy only all the dice in the current filter.

Inventory

The inventory works most the same as the shop, but for equipping dice. It also allows you to drag individual dice or entire sets to the equipped dice glyph. While dragging it will highlight all the slots the new dice will be equipped into.

Dice Rolling

The dice rolling uses the physics engine and detects once the dice have stopped moving, then determines which side is face up based on which of the normals is closest to straight up. It flags the die as cocked if that smallest angle is above a threshold. The dice sink into the table when not rolling to not interfere with any dice that are rolling.

Missile Storm

During certain events like winning the game or having the face of a die broken, the players' portraits will flash an emotion for a second. After winning, a random living die from the winning player is chosen to play their "finisher move", a flashy and dramatic effect to end the game. Shown is the arcane mechana's finisher, "Missile Storm".

+ diff --git a/projects/index.html b/projects/index.html index 6417ac18..600febe4 100644 --- a/projects/index.html +++ b/projects/index.html @@ -7,7 +7,7 @@ - + @@ -22,7 +22,7 @@
On this page

Games!

I make games regularly! Check them out in the sidebar or on my itch.io page.

Profectus!

I contributed to a modding framework called The Modding Tree and then made Profectus as an alternative that gives developers more control. Profectus is a game engine for the web that uses TS and Vue.

V-ecs!

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

OptiSpeech!

I led a team updating a legacy Unity project for research on speech therapy to use a modern version with a focus on extensibility to facilitate future maintenance and features.

Babble Buds!

Babble Buds is a free, open-source virtual puppet show engine I made for various platforms including HTLM5 and Unity, as well as an accompanying electron-based puppet editor and multiplayer stage.

Dice Armor

I was the lead programmer on a team of nine creating this game in a semester-long college course. I programmed all the gameplay systems as well as incorporated Babble Buds for the cutscenes and tutorial.

Capture the Citadel

A 3D VR re-envisioning of a Slay the Spire-style game by Anthony Lawn and Grant Barbee.

- + diff --git a/projects/optispeech/index.html b/projects/optispeech/index.html index b8b6fa9e..d808da62 100644 --- a/projects/optispeech/index.html +++ b/projects/optispeech/index.html @@ -7,7 +7,7 @@ - + @@ -21,8 +21,8 @@
On this page

OptiSpeech

The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks — for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.

System Architecture

This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.

This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.

The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.

New Interface

In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.

Documentation

Unit Tests

- +
On this page

OptiSpeech

The Optispeech project involves designing and testing a real-time tongue model that can be viewed in a transparent head while a subject talks — for the purposes of treating speech errors and teaching foreign language sounds. This work has been conducted in partnership with Vulintus and with support from the National Institutes of Health (NIH). The UT Dallas Speech Production Lab is currently updating the program to use updated versions of Unity and adding support for more features and hardware.

System Architecture

This video shows a talker with WAVE sensors placed on the tongue hitting a virtual target sphere located at the alveolar ridge. When an alveolar consonant is hit (e.g., /s/, /n/, /d/) the sphere changes color from red to green.

This video shows an American talker learning a novel sound not found in English. When the post-alveolar consonant is hit, the target sphere changes color from red to green. Here, the NDI WAVE system serves as input.

The program is being updated by a team in the UT Dallas Speech Production Lab led by Anthony Lawn, so the program uses a more modern version of Unity, has an easier-to-use interface, can more easily support new features, and can connect to additional EMA systems, namely the Carstens AG501.

New Interface

In addition, the program now includes documentation and unit tests to improve program stability and maintainability going forward.

Documentation

Unit Tests

+ diff --git a/projects/vecs/index.html b/projects/vecs/index.html index 4f05f482..9887a7bc 100644 --- a/projects/vecs/index.html +++ b/projects/vecs/index.html @@ -7,7 +7,7 @@ - + @@ -21,8 +21,8 @@
On this page

V-ecs

V-ecs Screenshot

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

The engine works with "worlds", which are collections of systems and renderers. The engine comes with several worlds using systems and renderers I made, including a voxel world, an incremental game, and some test scenes. All of these include systems to render the fps as well as show a debug console by typing the grave key (`). The default world is a title screen that detects any worlds in the "worlds" folder and displays a button for each of them.

Debug Menu

The original plans were to eventually put it on the steam workshop so people could more easily share their creations amongst each other, but I never became happy enough with the performance of the engine - the parallelization of the lua code involved a lot of overhead that severely limited performance.

Instead, I made a couple of worlds by myself - an infinite procedurally generated voxel world, a simple incremental game, and a more complex incremental game I call "Sands of Time".

Sands of Time

- +
On this page

V-ecs

V-ecs Screenshot

V-ecs (pronounced "Vex") is a Vulkan-based engine I made for making highly moddable games and tools in Lua centered around the ECS design pattern and a work-stealing job system.

The engine works with "worlds", which are collections of systems and renderers. The engine comes with several worlds using systems and renderers I made, including a voxel world, an incremental game, and some test scenes. All of these include systems to render the fps as well as show a debug console by typing the grave key (`). The default world is a title screen that detects any worlds in the "worlds" folder and displays a button for each of them.

Debug Menu

The original plans were to eventually put it on the steam workshop so people could more easily share their creations amongst each other, but I never became happy enough with the performance of the engine - the parallelization of the lua code involved a lot of overhead that severely limited performance.

Instead, I made a couple of worlds by myself - an infinite procedurally generated voxel world, a simple incremental game, and a more complex incremental game I call "Sands of Time".

Sands of Time

+ diff --git a/public/gamedevtree/2.0-format-changes/index.html b/public/gamedevtree/2.0-format-changes/index.html index 58c8cbf9..68fa361e 100644 --- a/public/gamedevtree/2.0-format-changes/index.html +++ b/public/gamedevtree/2.0-format-changes/index.html @@ -22,7 +22,7 @@
On this page

2.0 format changes

  • Temp format is changed from temp.something[layer] to temp[layer].something, for consistency
  • Challenges are now saved as an object with the amount of completions in each spot. (This will break saves.)
  • effectDisplay in Challenges and Upgrades no longer takes an argument, and neither does effect for Buyables
  • Buyable cost can take an argument for amount of buyables, but it needs to function if no argument is supplied (it should do the cost for the next purchase).
  • Generation of Points now happens in the main game loop (not in a layer update function), enabled by canGenPoints in game.js.
  • Changed fullLayerReset to layerDataReset, which takes an array of names of values to keep

In addition, many names were changed, mostly expanding abbreviations:

All instances of:

  • chall -> challenge
  • unl -> unlocked
  • upg -> upgrade (besides CSS)
  • amt -> amount
  • desc -> description
  • resCeil -> roundUpCost
  • order -> unlockOrder
  • incr_order -> increaseUnlockOrder

Challenges:

  • desc -> challengeDescription
  • reward -> rewardDescription
  • effect -> rewardEffect
  • effectDisplay -> rewardDisplay
  • active -> challengeActive
- + diff --git a/public/gamedevtree/README/index.html b/public/gamedevtree/README/index.html index 74f6fa2c..1e8eb8e2 100644 --- a/public/gamedevtree/README/index.html +++ b/public/gamedevtree/README/index.html @@ -22,7 +22,7 @@
On this page

The-Modding-Tree

A modified version of The Prestige Tree that is much easier to mod. It still requires programming knowledge, but it's mostly pretty easy things and copy/pasting.

Look here for a tutorial on getting started with modding with TMT

You can look in the documentation for more information on how it all works, or look at the code in layers.js to see what it all looks like.

- + diff --git a/public/gamedevtree/changelog/index.html b/public/gamedevtree/changelog/index.html index 86688124..83bcbaf9 100644 --- a/public/gamedevtree/changelog/index.html +++ b/public/gamedevtree/changelog/index.html @@ -22,7 +22,7 @@
On this page

The Game Dev Tree changelog:

v1.0.4 Version Bump [rebalanced,debuggedx3] - 2020-11-09

  • Fixed refactorings 2, 3, and 4 not actually affecting productivity

v1.0.3 Version Bump [rebalanced,debuggedx2] - 2020-11-08

  • Fixed API milestone 4 not working

v1.0.2 Version Bump [rebalanced,debugged] - 2020-11-08

  • Fixed tree lines being hidden after hitting "keepGoing" in the victory screen

v1.0.1 Version Bump [rebalanced] - 2020-11-08

  • Buffed several TAs

v1.0 Version Bump - 2020-11-08

  • Finished row 4
  • Added colored text to lore
  • Fixed some visual bugs with milestones
  • Probably other stuff lol its been a week

v0.2.3 Stylish - 2020-10-30

  • Re-styled basically everything
  • Added favicon
  • Added header bar
  • Added changelog

v0.2.2 Row 3 - 2020-10-22

  • Removed debug statement
  • Moved milestones in F layer beneath the buyables

v0.2.1 Row 3 - 2020-10-21

  • Fixed layers hiding
  • Fixed typos/minor issues
  • Fixed S layer being highlighted before you can unlock the layer

v0.2 Row 3 - 2020-10-21

  • Implemented row 3

v0.1.1 Cash Influx [rebalanced] - 2020-10-19

  • Fixed notification issue
  • Rebalanced to make early game faster and late game slower
  • Fixed other minor issues

v0.1 Cash Influx - 2020-10-19

  • Implemented row 2

v0.0 Initial Commit - 2020-10-18

  • Implemented row 1
- + diff --git a/public/gamedevtree/docs/!general-info/index.html b/public/gamedevtree/docs/!general-info/index.html index d2a1dd9a..b370c1cc 100644 --- a/public/gamedevtree/docs/!general-info/index.html +++ b/public/gamedevtree/docs/!general-info/index.html @@ -22,7 +22,7 @@
On this page

The-Modding-Tree

The main way to add content is through creating layers. You can either add a layer directly in the layers object in layersSupportjs, or declare it in another file and then do "addLayer(layername, layerdata)" (good for breaking things up into smaller files). The existing layers are just examples and can be freely deleted. You can also use them as references and a base for your own layers.

The first thing you need to do is to edit the modInfo at the top of game.js to set your modID (a string). A unique modId will prevent your mod's saves from conflicting with other mods.

Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to.

The Modding Tree uses break_eternity.js to store large values. This means that many numbers are Decimal objects, and must be treated differently. For example, you have to use new Decimal(x) to create a Decimal value instead of a plain number, and perform operations on them by calling functions. e.g, instead of x = x + y, use x = x.add(y).

Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.

All display text can be basic HTML instead (But you can't use most Vue features there).

Table of Contents:

General:

  • Getting Started: Getting your own copy of the code set up with Github Desktop.
  • Main mod info: How to set up general things for your mod in mod.js.
  • Basic layer breakdown: Breaking down the components of a layer with minimal features.
  • Layer features: Explanations of all of the different properties that you can give a layer.
  • Custom Tab Layouts: An optional way to give your tabs a different layout. You can even create entirely new components to use.
  • Updating TMT: Using Github Desktop to update your mod's version of TMT.

Common components

  • Upgrades: How to create upgrades for a layer.
  • Milestones: How to create milestones for a layer.
  • Buyables: Create rebuyable upgrades for your layer (with the option to make them respec-able). Can be used to make Enhancers or Space Buildings.
  • Clickables: A more generalized variant of buyables, for any kind of thing that is sometimes clickable. Between these and Buyables, you can do just about anything.

Other components

  • Challenges: How to create challenges for a layer.
  • Bars: Display some information as a progress bar, gague, or similar. They are highly customizable, and can be horizontal and vertical as well.
  • Subtabs and Microtabs: Create subtabs for your tabs, as well as "microtab" components that you can put inside the tabs.
  • Achievements: How to create achievements for a layer (or for the whole game).
  • Infoboxes: Boxes containing text that can be shown or hidden.
- + diff --git a/public/gamedevtree/docs/achievements/index.html b/public/gamedevtree/docs/achievements/index.html index 67b13e8d..e4d34d0f 100644 --- a/public/gamedevtree/docs/achievements/index.html +++ b/public/gamedevtree/docs/achievements/index.html @@ -31,7 +31,7 @@ etc }

Each achievement should have an id where the first digit is the row and the second digit is the column. Individual achievement can have these features:

  • name: optional, displayed at the top of the achievement. The only visible text. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the achievement should be awarded.

  • tooltip: Default tooltip for the achievement, appears when it is hovered over. Should convey the goal and any reward for completing the achievement. It can also be a function that returns updating text. Can use basic HTML.

  • effect(): optional, A function that calculates and returns the current values of any bonuses from the achievement. Can return a value or an object containing multiple values.

  • unlocked(): optional, A function returning a bool to determine if the achievement is visible or not. Default is unlocked.

  • onComplete() - optional, this function will be called when the achievement is completed.

  • style: Optional, Applies CSS to this achievement, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the achievement was stored under, for convenient access. The achievement in the example's id is 11.

  • goalTooltip: optional, depracated Appears when the achievement is hovered over and locked, overrides the basic tooltip. This is to display the goal (or a hint). It can also be a function that returns updating text. Can use basic HTML.

  • doneTooltip: optional, depracated Appears when the achievement is hovered over and completed, overrides the basic tooltip. This can display what the player achieved (the goal), and the rewards, if any. It can also be a function that returns updating text. Can use basic HTML.

- + diff --git a/public/gamedevtree/docs/bars/index.html b/public/gamedevtree/docs/bars/index.html index 5e6ded3b..67fc6ef0 100644 --- a/public/gamedevtree/docs/bars/index.html +++ b/public/gamedevtree/docs/bars/index.html @@ -29,7 +29,7 @@ etc }

Features:

  • direction: UP, DOWN, LEFT, or RIGHT (not Strings). Determines the direction that the bar is filled as it progresses. RIGHT means from left to right.

  • width, height: The size in pixels of the bar, but as Numbers (no "px" at the end)

  • progress(): A function that returns the portion of the bar that is filled, from "empty" at 0 to "full" at 1. (Nothing bad happens if the value goes out of these bounds, and it can be a number or Decimal).

  • display(): optional, A function that returns text to be displayed on top of the bar, can use HTML.

  • unlocked(): optional, A function returning a bool to determine if the bar is visible or not. Default is unlocked.

  • baseStyle, fillStyle, borderStyle, textStyle: Optional, Apply CSS to the unfilled portion, filled portion, border, and display text on the bar, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".

- + diff --git a/public/gamedevtree/docs/basic-layer-breakdown/index.html b/public/gamedevtree/docs/basic-layer-breakdown/index.html index 71fa1193..4c1970de 100644 --- a/public/gamedevtree/docs/basic-layer-breakdown/index.html +++ b/public/gamedevtree/docs/basic-layer-breakdown/index.html @@ -50,7 +50,7 @@ layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree. }, - + diff --git a/public/gamedevtree/docs/buyables/index.html b/public/gamedevtree/docs/buyables/index.html index d6f1f3cc..efb30931 100644 --- a/public/gamedevtree/docs/buyables/index.html +++ b/public/gamedevtree/docs/buyables/index.html @@ -36,7 +36,7 @@ etc }

Features:

  • title: optional, displayed at the top in a larger font It can also be a function that returns updating text.

  • cost(): cost for buying the next buyable. Can have an optional argument "x" to calculate the cost of the x+1th object, but needs to use "current amount" as a default value for x. (x is a Decimal). Can return an object if there are multiple currencies.

  • effect(): optional, A function that calculates and returns the current values of bonuses of this buyable. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the buyable after the title, likely including the description, amount bought, cost, and current effect. Can use basic HTML.

  • unlocked(): optional, A function returning a bool to determine if the buyable is visible or not. Default is unlocked.

  • canAfford(): A function returning a bool to determine if you can buy one of the buyables.

  • buy(): A function that implements buying one of the buyable, including spending the currency.

  • buyMax(): optional, A function that implements buying as many of the buyable as possible.

  • style: Optional, Applies CSS to this buyable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the buyable was stored under, for convenient access. The buyable in the example's id is 11.

Sell One/Sell All:

Including a sellOne or sellAll function will cause an additional button to appear beneath the buyable. They are functionally identical, but "sell one" appears above "sell all". You can also use them for other things.

sellOne/sellAll(): optional, Called when the button is pressed. The standard use would be to decrease/reset the amount of the buyable, And possibly return some currency to the player.

canSellOne/canSellAll(): optional, booleans determining whether or not to show the buttons. If "canSellOne/All" is absent but "sellOne/All" is present, the appropriate button will always show.

- + diff --git a/public/gamedevtree/docs/challenges/index.html b/public/gamedevtree/docs/challenges/index.html index 76696ce5..3e9bb639 100644 --- a/public/gamedevtree/docs/challenges/index.html +++ b/public/gamedevtree/docs/challenges/index.html @@ -31,7 +31,7 @@ etc }

Each challenge should have an id where the first digit is the row and the second digit is the column. Individual Challenges can have these features:

  • name: Name of the challenge, can be a string or a function. Can use basic HTML.

  • challengeDescription: A description of what makes the challenge a challenge. You will need to implement these elsewhere It can also be a function that returns updating text. Can use basic HTML.

  • rewardDescription: A description of the reward's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • rewardEffect(): optional, A function that calculates and returns the current values of any bonuses from the reward. Can return a value or an object containing multiple values. Can use basic HTML.

  • rewardDisplay(): optional, A function that returns a display of the current effects of the reward with formatting. Default behavior is to just display the a number appropriately formatted.

  • goal: A Decimal for the amount of currency required to beat the challenge. By default, the goal is in basic Points. The goal can also be a function if its value changes.

  • unlocked(): optional, A function returning a bool to determine if the challenge is visible or not. Default is unlocked.

  • onComplete() - optional, this function will be called when the challenge is completed when previously incomplete.

  • countsAs: optional, If a challenge combines the effects of other challenges in this layer, you can use this. An array of challenge ids. The player is effectively in all of those challenges when in the current one.

By default, challenges use basic Points for the goal. You can change that using these features.

  • currencyDisplayName: optional, the name to display for the currency for the goal

  • currencyInternalName: optional, the internal name for that currency

  • currencyLayer: optional, the internal name of the layer that currency is stored in. If it's not in a layer, omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation: optional, if your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

  • completionLimit: optional, the amount of times you can complete this challenge. Default is 1 completion.

  • style: Optional, Applies CSS to this challenge, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the challenge was stored under, for convenient access. The challenge in the example's id is 11.

- + diff --git a/public/gamedevtree/docs/clickables/index.html b/public/gamedevtree/docs/clickables/index.html index 5954acd5..3388c90d 100644 --- a/public/gamedevtree/docs/clickables/index.html +++ b/public/gamedevtree/docs/clickables/index.html @@ -35,7 +35,7 @@ etc }

Features:

  • title: optional, displayed at the top in a larger font It can also be a function that returns updating text.

  • effect(): optional, A function that calculates and returns the current values of bonuses of this clickable. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the clickable after the title, likely changing based on its state. Can use basic HTML.

  • unlocked(): optional, A function returning a bool to determine if the clickable is visible or not. Default is unlocked.

  • canClick(): A function returning a bool to determine if you can click the clickable.

  • onClick(): A function that implements clicking one of the clickable.

  • style: Optional, Applies CSS to this clickable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: Assigned automagically. It's the "key" which the clickable was stored under, for convenient access. The clickable in the example's id is 11.

- + diff --git a/public/gamedevtree/docs/custom-tab-layouts/index.html b/public/gamedevtree/docs/custom-tab-layouts/index.html index 27636586..6a02e330 100644 --- a/public/gamedevtree/docs/custom-tab-layouts/index.html +++ b/public/gamedevtree/docs/custom-tab-layouts/index.html @@ -31,7 +31,7 @@ ["toggle", ["c", "beep"]], "milestones", "blank", "blank", "upgrades"]

It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) applies a CSS style to it with a "CSS object", where the keys are CSS attributes.

These are the existing components, but you can create more in v.js:

  • display-text: Displays some text (can use basic HTML). The argument is the text to display. It can also be a function that returns updating text.

  • raw-html: Displays some basic HTML, can also be a function.

  • blank: Adds empty space. The default dimensions are 8px x 17px. The argument changes the dimensions. If it's a single value (e.g. "20px"), that determines the height. If you have a pair of arguments, the first is width and the second is height.

  • row: Display a list of components horizontally. The argument is an array of components in the tab layout format.

  • column: Display a list of components vertically. The argument is an array of components in the tab layout format. This is useful to display columns within a row.

  • main-display: The text that displays the main currency for the layer and its effects.

  • resource-display: The text that displays the currency that this layer is based on, as well as the best and/or total values for this layer's prestige currency (if they are put in startData for this layer)

  • prestige-button: The argument is a string that the prestige button should say before the amount of currency you will gain. It can also be a function that returns updating text.

  • upgrades, milestones, challs, achievements: Display the upgrades, milestones, and challenges for a layer, as appropriate.

  • buyables, clickables: Display all of the buyables/clickables for this layer, as appropriate. The argument optional, and is the size of the boxes in pixels.

  • microtabs: Display a set of subtabs for an area. The argument is the name of the set of microtabs in the "microtabs" feature.

  • bar: Display a bar. The argument is the id of the bar to display.

  • infobox: Display an infobox. The argument is the id of the infobox to display.

  • toggle: A toggle button that toggles a bool value. The data is a pair that identifies what bool to toggle, [layer, id]

The rest of the components are sub-components. They can be used just like other components, but are typically part of another component.

  • upgrade, milestone, chall, buyable, clickable, achievement: An individual upgrade, challenge, etc. The argument is the id. This can be used if you want to have upgrades split up across multiple subtabs, for example.

  • respec-button, master-button: The respec and master buttons for buyables and clickables, respectively.

  • sell-one, sell-all: The "sell one" and "sell all" for buyables, respectively. The argument is the id of the buyable.

- + diff --git a/public/gamedevtree/docs/getting-started/index.html b/public/gamedevtree/docs/getting-started/index.html index e48ab1aa..d7e16ff1 100644 --- a/public/gamedevtree/docs/getting-started/index.html +++ b/public/gamedevtree/docs/getting-started/index.html @@ -22,7 +22,7 @@
On this page

Getting started

Welcome to The Modding Tree!

Using the Modding Tree, at its simplest level, just requires getting a copy of it onto your computer. However, if you do it the right way, it will help in many ways.

Don't let the word "Github" scare you away. It's actually much easier to use than most people think, especially because most people use it the hard way. The key is Github Desktop, which lets you do everything you need to, without even touching the command line.

The benefits of using Github:

  • It makes it much, much easier to update The Modding Tree.
  • You can share your work without any extra effort using githack, or with a bit more effort, set up a github.io site.
  • It lets you undo changes to your code, and to have multiple versions of it.
  • It lets you collaborate with other people, if you want to.

Getting set up with Github and The Modding Tree:

  1. Install Github Desktop and Visual Studio Code.

  2. Make a Github account. You can handle this on your own.

  3. Log in on your browser, and go back to The Modding Tree page. At the top right, there should be a button that says "fork". Click on it, and then on your username. You now have your own fork, or copy, of The Modding Tree.

  4. Open Github Desktop and log in. Ignore everything else and choose "clone a repository". A "repository" is basically a "Github project", like The Modding Tree. "Cloning" is downloading a copy of the repository to your computer.

  5. Look for The Modding Tree in the list of repositiories (it should be the only one) and click "clone".

  6. Select that you're using it for your own purposes, and click continue. It will download the files and handle everything.

Using your repository

  1. Click on "show in finder" to the right, and then open index.html. This will let you view and test your project!

  2. To edit your project, click "open in VSCode" in Github Desktop.

  3. Open mod.js in VSCode, and look at the top part where it says "modInfo". On the lines below that, change the mod's name to whatever you want, and change the id as well. (It can be any string value, and it's used to determine where the savefile is. Make it something that's probably unique, and don't change it again later.)

  4. Save game.js, and then reload index.html. The title on the tab, as well as on the info page, will now be the new ones!

  5. Go back to Github Desktop. It's time to save your changes into the git system by making a "commit".

  6. At the bottom right corner, add a summary of your changes, and then click "commit to master".

  7. Finally, at the top middle, click "push origin" to push your changes out onto the online repository.

  8. You can view your project on line, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html

And now, you have successfully used Github! You can look at the documentation to see how The Modding Tree's system works and to make your mod a reality.

- + diff --git a/public/gamedevtree/docs/infoboxes/index.html b/public/gamedevtree/docs/infoboxes/index.html index 6ae2e07c..ac630520 100644 --- a/public/gamedevtree/docs/infoboxes/index.html +++ b/public/gamedevtree/docs/infoboxes/index.html @@ -29,7 +29,7 @@ etc }

Features:

  • title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.

  • body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.

  • style, titleStyle, bodyStyle: Optional, Apply CSS to the infobox, or to the title button or body of the infobox, in the form of an object where the keys are CSS attributes, and the values are the Values for those attributes (both as strings).

  • unlocked(): optional, A function returning a bool to determine if the infobox is visible or not. Default is unlocked.

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".

- + diff --git a/public/gamedevtree/docs/layer-features/index.html b/public/gamedevtree/docs/layer-features/index.html index 1762d2dc..79740016 100644 --- a/public/gamedevtree/docs/layer-features/index.html +++ b/public/gamedevtree/docs/layer-features/index.html @@ -39,7 +39,7 @@ "prestige-button"() {return {'color': '#AA66AA'}}, },

Custom Prestige type

  • getResetGain(): For custom prestige type, Returns how many points you should get if you reset now. You can call getResetGain(this.layer, useType = "static") or similar to calculate what your gain would be under another prestige type (provided you have all of the required features in the layer.)

  • getNextAt(canMax=false): For custom prestige type, Returns how many of the base currency you need to get to the next point. canMax is an optional variable used with Static-ish layers to differentiate between if it's looking for the first point you can reset at, or the requirement for any gain at all. (Supporting both is good). You can also call getNextAt(this.layer, canMax=false, useType = "static") or similar to calculate what your next at would be under another prestige type (provided you have all of the required features in the layer.)

  • canReset(): For custom prestige type, return true only if you have the resources required to do a prestige here.

- + diff --git a/public/gamedevtree/docs/main-mod-info/index.html b/public/gamedevtree/docs/main-mod-info/index.html index 53ba0e23..065b1701 100644 --- a/public/gamedevtree/docs/main-mod-info/index.html +++ b/public/gamedevtree/docs/main-mod-info/index.html @@ -28,7 +28,7 @@ happiness: new Decimal(72), }}
  • displayThings: An array of functions used to display extra things at the top of the tree tab. Each function returns a string, which is a line to display (with basic HTML support). If a function returns nothing, nothing is displayed (and it doesn't take up a line).

  • isEndgame(): A function to determine if the player has reached the end of the game, at which point the "you win!" screen appears.

Less important things beyond this point!

  • maxTickLength(): Returns the maximum tick length, in milliseconds. Only really useful if you have something that reduces over time, which long ticks mess up (usually a challenge).
- + diff --git a/public/gamedevtree/docs/milestones/index.html b/public/gamedevtree/docs/milestones/index.html index bde9e988..8ca21eb9 100644 --- a/public/gamedevtree/docs/milestones/index.html +++ b/public/gamedevtree/docs/milestones/index.html @@ -29,7 +29,7 @@ }

You can use hasMilestone(layer, id) to determine if the player has a given milestone

Milestone features:

  • requirementDesc: A string describing the requirement for unlocking this milestone. Suggestion: Use a "total". It can also be a function that returns updating text. Can use basic HTML.

  • effectDesc: A string describing the reward for having the milestone. You will have to implement the reward elsewhere. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the milestone should be awarded.

  • toggles: optional, Creates toggle buttons that appear on the milestone when it is unlocked. The toggles can toggle a given boolean value in a layer. It is defined as an array of paired items, one pair per toggle. The first is the internal name of the layer the value being toggled is stored in, and the second is the internal name of the variable to toggle. (e.g. [["b", "auto"], ["g", "auto"])

         **Tip:** Toggles are not de-set if the milestone becomes locked! In this case, you should also check if the player has the milestone.
     
  • style: Optional, Applies CSS to this milestone, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • unlocked(): Optional A function returning a boolean to determine if the milestone should be shown. If absent, it is always shown.

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the milestone was stored under, for convenient access. The milestone in the example's id is 0.

- + diff --git a/public/gamedevtree/docs/subtabs-and-microtabs/index.html b/public/gamedevtree/docs/subtabs-and-microtabs/index.html index 61c48468..c7764f3c 100644 --- a/public/gamedevtree/docs/subtabs-and-microtabs/index.html +++ b/public/gamedevtree/docs/subtabs-and-microtabs/index.html @@ -46,7 +46,7 @@ } },

Normal subtabs and microtab subtabs both use the same features:

Features:

  • content: The tab layout code for the subtab, in the tab layout format

  • style: Optional, Applies CSS to the whole subtab when switched to, in the form of an "CSS Object", where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • buttonStyle: Optional, A CSS object, which affects the appearance of the button for that subtab.

  • unlocked(): Optional, a function to determine if the button for this subtab should be visible. By default, a subtab is always unlocked. (You can't use the "this" keyword in this function.)

- + diff --git a/public/gamedevtree/docs/updating-tmt/index.html b/public/gamedevtree/docs/updating-tmt/index.html index 85c64855..6713d3cb 100644 --- a/public/gamedevtree/docs/updating-tmt/index.html +++ b/public/gamedevtree/docs/updating-tmt/index.html @@ -22,7 +22,7 @@
On this page

Updating The Modding Tree

This tutorial assumes that you have used the Getting Started Tutorial, and are using Github Desktop and VSCode for your mod.

Here's what you have to do when there's a TMT update:

  1. Look at the changelog. It will warn you if the update will break anything or require any changes. Decide if you want to try to update.

  2. Open Github Desktop, and at the top middle, click "fetch origin". This will make Github Desktop get information about the update.

  3. Click where it says "current branch: master" at the top middle, and at the bottom of the thing that appears, click "choose a branch to merge into master.

  4. Select upstream/master. It will likely say there are conflicts, but you have tools to resolve them. Click "Merge upstream/master into master".

  5. A conflict happens when the things you're trying to merge have both made changes in the same place. Click "open in Visual Studio Code" next to the first file.

  6. Scroll down through the file, and look for the parts highlighted in red and green. One of these is your code, and the other is some code that will be modified by the update. Do your best to try to edit things to keep the updated changes, but keep your content.

  7. Continue to do this for all remaining challenges.

  8. Do any other changes required by the update, run the game, fix issues, etc.

- + diff --git a/public/gamedevtree/docs/upgrades/index.html b/public/gamedevtree/docs/upgrades/index.html index 84296a2b..76f6e141 100644 --- a/public/gamedevtree/docs/upgrades/index.html +++ b/public/gamedevtree/docs/upgrades/index.html @@ -31,7 +31,7 @@ etc }

Each upgrade should have an id where the first digit is the row and the second digit is the column. Individual upgrades can have these features:

  • title: optional, displayed at the top in a larger font It can also be a function that returns updating text. Can use basic HTML.

  • description: A description of the upgrade's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • effect(): optional, A function that calculates and returns the current values of any bonuses from the upgrade. Can return a value or an object containing multiple values.

  • effectDisplay(): optional, A function that returns a display of the current effects of the upgrade with formatting. Default behavior is to just display the a number appropriately formatted. Can use basic HTML.

  • cost: A Decimal for the cost of the upgrade. By default, upgrades cost the main prestige currency for the layer.

  • unlocked(): optional, A function returning a bool to determine if the upgrade is visible or not. Default is unlocked.

  • onPurchase() - optional, this function will be called when the upgrade is purchased. Good for upgrades like "makes this layer act like it was unlocked first".

By default, upgrades use the main prestige currency for the layer. You can include these to change them (but it needs to be a Decimal):

  • currencyDisplayName: optional, the name to display for the currency for the upgrade

  • currencyInternalName: optional, the internal name for that currency

  • currencyLayer: optional, the internal name of the layer that currency is stored in. If it's not in a layer (like Points), omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation: optional, if your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

  • style: Optional, Applies CSS to this upgrade, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings)

  • layer: Assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: Assigned automagically. It's the "key" which the upgrade was stored under, for convenient access. The upgrade in the example's id is 11.

- + diff --git a/public/kronos/Old Things/2.0-format-changes/index.html b/public/kronos/Old Things/2.0-format-changes/index.html index 7a5f50b7..34ac20c1 100644 --- a/public/kronos/Old Things/2.0-format-changes/index.html +++ b/public/kronos/Old Things/2.0-format-changes/index.html @@ -22,7 +22,7 @@
On this page

2.0 format changes

  • Temp format is changed from temp.something[layer] to temp[layer].something, for consistency
  • Challenges are now saved as an object with the amount of completions in each spot. (This will break saves.)
  • effectDisplay in Challenges and Upgrades no longer takes an argument, and neither does effect for Buyables
  • Buyable cost can take an argument for amount of buyables, but it needs to function if no argument is supplied (it should do the cost for the next purchase).
  • Generation of Points now happens in the main game loop (not in a layer update function), enabled by canGenPoints in game.js.
  • Changed fullLayerReset to layerDataReset, which takes an array of names of values to keep

In addition, many names were changed, mostly expanding abbreviations:

All instances of:

  • chall -> challenge
  • unl -> unlocked
  • upg -> upgrade (besides CSS)
  • amt -> amount
  • desc -> description
  • resCeil -> roundUpCost
  • order -> unlockOrder
  • incr_order -> increaseUnlockOrder

Challenges:

  • desc -> challengeDescription
  • reward -> rewardDescription
  • effect -> rewardEffect
  • effectDisplay -> rewardDisplay
  • active -> challengeActive
- + diff --git a/public/kronos/README/index.html b/public/kronos/README/index.html index 04f05026..550f9f9a 100644 --- a/public/kronos/README/index.html +++ b/public/kronos/README/index.html @@ -22,7 +22,7 @@
On this page

Kronos

Play here.

Updating the website:

  • git submodule update --remote
  • git add -A
  • git commit -m "Updated kronos"
  • git push
- + diff --git a/public/kronos/changelog/index.html b/public/kronos/changelog/index.html index 706a23cd..1d6553f2 100644 --- a/public/kronos/changelog/index.html +++ b/public/kronos/changelog/index.html @@ -22,7 +22,7 @@
On this page

The Modding Tree changelog:

v2.5.9.2 - 5/19/21

  • Fixed many issues with things not updating.

v2.5.9.1 - 5/18/21

  • Made text inputs never give NaNs.

v2.5.9 - 5/18/21

  • Fixed issue when using text inputs for Numbers.
  • Added particle color feature.
  • Particle speed and dir are updated as it moves.
  • Added setSpeed and setDir for particles.
  • Added more trig functions.

v2.5.8 - 5/17/21

  • Added makeShinies, which creates a stationary particle in a random spot.
  • Bars will visually update more quickly.
  • Fixed a major particle-related issue.
  • Fixed autoUpgrade.
  • Fixed a minor visual issue with tree nodes.

v2.5.7 - 5/15/21

  • Added a particle system! Not only can it be used for visual effects, but particles can interact with the mouse. They could be used to create golden cookies or collectables, for example.
  • Added marked feature to buyables, clickables, and challenges. By default, stars multi-completion challenges when maxed.
  • Added 'deactivated' feature to layers, which disables many features.
  • Improved number formatting slightly.

v2.5.6 - 5/14/21

  • You can now use non-numeric ids for upgrades, buyables, etc.
  • Fixed an exploit that let you buy an extra buyable.
  • Moved basic getter/setter functions to easyAccess.js.

v2.5.5.2 - 5/12/21

  • Fixed a major issue with buyables.
  • Fixed a variety of tabFormat-related issues.
  • Fixed commas appearing in decimal places (thanks to pg132!)

v2.5.5.1 - 5/12/21

  • Fixed clickables.

v2.5.5 - 5/12/21

  • Added grids! They are a grid of buttons which behave the same, but have their own data. Good for inventory grids, map tiles, and more!
  • Added "marked" feature to add a mark to a node. Can be an image instead of a star. (Originally by Jacorb)
  • Added "layer-proxy" component that lets you use components from another layer.
  • Added the ability to display non-whole numbers in main-display.

v2.5.4 - 5/10/21

  • Added a setting to always use single-tab mode.
  • Added directMult, which multiplies prestige gain after exponents and softcaps. It actually multiplies gain for static layers.
  • Added onEnter and onExit for challenges.
  • Improved displaying numbers between 0.0001 and 0.1.
  • Added documentation on how gainMult/Exp work for static layers.
  • Fixed a visual issue on mobile, thanks to thepaperpilot.
  • Improved documentation in general.

v2.5.3 - 5/8/21

  • Improved performance of tab formats and bars.
  • Respec confirmation settings are now kept on resets.
  • Improved compatibility with older browsers.
  • Fixed missing pixel on vertical bars.

v2.5.2.1 - 5/7/21

  • Fixed microtabs making layers highlight incorrectly.

v2.5.2 - 5/7/21

  • Added glowColor for subtabs.
  • Improved the display for extremely small numbers.
  • Fixed issues in the buyable docs.

v2.5.1 - 5/7/21

  • Fixed dynamic things in tabFormat not updating.

v2.5: Dreams Really Do Come True - 5/7/21

  • Optimizations, hopefully a significant amount.
  • Added OOM/s point gen display at high values (thanks to Ducdat!)
  • Only one tab will display if the window is not wide enough (also thanks to Ducdat!)
  • Holding down a buyable's button now buys it continuously.
  • New milestone setting will also show the most recently unlocked milestone. (Also renamed all settings to be clearer)
  • Added an onHold feature for clickables.
  • Layer nodes will be highlighted even if the player is on the same tab.
  • Added customizable node glowColor.
  • Added buyable purchaseLimit.
  • Amount is automatically supplied to buyable cost and effect functions.
  • Locked (not yet visible) milestones no longer take up space. Also fixed hidden milestones taking a tiny bit of space.
  • Re-centered respec buttons.
  • Force-displayed tooltips are not hidden by resets.
  • Added formatting support for very small numbers. Disabled in most places by default because rounding errors might cause issues. Access it with formatSmall, or enable it globally by adding "allowSmall: true" to modInfo.

v2.4.1 - 4/29/21

  • A number of minor fixes, many thanks to thepaperpilot.
  • The respec confirmation checkbox is now part of the respec-button component. (This also fixes the checkbox appearing when there is no respec button)
  • Added a few undocumented changes to the 2.4 changelog (the two at the bottom)

v2.4: Rationalized Edition - 4/29/21

  • Completely reworked tooltips. Shift-click a node to force its tooltip to stay displayed. (And hopefully finally fixed flickering!)

  • Added text-input and slider components.

  • Added the ability to toggle respec confirmations.

  • Added custom respec confirmation messages.

  • The red layer highlight will not appear before a layer is unlocked.

  • Added unlocking hotkeys.

  • You no longer need to supply 'rows' and 'cols' for any Big Features.

  • Node symbols can use HTML.

  • Added documentation for the respec button.

  • Added prestigeNotify to subtabs, and prestigeNotify in subtabs also highlights the layer node.

  • The version number no longer contains special characters or irrational numbers.

  • Added ctrlDown and shiftDown variables.

  • Tooltips now use HTML (this means you need to replace any newlines with
    )

v2.Ï€.1 - 4/7/21

  • Fixed formatting for some larger numbers.
  • Upgrades will expand if there is too much text to display.
  • Fixed styling challenges.
  • No longer attempts to display a base currency when there is none.

v2.Ï€: Incrementally Updated - 2/5/21

  • Performance improvements.
  • Fixed tooltips overlapping with the top display.
  • Clicking a popup dismisses it immediately.
  • Added support for bulk challenge completions.
  • "Best" is updated automatically.
  • Fixed keeping Decimal values on reset.
  • Code reorganization and style improvements by fudo.

v2.3.5 - 12/21/20

  • Added resetTime, which tracks the time since a layer prestiged or was reset.
  • A layer node will be highlighted red if one of its subtabs is highlighted red.
  • Fixed issues with keeping challenges, buyables, and clickables on reset.
  • Improved the unlocking of custom layers.
  • Other minor fixes.

v2.3.4 - 12/16/20

  • Added a node image feature.
  • Resource display now always shows the amount of the currency the layer's gain is based on.
  • Added spacing between tree nodes.
  • Another attempt to fix tooltip flickering.

v2.3.3 - 12/13/20

  • Fixed the first node in a row always taking up space.
  • layerShown is now optional.
  • All prestige types can now use features for custom prestige types.

v2.3.2 - 12/13/20

  • Fixed achievement/milestone popups.

v2.3.1 - 12/12/20

  • Another attempt to fix flickering tooltips.
  • The "this" keyword should work everywhere except tabFormat arrays (although I may have missed some things).
  • Fixed tree branches not updating when scrolling on the right-side tab.
  • Fixed a spacing issue when a node's symbol is ""
  • Removed some old, unneeded files.

v2.3: Cooler and Newer Edition - 12/10/20

  • Added achievement/milestone popups (thank you to Jacorb for this contribution!)
  • The changelog tab is back, and can be set in mod.js.
  • Layer nodes and respec buttons will not be clicked by pressing "enter".
  • Possible fix for flickering tooltips and strange transitions.
  • The victory screen text is configurable.
  • Added image and textStyle features to achievements.
  • Added an argument to use specific rows in an "upgrades" component.
  • Fixed the comma appearing in the main display when there was no effectDescription
  • Added the ability to easily make a tab that is a collection of layers in subtabs.
  • Improved spacing for embedding layers with subtabs into subtabs.

v2.2.8 - 12/03/20

  • Double-clicking a layer node brings you to the main subtab for that layer.
  • Attempted to fix challenges visually updating a different way.
  • Added a softcap function for use in formulas.
  • Added displayRow feature, which lets layers be shown somewhere separate from where they are in the reset order (e.g. side layers)
  • Fixed autoupgrade issue.

v2.2.7 - 11/30/20

  • Added autoUpgrade feature.
  • resource-display now shows resource gain per second if passiveGain is active.
  • Fixed formatting issues on some large numbers.
  • Better support for using classed objects in player and in layers/tmp.
  • Made hard resetting more effective.
  • Removed Herobrine from getStartClickables.

v2.2.6 - 11/30/20

  • Added goalDescription for challenges and made the new "canComplete" system the standard.
  • Another attempt to fix challenges not visually updating.
  • Fixed side layers not appearing.
  • Fixed getStartClickables again.

v2.2.5 - 11/29/20

  • Added features for overriding the displays and costs/goals of upgrades and challenges to make them fully custom.
  • best, total, and unlocked are always automatically added to layerData (but best and total will only display if you add them yourself).
  • Fixed getStartClickables.

v2.2.4 - 11/28/20

  • Added softcap and softcapPower features (for Normal layers)
  • Offline time limit and default max tick length were fixed (previously the limits were 1000x too large)
  • Added fixOldSaves.
  • You can use HTML in main-display.
  • Fixed a number of minor oddities.

v2.2.3 - 11/28/20

  • Layers will be highlighted if you can finish a challenge.
  • The "can complete challenge" color now overrides the "already completed" color.
  • Button nodes now work as side "layers".
  • Setting a tooltip to "" hides it entirely.

v2.2.2 - 11/22/20

  • Fixed right half of the screen being unclickable in some circumstances.
  • Fixed tree branches being offset.
  • Fix to lastSafeTab.

v2.2.1 - 11/7/20

  • Added a small highlight to layers you can meaningfully prestige on.
  • Added passiveGeneration and autoPrestige features to standardize prestige automation. (The old ways still work, but the new ones work better with other things)
  • Improved milestones visually a bit.
  • "best" and "total" are now only displayed if present in startData.
  • Fixed issues with things not updating visually. (Thank you to to Jacorb!)
  • Side layers and button nodes can now be highlighted.
  • Updated docs on the new tree-related features.

v2.2: Uprooted - 11/7/20

  • You can now embed a layer inside of a subtab or microtab!
  • Added support for hiding or reformatting the tree tab
  • Added non-layer button nodes
  • Added shouldNotify to subtab/microtab buttons. (You can make them highlighted)
  • Added commas to large exponents.
  • Upgrades now only show "currently" if they have an effectDisplay (so not for constant effects).
  • Achievements are part of the default tab format.
  • NaN is now handled more intelligently.
  • Renamed files, and moved less relevant ones to another folder.
  • The "hide completed challenges" setting now only hides challenges at max completions.
  • Thank you to thepaperpilot for fixing errors in docs and improving the infobox appearance!
  • Many other minor fixes.

v2.1.4 - 10/25/20

  • Added an infobox component. Thank you to thepaperpilot for this contribution!
  • Layer type is now optional, and defaults to "none".
  • Improved the look of bars and tab buttons.
  • Improved spacing between layer nodes (also thanks to thepaperpilot!)
  • Fixed the "blank" component breaking if only specifying the height.
  • Fixed some numbers not displaying with enough digits.
  • Made a few more things able to be functions.
  • A few other minor fixes.

v2.1.3.1 - 10/21/20

  • Fixed the update function.

v2.1.3 - 10/21/20

  • gainMult and gainExp are now optional.
  • Layer unlocking is now kept on reset.
  • Game should start up faster.
  • Layer updates now have a determined order and starts with earlier-rowed layers.
  • Automation now has a determined order and starts with later-rowed layers.
  • Fixed issues with resetting clickables and challenges.
  • Commas should no longer appear in the decimal places of a number.
  • Fixed potential issue in displaying the tree.

v2.1.2 - 10/19/20

  • Added buyUpgrade function (buyUpg still works though)
  • Added author name to modInfo.
  • Fix to crash caused when the name of a subtab or microtab is changed.
  • Fixes to outdated information in docs.
  • Improvements to Discord links.
  • Thank you to thepaperpilot for contributing to this update!

v2.1.1 - 10/17/20

  • Added resource-display component, which displays the base currency for the prestige layer, as well as the best and/or total of this layer's prestige currency.
  • Fixed the value for the base currency not updating in resource-display.

v2.1: We should have thought of this sooner! - 10/17/20

  • Moved most of the code users will want to edit to mod.js, added documentation for it.
    • Specifically, modInfo, VERSION, canGenPoints, getPointGen, and maxTickLength
  • Added getStartPoints()
  • Added the ability to store non-layer-related data
  • Added the ability to display more things at the top of the tree tab below points.
  • Made the endgame condition customizable
  • Added "sell one" and "sell all" buttons for buyables.
  • Moved the old "game" to demo.js, and replaced it with a minimal game that won't cause issues when edited.
  • Fixed issues with version number
  • Fixed number formatting issue making things like "10e9" appear.

v2.0.5 - 10/16/20

  • Made more features (including prestige parameters) able to be dynamic.
  • Layer nodes can be hidden but still take up space with "ghost" visibility
  • Added clickableEffect for real.
  • Fixed some visual issues with bars.
  • A few other minor tweaks and improvements.

v2.0.4 - 10/16/20

  • Fixed HTML on buttons interfering with clicking on them.

v2.0.3 - 10/16/20

  • Fixed hotkeys not displaying in info.
  • Fixed the game supressing all external hotkeys.
  • You can use more things as currencies for upgrade costs and challenge goals using currencyLocation.
  • Added maxTickLength, which can be used to prevent offline time or tab-switching from breaking time-limit based mechanics.
  • Made buyable respec buttons and clickable "master" buttons their own components, and gave them a hide/show feature.
  • Added a general "tooltip" feature for achievements.

v2.0.2 - 10/15/20

  • Branches are now dynamic (they can be functions).
  • Fixed a crash related to offline time.
  • Fixed links being too wide.

v2.0.1 - 10/15/20

  • Fixed side layers appearing multiple times.

v2.0: The Pinnacle of Achievement Mountain - 10/15/20

  • Added progress bars, which are highly customizable and can be horizontal or vertical!
  • Added "side layers", displayed smaller and off to the side, and don't get reset by default. They can be used for global achievements and statistics. Speaking of which...
  • Added achievements!
  • Added clickables, a more generalized variant of buyables.
  • Almost every value in layer data can be either a function or a constant value!
  • Added support for multiple completions of challenges.
  • Added "none" prestige type, which removes the need for any other prestige-related features.
  • The points display and other gui elements stay at the top of the screen when the tree scrolls.
  • Added getter/setter functions for the amounts and effects of most Big Features
  • Moved modInfo to game.js, added a spot in modInfo for a Discord link, changelog link. Also added a separate mod version from the TMT version in VERSION.
  • Tree structure is based on layer data, no index.html editing is needed.
  • Tmp does not need to be manually updated.
  • You don't have to have the same amount of upgrades in every row (and challs and buyables)
  • "unlocked" is optional for all Big Components (defaults to true).
  • All displays will update correctly.
  • Changelog is no longer in index.html at all.
  • Generation of Points now happens in the main game loop
  • Changed the reset functions to make keeping things easier
  • Renamed many things to increase readability (see the list in the link below)
  • Improved documentation based on feedback

v1.3.5:

  • Completely automated convertToDecimal, now you never have to worry about it again.
  • Branches can be defined without a color id. But they can also use hex values for color ids!
  • Created a tutorial for getting started with TMT and Github.
  • Page title is now automatically taken from mod name.

v1.3.4 - 10/8/20

  • Added "midsection" feature to add things to a tab's layout while still keeping the standard layout.
  • Fix for being able to buy more buyables than you should.

v1.3.3 - 10/7/20

  • Fix for the "order of operations" issue in temp.

v1.3.1 - 10/7/20

  • Added custom CSS and tooltips for Layer Nodes.
  • Added custom CSS for upgrades, buyables, milestones, and challenges, both individually and layer-wide.
  • You can now use HTML in most display text!
  • You can now make milestones unlockable and not display immediately.
  • Fixed importing saves, and issue with upgrades not appearing, and probably more.
  • Optional "name" layer feature, used in confirmation messages.

v1.3: Tabception... ception! - 10/7/20

  • Added subtabs! And also a Micro-tab component to let you make smaller subtab-esque areas anywhere.
  • Added a "custom" prestige formula type, and a number of features to support it.
  • Added points/sec display (can be disabled).
  • Added h-line, v-line and image-display components, plus components for individual upgrades, challenges, and milestones.
  • Added upgEffect, buyableEffect, and challEffect functions.
  • Added "hide completed challenges" setting.
  • Moved old changelogs to a separate place.
  • Fixed hasMilestone and incr_order.
  • Static layers now show the currency amount needed for the next one if you can buy max.

v1.2.4 - 10/4/20

  • Layers are now highlighted if you can buy an upgrade, and a new feature, shouldNotify, lets you make it highlight other ways.
  • Fixed bugs with hasUpg, hasChall, hasMilestone, and inChallenge.
  • Changed the sample code to use the above functions for convenience.

v1.2.3 - 10/3/20

  • Added a row component, which displays a list of objects in a row.
  • Added a column component, which displays a list of objects in a column (useful within a row).
  • Changed blanks to have a customizable width and height.

v1.2: This Changes Everything! - 10/3/20

  • Many layer features can now be static values or functions. (This made some formats change, which will break old things)
  • You can now use the "this" keyword, to make code easier to transfer when making new layers.
  • Also added "this.layer", which is the current layer's name, and works on existing subfeatures (e.g. individual upgrades) as well! Subfeatures also have "this.id".
  • Fixed a big save issue. If you use a unique mod id, your save will never conflict with other mods.
  • Added a configurable offline time limit in modinfo at the top of index.html. (default 1 hour)
  • Added a few minor features, and updated the docs with new information.

v1.1.1 - 9/30/20

  • You can define hotkeys directly from layer config.

v1.1: Enhanced Edition - 9/30/20

  • Added "Buyables", which can function like Space Buildings or Enhancers.
  • Custom CSS can now be used on any component! Make the third argument an object with CSS parameters.
  • Lots of minor good things.

v1.0 - 9/27/20

  • First release.
- + diff --git a/public/kronos/docs/!general-info/index.html b/public/kronos/docs/!general-info/index.html index 1888ca63..a3a696a0 100644 --- a/public/kronos/docs/!general-info/index.html +++ b/public/kronos/docs/!general-info/index.html @@ -22,7 +22,7 @@
On this page

The-Modding-Tree

Making a game in The Modding Tree mostly involves defining parameters or functions on objects. If you aren't following the getting started guide, you should start by setting up your basic mod info in mod.js. It's important to set a mod id to ensure saving works properly.

Beyond that, the main way to add content is through creating layers, often in layers.js. You can add new layers by calling addLayer(layername, layerdata). There is an example of a basic layer in layers.js showing the recommended method. It is just an example and can be freely deleted. You can also use it as a reference or a base for your own layers.

Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to, for example to add new Vue components in components.js.

The Modding Tree uses break_eternity.js to store large values. This means that many numbers are Decimal objects, and must be treated differently. For example, you have to use new Decimal(x) to create a Decimal value instead of a plain number, and perform operations on them by calling functions. e.g, instead of x = x + y, use x = x.add(y). Keep in mind this also applies to comparison operators, which should be replaced with calling the .gt, .gte, .lt, .lte, .eq, and .neq functions. See the break_eternity.js docs for more details on working with Decimal values.

Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.

All display text can use basic HTML elements (But you can't use most Vue features there).

While reading this documentation, the following key will be used when describing features:

  • No label: This is required and the game may crash if it isn't included.
  • sometimes required: This is may be required, depending on other things in the layer.
  • optional: You can leave this out if you don't intend to use that feature for the layer.
  • assigned automagically: This value will be set automatically and override any value you set.
  • deprecated: This feature is not recommended to be used, because newer features are able to achieve the same thing in a better, easier way.

Table of Contents

General

  • Getting Started: Getting your own copy of the code set up with Github Desktop.
  • Main mod info: How to set up general things for your mod in mod.js.
  • Basic layer breakdown: Breaking down the components of a layer with minimal features.
  • Layer features: Explanations of all of the different properties that you can give a layer.
  • Custom Tab Layouts: An optional way to give your tabs a different layout. You can even create entirely new components to use.
  • Custom game layouts: You can get rid of the tree tab, add buttons and other things to the tree, or even customize the tab's layout like a layer tab.
  • Updating TMT: Using Github Desktop to update your mod's version of TMT.

Common components

  • Upgrades: How to create upgrades for a layer.
  • Milestones: How to create milestones for a layer.
  • Buyables: Create rebuyable upgrades for your layer (with the option to make them respec-able). Can be used to make Enhancers or Space Buildings, for example.
  • Clickables: A more generalized variant of buyables, for any kind of thing that is sometimes clickable. Between these and Buyables, you can do just about anything.
  • Achievements: How to create achievements for a layer (or for the whole game).

Other components and features

  • Challenges: How to create challenges for a layer.
  • Bars: Display some information as a progress bar, gauge, or similar. They are highly customizable, and can be horizontal and vertical as well.
  • Subtabs and Microtabs: Create subtabs for your tabs, as well as "microtab" components that you can put inside the tabs. You can even use them to embed a layer inside another layer!
  • [Grids][grids.md]: Create a group buttons that behave the same, but have their own data. Good for map tiles, an inventory grid, and more!
  • Infoboxes: Boxes containing text that can be shown or hidden.
  • Trees: Make your own trees. You can make non-layer button nodes too!
  • Particle system: Can be used to create particles for visual effects, but also interactable things like golden cookies or collectables.
- + diff --git a/public/kronos/docs/achievements/index.html b/public/kronos/docs/achievements/index.html index 0de60df5..82c4a9d5 100644 --- a/public/kronos/docs/achievements/index.html +++ b/public/kronos/docs/achievements/index.html @@ -29,7 +29,7 @@ etc }

Usually, each achievement should have an id where the first digit is the row and the second digit is the column.

Individual achievement can have these features:

  • name: optional. displayed at the top of the achievement. The only visible text. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the achievement should be awarded.

  • tooltip: Default tooltip for the achievement, appears when it is hovered over. Should convey the goal and any reward for completing the achievement. It can also be a function that returns updating text. Can use basic HTML. Setting this to "" disables the tooltip.

  • effect(): optional. A function that calculates and returns the current values of any bonuses from the achievement. Can return a value or an object containing multiple values.

  • unlocked(): optional. A function returning a bool to determine if the achievement is visible or not. Default is unlocked.

  • onComplete() - optional. this function will be called when the achievement is completed.

  • image: optional, puts the image from the given URL (relative or absolute) in the achievement

  • style: optional. Applies CSS to this achievement, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • textStyle: optional. Applies CSS to the text, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the achievement was stored under, for convenient access. The achievement in the example's id is 11.

  • goalTooltip: optional, deprecated. Appears when the achievement is hovered over and locked, overrides the basic tooltip. This is to display the goal (or a hint). It can also be a function that returns updating text. Can use basic HTML.

  • doneTooltip: optional, deprecated. Appears when the achievement is hovered over and completed, overrides the basic tooltip. This can display what the player achieved (the goal), and the rewards, if any. It can also be a function that returns updating text. Can use basic HTML.

Disable achievement popups by adding achievementsPopups: false to the layer.

- + diff --git a/public/kronos/docs/bars/index.html b/public/kronos/docs/bars/index.html index b2356279..e5d715d3 100644 --- a/public/kronos/docs/bars/index.html +++ b/public/kronos/docs/bars/index.html @@ -32,7 +32,7 @@ etc }

Features:

  • direction: UP, DOWN, LEFT, or RIGHT (not strings). Determines the direction that the bar is filled as it progresses. RIGHT means from left to right.

  • width, height: The size in pixels of the bar, but as numbers (no "px" at the end).

  • progress(): A function that returns the portion of the bar that is filled, from "empty" at 0 to "full" at 1, updating automatically. (Nothing bad happens if the value goes out of these bounds, and it can be a number or Decimal)

  • display(): optional. A function that returns text to be displayed on top of the bar, can use HTML.

  • unlocked(): optional. A function returning a bool to determine if the bar is visible or not. Default is unlocked.

  • baseStyle, fillStyle, borderStyle, textStyle: Optional, Apply CSS to the unfilled portion, filled portion, border, and display text on the bar, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".

- + diff --git a/public/kronos/docs/basic-layer-breakdown/index.html b/public/kronos/docs/basic-layer-breakdown/index.html index 44477bdc..1fe49cf2 100644 --- a/public/kronos/docs/basic-layer-breakdown/index.html +++ b/public/kronos/docs/basic-layer-breakdown/index.html @@ -54,7 +54,7 @@ }, }) - + diff --git a/public/kronos/docs/buyables/index.html b/public/kronos/docs/buyables/index.html index 68518cbd..36f80c6b 100644 --- a/public/kronos/docs/buyables/index.html +++ b/public/kronos/docs/buyables/index.html @@ -35,7 +35,7 @@ etc }

Features:

  • title: optional. displayed at the top in a larger font. It can also be a function that returns updating text.

  • cost(): cost for buying the next buyable. Can have an optional argument "x" to calculate the cost of the x+1th purchase. (x is a Decimal). Can return an object if there are multiple currencies.

  • effect(): optional. A function that calculates and returns the current values of bonuses of this buyable. Can have an optional argument "x" to calculate the effect of having x of the buyable.. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the buyable after the title, likely including the description, amount bought, cost, and current effect. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the buyable is visible or not. Default is unlocked.

  • canAfford(): A function returning a bool to determine if you can buy one of the buyables.

  • buy(): A function that implements buying one of the buyable, including spending the currency.

  • buyMax(): optional. A function that implements buying as many of the buyable as possible.

  • style: optional. Applies CSS to this buyable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • purchaseLimit: optional. The limit on how many of the buyable can be bought. The default is no limit.

  • marked: optional Adds a mark to the corner of the buyable. If it's "true" it will be a star, but it can also be an image URL.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the buyable was stored under, for convenient access. The buyable in the example's id is 11.

Sell One/Sell All:

Including a sellOne or sellAll function will cause an additional button to appear beneath the buyable. They are functionally identical, but "sell one" appears above "sell all". You can also use them for other things.

  • sellOne/sellAll(): optional. Called when the button is pressed. The standard use would be to decrease/reset the amount of the buyable, and possibly return some currency to the player.

  • canSellOne/canSellAll(): optional. booleans determining whether or not to show the buttons. If "canSellOne/All" is absent but "sellOne/All" is present, the appropriate button will always show.

To add a respec button, or something similar, add the respecBuyables function to the main buyables object (not individual buyables). You can use these features along with it:

  • respec(): optional. This is called when the button is pressed (after a toggleable confirmation message).

  • respecText: optional. Text to display on the respec Button.

  • showRespec(): optional. A function determining whether or not to show the button, if respecBuyables is defined. Defaults to true if absent.

  • respecMessage: optional. A custom confirmation message on respec, in place of the default one.

- + diff --git a/public/kronos/docs/challenges/index.html b/public/kronos/docs/challenges/index.html index 11ae477f..6cc72122 100644 --- a/public/kronos/docs/challenges/index.html +++ b/public/kronos/docs/challenges/index.html @@ -31,7 +31,7 @@ etc }

Usually, each challenge should have an id where the first digit is the row and the second digit is the column.

Individual Challenges can have these features:

  • name: Name of the challenge, can be a string or a function. Can use basic HTML.

  • challengeDescription: A description of what makes the challenge a challenge. You will need to implement these elsewhere. It can also be a function that returns updating text. Can use basic HTML.

  • goalDescription: A description of the win condition for the challenge. It can also be a function that returns updating text. Can use basic HTML. (Optional if using the old goal system)

  • canComplete(): A function that returns true if you meet the win condition for the challenge. Returning a number will allow bulk completing the challenge. (Optional if using the old goal system)

  • rewardDescription: A description of the reward's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • rewardEffect(): optional. A function that calculates and returns the current values of any bonuses from the reward. Can return a value or an object containing multiple values. Can use basic HTML.

  • rewardDisplay(): optional. A function that returns a display of the current effects of the reward with formatting. Default behavior is to just display the a number appropriately formatted.

  • fullDisplay(): OVERRIDE. Overrides the other displays and descriptions, and lets you set the full text for the challenge. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the challenge is visible or not. Default is unlocked.

  • onComplete() - optional. this function will be called when the challenge is completed when previously incomplete.

  • onEnter() - optional. this function will be called when entering the challenge

  • onExit() - optional. this function will be called when exiting the challenge in any way

  • countsAs: optional. If a challenge combines the effects of other challenges in this layer, you can use this. An array of challenge ids. The player is effectively in all of those challenges when in the current one.

  • completionLimit: optional. the amount of times you can complete this challenge. Default is 1 completion.

  • style: optional. Applies CSS to this challenge, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • marked: optional Adds a mark to the corner of the challenge. If it's "true" it will be a star, but it can also be an image URL. By default, if the challenge has multiple completions, it will be starred at max completions.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: assigned automagically. It's the "key" which the challenge was stored under, for convenient access. The challenge in the example's id is 11.

The old goal system uses these features:

  • goal: deprecated, A Decimal for the amount of currency required to beat the challenge. By default, the goal is in basic Points. The goal can also be a function if its value changes.

  • currencyDisplayName: deprecated. the name to display for the currency for the goal

  • currencyInternalName: deprecated. the internal name for that currency

  • currencyLayer: deprecated. the internal name of the layer that currency is stored in. If it's not in a layer, omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation(): deprecated. if your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

- + diff --git a/public/kronos/docs/clickables/index.html b/public/kronos/docs/clickables/index.html index 274f1f88..f9640995 100644 --- a/public/kronos/docs/clickables/index.html +++ b/public/kronos/docs/clickables/index.html @@ -29,7 +29,7 @@ etc }

Features:

  • title: optional. displayed at the top in a larger font. It can also be a function that returns updating text.

  • effect(): optional. A function that calculates and returns the current values of bonuses of this clickable. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the clickable after the title, likely changing based on its state. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the clickable is visible or not. Default is unlocked.

  • canClick(): A function returning a bool to determine if you can click the clickable.

  • onClick(): A function that implements clicking the clickable.

  • onHold(): optional A function that is called 20x/sec when the button is held for at least 0.25 seconds.

  • style: optional. Applies CSS to this clickable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • marked: optional Adds a mark to the corner of the clickable. If it's "true" it will be a star, but it can also be an image URL.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the clickable was stored under, for convenient access. The clickable in the example's id is 11.

You can also use these features on the clickables object to add a button above all the clickables, for implementing a respec button or similar.

  • masterButtonPress(): optional. If present, an additional button will appear above the clickables. Pressing it will call this function.

  • masterButtonText: optional. Text to display on the Master Button.

  • showMasterButton(): optional. A function determining whether or not to show the button, if masterButtonPress is defined. Defaults to true if absent.

- + diff --git a/public/kronos/docs/custom-tab-layouts/index.html b/public/kronos/docs/custom-tab-layouts/index.html index 4a17b9cf..b3d3cca1 100644 --- a/public/kronos/docs/custom-tab-layouts/index.html +++ b/public/kronos/docs/custom-tab-layouts/index.html @@ -36,7 +36,7 @@ "upgrades" ]

It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) applies a CSS style to it with a "CSS object", where the keys are CSS attributes.

These are the existing components, but you can create more in components.js:

  • display-text: Displays some text (can use basic HTML). The argument is the text to display. It can also be a function that returns updating text.

  • raw-html: Displays some basic HTML, can also be a function.

  • blank: Adds empty space. The default dimensions are 8px x 17px. The argument changes the dimensions. If it's a single value (e.g. "20px"), that determines the height. If you have a pair of arguments, the first is width and the second is height.

  • row: Display a list of components horizontally. The argument is an array of components in the tab layout format.

  • column: Display a list of components vertically. The argument is an array of components in the tab layout format. This is useful to display columns within a row.

  • main-display: The text that displays the main currency for the layer and its effects. The argument is the amount of precision to use, allowing it to display non-whole numbers.

  • resource-display: The text that displays the currency that this layer is based on, as well as the best and/or total values for this layer's prestige currency (if they are put in startData for this layer).

  • prestige-button: The argument is a string that the prestige button should say before the amount of currency you will gain. It can also be a function that returns updating text.

  • text-input: A text input box. The argument is the name of the variable in player[layer] that the input is for, player[layer][argument] (Works with strings, numbers, and Decimals!)

  • slider: Lets the user input a value with a slider. The argument a 3-element array: [name, min, max]. The name is the name of the variable in player[layer] that the input that the input is for, and min and max are the limits of the slider. (Does not work for Decimal values)

  • upgrades: The layer's upgrades. The argument is optional, and is a the list of rows this component should include, if it doesn't have all of them.

  • milestones, challenges, achievements: Display the upgrades, milestones, and challenges for a layer, as appropriate.

  • buyables, clickables: Display all of the buyables/clickables for this layer, as appropriate. The argument is optional and is the size of the boxes in pixels.

  • microtabs: Display a set of subtabs for an area. The argument is the name of the set of microtabs in the "microtabs" feature.

  • bar: Display a bar. The argument is the id of the bar to display.

  • infobox: Display an infobox. The argument is the id of the infobox to display.

  • tree: Displays a tree. The argument is an array of arrays containing the names of the nodes in the tree (first by row, then by column) See here for more information on tree layouts and nodes!

  • toggle: A toggle button that toggles a bool value. The argument is a pair that identifies the location in player of the bool to toggle, e.g. [layer, id]. 'layer' also affects the color of the toggle.

  • grid: Displays the gridable grid for the layer. If you need more than one grid, use a layer proxy.

  • layer-proxy: Lets you use components from another layer. The argument is a pair, [layer, data], consisting of the id of the layer to proxy from, and the tabFormat for the components to show. (Note: you cannot use a microtab within a layer proxy)

The rest of the components are sub-components. They can be used just like other components, but are typically part of another component.

  • upgrade, milestone, challenge, buyable, clickable, achievement, gridable: An individual upgrade, challenge, etc. The argument is the id. This can be used if you want to have upgrades split up across multiple subtabs, for example.

  • respec-button, master-button: The respec and master buttons for buyables and clickables, respectively.

  • sell-one, sell-all: The "sell one" and "sell all" for buyables, respectively. The argument is the id of the buyable.

- + diff --git a/public/kronos/docs/getting-started/index.html b/public/kronos/docs/getting-started/index.html index d45cc081..dfb978f9 100644 --- a/public/kronos/docs/getting-started/index.html +++ b/public/kronos/docs/getting-started/index.html @@ -22,7 +22,7 @@
On this page

Getting started

Welcome to The Modding Tree!

Using the Modding Tree, at its simplest level, just requires getting a copy of it onto your computer. However, if you do it the right way, it will help in many ways.

Don't let the word "Github" scare you away. It's actually much easier to use than most people think, especially because most people use it the hard way. The key is Github Desktop, which lets you do everything you need to, without even touching the command line.

The benefits of using Github:

  • It makes it much, much easier to update The Modding Tree.
  • You can share your work without any extra effort using githack, or with a bit more effort, set up a github.io site.
  • It lets you undo changes to your code, and to have multiple versions of it.
  • It lets you collaborate with other people, if you want to.

Getting set up with Github Desktop, Visual Studio Code, and The Modding Tree:

  1. Install Github Desktop and Visual Studio Code.

  2. Make a Github account. You can handle this on your own.

  3. Log in on your browser, and go back to The Modding Tree page. At the top right, there should be a button that says "fork". Click on it, and then on your username. You now have your own fork, or copy, of The Modding Tree.

  4. Open Github Desktop and log in. Ignore everything else and choose "clone a repository". A "repository" is basically a "Github project", like The Modding Tree. "Cloning" is downloading a copy of the repository to your computer.

  5. Look for The Modding Tree in the list of repositiories (it should be the only one) and click "clone".

  6. Select that you're using it for your own purposes, and click continue. It will download the files and handle everything.

Using your repository

  1. Click on "show in explorer/finder" to the right, and then open the index.html file in the folder. The page should open up on your browser. This will let you view and test your project locally!

  2. To edit your project, click "open in VSCode" in Github Desktop.

  3. Open mod.js in VSCode, and look at the top part where it has a "modInfo" object. Fill in your mod's name to whatever you want, and change the id as well. (It can be any string value, and it's used to determine where the savefile is. Make it something that's probably unique, and don't change it again later or else it'll effectively wipe existing saves)

  4. Save mod.js, and then reload index.html in your browser. The title on the tab, as well as on the info page, will now be updated! You can reload the page every time you change the code to test it quickly and easily.

  5. Go back to Github Desktop. It's time to save your changes into the git system by making a "commit". This basically saves your work and creates a snapshot of what your code looks like at this moment, allowing you to look back at it later.

  6. At the bottom right corner, add a summary of your changes, and then click "commit to master".

  7. Finally, at the top middle, click "push origin" to push your changes out onto the online repository.

  8. You can view your project on line, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html

And now, you have successfully used Github! You can look at the documentation to see how The Modding Tree's system works and to make your mod a reality.

- + diff --git a/public/kronos/docs/grids/index.html b/public/kronos/docs/grids/index.html index 24aeee10..b67cb7bc 100644 --- a/public/kronos/docs/grids/index.html +++ b/public/kronos/docs/grids/index.html @@ -43,7 +43,7 @@ etc }

Features:

  • rows, cols: The amount of rows and columns of gridable to display.

  • maxRows, maxCols: sometimes needed. If rows or cols are dynamic, you need to define the maximum amount that there can be (you can increase it when you update the game though). These CANNOT be dynamic.

  • getStartData(id): Creates the default data for the gridable at this position. This can be an object, or a regular value.

  • getUnlocked(id): optional. Returns true if the gridable at this position should be visible.

  • getTitle(data, id): optional. Returns text that should displayed at the top in a larger font, based on the position and data of the gridable.

  • getDisplay(data, id): optional. Returns everything that should be displayed on the gridable after the title, based on the position and data of the gridable.

  • getStyle(data, id): optional. Returns CSS to apply to this gridable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • getCanClick(data, id): optional. A function returning a bool to determine if you can click a gridable, based on its data and position. If absent, you can always click it.

  • onClick(data, id): A function that implements clicking on the gridable, based on its position and data.

  • onHold(data, id): optional A function that is called 20x/sec when the button is held for at least 0.25 seconds.

  • getEffect(data, id): optional. A function that calculates and returns a gridable's effect, based on its position and data. (Whatever that means for a gridable)

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

- + diff --git a/public/kronos/docs/infoboxes/index.html b/public/kronos/docs/infoboxes/index.html index f97cde19..b189d946 100644 --- a/public/kronos/docs/infoboxes/index.html +++ b/public/kronos/docs/infoboxes/index.html @@ -30,7 +30,7 @@ etc }

Features:

  • title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.

  • body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.

  • style, titleStyle, bodyStyle: optional. Apply CSS to the infobox, or to the title button or body of the infobox, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • unlocked(): optional. A function returning a bool to determine if the infobox is visible or not. Default is unlocked.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: assigned automagically. It's the "key" which the bar was stored under, for convenient access. The infobox in the example's id is "lore".

- + diff --git a/public/kronos/docs/layer-features/index.html b/public/kronos/docs/layer-features/index.html index 4d1f4b1b..a5094589 100644 --- a/public/kronos/docs/layer-features/index.html +++ b/public/kronos/docs/layer-features/index.html @@ -34,7 +34,7 @@ "prestige-button"() { return {'color': '#AA66AA'} } }
  • deactivated: optional, if this is true, hasUpgrade, hasChallenge, hasAchievement, and hasMilestone will return false for things in the layer, and you will be unable to buy or click things on the layer. You will have to disable effects of buyables, the innate layer effect, and possibly other things yourself.

Custom Prestige type

(All of these can also be used by other prestige types)

  • getResetGain(): mostly for custom prestige type. Returns how many points you should get if you reset now. You can call getResetGain(this.layer, useType = "static") or similar to calculate what your gain would be under another prestige type (provided you have all of the required features in the layer).

  • getNextAt(canMax=false): mostly for custom prestige type. Returns how many of the base currency you need to get to the next point. canMax is an optional variable used with Static-ish layers to differentiate between if it's looking for the first point you can reset at, or the requirement for any gain at all (Supporting both is good). You can also call getNextAt(this.layer, canMax=false, useType = "static") or similar to calculate what your next at would be under another prestige type (provided you have all of the required features in the layer).

  • canReset(): mostly for custom prestige type. Return true only if you have the resources required to do a prestige here.

  • prestigeNotify(): mostly for custom prestige types, returns true if this layer should be subtly highlighted to indicate you can prestige for a meaningful gain.

- + diff --git a/public/kronos/docs/main-mod-info/index.html b/public/kronos/docs/main-mod-info/index.html index ec3022e8..a4c70c66 100644 --- a/public/kronos/docs/main-mod-info/index.html +++ b/public/kronos/docs/main-mod-info/index.html @@ -28,7 +28,7 @@ happiness: new Decimal(72), }}
  • displayThings: An array of functions used to display extra things at the top of the tree tab. Each function returns a string, which is a line to display (with basic HTML support). If a function returns nothing, nothing is displayed (and it doesn't take up a line).

  • isEndgame(): A function to determine if the player has reached the end of the game, at which point the "you win!" screen appears.

Less important things beyond this point!

  • maxTickLength(): Returns the maximum tick length, in milliseconds. Only really useful if you have something that reduces over time, which long ticks mess up (usually a challenge).

  • fixOldSave(): Can be used to modify a save file when loading into a new version of the game. Use this to undo inflation, never forcibly hard reset your players.

- + diff --git a/public/kronos/docs/milestones/index.html b/public/kronos/docs/milestones/index.html index 422d3753..8baddc7d 100644 --- a/public/kronos/docs/milestones/index.html +++ b/public/kronos/docs/milestones/index.html @@ -30,7 +30,7 @@ etc }

You can use hasMilestone(layer, id) to determine if the player has a given milestone

Milestone features:

  • requirementDescription: A string describing the requirement for unlocking this milestone. Suggestion: Use a "total". It can also be a function that returns updating text. Can use basic HTML.

  • effectDescription: A string describing the reward for having the milestone. You will have to implement the reward elsewhere. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the milestone should be awarded.

  • toggles: optional. Creates toggle buttons that appear on the milestone when it is unlocked. The toggles can toggle a given boolean value in a layer. It is defined as an array of paired items, one pair per toggle. The first is the internal name of the layer the value being toggled is stored in, and the second is the internal name of the variable to toggle. (e.g. [["b", "auto"], ["g", "auto"])

    Tip: Toggles are not de-set if the milestone becomes locked! In this case, you should also check if the player has the milestone.

  • style: optional. Applies CSS to this milestone, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • unlocked(): optional. A function returning a boolean to determine if the milestone should be shown. If absent, it is always shown.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the milestone was stored under, for convenient access. The milestone in the example's id is 0.

Disaable milestone popups by adding milestonePopups: false to the layer.

- + diff --git a/public/kronos/docs/particles/index.html b/public/kronos/docs/particles/index.html index 11d631e5..ad0225c0 100644 --- a/public/kronos/docs/particles/index.html +++ b/public/kronos/docs/particles/index.html @@ -33,7 +33,7 @@ etc... }

Features can be functions or constant. These features will be called when each particle is made, with an id argument, which is assigned based on which of the amount particles being spawned this is. All of these are optional, with a default value.

All distances are in pixels and angles are in degrees, with 0 being up and going clockwise.

  • time: The amount of time, in seconds, that the particle will last. Default is 3.

  • fadeOutTime: The amount of seconds that fading out at the end should take (part of the total lifetime). Default is 1.

  • fadeInTime: The amount of seconds that fading in should take (part of the total lifetime). Default is 0.

  • image: The image the particle should display. "" will display no image. Default is a generic particle.

  • text: Displays text on the particle. Can use basic HTML.

  • style: Lets you apply other CSS styling to the particle.

  • width, height: The dimensions of the particle. Default is 35 and 35.

  • color: Sets the color of the image to this color.

  • angle: The angle that the particle should face. Default is 0.

  • dir: The initial angle that the particles should move in, before spread is factored in. Default is whatever angle is.

  • spread: If there are several particles, they will be spread out by this many degrees, centered on dir. Default is 30.

  • rotation: The amount that the (visual) angle of the particle should change by. Default is 0.

  • speed: The starting speed of the particle. Default is 15.

  • gravity: The amount the particle should accelerate downwards. Default is 0.

  • x, y: The starting coordinates of the particle. Default is at the mouse position.

  • offset: How far from the start each particle should appear. Default is 10.

  • xVel, yVel: Set initially based on other properties, then used to update movement.

  • layer: When changing tabs, if leaving the layer tab, this particle will be erased.

  • You can add other features to particles, but you must impliment their effects yourself.

Function features: These stay as functions and are for more advanced things. They are optional.

  • update(): Called each tick. Lets you do more advanced visual and movement behaviors by changing other properties.
  • onClick(), onMouseOver(), onMouseLeave(): Called when the particle is interacted with.

Other useful things that are not features of the particle object:

  • setDir(particle, dir), setSpeed(particle, speed): Set the speed/direction on a particle.
  • clearParticles(check): Function to delete particles. With no check, it deletes all particles. Check is a function that takes a particle, and returns true if that particle should be deleted.
  • You can use Vue.delete(particles, this.id) to make a particle delete itself.
  • mouseX and mouseY are variables that track the mouse position.
  • sin(x), cos(x), tan(x): functions that do these operations, with x in degrees. (Instead of radians).
  • asin(x), acos(x), atan(x): functions that do these operations, with the returned value in degrees. (instead of radians).
- + diff --git a/public/kronos/docs/subtabs-and-microtabs/index.html b/public/kronos/docs/subtabs-and-microtabs/index.html index 488eed7d..8988dc1c 100644 --- a/public/kronos/docs/subtabs-and-microtabs/index.html +++ b/public/kronos/docs/subtabs-and-microtabs/index.html @@ -48,7 +48,7 @@ } }

Normal subtabs and microtab subtabs both use the same features:

Features:

  • content: The tab layout code for the subtab, in the tab layout format.

  • style: optional. Applies CSS to the whole subtab when switched to, in the form of an "CSS Object", where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • buttonStyle: optional. A CSS object, which affects the appearance of the button for that subtab.

  • unlocked(): optional. a function to determine if the button for this subtab should be visible. By default, a subtab is always unlocked. You can't use the "this" keyword in this function.

  • shouldNotify()/prestigeNotify(): optional, if true, the tab button will be highlighted to notify the player that there is something there.

  • glowColor: optional, specifies the color that the subtab glows. If this subtab is causing the main layer to node glow (and it would't otherwise) the node also glows this color. Is NOT overridden by embedding a layer.

  • embedLayer: SIGNIFICANT, the id of another layer. If you have this, it will override "content", "style" and "shouldNotify", instead displaying the entire layer in the subtab.

- + diff --git a/public/kronos/docs/trees-and-tree-customization/index.html b/public/kronos/docs/trees-and-tree-customization/index.html index aa5158ea..3a836b3c 100644 --- a/public/kronos/docs/trees-and-tree-customization/index.html +++ b/public/kronos/docs/trees-and-tree-customization/index.html @@ -25,7 +25,7 @@ ["left", "blank", "right", "blank"] ["a", "b", "blank", "c", "weirdButton"]]

Nodes

Nodes are non-layer buttons that can go in trees. They are defined similarly to layers, but with addNode instead of addLayer.

Features:

  • color: optional, The node's color. (A string in hex format with a #)

  • symbol: optional The text on the button (The id capitalized by default)

  • canClick(): Returns true if the player can click the node. ()

  • onClick(): The function called when the node is clicked.

  • layerShown(): optional, A function returning a bool which determines if this node should be visible. It can also return "ghost", which will hide the layer, but its node will still take up space in its tree.

  • branches: optional. An array of layer/node ids. On a tree, a line will appear from this node to all of the nodes in the list. Alternatively, an entry in the array can be a 2-element array consisting of the id and a color value. The color value can either be a string with a hex color code, or a number from 1-3 (theme-affected colors).

  • nodeStyle: optional. A CSS object, where the keys are CSS attributes, which styles this node on the tree.

  • tooltip() / tooltipLocked(): optional. Functions that return text, which is the tooltip for the node when the layer is unlocked or locked, respectively. By default the tooltips behave the same as in the original Prestige Tree.

  • row: optional, the row that this node appears in (for the default tree).

  • position: optional, Determines the horizontal position of the layer in its row in a default tree. By default, it uses the id, and layers/nodes are sorted in alphabetical order.

- + diff --git a/public/kronos/docs/updating-tmt/index.html b/public/kronos/docs/updating-tmt/index.html index 66c91b58..98588b4f 100644 --- a/public/kronos/docs/updating-tmt/index.html +++ b/public/kronos/docs/updating-tmt/index.html @@ -22,7 +22,7 @@
On this page

Updating The Modding Tree

This tutorial assumes that you have used the Getting Started Tutorial, and are using Github Desktop and VSCode for your mod.

Here's what you have to do when there's a TMT update:

  1. Look at the changelog. It will warn you if the update will break anything or require any changes. Decide if you want to try to update.

  2. Open Github Desktop, and at the top middle, click "fetch origin". This will make Github Desktop get information about the update.

  3. Click where it says "current branch: master" at the top middle, and at the bottom of the thing that appears, click "choose a branch to merge into master".

  4. Select upstream/master. It will likely say there are conflicts, but you have tools to resolve them. Click "Merge upstream/master into master".

  5. A conflict happens when the things you're trying to merge have both made changes in the same place. Click "open in Visual Studio Code" next to the first file.

  6. Scroll down through the file, and look for the parts highlighted in red and green. One of these is your code, and the other is some code that will be modified by the update. Do your best to try to edit things to keep the updated changes, but keep your content.

  7. Continue to do this for all remaining changes.

  8. Do any other changes required by the update, run the game, fix issues, etc.

- + diff --git a/public/kronos/docs/upgrades/index.html b/public/kronos/docs/upgrades/index.html index 0c5afbef..2826e4f2 100644 --- a/public/kronos/docs/upgrades/index.html +++ b/public/kronos/docs/upgrades/index.html @@ -30,7 +30,7 @@ etc }

Usually, upgrades should have an id where the first digit is the row and the second digit is the column.

Individual upgrades can have these features:

  • title: optional. Displayed at the top in a larger font. It can also be a function that returns updating text. Can use basic HTML.

  • description: A description of the upgrade's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • effect(): optional. A function that calculates and returns the current values of any bonuses from the upgrade. Can return a value or an object containing multiple values.

  • effectDisplay(): optional. A function that returns a display of the current effects of the upgrade with formatting. Default displays nothing. Can use basic HTML.

  • fullDisplay(): OVERRIDE. Overrides the other displays and descriptions, and lets you set the full text for the upgrade. Can use basic HTML.

  • cost: A Decimal for the cost of the upgrade. By default, upgrades cost the main prestige currency for the layer.

  • unlocked(): optional. A function returning a bool to determine if the upgrade is visible or not. Default is unlocked.

  • onPurchase(): optional. This function will be called when the upgrade is purchased. Good for upgrades like "makes this layer act like it was unlocked first".

  • style: optional. Applies CSS to this upgrade, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the upgrade was stored under, for convenient access. The upgrade in the example's id is 11.

By default, upgrades use the main prestige currency for the layer. You can include these to change them (but it needs to be a Decimal):

  • currencyDisplayName: optional. The name to display for the currency for the upgrade.

  • currencyInternalName: optional. The internal name for that currency.

  • currencyLayer: optional. The internal name of the layer that currency is stored in. If it's not in a layer (like Points), omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation: optional. If your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

If you want to do something more complicated like upgrades that cost two currencies, you can override the purchase system with these (and you need to use fullDisplay as well)

  • canAfford(): OVERRIDE, a function determining if you are able to buy the upgrade

  • pay(): OVERRIDE, a function that reduces your currencies when you buy the upgrade

- + diff --git a/public/lit/Old Things/2.0-format-changes/index.html b/public/lit/Old Things/2.0-format-changes/index.html index f75c8e95..c92da710 100644 --- a/public/lit/Old Things/2.0-format-changes/index.html +++ b/public/lit/Old Things/2.0-format-changes/index.html @@ -22,7 +22,7 @@
On this page

2.0 format changes

  • Temp format is changed from temp.something[layer] to temp[layer].something, for consistency
  • Challenges are now saved as an object with the amount of completions in each spot. (This will break saves.)
  • effectDisplay in Challenges and Upgrades no longer takes an argument, and neither does effect for Buyables
  • Buyable cost can take an argument for amount of buyables, but it needs to function if no argument is supplied (it should do the cost for the next purchase).
  • Generation of Points now happens in the main game loop (not in a layer update function), enabled by canGenPoints in game.js.
  • Changed fullLayerReset to layerDataReset, which takes an array of names of values to keep

In addition, many names were changed, mostly expanding abbreviations:

All instances of:

  • chall -> challenge
  • unl -> unlocked
  • upg -> upgrade (besides CSS)
  • amt -> amount
  • desc -> description
  • resCeil -> roundUpCost
  • order -> unlockOrder
  • incr_order -> increaseUnlockOrder

Challenges:

  • desc -> challengeDescription
  • reward -> rewardDescription
  • effect -> rewardEffect
  • effectDisplay -> rewardDisplay
  • active -> challengeActive
- + diff --git a/public/lit/README/index.html b/public/lit/README/index.html index 186f2788..93bc5889 100644 --- a/public/lit/README/index.html +++ b/public/lit/README/index.html @@ -22,7 +22,7 @@
On this page

Kronos

Play here.

Updating the website:

  • git submodule update --remote
  • git add -A
  • git commit -m "Updated kronos"
  • git push
- + diff --git a/public/lit/changelog/index.html b/public/lit/changelog/index.html index ce5b62ec..589be9a1 100644 --- a/public/lit/changelog/index.html +++ b/public/lit/changelog/index.html @@ -22,7 +22,7 @@
On this page

The Modding Tree changelog:

v2.Ï€: Incrementally Updated - 2/5/21

  • Performance improvements.
  • Fixed tooltips overlapping with the top display.
  • Clicking a popup dismisses it immediately.
  • Added support for bulk challenge completions.
  • "Best" is updated automatically.
  • Fixed keeping Decimal values on reset.
  • Code reorganization and style improvements by fudo.

v2.3.5 - 12/21/20

  • Added resetTime, which tracks the time since a layer prestiged or was reset.
  • A layer node will be highlighted red if one of its subtabs is highlighted red.
  • Fixed issues with keeping challenges, buyables, and clickables on reset.
  • Improved the unlocking of custom layers.
  • Other minor fixes.

v2.3.4 - 12/16/20

  • Added a node image feature.
  • Resource display now always shows the amount of the currency the layer's gain is based on.
  • Added spacing between tree nodes.
  • Another attempt to fix tooltip flickering.

v2.3.3 - 12/13/20

  • Fixed the first node in a row always taking up space.
  • layerShown is now optional.
  • All prestige types can now use features for custom prestige types.

v2.3.2 - 12/13/20

  • Fixed achievement/milestone popups.

v2.3.1 - 12/12/20

  • Another attempt to fix flickering tooltips.
  • The "this" keyword should work everywhere except tabFormat arrays (although I may have missed some things).
  • Fixed tree branches not updating when scrolling on the right-side tab.
  • Fixed a spacing issue when a node's symbol is ""
  • Removed some old, unneeded files.

v2.3: Cooler and Newer Edition - 12/10/20

  • Added achievement/milestone popups (thank you to Jacorb for this contribution!)
  • The changelog tab is back, and can be set in mod.js.
  • Layer nodes and respec buttons will not be clicked by pressing "enter".
  • Possible fix for flickering tooltips and strange transitions.
  • The victory screen text is configurable.
  • Added image and textStyle features to achievements.
  • Added an argument to use specific rows in an "upgrades" component.
  • Fixed the comma appearing in the main display when there was no effectDescription
  • Added the ability to easily make a tab that is a collection of layers in subtabs.
  • Improved spacing for embedding layers with subtabs into subtabs.

v2.2.8 - 12/03/20

  • Double-clicking a layer node brings you to the main subtab for that layer.
  • Attempted to fix challenges visually updating a different way.
  • Added a softcap function for use in formulas.
  • Added displayRow feature, which lets layers be shown somewhere separate from where they are in the reset order (e.g. side layers)
  • Fixed autoupgrade issue.

v2.2.7 - 11/30/20

  • Added autoUpgrade feature.
  • resource-display now shows resource gain per second if passiveGain is active.
  • Fixed formatting issues on some large numbers.
  • Better support for using classed objects in player and in layers/tmp.
  • Made hard resetting more effective.
  • Removed Herobrine from getStartClickables.

v2.2.6 - 11/30/20

  • Added goalDescription for challenges and made the new "canComplete" system the standard.
  • Another attempt to fix challenges not visually updating.
  • Fixed side layers not appearing.
  • Fixed getStartClickables again.

v2.2.5 - 11/29/20

  • Added features for overriding the displays and costs/goals of upgrades and challenges to make them fully custom.
  • best, total, and unlocked are always automatically added to layerData (but best and total will only display if you add them yourself).
  • Fixed getStartClickables.

v2.2.4 - 11/28/20

  • Added softcap and softcapPower features (for Normal layers)
  • Offline time limit and default max tick length were fixed (previously the limits were 1000x too large)
  • Added fixOldSaves.
  • You can use HTML in main-display.
  • Fixed a number of minor oddities.

v2.2.3 - 11/28/20

  • Layers will be highlighted if you can finish a challenge.
  • The "can complete challenge" color now overrides the "already completed" color.
  • Button nodes now work as side "layers".
  • Setting a tooltip to "" hides it entirely.

v2.2.2 - 11/22/20

  • Fixed right half of the screen being unclickable in some circumstances.
  • Fixed tree branches being offset.
  • Fix to lastSafeTab.

v2.2.1 - 11/7/20

  • Added a small highlight to layers you can meaningfully prestige on.
  • Added passiveGeneration and autoPrestige features to standardize prestige automation. (The old ways still work, but the new ones work better with other things)
  • Improved milestones visually a bit.
  • "best" and "total" are now only displayed if present in startData.
  • Fixed issues with things not updating visually. (Thank you to to Jacorb!)
  • Side layers and button nodes can now be highlighted.
  • Updated docs on the new tree-related features.

v2.2: Uprooted - 11/7/20

  • You can now embed a layer inside of a subtab or microtab!
  • Added support for hiding or reformatting the tree tab
  • Added non-layer button nodes
  • Added shouldNotify to subtab/microtab buttons. (You can make them highlighted)
  • Added commas to large exponents.
  • Upgrades now only show "currently" if they have an effectDisplay (so not for constant effects).
  • Achievements are part of the default tab format.
  • NaN is now handled more intelligently.
  • Renamed files, and moved less relevant ones to another folder.
  • The "hide completed challenges" setting now only hides challenges at max completions.
  • Thank you to thepaperpilot for fixing errors in docs and improving the infobox appearance!
  • Many other minor fixes.

v2.1.4 - 10/25/20

  • Added an infobox component. Thank you to thepaperpilot for this contribution!
  • Layer type is now optional, and defaults to "none".
  • Improved the look of bars and tab buttons.
  • Improved spacing between layer nodes (also thanks to thepaperpilot!)
  • Fixed the "blank" component breaking if only specifying the height.
  • Fixed some numbers not displaying with enough digits.
  • Made a few more things able to be functions.
  • A few other minor fixes.

v2.1.3.1 - 10/21/20

  • Fixed the update function.

v2.1.3 - 10/21/20

  • gainMult and gainExp are now optional.
  • Layer unlocking is now kept on reset.
  • Game should start up faster.
  • Layer updates now have a determined order and starts with earlier-rowed layers.
  • Automation now has a determined order and starts with later-rowed layers.
  • Fixed issues with resetting clickables and challenges.
  • Commas should no longer appear in the decimal places of a number.
  • Fixed potential issue in displaying the tree.

v2.1.2 - 10/19/20

  • Added buyUpgrade function (buyUpg still works though)
  • Added author name to modInfo.
  • Fix to crash caused when the name of a subtab or microtab is changed.
  • Fixes to outdated information in docs.
  • Improvements to Discord links.
  • Thank you to thepaperpilot for contributing to this update!

v2.1.1 - 10/17/20

  • Added resource-display component, which displays the base currency for the prestige layer, as well as the best and/or total of this layer's prestige currency.
  • Fixed the value for the base currency not updating in resource-display.

v2.1: We should have thought of this sooner! - 10/17/20

  • Moved most of the code users will want to edit to mod.js, added documentation for it.
    • Specifically, modInfo, VERSION, canGenPoints, getPointGen, and maxTickLength
  • Added getStartPoints()
  • Added the ability to store non-layer-related data
  • Added the ability to display more things at the top of the tree tab below points.
  • Made the endgame condition customizable
  • Added "sell one" and "sell all" buttons for buyables.
  • Moved the old "game" to demo.js, and replaced it with a minimal game that won't cause issues when edited.
  • Fixed issues with version number
  • Fixed number formatting issue making things like "10e9" appear.

v2.0.5 - 10/16/20

  • Made more features (including prestige parameters) able to be dynamic.
  • Layer nodes can be hidden but still take up space with "ghost" visibility
  • Added clickableEffect for real.
  • Fixed some visual issues with bars.
  • A few other minor tweaks and improvements.

v2.0.4 - 10/16/20

  • Fixed HTML on buttons interfering with clicking on them.

v2.0.3 - 10/16/20

  • Fixed hotkeys not displaying in info.
  • Fixed the game supressing all external hotkeys.
  • You can use more things as currencies for upgrade costs and challenge goals using currencyLocation.
  • Added maxTickLength, which can be used to prevent offline time or tab-switching from breaking time-limit based mechanics.
  • Made buyable respec buttons and clickable "master" buttons their own components, and gave them a hide/show feature.
  • Added a general "tooltip" feature for achievements.

v2.0.2 - 10/15/20

  • Branches are now dynamic (they can be functions).
  • Fixed a crash related to offline time.
  • Fixed links being too wide.

v2.0.1 - 10/15/20

  • Fixed side layers appearing multiple times.

v2.0: The Pinnacle of Achievement Mountain - 10/15/20

  • Added progress bars, which are highly customizable and can be horizontal or vertical!
  • Added "side layers", displayed smaller and off to the side, and don't get reset by default. They can be used for global achievements and statistics. Speaking of which...
  • Added achievements!
  • Added clickables, a more generalized variant of buyables.
  • Almost every value in layer data can be either a function or a constant value!
  • Added support for multiple completions of challenges.
  • Added "none" prestige type, which removes the need for any other prestige-related features.
  • The points display and other gui elements stay at the top of the screen when the tree scrolls.
  • Added getter/setter functions for the amounts and effects of most Big Features
  • Moved modInfo to game.js, added a spot in modInfo for a Discord link, changelog link. Also added a separate mod version from the TMT version in VERSION.
  • Tree structure is based on layer data, no index.html editing is needed.
  • Tmp does not need to be manually updated.
  • You don't have to have the same amount of upgrades in every row (and challs and buyables)
  • "unlocked" is optional for all Big Components (defaults to true).
  • All displays will update correctly.
  • Changelog is no longer in index.html at all.
  • Generation of Points now happens in the main game loop
  • Changed the reset functions to make keeping things easier
  • Renamed many things to increase readability (see the list in the link below)
  • Improved documentation based on feedback

v1.3.5:

  • Completely automated convertToDecimal, now you never have to worry about it again.
  • Branches can be defined without a color id. But they can also use hex values for color ids!
  • Created a tutorial for getting started with TMT and Github.
  • Page title is now automatically taken from mod name.

v1.3.4 - 10/8/20

  • Added "midsection" feature to add things to a tab's layout while still keeping the standard layout.
  • Fix for being able to buy more buyables than you should.

v1.3.3 - 10/7/20

  • Fix for the "order of operations" issue in temp.

v1.3.1 - 10/7/20

  • Added custom CSS and tooltips for Layer Nodes.
  • Added custom CSS for upgrades, buyables, milestones, and challenges, both individually and layer-wide.
  • You can now use HTML in most display text!
  • You can now make milestones unlockable and not display immediately.
  • Fixed importing saves, and issue with upgrades not appearing, and probably more.
  • Optional "name" layer feature, used in confirmation messages.

v1.3: Tabception... ception! - 10/7/20

  • Added subtabs! And also a Micro-tab component to let you make smaller subtab-esque areas anywhere.
  • Added a "custom" prestige formula type, and a number of features to support it.
  • Added points/sec display (can be disabled).
  • Added h-line, v-line and image-display components, plus components for individual upgrades, challenges, and milestones.
  • Added upgEffect, buyableEffect, and challEffect functions.
  • Added "hide completed challenges" setting.
  • Moved old changelogs to a separate place.
  • Fixed hasMilestone and incr_order.
  • Static layers now show the currency amount needed for the next one if you can buy max.

v1.2.4 - 10/4/20

  • Layers are now highlighted if you can buy an upgrade, and a new feature, shouldNotify, lets you make it highlight other ways.
  • Fixed bugs with hasUpg, hasChall, hasMilestone, and inChallenge.
  • Changed the sample code to use the above functions for convenience.

v1.2.3 - 10/3/20

  • Added a row component, which displays a list of objects in a row.
  • Added a column component, which displays a list of objects in a column (useful within a row).
  • Changed blanks to have a customizable width and height.

v1.2: This Changes Everything! - 10/3/20

  • Many layer features can now be static values or functions. (This made some formats change, which will break old things)
  • You can now use the "this" keyword, to make code easier to transfer when making new layers.
  • Also added "this.layer", which is the current layer's name, and works on existing subfeatures (e.g. individual upgrades) as well! Subfeatures also have "this.id".
  • Fixed a big save issue. If you use a unique mod id, your save will never conflict with other mods.
  • Added a configurable offline time limit in modinfo at the top of index.html. (default 1 hour)
  • Added a few minor features, and updated the docs with new information.

v1.1.1:

  • You can define hotkeys directly from layer config.

v1.1: Enhanced Edition

  • Added "Buyables", which can function like Space Buildings or Enhancers.
  • Custom CSS can now be used on any component! Make the third argument an object with CSS parameters.
  • Lots of minor good things.

v1.0:

  • First release.
- + diff --git a/public/lit/docs/!general-info/index.html b/public/lit/docs/!general-info/index.html index cd9c2ffb..9caf71b1 100644 --- a/public/lit/docs/!general-info/index.html +++ b/public/lit/docs/!general-info/index.html @@ -22,7 +22,7 @@
On this page

The-Modding-Tree

The main way to add content is through creating layers. You can either add a layer directly in the layers object in layerSupport.js, or declare it in another file and register it by calling addLayer(layername, layerdata). There is an example layer registration in layers.js showing the recommended method. It is just an example and can be freely deleted. You can also use it as a reference or a base for your own layers.

The first thing you need to do is fill out the modInfo object at the top of mod.js to set your mod's name, ID (a string), and other information. A unique modId will prevent your mod's saves from conflicting with other mods. Note that changing this after people have started playing will reset their saves.

Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to, for example to add new Vue components in v.js.

The Modding Tree uses break_eternity.js to store large values. This means that many numbers are Decimal objects, and must be treated differently. For example, you have to use new Decimal(x) to create a Decimal value instead of a plain number, and perform operations on them by calling functions. e.g, instead of x = x + y, use x = x.add(y). Keep in mind this also applies to comparison operators, which should be replaced with calling the .gt, .gte, .lt, .lte, .eq, and .neq functions. See the break_eternity.js docs for more details on working with Decimal values.

Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.

All display text can use basic HTML elements (But you can't use most Vue features there).

While reading this documentation, the following key will be used when describing features:

  • No label: This is required and the game may crash if it isn't included.
  • sometimes required: This is may be required, depending on other things in the layer.
  • optional: You can leave this out if you don't intend to use that feature for the layer.
  • assigned automagically: This value will be set automatically and override any value you set.
  • deprecated: This feature is not recommended to be used anymore, and may be removed in future versions of TMT.

Table of Contents

General

  • Getting Started: Getting your own copy of the code set up with Github Desktop.
  • Main mod info: How to set up general things for your mod in mod.js.
  • Basic layer breakdown: Breaking down the components of a layer with minimal features.
  • Layer features: Explanations of all of the different properties that you can give a layer.
  • Custom Tab Layouts: An optional way to give your tabs a different layout. You can even create entirely new components to use.
  • Custom game layouts: You can get rid of the tree tab, add buttons and other things to the tree, or even customize the tab's layout like a layer tab.
  • Updating TMT: Using Github Desktop to update your mod's version of TMT.

Common components

  • Upgrades: How to create upgrades for a layer.
  • Milestones: How to create milestones for a layer.
  • Buyables: Create rebuyable upgrades for your layer (with the option to make them respec-able). Can be used to make Enhancers or Space Buildings.
  • Clickables: A more generalized variant of buyables, for any kind of thing that is sometimes clickable. Between these and Buyables, you can do just about anything.

Other components and features

  • Challenges: How to create challenges for a layer.
  • Bars: Display some information as a progress bar, gauge, or similar. They are highly customizable, and can be horizontal and vertical as well.
  • Subtabs and Microtabs: Create subtabs for your tabs, as well as "microtab" components that you can put inside the tabs. You can even use them to embed a layer inside another layer!
  • Achievements: How to create achievements for a layer (or for the whole game).
  • Infoboxes: Boxes containing text that can be shown or hidden.
  • Trees: Make your own trees. You can make non-layer button nodes too!
- + diff --git a/public/lit/docs/achievements/index.html b/public/lit/docs/achievements/index.html index fd5ef34a..b80d87f5 100644 --- a/public/lit/docs/achievements/index.html +++ b/public/lit/docs/achievements/index.html @@ -31,7 +31,7 @@ etc }

Each achievement should have an id where the first digit is the row and the second digit is the column.

Individual achievement can have these features:

  • name: optional. displayed at the top of the achievement. The only visible text. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the achievement should be awarded.

  • tooltip: Default tooltip for the achievement, appears when it is hovered over. Should convey the goal and any reward for completing the achievement. It can also be a function that returns updating text. Can use basic HTML. Setting this to "" disables the tooltip.

  • effect(): optional. A function that calculates and returns the current values of any bonuses from the achievement. Can return a value or an object containing multiple values.

  • unlocked(): optional. A function returning a bool to determine if the achievement is visible or not. Default is unlocked.

  • onComplete() - optional. this function will be called when the achievement is completed.

  • image: optional, puts the image from the given URL (relative or absolute) in the achievement

  • style: optional. Applies CSS to this achievement, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • textStyle: optional. Applies CSS to the text, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the achievement was stored under, for convenient access. The achievement in the example's id is 11.

  • goalTooltip: optional, deprecated. Appears when the achievement is hovered over and locked, overrides the basic tooltip. This is to display the goal (or a hint). It can also be a function that returns updating text. Can use basic HTML.

  • doneTooltip: optional, deprecated. Appears when the achievement is hovered over and completed, overrides the basic tooltip. This can display what the player achieved (the goal), and the rewards, if any. It can also be a function that returns updating text. Can use basic HTML.

Disable achievement popups by adding achievementsPopups: false to the layer.

- + diff --git a/public/lit/docs/bars/index.html b/public/lit/docs/bars/index.html index c5af71b4..5c3fc1c6 100644 --- a/public/lit/docs/bars/index.html +++ b/public/lit/docs/bars/index.html @@ -32,7 +32,7 @@ etc }

Features:

  • direction: UP, DOWN, LEFT, or RIGHT (not strings). Determines the direction that the bar is filled as it progresses. RIGHT means from left to right.

  • width, height: The size in pixels of the bar, but as numbers (no "px" at the end).

  • progress(): A function that returns the portion of the bar that is filled, from "empty" at 0 to "full" at 1, updating automatically. (Nothing bad happens if the value goes out of these bounds, and it can be a number or Decimal)

  • display(): optional. A function that returns text to be displayed on top of the bar, can use HTML.

  • unlocked(): optional. A function returning a bool to determine if the bar is visible or not. Default is unlocked.

  • baseStyle, fillStyle, borderStyle, textStyle: Optional, Apply CSS to the unfilled portion, filled portion, border, and display text on the bar, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".

- + diff --git a/public/lit/docs/basic-layer-breakdown/index.html b/public/lit/docs/basic-layer-breakdown/index.html index 08129361..02b36bff 100644 --- a/public/lit/docs/basic-layer-breakdown/index.html +++ b/public/lit/docs/basic-layer-breakdown/index.html @@ -50,7 +50,7 @@ layerShown() { return true } // Returns a bool for if this layer's node should be visible in the tree. }) - + diff --git a/public/lit/docs/buyables/index.html b/public/lit/docs/buyables/index.html index 676fdefc..ec087764 100644 --- a/public/lit/docs/buyables/index.html +++ b/public/lit/docs/buyables/index.html @@ -37,7 +37,7 @@ etc }

Features:

  • title: optional. displayed at the top in a larger font. It can also be a function that returns updating text.

  • cost(): cost for buying the next buyable. Can have an optional argument "x" to calculate the cost of the x+1th object, but needs to use "current amount" as a default value for x. (x is a Decimal). Can return an object if there are multiple currencies.

  • effect(): optional. A function that calculates and returns the current values of bonuses of this buyable. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the buyable after the title, likely including the description, amount bought, cost, and current effect. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the buyable is visible or not. Default is unlocked.

  • canAfford(): A function returning a bool to determine if you can buy one of the buyables.

  • buy(): A function that implements buying one of the buyable, including spending the currency.

  • buyMax(): optional. A function that implements buying as many of the buyable as possible.

  • style: optional. Applies CSS to this buyable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the buyable was stored under, for convenient access. The buyable in the example's id is 11.

Sell One/Sell All:

Including a sellOne or sellAll function will cause an additional button to appear beneath the buyable. They are functionally identical, but "sell one" appears above "sell all". You can also use them for other things.

  • sellOne/sellAll(): optional. Called when the button is pressed. The standard use would be to decrease/reset the amount of the buyable, and possibly return some currency to the player.

  • canSellOne/canSellAll(): optional. booleans determining whether or not to show the buttons. If "canSellOne/All" is absent but "sellOne/All" is present, the appropriate button will always show.

- + diff --git a/public/lit/docs/challenges/index.html b/public/lit/docs/challenges/index.html index 77b57836..05687bc0 100644 --- a/public/lit/docs/challenges/index.html +++ b/public/lit/docs/challenges/index.html @@ -33,7 +33,7 @@ etc }

Each challenge should have an id where the first digit is the row and the second digit is the column.

Individual Challenges can have these features:

  • name: Name of the challenge, can be a string or a function. Can use basic HTML.

  • challengeDescription: A description of what makes the challenge a challenge. You will need to implement these elsewhere. It can also be a function that returns updating text. Can use basic HTML.

  • goalDescription: A description of the win condition for the challenge. It can also be a function that returns updating text. Can use basic HTML. (Optional if using the old goal system)

  • canComplete(): A function that returns true if you meet the win condition for the challenge. Returning a number will allow bulk completing the challenge. (Optional if using the old goal system)

  • rewardDescription: A description of the reward's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • rewardEffect(): optional. A function that calculates and returns the current values of any bonuses from the reward. Can return a value or an object containing multiple values. Can use basic HTML.

  • rewardDisplay(): optional. A function that returns a display of the current effects of the reward with formatting. Default behavior is to just display the a number appropriately formatted.

  • fullDisplay(): OVERRIDE. Overrides the other displays and descriptions, and lets you set the full text for the challenge. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the challenge is visible or not. Default is unlocked.

  • onComplete() - optional. this function will be called when the challenge is completed when previously incomplete.

  • countsAs: optional. If a challenge combines the effects of other challenges in this layer, you can use this. An array of challenge ids. The player is effectively in all of those challenges when in the current one.

  • completionLimit: optional. the amount of times you can complete this challenge. Default is 1 completion.

  • style: optional. Applies CSS to this challenge, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: assigned automagically. It's the "key" which the challenge was stored under, for convenient access. The challenge in the example's id is 11.

The old goal system uses these features:

  • goal: deprecated, A Decimal for the amount of currency required to beat the challenge. By default, the goal is in basic Points. The goal can also be a function if its value changes.

  • currencyDisplayName: deprecated. the name to display for the currency for the goal

  • currencyInternalName: deprecated. the internal name for that currency

  • currencyLayer: deprecated. the internal name of the layer that currency is stored in. If it's not in a layer, omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation(): deprecated. if your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

- + diff --git a/public/lit/docs/clickables/index.html b/public/lit/docs/clickables/index.html index f7e8366a..30e7d308 100644 --- a/public/lit/docs/clickables/index.html +++ b/public/lit/docs/clickables/index.html @@ -31,7 +31,7 @@ etc }

Features:

  • title: optional. displayed at the top in a larger font. It can also be a function that returns updating text.

  • effect(): optional. A function that calculates and returns the current values of bonuses of this clickable. Can return a value or an object containing multiple values.

  • display(): A function returning everything that should be displayed on the clickable after the title, likely changing based on its state. Can use basic HTML.

  • unlocked(): optional. A function returning a bool to determine if the clickable is visible or not. Default is unlocked.

  • canClick(): A function returning a bool to determine if you can click the clickable.

  • onClick(): A function that implements clicking one of the clickable.

  • style: optional. Applies CSS to this clickable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the clickable was stored under, for convenient access. The clickable in the example's id is 11.

You can also use these features on the clickables object to add a button above all the clickables, for implementing a respec button or similar.

  • masterButtonPress(): optional. If present, an additional button will appear above the clickables. Pressing it will call this function.

  • masterButtonText: optional. Text to display on the Master Button.

  • showMasterButton(): optional. A function determining whether or not to show the button. Defaults to true if absent.

- + diff --git a/public/lit/docs/custom-tab-layouts/index.html b/public/lit/docs/custom-tab-layouts/index.html index 645ae714..91c5b9fc 100644 --- a/public/lit/docs/custom-tab-layouts/index.html +++ b/public/lit/docs/custom-tab-layouts/index.html @@ -36,7 +36,7 @@ "upgrades" ]

It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) applies a CSS style to it with a "CSS object", where the keys are CSS attributes.

These are the existing components, but you can create more in components.js:

  • display-text: Displays some text (can use basic HTML). The argument is the text to display. It can also be a function that returns updating text.

  • raw-html: Displays some basic HTML, can also be a function.

  • blank: Adds empty space. The default dimensions are 8px x 17px. The argument changes the dimensions. If it's a single value (e.g. "20px"), that determines the height. If you have a pair of arguments, the first is width and the second is height.

  • row: Display a list of components horizontally. The argument is an array of components in the tab layout format.

  • column: Display a list of components vertically. The argument is an array of components in the tab layout format. This is useful to display columns within a row.

  • main-display: The text that displays the main currency for the layer and its effects.

  • resource-display: The text that displays the currency that this layer is based on, as well as the best and/or total values for this layer's prestige currency (if they are put in startData for this layer).

  • prestige-button: The argument is a string that the prestige button should say before the amount of currency you will gain. It can also be a function that returns updating text.

  • upgrades: The layer's upgrades. The argument is optional, and is a the list of rows this component should include, if it doesn't have all of them.

  • milestones, challenges, achievements: Display the upgrades, milestones, and challenges for a layer, as appropriate.

  • buyables, clickables: Display all of the buyables/clickables for this layer, as appropriate. The argument is optional and is the size of the boxes in pixels.

  • microtabs: Display a set of subtabs for an area. The argument is the name of the set of microtabs in the "microtabs" feature.

  • bar: Display a bar. The argument is the id of the bar to display.

  • infobox: Display an infobox. The argument is the id of the infobox to display.

  • tree: Displays a tree. The argument is an array of arrays containing the names of the nodes in the tree (first by row, then by column) See here for more information on tree layouts and nodes!

  • toggle: A toggle button that toggles a bool value. The data is a pair that identifies what bool to toggle, e.g. [layer, id]

The rest of the components are sub-components. They can be used just like other components, but are typically part of another component.

  • upgrade, milestone, challenge, buyable, clickable, achievement: An individual upgrade, challenge, etc. The argument is the id. This can be used if you want to have upgrades split up across multiple subtabs, for example.

  • respec-button, master-button: The respec and master buttons for buyables and clickables, respectively.

  • sell-one, sell-all: The "sell one" and "sell all" for buyables, respectively. The argument is the id of the buyable.

- + diff --git a/public/lit/docs/getting-started/index.html b/public/lit/docs/getting-started/index.html index 37cc289f..26f8bd57 100644 --- a/public/lit/docs/getting-started/index.html +++ b/public/lit/docs/getting-started/index.html @@ -22,7 +22,7 @@
On this page

Getting started

Welcome to The Modding Tree!

Using the Modding Tree, at its simplest level, just requires getting a copy of it onto your computer. However, if you do it the right way, it will help in many ways.

Don't let the word "Github" scare you away. It's actually much easier to use than most people think, especially because most people use it the hard way. The key is Github Desktop, which lets you do everything you need to, without even touching the command line.

The benefits of using Github:

  • It makes it much, much easier to update The Modding Tree.
  • You can share your work without any extra effort using githack, or with a bit more effort, set up a github.io site.
  • It lets you undo changes to your code, and to have multiple versions of it.
  • It lets you collaborate with other people, if you want to.

Getting set up with Github Desktop, Visual Studio Code, and The Modding Tree:

  1. Install Github Desktop and Visual Studio Code.

  2. Make a Github account. You can handle this on your own.

  3. Log in on your browser, and go back to The Modding Tree page. At the top right, there should be a button that says "fork". Click on it, and then on your username. You now have your own fork, or copy, of The Modding Tree.

  4. Open Github Desktop and log in. Ignore everything else and choose "clone a repository". A "repository" is basically a "Github project", like The Modding Tree. "Cloning" is downloading a copy of the repository to your computer.

  5. Look for The Modding Tree in the list of repositiories (it should be the only one) and click "clone".

  6. Select that you're using it for your own purposes, and click continue. It will download the files and handle everything.

Using your repository

  1. Click on "show in explorer/finder" to the right, and then open the index.html file in the folder. The page should open up on your browser. This will let you view and test your project locally!

  2. To edit your project, click "open in VSCode" in Github Desktop.

  3. Open mod.js in VSCode, and look at the top part where it has a "modInfo" object. Fill in your mod's name to whatever you want, and change the id as well. (It can be any string value, and it's used to determine where the savefile is. Make it something that's probably unique, and don't change it again later or else it'll effectively wipe existing saves)

  4. Save mod.js, and then reload index.html in your browser. The title on the tab, as well as on the info page, will now be updated! You can reload the page every time you change the code to test it quickly and easily.

  5. Go back to Github Desktop. It's time to save your changes into the git system by making a "commit". This basically saves your work and creates a snapshot of what your code looks like at this moment, allowing you to look back at it later.

  6. At the bottom right corner, add a summary of your changes, and then click "commit to master".

  7. Finally, at the top middle, click "push origin" to push your changes out onto the online repository.

  8. You can view your project on line, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html

And now, you have successfully used Github! You can look at the documentation to see how The Modding Tree's system works and to make your mod a reality.

- + diff --git a/public/lit/docs/infoboxes/index.html b/public/lit/docs/infoboxes/index.html index 7ea74856..ae57d4a7 100644 --- a/public/lit/docs/infoboxes/index.html +++ b/public/lit/docs/infoboxes/index.html @@ -30,7 +30,7 @@ etc }

Features:

  • title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.

  • body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.

  • style, titleStyle, bodyStyle: optional. Apply CSS to the infobox, or to the title button or body of the infobox, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • unlocked(): optional. A function returning a bool to determine if the infobox is visible or not. Default is unlocked.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar

  • id: assigned automagically. It's the "key" which the bar was stored under, for convenient access. The infobox in the example's id is "lore".

- + diff --git a/public/lit/docs/layer-features/index.html b/public/lit/docs/layer-features/index.html index 6e442169..9c6c93bd 100644 --- a/public/lit/docs/layer-features/index.html +++ b/public/lit/docs/layer-features/index.html @@ -33,7 +33,7 @@ "prestige-button"() { return {'color': '#AA66AA'} } }

Custom Prestige type

(All of these can also be used by other prestige types)

  • getResetGain(): mostly for custom prestige type. Returns how many points you should get if you reset now. You can call getResetGain(this.layer, useType = "static") or similar to calculate what your gain would be under another prestige type (provided you have all of the required features in the layer).

  • getNextAt(canMax=false): mostly for custom prestige type. Returns how many of the base currency you need to get to the next point. canMax is an optional variable used with Static-ish layers to differentiate between if it's looking for the first point you can reset at, or the requirement for any gain at all (Supporting both is good). You can also call getNextAt(this.layer, canMax=false, useType = "static") or similar to calculate what your next at would be under another prestige type (provided you have all of the required features in the layer).

  • canReset(): mostly for custom prestige type. Return true only if you have the resources required to do a prestige here.

  • prestigeNotify(): mostly for custom prestige types, returns true if this layer should be subtly highlighted to indicate you can prestige for a meaningful gain.

- + diff --git a/public/lit/docs/main-mod-info/index.html b/public/lit/docs/main-mod-info/index.html index 6e33c32f..5bec3451 100644 --- a/public/lit/docs/main-mod-info/index.html +++ b/public/lit/docs/main-mod-info/index.html @@ -28,7 +28,7 @@ happiness: new Decimal(72), }}
  • displayThings: An array of functions used to display extra things at the top of the tree tab. Each function returns a string, which is a line to display (with basic HTML support). If a function returns nothing, nothing is displayed (and it doesn't take up a line).

  • isEndgame(): A function to determine if the player has reached the end of the game, at which point the "you win!" screen appears.

Less important things beyond this point!

  • maxTickLength(): Returns the maximum tick length, in milliseconds. Only really useful if you have something that reduces over time, which long ticks mess up (usually a challenge).
- + diff --git a/public/lit/docs/milestones/index.html b/public/lit/docs/milestones/index.html index 49f6f75f..f055ce21 100644 --- a/public/lit/docs/milestones/index.html +++ b/public/lit/docs/milestones/index.html @@ -30,7 +30,7 @@ etc }

You can use hasMilestone(layer, id) to determine if the player has a given milestone

Milestone features:

  • requirementDescription: A string describing the requirement for unlocking this milestone. Suggestion: Use a "total". It can also be a function that returns updating text. Can use basic HTML.

  • effectDescription: A string describing the reward for having the milestone. You will have to implement the reward elsewhere. It can also be a function that returns updating text. Can use basic HTML.

  • done(): A function returning a boolean to determine if the milestone should be awarded.

  • toggles: optional. Creates toggle buttons that appear on the milestone when it is unlocked. The toggles can toggle a given boolean value in a layer. It is defined as an array of paired items, one pair per toggle. The first is the internal name of the layer the value being toggled is stored in, and the second is the internal name of the variable to toggle. (e.g. [["b", "auto"], ["g", "auto"])

    Tip: Toggles are not de-set if the milestone becomes locked! In this case, you should also check if the player has the milestone.

  • style: optional. Applies CSS to this milestone, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • unlocked(): optional. A function returning a boolean to determine if the milestone should be shown. If absent, it is always shown.

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the milestone was stored under, for convenient access. The milestone in the example's id is 0.

Disaable milestone popups by adding milestonePopups: false to the layer.

- + diff --git a/public/lit/docs/subtabs-and-microtabs/index.html b/public/lit/docs/subtabs-and-microtabs/index.html index 6a75404c..f53eed88 100644 --- a/public/lit/docs/subtabs-and-microtabs/index.html +++ b/public/lit/docs/subtabs-and-microtabs/index.html @@ -48,7 +48,7 @@ } }

Normal subtabs and microtab subtabs both use the same features:

Features:

  • content: The tab layout code for the subtab, in the tab layout format.

  • style: optional. Applies CSS to the whole subtab when switched to, in the form of an "CSS Object", where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • buttonStyle: optional. A CSS object, which affects the appearance of the button for that subtab.

  • unlocked(): optional. a function to determine if the button for this subtab should be visible. By default, a subtab is always unlocked. You can't use the "this" keyword in this function.

  • shouldNotify(): optional, if true, the tab button will be highlighted to notify the player that there is something there.

  • embedLayer: SIGNIFICANT, the id of another layer. If you have this, it will override "content", "style" and "shouldNotify", instead displaying the entire layer in the subtab.

- + diff --git a/public/lit/docs/trees-and-tree-customization/index.html b/public/lit/docs/trees-and-tree-customization/index.html index edafb6ac..37b1cc49 100644 --- a/public/lit/docs/trees-and-tree-customization/index.html +++ b/public/lit/docs/trees-and-tree-customization/index.html @@ -25,7 +25,7 @@ ["left", "blank", "right", "blank"] ["a", "b", "blank", "c", "weirdButton"]]

Nodes

Nodes are non-layer buttons that can go in trees. They are defined similarly to layers, but with addNode instead of addLayer.

Features:

  • color: optional, The node's color. (A string in hex format with a #)

  • symbol: optional The text on the button (The id capitalized by default)

  • canClick(): Returns true if the player can click the node. ()

  • onClick(): The function called when the node is clicked.

  • layerShown(): optional, A function returning a bool which determines if this node should be visible. It can also return "ghost", which will hide the layer, but its node will still take up space in its tree.

  • branches: optional. An array of layer/node ids. On a tree, a line will appear from this node to all of the nodes in the list. Alternatively, an entry in the array can be a 2-element array consisting of the id and a color value. The color value can either be a string with a hex color code, or a number from 1-3 (theme-affected colors).

  • nodeStyle: optional. A CSS object, where the keys are CSS attributes, which styles this node on the tree.

  • tooltip() / tooltipLocked(): optional. Functions that return text, which is the tooltip for the node when the layer is unlocked or locked, respectively. By default the tooltips behave the same as in the original Prestige Tree.

  • row: optional, the row that this node appears in (for the default tree).

  • position: optional, Determines the horizontal position of the layer in its row in a default tree. By default, it uses the id, and layers/nodes are sorted in alphabetical order.

- + diff --git a/public/lit/docs/updating-tmt/index.html b/public/lit/docs/updating-tmt/index.html index 404a92fd..444b75b8 100644 --- a/public/lit/docs/updating-tmt/index.html +++ b/public/lit/docs/updating-tmt/index.html @@ -22,7 +22,7 @@
On this page

Updating The Modding Tree

This tutorial assumes that you have used the Getting Started Tutorial, and are using Github Desktop and VSCode for your mod.

Here's what you have to do when there's a TMT update:

  1. Look at the changelog. It will warn you if the update will break anything or require any changes. Decide if you want to try to update.

  2. Open Github Desktop, and at the top middle, click "fetch origin". This will make Github Desktop get information about the update.

  3. Click where it says "current branch: master" at the top middle, and at the bottom of the thing that appears, click "choose a branch to merge into master".

  4. Select upstream/master. It will likely say there are conflicts, but you have tools to resolve them. Click "Merge upstream/master into master".

  5. A conflict happens when the things you're trying to merge have both made changes in the same place. Click "open in Visual Studio Code" next to the first file.

  6. Scroll down through the file, and look for the parts highlighted in red and green. One of these is your code, and the other is some code that will be modified by the update. Do your best to try to edit things to keep the updated changes, but keep your content.

  7. Continue to do this for all remaining changes.

  8. Do any other changes required by the update, run the game, fix issues, etc.

- + diff --git a/public/lit/docs/upgrades/index.html b/public/lit/docs/upgrades/index.html index ed93c503..019de432 100644 --- a/public/lit/docs/upgrades/index.html +++ b/public/lit/docs/upgrades/index.html @@ -32,7 +32,7 @@ etc }

Each upgrade should have an id where the first digit is the row and the second digit is the column.

Individual upgrades can have these features:

  • title: optional. Displayed at the top in a larger font. It can also be a function that returns updating text. Can use basic HTML.

  • description: A description of the upgrade's effect. You will also have to implement the effect where it is applied. It can also be a function that returns updating text. Can use basic HTML.

  • effect(): optional. A function that calculates and returns the current values of any bonuses from the upgrade. Can return a value or an object containing multiple values.

  • effectDisplay(): optional. A function that returns a display of the current effects of the upgrade with formatting. Default displays nothing. Can use basic HTML.

  • fullDisplay(): OVERRIDE. Overrides the other displays and descriptions, and lets you set the full text for the upgrade. Can use basic HTML.

  • cost: A Decimal for the cost of the upgrade. By default, upgrades cost the main prestige currency for the layer.

  • unlocked(): optional. A function returning a bool to determine if the upgrade is visible or not. Default is unlocked.

  • onPurchase(): optional. This function will be called when the upgrade is purchased. Good for upgrades like "makes this layer act like it was unlocked first".

  • style: optional. Applies CSS to this upgrade, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).

  • layer: assigned automagically. It's the same value as the name of this layer, so you can do player[this.layer].points or similar.

  • id: assigned automagically. It's the "key" which the upgrade was stored under, for convenient access. The upgrade in the example's id is 11.

By default, upgrades use the main prestige currency for the layer. You can include these to change them (but it needs to be a Decimal):

  • currencyDisplayName: optional. The name to display for the currency for the upgrade.

  • currencyInternalName: optional. The internal name for that currency.

  • currencyLayer: optional. The internal name of the layer that currency is stored in. If it's not in a layer (like Points), omit. If it's not stored directly in a layer, instead use the next feature.

  • currencyLocation: optional. If your currency is stored in something inside a layer (e.g. a buyable's amount), you can access it this way. This is a function returning the object in "player" that contains the value (like player[this.layer].buyables)

If you want to do something more complicated like upgrades that cost two currencies, you can override the purchase system with these (and you need to use fullDisplay as well)

  • canAfford(): OVERRIDE, a function determining if you are able to buy the upgrade

  • pay(): OVERRIDE, a function that reduces your currencies when you buy the upgrade

- +